From 4da55dd812ec52f16c2d64314dd4bde3a9ab4817 Mon Sep 17 00:00:00 2001 From: ekinaci Date: Thu, 23 Feb 2017 16:12:17 +0100 Subject: [PATCH] generate total mole field --- .../cfdemSolverRhoPimpleChem/createFields.H | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/applications/solvers/cfdemSolverRhoPimpleChem/createFields.H b/applications/solvers/cfdemSolverRhoPimpleChem/createFields.H index b90ad863..89b7d252 100644 --- a/applications/solvers/cfdemSolverRhoPimpleChem/createFields.H +++ b/applications/solvers/cfdemSolverRhoPimpleChem/createFields.H @@ -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& 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