add W, and N fields to solver

This commit is contained in:
ekinaci
2017-03-02 15:41:23 +01:00
parent 0924b618f5
commit ea66961ba6
2 changed files with 9 additions and 11 deletions

View File

@ -15,7 +15,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
// volScalarField Wt(0.0*W);
forAll(Y, i)
{
@ -44,8 +43,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection
Yi.max(0.0);
Yt += Yi;
// Wt += thermo.composition().W(i);
}
else
{
@ -53,10 +50,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection
}
}
// calculate total molar number in volume
N = Yt*rhoeps/W;
// calculate total mole in Volume
N = rho/W;
Info << "molecular weight of mixture" << W << endl;
Info << "total molar weight in volume (solver)" << W << endl;
Info << "rho (solver)" << rho << endl;
Info << "total mass fractions" << Yt << endl;
Info << "total moles in volume (solver)" << N << endl;
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);

View File

@ -13,13 +13,12 @@
// probably for particles in OF, not needed when using LIGGGHTS
// SLGThermo slgThermo(mesh, thermo);
// new class exists in OF4.x containing all material therm props called basicSpecieMixture
//basicMultiComponentMixture& composition = thermo.composition();
// basicMultiComponentMixture& composition = thermo.composition();
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
// The molecular weight [kj/mol]
const volScalarField W(composition.W());
// read molecular weight
volScalarField W(composition.W());
const word inertSpecie(thermo.lookup("inertSpecie"));
@ -41,7 +40,6 @@
}
fields.add(thermo.he());
// Total Mole in Volume
volScalarField N
(
IOobject