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/)
-   -   two mixing compresible fluids solver (https://www.cfd-online.com/Forums/openfoam-solving/79875-two-mixing-compresible-fluids-solver.html)

Jimmy Chokshi April 23, 2015 06:11

Quote:

Originally Posted by ziemowitzima (Post 534195)
Hi,
Give me your email, I will send you the working case with few words of explanations.
I would attached it here, but size of the file seems to be too large (1.4MB), and I could not attached it to my reply.

best

Hi,

Can you please send this working case to chokshirl@gmail.com ?

Many thanks !!

Jimmy Chokshi April 23, 2015 06:14

Hi,

Can you please send this working case to chokshirl@gmail.com ?

Many thanks !!

HVonSch May 20, 2020 06:14

1 Attachment(s)
Hello everyone,


I had the same problem (multi-fluid-mixing flow, single phase, compressible, stationary).

I combined rhoSimpleFoam and reactingFoam to a new solver, which integrates in rhoSimpleFoam.
I called it rhoMixingSimpleFoam. It is attached to this post.


EDIT: Please keep in mind, that this solver is not well tested or validated in any way!
Also: In this solver the turbulent species transport is modelled via alphat and is thus equal to the turbulent heat fluxes. This is not always the case!



Installation:
Just copy the dir "rhoMixingSimpleFoam" to the rhoSimpleFoam-directory (/path_to_Openfoam/applications/solvers/compressible/rhoSimpleFoam/), enter it and run wmake.


Also attached is the following thermophysicalProperties which is used by this solver:
Code:

thermoType
{
    type            heRhoThermo;
    mixture        multiComponentMixture;
    transport      sutherland;
    thermo          janaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

inertSpecie air;

species (air CO2);

air
{
    specie
    {
        nMoles          1;
        molWeight      28.965; // (refprop)
    }
    equationOfState
    {
        pRef            1e6;
    }
    thermodynamics
    {
        Tlow            200;
        Thigh          6000;
        Tcommon        1000;
        highCpCoeffs    ( 3.08792717E+00 1.24597184E-03 -4.23718945E-07 6.74774789E-11 -3.97076972E-15 -9.95262755E+02 5.95960930E+00 );
        lowCpCoeffs    ( 3.56839620E+00 -6.78729429E-04 1.55371476E-06 -3.29937060E-12 -4.66395387E-13 -1.06234659E+03 3.71582965E+00 );
        // no source, sorry
    }
    transport
    {
        As          1.460846342e-06; // (White - Viscous Fluid Flow)
        Ts          111;
    }
}

CO2
{
    specie
    {
        nMoles          1;
        molWeight      44.01; // (refprop)
    }
    equationOfState
    {
        pRef            1e6;
    }
    thermodynamics
    {
        Tlow            200;
        Thigh          3500;
        Tcommon        1000;
        highCpCoeffs    ( 3.85746029E+00 4.41437026E-03 -2.21481404E-06 5.23490188E-10 -4.72084164E-14 -4.87591660E+04 2.27163806E+00 );
        lowCpCoeffs    ( 2.35677352E+00 8.98459677E-03 -7.12356269E-06 2.45919022E-09 -1.43699548E-13 -4.83719697E+04 9.90105222E+00 );
        //http://combustion.berkeley.edu/gri-mech/data/nasa_plnm.html
    }
    transport
    {
        As              1.503425096e-06; // (White - Viscous Fluid Flow)
        Ts              222;
    }
}


KAMAL KHEMANI May 31, 2020 15:15

Quote:

Originally Posted by HVonSch (Post 771251)
Hello everyone,


I had the same problem (multi-fluid-mixing flow, single phase, compressible, stationary).


I combined rhoSimpleFoam and reactingFoam to a new solver, which integrates in rhoSimpleFoam.
I called it rhoMixingSimpleFoam. It is attached to this post.


Just copy the dir "rhoMixingSimpleFoam" to the rhoSimpleFoam-directory (/path_to_Openfoam/applications/solvers/compressible/rhoSimpleFoam/), enter it and run wmake.


Also attached is the following thermophysicalProperties which is used by this solver:
Code:

thermoType
{
    type            heRhoThermo;
    mixture        multiComponentMixture;
    transport      sutherland;
    thermo          janaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

inertSpecie air;

species (air CO2);

air
{
    specie
    {
        nMoles          1;
        molWeight      28.965; // (refprop)
    }
    equationOfState
    {
        pRef            1e6;
    }
    thermodynamics
    {
        Tlow            200;
        Thigh          6000;
        Tcommon        1000;
        highCpCoeffs    ( 3.08792717E+00 1.24597184E-03 -4.23718945E-07 6.74774789E-11 -3.97076972E-15 -9.95262755E+02 5.95960930E+00 );
        lowCpCoeffs    ( 3.56839620E+00 -6.78729429E-04 1.55371476E-06 -3.29937060E-12 -4.66395387E-13 -1.06234659E+03 3.71582965E+00 );
        // no source, sorry
    }
    transport
    {
        As          1.460846342e-06; // (White - Viscous Fluid Flow)
        Ts          111;
    }
}

CO2
{
    specie
    {
        nMoles          1;
        molWeight      44.01; // (refprop)
    }
    equationOfState
    {
        pRef            1e6;
    }
    thermodynamics
    {
        Tlow            200;
        Thigh          3500;
        Tcommon        1000;
        highCpCoeffs    ( 3.85746029E+00 4.41437026E-03 -2.21481404E-06 5.23490188E-10 -4.72084164E-14 -4.87591660E+04 2.27163806E+00 );
        lowCpCoeffs    ( 2.35677352E+00 8.98459677E-03 -7.12356269E-06 2.45919022E-09 -1.43699548E-13 -4.83719697E+04 9.90105222E+00 );
        //http://combustion.berkeley.edu/gri-mech/data/nasa_plnm.html
    }
    transport
    {
        As              1.503425096e-06; // (White - Viscous Fluid Flow)
        Ts              222;
    }
}


Hi HVonSch, with laminar conditions the temperature shoots up at very high value any reason for that ?

HVonSch June 2, 2020 07:33

Hello Kamal,

Is the simulation fully converged?
Please provide more information about your case and the way you are using the species mixing (species, phases) to track down if the error is caused by the solver modification.


Best regards,
Hendrik

petr.f. June 15, 2020 15:59

Hi Hendrik, I'm checking out your solver (nice work btw.). How do you prescribe boundary conditions for the individual species? Is it in the same way as in case of reactingFoam i.e. by individual files in constant/ dir as e.g. "air" and "CO2"?

HVonSch June 16, 2020 02:04

Hello Petr,


thank you!


Yes, BCs are prescribed as in reactingFoam.


For example for CO2:


Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      CO2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    INLET
    {
        type            fixedValue;
        value          uniform 0;
    }
    OUTLET
    {
        type            inletOutlet;
        value          uniform 0;
        inletValue      uniform 0;
    }
    PLENUM_INLET
    {
        type            fixedValue;
        value          uniform 1;
    }
    PLENUM_OUTLET
    {
        type            inletOutlet;
        value          uniform 1;
        inletValue      uniform 1;
    }
    WALL
    {
        type            zeroGradient;
    }
}


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

You don't need a BC-file for the "inert species" as its fraction is just 1-sum(other species fractions).


Best,
Hendrik

nikhil108 August 13, 2020 12:40

Hallo Foamers,

can you suggest me a solver for, propane jet leak in to air. Right now, i am using reactingbuoyantfoam, but i want to add dynamic mesh, which is not supported by reactingFoam. any suggestions?.

cheers,
nm.


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