Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
97535cc6
Commit
97535cc6
authored
Nov 08, 2011
by
andy
Browse files
ENH: Added new sprayEngineFoam solver to replace dieselEngineFoam
parent
627991bf
Changes
7
Hide whitespace changes
Inline
Side-by-side
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/Make/files
0 → 100644
View file @
97535cc6
sprayEngineFoam.C
EXE = $(FOAM_APPBIN)/sprayEngineFoam
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/Make/options
0 → 100644
View file @
97535cc6
EXE_INC = \
-I$(FOAM_SOLVERS)/lagrangian/sprayFoam \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/spray/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianSpray \
-lspecie \
-lbasicThermophysicalModels \
-lliquidProperties \
-lliquidMixtureProperties \
-lsolidProperties \
-lsolidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lengine \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/createClouds.H
0 → 100644
View file @
97535cc6
Info
<<
"
\n
Constructing reacting cloud"
<<
endl
;
basicSprayCloud
parcels
(
"sprayCloud"
,
rho
,
U
,
g
,
slgThermo
);
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/logSummary.H
0 → 100644
View file @
97535cc6
Info
<<
"Mean pressure:"
<<
p
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
Info
<<
"Mean temperature:"
<<
T
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
Info
<<
"Mean u':"
<<
(
sqrt
((
2
.
0
/
3
.
0
)
*
turbulence
->
k
()))().
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
logSummaryFile
<<
runTime
.
theta
()
<<
tab
<<
p
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
tab
<<
T
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
tab
<<
(
sqrt
((
2
.
0
/
3
.
0
)
*
turbulence
->
k
()))().
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/readEngineTimeControls.H
0 → 100644
View file @
97535cc6
#include
"readTimeControls.H"
maxDeltaT
=
runTime
.
userTimeToTime
(
maxDeltaT
);
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/sprayEngineFoam.C
0 → 100644
View file @
97535cc6
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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
sprayEngineFoam
Description
Transient PIMPLE solver for compressible, laminar or turbulent engine
flow swith spray parcels.
\*---------------------------------------------------------------------------*/
#include
"fvCFD.H"
#include
"engineTime.H"
#include
"engineMesh.H"
#include
"turbulenceModel.H"
#include
"basicSprayCloud.H"
#include
"psiChemistryCombustionModel.H"
#include
"radiationModel.H"
#include
"SLGThermo.H"
#include
"pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
#include
"setRootCase.H"
#include
"createEngineTime.H"
#include
"createEngineMesh.H"
#include
"readGravitationalAcceleration.H"
#include
"createFields.H"
#include
"createClouds.H"
#include
"createRadiationModel.H"
#include
"initContinuityErrs.H"
#include
"readEngineTimeControls.H"
#include
"compressibleCourantNo.H"
#include
"setInitialDeltaT.H"
#include
"startSummary.H"
pimpleControl
pimple
(
mesh
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include
"readEngineTimeControls.H"
#include
"compressibleCourantNo.H"
#include
"setDeltaT.H"
runTime
++
;
Info
<<
"Crank angle = "
<<
runTime
.
theta
()
<<
" CA-deg"
<<
endl
;
parcels
.
evolve
();
#include
"rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
while
(
pimple
.
loop
())
{
#include
"UEqn.H"
#include
"YEqn.H"
#include
"hsEqn.H"
// --- Pressure corrector loop
while
(
pimple
.
correct
())
{
#include
"pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
turbulence
->
correct
();
}
}
#include
"logSummary.H"
rho
=
thermo
.
rho
();
if
(
runTime
.
write
())
{
chemistry
.
dQ
()().
write
();
}
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s"
<<
" ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
" s"
<<
nl
<<
endl
;
}
Info
<<
"End
\n
"
<<
endl
;
return
(
0
);
}
// ************************************************************************* //
applications/solvers/lagrangian/sprayFoam/sprayEnginFoam/startSummary.H
0 → 100644
View file @
97535cc6
Info
<<
"Total cylinder mass: "
<<
fvc
::
domainIntegrate
(
rho
).
value
()
<<
endl
;
//Info<< "Total fuel mass: "
// << fvc::domainIntegrate(rho*compostion.ft()).value() << endl;
OFstream
logSummaryFile
(
runTime
.
path
()
/
(
"logSummary."
+
runTime
.
timeName
()
+
".dat"
)
);
logSummaryFile
<<
"# CA"
<<
" p"
<<
" T"
<<
" u'"
<<
endl
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment