CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   [rhoCentralFoam] Crash in Nozzle Simulation (https://www.cfd-online.com/Forums/openfoam-solving/138192-rhocentralfoam-crash-nozzle-simulation.html)

maxmax June 30, 2014 08:25

[rhoCentralFoam] Crash in Nozzle Simulation
 
3 Attachment(s)
Hi, :)

I tried to compute a "simple" gas flow through a laval nozzle into vacuum, however the simulation crashes because of negative temperatures.

The simulations I want to run are 3D, but for the sake of simplicity I created a 2D version in which the same error occurs. I attached a picture of the nozzle geometry as well as the full case directory (including the blockMeshDict). The bottom in the picture is a symmetryplane, the top a wall, left is the inlet, right the outlet and front and back are of type 'empty'.

The inlet has a linear increase in pressure from 1e-6 Pa to 50 bar (5e+6 Pa) within 5e-6 s, and a pressureInletOutletVelocity. Everywhere else the initial pressure is 1e-6 Pa and zero velocity. What happens when the simulation runs is plotted in 'inlet.png' in the attachment. The pressure at the inlet constantly increases, as is the velocity, but the temperature quickly drops below zero which eventually crashes the simulation when calculating rhoCentralFoam.C:116
Code:

volScalarField c(sqrt(thermo.Cp()/thermo.Cv()*rPsi));
The simulation crashes within few picoseconds, at which the inlet pressure is about 10 Pa.

When the mesh resolution is increased, the simulation diverges earlier! The courant number was well below 1 in all cases that I tried to run, but this has no influence on the time of the crash.

I am confused what might cause the temperature to diverge so strongly and hope someone might have a clue of what is going wrong here. :)

Best regards,
Max

maHein June 30, 2014 09:45

Hello maxmax,

have you checked your thermophysicalProperties? It looks like they are normalized to speed of sound at 1m/s and 1K.

I'm not sure if you should therefore also adjust the pressure boundary conditions accordingly or simply use non-normalized values instead.

Regards,

Martin

maxmax July 1, 2014 05:43

Hi Martin,

thanks a lot for the quick reply! :)
I changed the thermophysical properties to non-normalized values, but the problem still persists. The temperature equally diverges to negative values. I hope that I did not missunderstand what you meant by non-normalized values. The values I used are
Code:

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


mixture
{
    specie
    {
        nMoles        1;
        molWeight    4; // H: 2.0; He: 4.0; Ar: 39.9; N: 32.0
    }
    thermodynamics
    {
        Cp        5.19e3; //heat capacity [J/(kgK)]: H: 14.304e3; He: 5.193e3; Ar: 0.52e3; N: 1.040e3
        Hf        5.23e6; //heat of fusion [J/kg]: H: 58.6e3; He: 5.23e3; N: 25.5e3; Ar:
    }
    transport
    {
        mu        0; // dynamic viscosity: He: 1.86e-5 Pas (at 20°C);
        Pr        0.66; // Prandtl number [Pr = c_p*mu/kappa] monoatomic gas: 0.66
    }
}

Best regards,
Max

maxmax July 7, 2014 07:43

Even with totalPressure and pressureInletOutletVelocity the simulation crashes.
I found that also the pressure becomes negative, at exactly the same time as the temperature becomes negative. I'm so confused... :confused:

maxmax July 14, 2014 11:19

Does no one have an idea? :(

maHein July 18, 2014 04:56

Sorry, I did not have any success either :-(

mckeee2 June 3, 2015 15:51

Hey maxmax,

This response has probably come too late. I noticed that the value for your heat of fusion is way too large: You quote:

Hf 5.23e6; //heat of fusion [J/kg]: H: 58.6e3; He: 5.23e3; N: 25.5e3; Ar:

your stated value in your comment was 5.23e3 for helium but you wrote 5.23e6.

Let me know if you found this please and got it working. Thanks!


All times are GMT -4. The time now is 18:57.