Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
combustion
engineFoam
engineFoam.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Application
25
engineFoam
26
27
Description
28
Solver for internal combustion engines.
29
30
Combusting RANS code using the b-Xi two-equation model.
31
Xi may be obtained by either the solution of the Xi transport
32
equation or from an algebraic exression. Both approaches are
33
based on Gulder's flame speed correlation which has been shown
34
to be appropriate by comparison with the results from the
35
spectral model.
36
37
Strain effects are encorporated directly into the Xi equation
38
but not in the algebraic approximation. Further work need to be
39
done on this issue, particularly regarding the enhanced removal rate
40
caused by flame compression. Analysis using results of the spectral
41
model will be required.
42
43
For cases involving very lean Propane flames or other flames which are
44
very strain-sensitive, a transport equation for the laminar flame
45
speed is present. This equation is derived using heuristic arguments
46
involving the strain time scale and the strain-rate at extinction.
47
the transport velocity is the same as that for the Xi equation.
48
49
Usage
50
- engineFoam [OPTION]
51
52
@param -case <dir> \n
53
Specify the case directory
54
55
@param -parallel \n
56
Run the case in parallel
57
58
@param -help \n
59
Display short usage message
60
61
@param -doc \n
62
Display Doxygen documentation page
63
64
@param -srcDoc \n
65
Display source code
66
67
\*---------------------------------------------------------------------------*/
68
69
#include <
finiteVolume/fvCFD.H
>
70
#include <
engine/engineTime.H
>
71
#include <
engine/engineMesh.H
>
72
#include <
reactionThermophysicalModels/hhuCombustionThermo.H
>
73
#include <
compressibleTurbulenceModel/turbulenceModel.H
>
74
#include <
laminarFlameSpeedModels/laminarFlameSpeed.H
>
75
#include <
engine/ignition.H
>
76
#include <
OpenFOAM/Switch.H
>
77
#include <
OpenFOAM/OFstream.H
>
78
79
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80
81
int
main
(
int
argc,
char
*argv[])
82
{
83
#include <
OpenFOAM/setRootCase.H
>
84
85
#include <
engine/createEngineTime.H
>
86
#include <
engine/createEngineMesh.H
>
87
#include "
../XiFoam/readCombustionProperties.H
"
88
#include "
../XiFoam/createFields.H
"
89
#include <
finiteVolume/initContinuityErrs.H
>
90
#include "
readEngineTimeControls.H
"
91
#include <
finiteVolume/compressibleCourantNo.H
>
92
#include <
finiteVolume/setInitialDeltaT.H
>
93
#include "
startSummary.H
"
94
95
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96
97
Info
<<
"\nStarting time loop\n"
<<
endl
;
98
99
while
(runTime.run())
100
{
101
#include <
finiteVolume/readPISOControls.H
>
102
#include "
readEngineTimeControls.H
"
103
#include <
finiteVolume/compressibleCourantNo.H
>
104
#include <
finiteVolume/setDeltaT.H
>
105
106
runTime++;
107
108
Info
<<
"Crank angle = "
<< runTime.theta() <<
" CA-deg"
<<
endl
;
109
110
mesh
.move();
111
112
#include <
finiteVolume/rhoEqn.H
>
113
114
#include "
UEqn.H
"
115
116
// --- PISO loop
117
for
(
int
corr=1; corr<=
nCorr
; corr++)
118
{
119
#include "
../XiFoam/ftEqn.H
"
120
#include "
../XiFoam/bEqn.H
"
121
#include "
../XiFoam/huEqn.H
"
122
#include "
../XiFoam/hEqn.H
"
123
124
if
(!ign.ignited())
125
{
126
hu
==
h
;
127
}
128
129
#include "
pEqn.H
"
130
}
131
132
turbulence
->correct();
133
134
#include "
logSummary.H
"
135
136
rho
=
thermo
.
rho
();
137
138
runTime.write();
139
140
Info
<<
"ExecutionTime = "
<< runTime.elapsedCpuTime() <<
" s"
141
<<
" ClockTime = "
<< runTime.elapsedClockTime() <<
" s"
142
<<
nl
<<
endl
;
143
}
144
145
Info
<<
"End\n"
<<
endl
;
146
147
return
0;
148
}
149
150
151
// ************************ vim: set sw=4 sts=4 et: ************************ //