Skip to content
GitLab
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
cb6fdd4d
Commit
cb6fdd4d
authored
May 27, 2011
by
andy
Browse files
ENH: Added new sprayFoam solver - uses new spray library
parent
78ce13bb
Changes
5
Hide whitespace changes
Inline
Side-by-side
applications/solvers/lagrangian/sprayFoam/Make/files
0 → 100644
View file @
cb6fdd4d
sprayFoam.C
EXE = $(FOAM_APPBIN)/sprayFoam
applications/solvers/lagrangian/sprayFoam/Make/options
0 → 100644
View file @
cb6fdd4d
EXE_INC = \
-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)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-llagrangian \
-llagrangianIntermediate \
-lspray \
-lspecie \
-lbasicThermophysicalModels \
-lliquidProperties \
-lliquidMixtureProperties \
-lsolidProperties \
-lsolidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lsampling
applications/solvers/lagrangian/sprayFoam/chemistry.H
0 → 100644
View file @
cb6fdd4d
if
(
chemistry
.
chemistry
())
{
Info
<<
"Solving chemistry"
<<
endl
;
chemistry
.
solve
(
runTime
.
value
()
-
runTime
.
deltaTValue
(),
runTime
.
deltaTValue
()
);
// turbulent time scale
if
(
turbulentReaction
)
{
tmp
<
volScalarField
>
tepsilon
(
turbulence
->
epsilon
());
const
volScalarField
&
epsilon
=
tepsilon
();
tmp
<
volScalarField
>
tmuEff
(
turbulence
->
muEff
());
const
volScalarField
&
muEff
=
tmuEff
();
tmp
<
volScalarField
>
ttc
(
chemistry
.
tc
());
const
volScalarField
&
tc
=
ttc
();
forAll
(
epsilon
,
i
)
{
if
(
epsilon
[
i
]
>
0
)
{
// Chalmers PaSR model
scalar
tk
=
Cmix
.
value
()
*
Foam
::
sqrt
(
muEff
[
i
]
/
rho
[
i
]
/
epsilon
[
i
]);
kappa
[
i
]
=
(
runTime
.
deltaTValue
()
+
tc
[
i
])
/
(
runTime
.
deltaTValue
()
+
tc
[
i
]
+
tk
);
}
else
{
// Return to laminar combustion
kappa
[
i
]
=
1
.
0
;
}
}
}
else
{
kappa
=
1
.
0
;
}
chemistrySh
=
kappa
*
chemistry
.
Sh
()();
}
applications/solvers/lagrangian/sprayFoam/createClouds.H
0 → 100644
View file @
cb6fdd4d
Info
<<
"
\n
Constructing reacting cloud"
<<
endl
;
basicSprayCloud
parcels
(
"sprayCloud"
,
rho
,
U
,
g
,
slgThermo
);
applications/solvers/lagrangian/sprayFoam/sprayFoam.C
0 → 100644
View file @
cb6fdd4d
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
\\/ 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
sprayFoam
Description
Transient PIMPLE solver for compressible, laminar or turbulent flow with
spray parcels.
\*---------------------------------------------------------------------------*/
#include
"fvCFD.H"
#include
"hCombustionThermo.H"
#include
"turbulenceModel.H"
#include
"basicSprayCloud.H"
#include
"psiChemistryModel.H"
#include
"chemistrySolver.H"
#include
"radiationModel.H"
#include
"SLGThermo.H"
#include
"pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createMesh.H"
#include
"readChemistryProperties.H"
#include
"readGravitationalAcceleration.H"
#include
"createFields.H"
#include
"createClouds.H"
#include
"createRadiationModel.H"
#include
"initContinuityErrs.H"
#include
"readTimeControls.H"
#include
"compressibleCourantNo.H"
#include
"setInitialDeltaT.H"
pimpleControl
pimple
(
mesh
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include
"readTimeControls.H"
#include
"compressibleCourantNo.H"
#include
"setDeltaT.H"
runTime
++
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
parcels
.
evolve
();
#include
"chemistry.H"
#include
"rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for
(
pimple
.
start
();
pimple
.
loop
();
pimple
++
)
{
#include
"UEqn.H"
#include
"YEqn.H"
#include
"hsEqn.H"
// --- PISO loop
for
(
int
corr
=
0
;
corr
<
pimple
.
nCorr
();
corr
++
)
{
#include
"pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
turbulence
->
correct
();
}
}
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
);
}
// ************************************************************************* //
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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