用rhoReactingFoam对燃烧瞬态过程进行求解
-
最近在做多组分燃烧+流动的计算,发现有人提到在每个时间步里,先算流动再算化学反应,且化学反应的时间步长一般要小于流动的时间步长(我理解为
controlDict
中的deltaT
),但是我在rhoReactingFoam
的源码中并没有发现这样一个分开计算的过程,有两个问题望大佬解惑。-
rhoReactingFoam
在计算瞬态问题时的实际计算过程是怎么样的? -
如果化学反应的时间步长和流动的时间步长不一致,那么化学反应的时间步长该如何控制?(在
chemFoam
的源码中有提到过dtChem
这个变量,但没看懂具体是如何来的)
附OpenFOAM-6的rhoReactingFoam.C如下。
#include "fvCFD.H" #include "rhoReactionThermo.H" #include "CombustionModel.H" #include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" #include "pressureControl.H" #include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "postProcess.H" #include "setRootCaseLists.H" #include "createTime.H" #include "createMesh.H" #include "createControl.H" #include "initContinuityErrs.H" #include "createFields.H" #include "createFieldRefs.H" #include "createRhoUfIfPresent.H" #include "createTimeControls.H" turbulence->validate(); if (!LTS) { #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { #include "readTimeControls.H" if (LTS) { #include "setRDeltaT.H" } else { #include "compressibleCourantNo.H" #include "setDeltaT.H" } runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { #include "UEqn.H" #include "YEqn.H" #include "EEqn.H" // --- Pressure corrector loop while (pimple.correct()) { if (pimple.consistent()) { #include "../../../compressible/rhoPimpleFoam/pcEqn.H" } else { #include "../../../compressible/rhoPimpleFoam/pEqn.H" } } if (pimple.turbCorr()) { turbulence->correct(); } } rho = thermo.rho(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; }
-