CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

[rhoCentralFoam] simulating compressible inviscid flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2014, 11:24
Default [rhoCentralFoam] simulating compressible inviscid flow
  #1
New Member
 
Yuval
Join Date: Jul 2014
Location: Munich, Germany
Posts: 3
Rep Power: 12
Yuval is on a distinguished road
Hi,

I'm trying to simulate a compressible inviscid flow through a de-laval nozzle into vacuum.
Later I will want to add viscosity to the simulation but for now I want to get inviscid results.
For that purpose I tried setting the thermophysicalProperties dictionary with a janaf model to have Cp changed with temperature and since janaf model has to to go with sutherland's model for transport, and since I want an invscid flow, I set As=Ts=0 to have zero viscosity. Here is my file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;     /*const;*/
    thermo          janaf;		/*hConst;*/
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
//H2O
{
    specie
    {
        nMoles          1;
        molWeight       18.0153;
    }
    thermodynamics //from http://www2.galcit.caltech.edu/EDL/public/thermo/nasadat
    {
        Tlow            200;
        Thigh           6000;
        Tcommon         1000;
        highCpCoeffs    (2.67703787 2.97318329E-03 -7.73769690E-07 9.44336689E-11 -4.26900959E-15 -2.98858938E+04 6.88255571);
        lowCpCoeffs     (4.19864056 -2.03643410E-03 6.52040211E-06 -5.48797062E-09 1.77197817E-12 -3.02937267E+04 -8.49032208E-01); 
	 	//Cp				2609; // for T=1500K 		from http://www.engineeringtoolbox.com/water-vapor-d_979.html
		//Hf				0; //3.34e5;
    }
    transport //from http://labspace.open.ac.uk/file.php/6999/t236_1_b2_unit03.pdf pg. 14 (constants applicable for temprature range 0-523 K
    {
        As              0;	//1.383e-06;
        Ts              0;	//405.5;
	//mu		 0; 
       	//Pr            1;
    }
}


// ************************************************************************* //
I saw that in the rhoCentralFoam tutorial for inviscid flows (e.g forwardStep) the flow was simulated as inviscid by setting mu=0 in the transport part of the dictionary, although there they used Const model for the transport. So I figured it should work similarly for the Sutherland model by setting the As, Ts coefficients to 0.

But the simulation crashes after sometime with the following error:

Code:
Mean and max Courant Numbers = 714.712961755555 7526243.04395094
deltaT = 1.29974885066034e-150
--> FOAM Warning :
From function Time::operator++()
in file db/Time/Time.C at line 1055
Increased the timePrecision from 1883 to 1884 to distinguish between timeNames at time 0.0409300097404806
Time = 0.040930009740480610691548690738272853195667266845703125

[1] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #2   in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #1  Foam::sigFpe::sigHandler(int) in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3  Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #2   in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #4   in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3  Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #4   in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[0] #5
void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&)[0]  at rhoCentralFoam.C:0
[0] #6   in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[1] #5

[0]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[0] #7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #8  [1]  at rhoCentralFoam.C:0
[1] #6
[0]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[LRT:20892] *** Process received signal ***
[LRT:20892] Signal: Floating point exception (8)
[LRT:20892] Signal code:  (-6)
[LRT:20892] Failing at address: 0x3e80000519c
[LRT:20892] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36150) [0x7f637fa55150]
[LRT:20892] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f637fa550d5]
[LRT:20892] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x36150) [0x7f637fa55150]
[LRT:20892] [ 3] /opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam8multiplyERNS_5FieldIdEERKNS_5UListIdEES6_+0xe6) [0x7f6380ce92a6]
[LRT:20892] [ 4] rhoCentralFoam(_ZN4Foam8multiplyINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3e) [0x44b4ae]
[LRT:20892] [ 5] rhoCentralFoam() [0x432b8f]
[LRT:20892] [ 6] rhoCentralFoam() [0x42406c]
[LRT:20892] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f637fa4076d]
[LRT:20892] [ 8] rhoCentralFoam() [0x42ba3d]
[LRT:20892] *** End of error message ***

[1]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[1] #7  __libc_start_main--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 20892 on node LRT exited on signal 8 (Floating point exception).
--------------------------------------------------------------------------
Killing PID 20885
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/20885/status'
When I set the values of the As, Ts coefficients to other values (commented out in my code snippet) the simulation runs, although I get obviously wrong results...

I'm a bit confused. My turbulenceProperties is obviously also set to laminar.

Could someone please help me?

Thanks a lot in advance!

Yuval.

P.S. If more information is needed pls let me know...
Yuval is offline   Reply With Quote

Old   January 27, 2016, 16:46
Default
  #2
New Member
 
Mr.liu
Join Date: Sep 2012
Posts: 27
Rep Power: 14
lx882211 is on a distinguished road
Quote:
Originally Posted by Yuval View Post
Hi,

I'm trying to simulate a compressible inviscid flow through a de-laval nozzle into vacuum.
Later I will want to add viscosity to the simulation but for now I want to get inviscid results.
For that purpose I tried setting the thermophysicalProperties dictionary with a janaf model to have Cp changed with temperature and since janaf model has to to go with sutherland's model for transport, and since I want an invscid flow, I set As=Ts=0 to have zero viscosity. Here is my file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;     /*const;*/
    thermo          janaf;		/*hConst;*/
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
//H2O
{
    specie
    {
        nMoles          1;
        molWeight       18.0153;
    }
    thermodynamics //from http://www2.galcit.caltech.edu/EDL/public/thermo/nasadat
    {
        Tlow            200;
        Thigh           6000;
        Tcommon         1000;
        highCpCoeffs    (2.67703787 2.97318329E-03 -7.73769690E-07 9.44336689E-11 -4.26900959E-15 -2.98858938E+04 6.88255571);
        lowCpCoeffs     (4.19864056 -2.03643410E-03 6.52040211E-06 -5.48797062E-09 1.77197817E-12 -3.02937267E+04 -8.49032208E-01); 
	 	//Cp				2609; // for T=1500K 		from http://www.engineeringtoolbox.com/water-vapor-d_979.html
		//Hf				0; //3.34e5;
    }
    transport //from http://labspace.open.ac.uk/file.php/6999/t236_1_b2_unit03.pdf pg. 14 (constants applicable for temprature range 0-523 K
    {
        As              0;	//1.383e-06;
        Ts              0;	//405.5;
	//mu		 0; 
       	//Pr            1;
    }
}


// ************************************************************************* //
I saw that in the rhoCentralFoam tutorial for inviscid flows (e.g forwardStep) the flow was simulated as inviscid by setting mu=0 in the transport part of the dictionary, although there they used Const model for the transport. So I figured it should work similarly for the Sutherland model by setting the As, Ts coefficients to 0.

But the simulation crashes after sometime with the following error:

Code:
Mean and max Courant Numbers = 714.712961755555 7526243.04395094
deltaT = 1.29974885066034e-150
--> FOAM Warning :
From function Time::operator++()
in file db/Time/Time.C at line 1055
Increased the timePrecision from 1883 to 1884 to distinguish between timeNames at time 0.0409300097404806
Time = 0.040930009740480610691548690738272853195667266845703125

[1] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #2   in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #1  Foam::sigFpe::sigHandler(int) in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3  Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #2   in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #4   in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3  Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[1] #4   in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[0] #5
void Foam::multiply<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&)[0]  at rhoCentralFoam.C:0
[0] #6   in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[1] #5

[0]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[0] #7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #8  [1]  at rhoCentralFoam.C:0
[1] #6
[0]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[LRT:20892] *** Process received signal ***
[LRT:20892] Signal: Floating point exception (8)
[LRT:20892] Signal code:  (-6)
[LRT:20892] Failing at address: 0x3e80000519c
[LRT:20892] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36150) [0x7f637fa55150]
[LRT:20892] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f637fa550d5]
[LRT:20892] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x36150) [0x7f637fa55150]
[LRT:20892] [ 3] /opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam8multiplyERNS_5FieldIdEERKNS_5UListIdEES6_+0xe6) [0x7f6380ce92a6]
[LRT:20892] [ 4] rhoCentralFoam(_ZN4Foam8multiplyINS_13fvsPatchFieldENS_11surfaceMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0x3e) [0x44b4ae]
[LRT:20892] [ 5] rhoCentralFoam() [0x432b8f]
[LRT:20892] [ 6] rhoCentralFoam() [0x42406c]
[LRT:20892] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f637fa4076d]
[LRT:20892] [ 8] rhoCentralFoam() [0x42ba3d]
[LRT:20892] *** End of error message ***

[1]  in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
[1] #7  __libc_start_main--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 20892 on node LRT exited on signal 8 (Floating point exception).
--------------------------------------------------------------------------
Killing PID 20885
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/20885/status'
When I set the values of the As, Ts coefficients to other values (commented out in my code snippet) the simulation runs, although I get obviously wrong results...

I'm a bit confused. My turbulenceProperties is obviously also set to laminar.

Could someone please help me?

Thanks a lot in advance!

Yuval.

P.S. If more information is needed pls let me know...
Have you solved your problem? i also want to get inviscid results using rhocentralFoam.
lx882211 is offline   Reply With Quote

Old   January 27, 2016, 22:33
Default
  #3
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,
There is a pretty simple answer to this, and as with most issues in OpenFOAM, just having a quick look at the source code will usually resolve things.

So, if you want inviscid, you need to have mu set less than or equal to 0. From createFields.H in the rhoCentralFoam solver directory:

Code:
bool inviscid(true);
if (max(mu.internalField()) > 0.0)
{
    inviscid = false;
}
Hope this helps!
Peter
opedrofunk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compressible flow maria teresa FLUENT 1 September 7, 2007 17:58
Convergence for inviscid flow over sylinder Rjakk Main CFD Forum 2 March 21, 2007 11:53
compressible flow computation amv Main CFD Forum 5 June 27, 2003 08:27
Boundary Layer created by Euler Solvers Jim Main CFD Forum 31 November 18, 2001 00:18
compressible channel flow.. R.D.Prabhu Main CFD Forum 0 July 17, 1998 18:23


All times are GMT -4. The time now is 06:37.