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/)
-   -   Density Modelling Problems in Compressible Case (https://www.cfd-online.com/Forums/openfoam-solving/173507-density-modelling-problems-compressible-case.html)

McCharles June 21, 2016 10:17

Density Modelling Problems in Compressible Case
 
Hi Foamers,

I am trying to simulate a compressible case with rhoPimpleFoam and rhoSimpleFoam. The problem is that the density isn't calculated correctly as it is almost constant trough the entire domain except for the INLET and the 2 OUTLETS, where I configured a specific density as I am using flowRateInletVelocity (mass flow) as Inlet/outlet BC. There should be strong density variations in certain areas of the Model, e.g. the flow is accelerated through a nozzle.

There is probably something wrong with my BCs. I would be very thankful if someone could take a look at my settings below.

Let me know if you need more specific informations.

Cheers!
Charles

U
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    PLENUM
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    ROTOR
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis            (1 0 0);
        omega          constant 838;
        value          uniform (0 0 0);
    }
    STATOR
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    OUTLET_LABY
    {
        type            flowRateInletVelocity;
        massFlowRate    constant -0.00031042;
        rhoInlet        2.776162;
 
    }
    INLET
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.002989;
        rhoInlet        3.09;
        value          uniform (0 0 0);
    }
    OUTLET
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
    CUT
    {
        type            slip;
       
    }
    SPALT_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    SPALT_PERIODIC_2
    {
        type            cyclicAMI;
     
    }
    PLENUM_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    PLENUM_PERIODIC_2
    {
        type            cyclicAMI;
       
    }
}

// ************************************************************************* //

p
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 300000;

boundaryField
{
    PLENUM
    {
        type            zeroGradient;
    }
    ROTOR
    {
        type            zeroGradient;
    }
    STATOR
    {
        type            zeroGradient;
    }
    OUTLET_LABY
    {
        type            zeroGradient;
 
    }
    INLET
    {
        type            zeroGradient;
     
    }
    OUTLET
    {
        type            fixedValue;
        value          uniform 250304;
     
    }
    CUT
    {
        type            zeroGradient;
    }
    SPALT_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    SPALT_PERIODIC_2
    {
        type            cyclicAMI;
       
    }
    PLENUM_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    PLENUM_PERIODIC_2
    {
        type            cyclicAMI;
       
    }
}
// ************************************************************************* //

T
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 390;

boundaryField
{
    PLENUM
    {
        type            zeroGradient;
    }
    ROTOR
    {
        type            zeroGradient;
    }
    STATOR
    {
        type            fixedValue;
        value          uniform 389;
    }
    OUTLET_LABY
    {
        type            inletOutlet;
    inletValue      uniform 369.989;
    value          uniform 369.989;
    }
    INLET
    {
        type            fixedValue;
        value          uniform 400;
    }
    OUTLET
    {
        type            inletOutlet;
        inletValue      uniform 390;
        value          uniform 390;
    }
    CUT
    {
        type            zeroGradient;
    }
    SPALT_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    SPALT_PERIODIC_2
    {
        type            cyclicAMI;
       
    }
    PLENUM_PERIODIC_1
    {
        type            cyclicAMI;
       
    }
    PLENUM_PERIODIC_2
    {
        type            cyclicAMI;
       
    }
}

// ************************************************************************* //

thermoPhysicalProperties
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.1                                |
|  \\  /    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;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles      1; //no combustion = 1
        molWeight  28.9; // für trockene Luft in g/mol
    }
    thermodynamics
    {
        Cp          1007;
        Hf          2.544e+06;
    }
    transport
    {
        As          1.4584e-06;
        Ts          110.33;

    }
}


// ************************************************************************* //



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