mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
adding solver files
This commit is contained in:
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
Info << "Solving chemistry" << endl;
|
||||||
|
|
||||||
|
chemistry.solve
|
||||||
|
(
|
||||||
|
runTime.value() - runTime.deltaT().value(),
|
||||||
|
runTime.deltaT().value()
|
||||||
|
);
|
||||||
|
|
||||||
|
// turbulent time scale
|
||||||
|
if (turbulentReaction)
|
||||||
|
{
|
||||||
|
DimensionedField<scalar, volMesh> tk =
|
||||||
|
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
|
||||||
|
DimensionedField<scalar, volMesh> tc =
|
||||||
|
chemistry.tc()().dimensionedInternalField();
|
||||||
|
|
||||||
|
// Chalmers PaSR model
|
||||||
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kappa = 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, h)
|
||||||
|
+ mvConvection->fvmDiv(phi, h)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ parcels.Sh()
|
||||||
|
+ radiation->Sh(thermo)
|
||||||
|
);
|
||||||
|
|
||||||
|
hEqn.relax();
|
||||||
|
|
||||||
|
hEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
Info<< "Reading chemistry properties\n" << endl;
|
||||||
|
|
||||||
|
IOdictionary chemistryProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistryProperties",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||||
|
|
||||||
|
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||||
|
|
||||||
|
if (turbulentReaction)
|
||||||
|
{
|
||||||
|
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user