slfmenergyfoam-4.x/SLFMFoam.C
2018-09-15 20:55:34 +09:00

118 lines
3.6 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
SLFMFoam
Description
Steady Laminar Flamelet Model(SLFM) solver for turbulent combustion. SLFM
assumes a turbulent flame composed of thin stretched laminar flamelets.
Each flamelet library is generated by external program and imported by
the solver.
References
A.Y. Klimenko, R.W. Bilger, Progress in Energy and Combustion Science 25 (1999) 595-687
N. Peters, Turbulent Combustion, Cambridge University Press (2000)
Contact
POSTECH combustion lab.
huh@postech.ac.kr
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "rhoCombustionModel.H"
#include "fvOptions.H"
#include "simpleControl.H"
#include "FlameStructure/FlameStructure.H"
#include "interpolateXY.H"
#include "AMC.H"
#include "BetaFunction.H"
#include "BetaGrid.H"
#include "BetaIntegrator.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
turbulence->validate();
//SLFM
Info<<"Read SLFM library"<<endl;
#include "readSLFMlib.H" //read SLFM library
Info<<"Construct Beta-PDF"<<endl;
#include "preIntegration.H" //AMC C1 coefficient pdf integration
Info<< "\nStarting time loop\n" << endl;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity SIMPLE corrector loop
{
#include "UEqn.H"
#include "Mixturefraction.H" //mean mixture fraction
#include "MixturefractionVar.H" //mean mixture fraction variance
#include "setSDR.H" //calculate scalar dissipation rate
#include "updateT_RHO.H" //update temperature and density
#include "pEqn.H"
}
turbulence->correct();
if (runTime.write())
{
#include "updateYi.H" //update species
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //