LagrangianCMCFoam solves absolute enthalpy equation
This commit is contained in:
parent
e27ddfb56c
commit
454d0c8cf0
8 changed files with 26 additions and 50 deletions
|
|
@ -21,7 +21,7 @@ thermoType
|
|||
mixture reactingMixture;
|
||||
transport sutherland;
|
||||
thermo janaf;
|
||||
energy sensibleEnthalpy;
|
||||
energy absoluteEnthalpy;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ divSchemes
|
|||
div(phi,U) Gauss linearUpwindV cellLimited Gauss linear 1;
|
||||
div(phi,Yi_h) Gauss multivariateSelection
|
||||
{
|
||||
h linearUpwind cellLimited Gauss linear 1;
|
||||
ha linearUpwind cellLimited Gauss linear 1;
|
||||
H2 linearUpwind cellLimited Gauss linear 1;
|
||||
H linearUpwind cellLimited Gauss linear 1;
|
||||
O linearUpwind cellLimited Gauss linear 1;
|
||||
|
|
|
|||
|
|
@ -46,14 +46,14 @@ solvers
|
|||
relTol 0.0;
|
||||
}
|
||||
|
||||
"(U|Yi|h|k|epsilon|mf|mfVar|Fk)"
|
||||
"(U|Yi|ha|k|epsilon|mf|mfVar|Fk)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
"(U|Yi|h|k|epsilon|mf|mfVar|Fk)Final"
|
||||
"(U|Yi|ha|k|epsilon|mf|mfVar|Fk)Final"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
|
|
|
|||
|
|
@ -1,50 +1,27 @@
|
|||
|
||||
|
||||
forAll(rho, celli)
|
||||
{
|
||||
if(F_total[celli] > 0)
|
||||
if(F_total[celli] > 0)
|
||||
{
|
||||
scalarField Ytemp(Ysize, 0.0);
|
||||
|
||||
for(label i=0 ; i<Ysize ; i++) //mass fraction integration over an eta-space for species i
|
||||
{
|
||||
scalarField Ytemp(Ysize, 0.0);
|
||||
|
||||
for(label i=0 ; i < Ysize ; i++) //reaction rate integration over an eta-space for species i
|
||||
for(label k=0 ; k<=group ; k++)
|
||||
{
|
||||
for(label j=0 ; j<=etamax ; j++)
|
||||
{
|
||||
for(label k=0 ; k<=group ; k++)
|
||||
{
|
||||
for(label j=0 ; j<= etamax ; j++)
|
||||
{
|
||||
pdf[j] = Peta[j][celli];
|
||||
f[j] = QiCMC[(k*(etamax+1)+j)*Ysize + i];
|
||||
}
|
||||
Ytemp[i] += Ffrac[k][celli]*integration(deltaftn[celli], MFcut, Neta, pdf, f);
|
||||
}
|
||||
}
|
||||
|
||||
if( Ytemp[o2index] > Y[o2index][celli] || Ytemp[fuelindex] > Y[fuelindex][celli])
|
||||
{
|
||||
SUMSh[celli] = 0;
|
||||
//keep Yi value
|
||||
}
|
||||
else
|
||||
{
|
||||
scalarField ReactionRate(Ysize, 0.0);
|
||||
scalar tShtemp(0);
|
||||
|
||||
for(label i = 0 ; i<Ysize ; i++)
|
||||
{
|
||||
ReactionRate[i] = rho[celli] * (Ytemp[i] - Y[i][celli]) / runTime.deltaT().value();
|
||||
tShtemp -= chemistry->calculateShCMC( ReactionRate , i);
|
||||
}
|
||||
SUMSh[celli] = tShtemp;
|
||||
|
||||
for(label i = 0 ; i <Ysize ; i++)
|
||||
{
|
||||
Y[i][celli] = Ytemp[i];
|
||||
}
|
||||
|
||||
pdf[j] = Peta[j][celli];
|
||||
f[j] = QiCMC[(k*(etamax+1)+j)*Ysize + i];
|
||||
}
|
||||
Ytemp[i] += Ffrac[k][celli]*integration(deltaftn[celli], MFcut, Neta, pdf, f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
for(label i=0 ; i<Ysize ; i++)
|
||||
{
|
||||
SUMSh[celli] = 0;
|
||||
Y[i][celli] = Ytemp[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
fvm::ddt(rho, he) + mvConvection->fvmDiv(phi, he)
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
he.name() == "ea"
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
|
|
@ -17,8 +17,7 @@
|
|||
)
|
||||
- fvm::laplacian(1.47*turbulence->mut(), he)
|
||||
==
|
||||
SUMSh
|
||||
+fvOptions(rho, he)
|
||||
fvOptions(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ int main(int argc, char *argv[])
|
|||
init_start_CMC = false;
|
||||
}
|
||||
#include "CMCequation.H" //Solve CMC equations
|
||||
#include "YEqn.H"
|
||||
#include "CMCintegration.H" //Conditional field integration and get reaction rate
|
||||
#include "EEqn.H"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ EXE_LIBS = \
|
|||
-L$(FOAM_USER_LIBBIN) \
|
||||
-lchemistryModel_POSTECH \
|
||||
-lcombustionModels_POSTECH \
|
||||
-lthermoAdd \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ autoPtr<combustionModels::psiChemistryCombustion> reaction
|
|||
autoPtr<psiChemistryModel> chemistry = reaction->chem();
|
||||
psiReactionThermo& thermo = chemistry->thermo();
|
||||
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
thermo.validate(args.executable(), "ha");
|
||||
|
||||
basicMultiComponentMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue