From 7587045ea0169ecb9cf1b990b1912e379d20d7a3 Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Tue, 30 Oct 2018 13:31:49 -0400 Subject: [PATCH] added cantera transport headers and removed the time loop --- testApp/YEqn.H | 12 ------------ testApp/chemFoam.C | 24 +++--------------------- testApp/hEqn.H | 14 -------------- testApp/output.H | 11 ----------- testApp/pEqn.H | 16 ---------------- testApp/readControls.H | 3 --- testApp/setDeltaT.H | 6 ------ testApp/solveChemistry.H | 3 --- 8 files changed, 3 insertions(+), 86 deletions(-) delete mode 100644 testApp/YEqn.H delete mode 100644 testApp/hEqn.H delete mode 100644 testApp/output.H delete mode 100644 testApp/pEqn.H delete mode 100644 testApp/readControls.H delete mode 100644 testApp/setDeltaT.H delete mode 100644 testApp/solveChemistry.H diff --git a/testApp/YEqn.H b/testApp/YEqn.H deleted file mode 100644 index edb4072..0000000 --- a/testApp/YEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - forAll(Y, specieI) - { - volScalarField& Yi = Y[specieI]; - - solve - ( - fvm::ddt(rho, Yi) - chemistry.RR(specieI), - mesh.solver("Yi") - ); - } -} \ No newline at end of file diff --git a/testApp/chemFoam.C b/testApp/chemFoam.C index a68d7d0..a61d3a3 100644 --- a/testApp/chemFoam.C +++ b/testApp/chemFoam.C @@ -31,6 +31,9 @@ Description \*---------------------------------------------------------------------------*/ +#include +#include + #include "fvCFD.H" #include "psiReactionThermo.H" #include "psiChemistryModel.H" @@ -62,27 +65,6 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; - while (runTime.run()) - { - #include "readControls.H" - - #include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "solveChemistry.H" - #include "YEqn.H" - #include "hEqn.H" - #include "pEqn.H" - - #include "output.H" - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - Info << "Number of steps = " << runTime.timeIndex() << endl; Info << "End" << nl << endl; diff --git a/testApp/hEqn.H b/testApp/hEqn.H deleted file mode 100644 index 4dd593e..0000000 --- a/testApp/hEqn.H +++ /dev/null @@ -1,14 +0,0 @@ -{ - volScalarField& h = thermo.he(); - - if (constProp == "volume") - { - h[0] = u0 + p[0]/rho[0] + integratedHeat; - } - else - { - h[0] = h0 + integratedHeat; - } - - thermo.correct(); -} diff --git a/testApp/output.H b/testApp/output.H deleted file mode 100644 index 5620fe6..0000000 --- a/testApp/output.H +++ /dev/null @@ -1,11 +0,0 @@ - runTime.write(); - - Info<< "Sh = " << Sh - << ", T = " << thermo.T()[0] - << ", p = " << thermo.p()[0] - << ", " << Y[0].name() << " = " << Y[0][0] - << endl; - - post<< runTime.value() << token::TAB << thermo.T()[0] << token::TAB - << thermo.p()[0] << endl; - diff --git a/testApp/pEqn.H b/testApp/pEqn.H deleted file mode 100644 index a919ff1..0000000 --- a/testApp/pEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - rho = thermo.rho(); - if (constProp == "volume") - { - scalar invW = 0.0; - forAll(Y, i) - { - invW += Y[i][0]/specieData[i].W(); - } - - Rspecific[0] = 1000.0*constant::physicoChemical::R.value()*invW; - - p[0] = rho0*Rspecific[0]*thermo.T()[0]; - rho[0] = rho0; - } -} diff --git a/testApp/readControls.H b/testApp/readControls.H deleted file mode 100644 index c56206d..0000000 --- a/testApp/readControls.H +++ /dev/null @@ -1,3 +0,0 @@ -runTime.controlDict().lookup("adjustTimeStep") >> adjustTimeStep; - -maxDeltaT = readScalar(runTime.controlDict().lookup("maxDeltaT")); diff --git a/testApp/setDeltaT.H b/testApp/setDeltaT.H deleted file mode 100644 index 46d9f7b..0000000 --- a/testApp/setDeltaT.H +++ /dev/null @@ -1,6 +0,0 @@ -if (adjustTimeStep) -{ - runTime.setDeltaT(min(dtChem, maxDeltaT)); - Info<< "deltaT = " << runTime.deltaT().value() << endl; -} - diff --git a/testApp/solveChemistry.H b/testApp/solveChemistry.H deleted file mode 100644 index cb4258c..0000000 --- a/testApp/solveChemistry.H +++ /dev/null @@ -1,3 +0,0 @@ - dtChem = chemistry.solve(runTime.deltaT().value()); - scalar Sh = chemistry.Sh()()[0]/rho[0]; - integratedHeat += Sh*runTime.deltaT().value();