From 1dc3746afded0f7541adebfa75578b622882fb25 Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Thu, 1 Nov 2018 12:37:10 -0400 Subject: [PATCH] mixture enthalpy logic reuse and no read dummy 0 time directory --- testApp/chemFoam.C | 8 ++++++-- testApp/createBaseFields.H | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/testApp/chemFoam.C b/testApp/chemFoam.C index 922ca53..df4e56f 100644 --- a/testApp/chemFoam.C +++ b/testApp/chemFoam.C @@ -96,8 +96,12 @@ int main(int argc, char *argv[]) forAll(T, i) { // OpenFOAM diffusivity model - thermo.T()[0] = T[i]; - thermo.he() = thermo.he(p, thermo.T()); + scalar h0 = 0.0; + forAll(Y, k) + { + h0 += XY[k]*specieData[k].Hs(p[0], T[i]); + } + thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0); thermo.correct(); diff.correct(); diff --git a/testApp/createBaseFields.H b/testApp/createBaseFields.H index 0762f27..b72af3c 100644 --- a/testApp/createBaseFields.H +++ b/testApp/createBaseFields.H @@ -10,7 +10,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl; "Ydefault", runTime.timeName(), mesh, - IOobject::READ_IF_PRESENT, + IOobject::NO_READ, IOobject::NO_WRITE, false ), @@ -27,7 +27,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl; "p", runTime.timeName(), mesh, - IOobject::READ_IF_PRESENT, + IOobject::NO_READ, IOobject::NO_WRITE, false ), @@ -44,7 +44,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl; "T", runTime.timeName(), mesh, - IOobject::READ_IF_PRESENT, + IOobject::NO_READ, IOobject::NO_WRITE, false ),