OpenFOAM
v2512
The open source CFD toolbox
Loading...
Searching...
No Matches
chemFoam.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2011-2017 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Application
27
chemFoam
28
29
Group
30
grpCombustionSolvers
31
32
Description
33
Solver for chemistry problems, designed for use on single cell cases to
34
provide comparison against other chemistry solvers, that uses a single cell
35
mesh, and fields created from the initial conditions.
36
37
\*---------------------------------------------------------------------------*/
38
39
#include "
fvCFD.H
"
40
#include "
psiReactionThermo.H
"
41
#include "
BasicChemistryModel.H
"
42
#include "
reactingMixture.H
"
43
#include "
chemistrySolver.H
"
44
#include "
OFstream.H
"
45
#include "
thermoPhysicsTypes.H
"
46
#include "
basicSpecieMixture.H
"
47
#include "
hexCellFvMesh.H
"
48
49
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51
int
main(
int
argc,
char
*argv[])
52
{
53
argList::addNote
54
(
55
"Solver for chemistry problems, designed for use on single cell cases"
56
" to provide comparison against other chemistry solvers"
57
);
58
59
argList::noParallel();
60
61
#define CREATE_MESH createSingleCellMesh.H
62
#define NO_CONTROL
63
#include "
postProcess.H
"
64
65
#include "
setRootCaseLists.H
"
66
#include "
createTime.H
"
67
#include "
createSingleCellMesh.H
"
68
#include "
createFields.H
"
69
#include "
createFieldRefs.H
"
70
#include "
readInitialConditions.H
"
71
#include "
createControls.H
"
72
73
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74
75
Info
<<
"\nStarting time loop\n"
<<
endl
;
76
77
while
(
runTime
.run())
78
{
79
#include "
readControls.H
"
80
81
#include "
setDeltaT.H
"
82
83
++
runTime
;
84
Info
<<
"Time = "
<<
runTime
.timeName() <<
nl
<<
endl
;
85
86
#include "
solveChemistry.H
"
87
#include "
YEqn.H
"
88
#include "
hEqn.H
"
89
#include "
pEqn.H
"
90
91
#include "
output.H
"
92
93
runTime
.printExecutionTime(Info);
94
}
95
96
Info
<<
"Number of steps = "
<<
runTime
.timeIndex() <<
nl
;
97
Info
<<
"End\n"
<<
endl
;
98
99
return
0;
100
}
101
102
103
// ************************************************************************* //
BasicChemistryModel.H
OFstream.H
createControls.H
setDeltaT.H
basicSpecieMixture.H
chemistrySolver.H
YEqn.H
createFieldRefs.H
hEqn.H
pEqn.H
readControls.H
runTime
engineTime & runTime
Definition
createEngineTime.H:13
createSingleCellMesh.H
createTime.H
fvCFD.H
hexCellFvMesh.H
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere).
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition
Ostream.H:519
Foam::nl
constexpr char nl
The newline '\n' character (0x0a).
Definition
Ostream.H:50
output.H
postProcess.H
Execute application functionObjects to post-process existing results.
psiReactionThermo.H
reactingMixture.H
readInitialConditions.H
setRootCaseLists.H
solveChemistry.H
createFields.H
thermoPhysicsTypes.H
Type definitions for thermo-physics models.
applications
solvers
combustion
chemFoam
chemFoam.C
Generated by
1.16.1