CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Problems when change the boundary conditions in rhoSimplicFoam tutorial example (https://www.cfd-online.com/Forums/openfoam/145983-problems-when-change-boundary-conditions-rhosimplicfoam-tutorial-example.html)

SylvainWang December 16, 2014 08:52

Problems when change the boundary conditions in rhoSimplicFoam tutorial example
 
Hello, Foamers;

I just begin to use OpenFOAM to do my thesis. Since my problem is a compressible case, so I'd like to choose the rhoSimplecFoam solver to solve it. In the tutorial example offered in the rhoSimplecFoam solver, it gives a mass flowrate inlet condition and pressure outlet condition. However, in my case, it should be a total pressure inlet condition and pressure outlet condition. Problem comes as I changed the boundary conditions of U and P after 3 iterations. The error messages are as following:
Quote:

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam::perfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam::perfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5
at ??:?
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
at ??:?
Floating point exception (core dumped)
and the new boundary conditions are
P
Code:

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 100000;

boundaryField
{
    Default_Boundary_Region
    {
        type            zeroGradient;
    }
    inlet
    {
        type            totalPressure;
        U              U;
        phi            phi;
        rho            none;
        psi            none;
        gamma          1.4;
        p0              uniform 200000;
    }
    outlet
    {
        type            inletOutlet;
        phi            phi;
        inletValue      uniform 100000;
        value          uniform 100000;
    }
}

U
Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    Default_Boundary_Region
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    inlet
    {
        type            pressureInletVelocity;
        phi            phi;
        rho            rho;
        value          uniform (0 0 0);
    }
    outlet
    {
        type            pressureInletOutletVelocity;
        phi            phi;
        value          uniform (0 0 0);
    }
}

The version I used is 2.3.0, from the error message, it seems that the errors comes from the thermal properties. Nevertheless, we should not encounter any errors when just change the velocity inlet boundary condition to a total pressure boundary condition. Is there any problems in the modified boundary conditions?

Endless appreciation if any foamers can help. Sylvain

tomf December 17, 2014 15:43

Hi Sylvain,

I think you should change your pressure boundary condition for the outlet to either a fixed static pressure or to outletInlet instead of inletOutlet. Look up their differences in the sourcecode!

Some hints:

Code:

$> cd $FOAM_SRC
$> find . -iname *inletoutlet*

If you have a supersonic outlet, zeroGradient or waveTransmissive may be better options.

You may also need to ramp your total pressure at the inlet over several iterations. I think some examples may be found on the forum.

Regards,
Tom


All times are GMT -4. The time now is 20:41.