CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   using rhoReactingFoam for 2D DLR scamjet (https://www.cfd-online.com/Forums/openfoam/225905-using-rhoreactingfoam-2d-dlr-scamjet.html)

yanchong13 April 11, 2020 06:42

using rhoReactingFoam for 2D DLR scamjet
 
I'm A PHD student major in combustion. Recently, I want to simulate a supersonic combustion case using OpenFoam. I thought rhoReactingFoam maybe capable for the case. But the position of the shock wave is ayways incorrect. I thought that may caused by th boundry condition of U or P or something else,but i cant figure is out. can anyon give me some suggestions?
https://www.cfd-online.com/Forums/me...15-p-0000.jpeg
https://www.cfd-online.com/Forums/me...16-p-0029.jpeg
p
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 101325;

boundaryField
{
    inletfuel
    {
        type            fixedValue;
        value          uniform 101325;
    }
    inletair
    {
        type            fixedValue;
        value          uniform 101325;
    }
    outlet
    {
        type            zeroGradient;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
    WALL_TOP
    {
        type            zeroGradient;
    }
    WALL_BOT
    {
        type            zeroGradient;
    }
    WALL_INSIDE
    {
        type            zeroGradient;
    }
}


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

Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (730 0 0);

boundaryField
{
    inletfuel
    {
        type            fixedValue;
        value          uniform (1200 0 0);
    }
    inletair
    {
        type            fixedValue;
        value          uniform (730 0 0);
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (730 0 0);
        value          uniform (730 0 0);
    }
    frontAndBackPlanes
    {
        type            empty;
    }
    WALL_TOP
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    WALL_BOT
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    WALL_INSIDE
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}


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

Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 1200;

boundaryField
{
    inletfuel
    {
        type            fixedValue;
        value          uniform 250;
    }
    inletair
    {
        type            fixedValue;
        value          uniform 1200;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 340;
        value          uniform 340;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
    WALL_TOP
    {
        type            zeroGradient;
    }
    WALL_BOT
    {
        type            zeroGradient;
    }
    WALL_INSIDE
    {
        type            zeroGradient;
    }
}


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

fvSchemes
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default            none;

    div(phi,U)      Gauss linearUpwindV grad(U);
    div(phi,Yi)        Gauss linearUpwind;
    div(phi,h)          Gauss linearUpwind;
    div(phi,K)          Gauss linearUpwind grad(U);
    div(phid,p)        Gauss linearUpwind;
    div(phi,omega)      Gauss upwind;
    div(phi,epsilon)    Gauss upwind;
    div(phi,Yi_h)      Gauss upwind;
    div(phi,k)          Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U)))))    Gauss linear;
    div(phiv,p)        Gauss linearUpwind grad(U);
}

laplacianSchemes
{
    default        Gauss linear corrected;
}   

interpolationSchemes
{
    default        linear;
    //interpolate(rho)              upwind phi;
    //interpolate((rho*(1|A(U))))  upwind phi;
    //flux(HbyA)                    upwind phi;
    //dotInterpolate(S,(rho_0*U_0)) linear;
}

snGradSchemes
{
    default        corrected;
}

wallDist
{
    method meshWave;
}

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

fvSolution
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  dev
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "rho.*"
    {
        solver          diagonal;
    }

    p
    {
        solver          PBiCGStab;
        preconditioner  DIC;
        tolerance        1e-6;
        relTol          1e-6;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "(U|e|k|epsilon|omega)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance      1e-6;
        relTol          1e-6;
    }

    "(U|e|k|epsilon|omega)Final"
    {
        $U;
    }

    "Yi.*"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance      1e-8;
        relTol          1e-6;
    }
}

PIMPLE
{
    momentumPredictor  yes;
    nOuterCorrectors    1;
    nCorrectors        2;
    nNonOrthogonalCorrectors 1;

    maxDeltaT          1e-7;
    maxCo              0.25;
    alphaTemp          0.05;
    alphaY              0.05;
    Yref
    {
        O2                  0.1;
        H2                  0.1;
    }
    rDeltaTSmoothingCoeff  0.05;
    rDeltaTDampingCoeff    1;
}

relaxationFactors
{
    equations
    {
        ".*"    1;
    }
}

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


as020002 April 13, 2020 02:43

Hi,

I am doing combustion research on this geometry at the moment.
You can try the "waveTransmissive" boundary on the p.outlet

Regards,
Rick


All times are GMT -4. The time now is 07:15.