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/)
-   -   simpleFoam and rhoSimpleFoam boundary conditions (https://www.cfd-online.com/Forums/openfoam-solving/250025-simplefoam-rhosimplefoam-boundary-conditions.html)

aneps May 22, 2023 13:00

simpleFoam and rhoSimpleFoam boundary conditions
 
Hello, I am a newbie to openfoam. After going though the tutorials, I am setting up a capillary gas flow where the inlet is at atmospheric pressure 101325 pascal and the outlet is at 300 pascal.

I know that the incomprssible simpleFoam use p/rho and compressible use absolute pressure. But I am not sure if the p and U settings I entered are correct. The simulation is running somehow, but I do not see mach cones, which are expected at the outlet of the capillary. It looks like a simple gas expansion. So I am worried about the boundary settings. Following are the boundary setting for simpleFoam and rhoSimpleFoam.

simpleFoam U:

Code:

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

internalField  uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform (0 0 0.7);
    }

    outlet
    {
        type            inletOutlet;;
        inletValue          uniform (0 0 0.7);

    }

    walls
    {
        type            noSlip;
    }

 
}


simpleFoam p:

Code:


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

internalField  uniform 216; //260/1.2;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {

        type            fixedValue;
        value          uniform 216; //260/1.2;
       
    }

    walls
    {
        type            zeroGradient;
    }

 
}


rhoSimpleFoam U:

Code:

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

internalField  uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.5; //I have a mesurement of mass flow rate //1.2 L/min. But just to test the code I used the default 0.5.
        rhoInlet        0.5;    // Guess for rho
        profile        turbulentBL;
    }

    outlet
    {

        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    walls
    {
        type            noSlip;
    }

 
}

rhoSimpleFoam p:

Code:


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

internalField  uniform 260;

boundaryField
{
    inlet
    {
        type            zeroGradient;

        refValue        uniform 101325;
        refGradient    uniform 0;
        valueFraction  uniform 0.3;
    }

    outlet
    {

        type            fixedValue;
        value          uniform 260;
       
    }

    walls
    {
        type            zeroGradient;
    }

 
}

Can anyone please check if this boundary conditions are correct (atmosperic pressure inlet and 300 Pa outlet).

Any comments on if the mach cones will be visible with simpleFoam or rhoSimpleFoam?

Thank you


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