generate total mole field

This commit is contained in:
ekinaci
2017-02-23 16:12:17 +01:00
parent 38712e6c33
commit 4da55dd812

View File

@ -13,9 +13,15 @@
// probably for particles in OF, not needed when using LIGGGHTS
// SLGThermo slgThermo(mesh, thermo);
basicMultiComponentMixture& composition = thermo.composition();
// new class exists in OF4.x containing all material therm props called basicSpecieMixture
//basicMultiComponentMixture& composition = thermo.composition();
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
// The molecular weight [kj/mol] ====== EKI
//const volScalarField W(composition.W());
const volScalarField& W = composition.W();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.contains(inertSpecie))
@ -36,6 +42,21 @@
}
fields.add(thermo.he());
// define total number of moles in volume ====== EKI
volScalarField N
(
IOobject
(
"N",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// =============================================
volScalarField rho
(
IOobject