PDRFoam.C 5.4 KB
 OpenFOAM-admin committed Apr 15, 2008 1 2 3 4 ``````/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | `````` OpenFOAM bot committed Oct 31, 2019 5 `````` \\ / A nd | www.openfoam.com `````` OpenFOAM-admin committed Apr 15, 2008 6 `````` \\/ M anipulation | `````` OpenFOAM bot committed Feb 06, 2019 7 ``````------------------------------------------------------------------------------- `````` OpenFOAM bot committed Oct 31, 2019 8 `````` Copyright (C) 2011-2017 OpenFOAM Foundation `````` OpenFOAM-admin committed Apr 15, 2008 9 10 11 12 ``````------------------------------------------------------------------------------- License This file is part of OpenFOAM. `````` Mark Olesen committed Mar 29, 2010 13 14 15 16 `````` 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-admin committed Apr 15, 2008 17 18 19 20 21 22 23 `````` 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 `````` Mark Olesen committed Mar 29, 2010 24 `````` along with OpenFOAM. If not, see . `````` OpenFOAM-admin committed Apr 15, 2008 25 26 27 28 `````` Application PDRFoam `````` Andrew Heather committed Dec 03, 2015 29 30 31 ``````Group grpCombustionSolvers `````` OpenFOAM-admin committed Apr 15, 2008 32 ``````Description `````` Chris Greenshields committed Jul 22, 2009 33 34 `````` Solver for compressible premixed/partially-premixed combustion with turbulence modelling. `````` OpenFOAM-admin committed Apr 15, 2008 35 36 37 `````` Combusting RANS code using the b-Xi two-equation model. Xi may be obtained by either the solution of the Xi transport `````` Mark OLESEN committed May 04, 2020 38 `````` equation or from an algebraic expression. Both approaches are `````` OpenFOAM-admin committed Apr 15, 2008 39 40 41 42 `````` based on Gulder's flame speed correlation which has been shown to be appropriate by comparison with the results from the spectral model. `````` Andrew Heather committed Jun 15, 2009 43 `````` Strain effects are incorporated directly into the Xi equation `````` OpenFOAM-admin committed Apr 15, 2008 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 `````` but not in the algebraic approximation. Further work need to be done on this issue, particularly regarding the enhanced removal rate caused by flame compression. Analysis using results of the spectral model will be required. For cases involving very lean Propane flames or other flames which are very strain-sensitive, a transport equation for the laminar flame speed is present. This equation is derived using heuristic arguments involving the strain time scale and the strain-rate at extinction. the transport velocity is the same as that for the Xi equation. For large flames e.g. explosions additional modelling for the flame wrinkling due to surface instabilities may be applied. PDR (porosity/distributed resistance) modelling is included to handle regions containing blockages which cannot be resolved by the mesh. `````` sergio committed Apr 18, 2011 61 `````` The fields used by this solver are: `````` Andrew Heather committed Dec 03, 2015 62 63 64 65 66 67 68 `````` \plaintable betav | Volume porosity Lobs | Average diameter of obstacle in cell (m) Aw | Obstacle surface area per unit volume (1/m) CR | Drag tensor (1/m) CT | Turbulence generation parameter (1/m) Nv | Number of obstacles in cell per unit volume (m^-2) `````` Mark OLESEN committed May 04, 2020 69 `````` nsv | Tensor whose diagonal indicates the number to subtract from `````` Andrew Heather committed Dec 03, 2015 70 71 72 `````` | Nv to get the number of obstacles crossing the flow in each | direction. \endplaintable `````` sergio committed Apr 18, 2011 73 `````` `````` OpenFOAM-admin committed Apr 15, 2008 74 75 76 ``````\*---------------------------------------------------------------------------*/ #include "fvCFD.H" `````` Henry committed May 30, 2012 77 ``````#include "psiuReactionThermo.H" `````` Henry committed Jan 21, 2015 78 ``````#include "turbulentFluidThermoModel.H" `````` OpenFOAM-admin committed Apr 15, 2008 79 80 81 82 83 ``````#include "laminarFlameSpeed.H" #include "XiModel.H" #include "PDRDragModel.H" #include "ignition.H" #include "bound.H" `````` andy committed Apr 18, 2011 84 ``````#include "pimpleControl.H" `````` Henry Weller committed Dec 02, 2015 85 ``````#include "fvOptions.H" `````` OpenFOAM-admin committed Apr 15, 2008 86 87 88 89 90 `````` // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { `````` Mark OLESEN committed Dec 11, 2018 91 92 93 94 95 96 `````` argList::addNote ( "Solver for compressible premixed/partially-premixed combustion with" " turbulence modelling." ); `````` Henry Weller committed May 09, 2016 97 `````` #include "postProcess.H" `````` OpenFOAM-admin committed Apr 15, 2008 98 `````` `````` Andrew Heather committed Jan 11, 2018 99 `````` #include "addCheckCaseOptions.H" `````` Mark OLESEN committed Dec 13, 2018 100 `````` #include "setRootCaseLists.H" `````` Andrew Heather committed Jun 15, 2009 101 102 `````` #include "createTime.H" #include "createMesh.H" `````` Henry Weller committed May 09, 2016 103 `````` #include "createControl.H" `````` Andrew Heather committed Jun 15, 2009 104 `````` #include "readCombustionProperties.H" `````` henry committed Jul 08, 2009 105 `````` #include "readGravitationalAcceleration.H" `````` Andrew Heather committed Jun 15, 2009 106 `````` #include "createFields.H" `````` Henry Weller committed May 09, 2016 107 `````` #include "createFieldRefs.H" `````` Andrew Heather committed Jun 15, 2009 108 `````` #include "initContinuityErrs.H" `````` Henry Weller committed Jul 19, 2015 109 `````` #include "createTimeControls.H" `````` sergio committed Mar 04, 2011 110 `````` #include "compressibleCourantNo.H" `````` Andrew Heather committed Jun 15, 2009 111 `````` #include "setInitialDeltaT.H" `````` OpenFOAM-admin committed Apr 15, 2008 112 `````` `````` Henry Weller committed Dec 01, 2015 113 `````` turbulence->validate(); `````` Andrew Heather committed Jun 15, 2009 114 `````` scalar StCoNum = 0.0; `````` OpenFOAM-admin committed Apr 15, 2008 115 `````` `````` Andrew Heather committed Jun 15, 2009 116 `````` // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // `````` OpenFOAM-admin committed Apr 15, 2008 117 118 119 120 121 `````` Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { `````` 122 `````` #include "readTimeControls.H" `````` sergio committed Mar 04, 2011 123 `````` #include "compressibleCourantNo.H" `````` Andrew Heather committed Jun 15, 2009 124 `````` #include "setDeltaT.H" `````` OpenFOAM-admin committed Apr 15, 2008 125 `````` `````` Mark OLESEN committed Jul 02, 2018 126 `````` ++runTime; `````` OpenFOAM-admin committed Apr 15, 2008 127 128 `````` Info<< "\n\nTime = " << runTime.timeName() << endl; `````` Andrew Heather committed Jun 15, 2009 129 `````` #include "rhoEqn.H" `````` OpenFOAM-admin committed Apr 15, 2008 130 `````` `````` andy committed Apr 18, 2011 131 `````` // --- Pressure-velocity PIMPLE corrector loop `````` andy committed Oct 26, 2011 132 `````` while (pimple.loop()) `````` OpenFOAM-admin committed Apr 15, 2008 133 `````` { `````` andy committed Apr 18, 2011 134 `````` #include "UEqn.H" `````` OpenFOAM-admin committed Apr 15, 2008 135 `````` `````` andy committed Oct 26, 2011 136 137 `````` // --- Pressure corrector loop while (pimple.correct()) `````` OpenFOAM-admin committed Apr 15, 2008 138 `````` { `````` andy committed Apr 18, 2011 139 140 `````` #include "bEqn.H" #include "ftEqn.H" `````` Henry committed Sep 23, 2012 141 142 `````` #include "EauEqn.H" #include "EaEqn.H" `````` andy committed Apr 18, 2011 143 144 145 `````` if (!ign.ignited()) { `````` Henry committed Sep 23, 2012 146 `````` thermo.heu() == thermo.he(); `````` andy committed Apr 18, 2011 147 148 149 `````` } #include "pEqn.H" `````` OpenFOAM-admin committed Apr 15, 2008 150 151 `````` } `````` andy committed Apr 18, 2011 152 153 154 155 `````` if (pimple.turbCorr()) { turbulence->correct(); } `````` OpenFOAM-admin committed Apr 15, 2008 156 157 158 159 `````` } runTime.write(); `````` Mark OLESEN committed Apr 27, 2018 160 `````` runTime.printExecutionTime(Info); `````` OpenFOAM-admin committed Apr 15, 2008 161 162 `````` } `````` HenningScheufler committed Jun 18, 2021 163 `````` Info<< "End\n"; `````` OpenFOAM-admin committed Apr 15, 2008 164 `````` `````` Mark Olesen committed Feb 18, 2009 165 `````` return 0; `````` OpenFOAM-admin committed Apr 15, 2008 166 167 168 169 ``````} // ************************************************************************* //``````