Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HPCAPPs
OpenFOAM-GPU-v2.0
Commits
ea17556c
Commit
ea17556c
authored
Mar 07, 2024
by
shunbo
Browse files
Initial commit
parents
Changes
798
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
883 additions
and
0 deletions
+883
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files
...ations/solvers/lagrangian/simpleCoalParcelFoam/Make/files
+3
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
...ions/solvers/lagrangian/simpleCoalParcelFoam/Make/options
+52
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
+21
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
+48
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
...ns/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
+9
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
...solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
+3
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
...ns/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
+102
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
+57
-0
applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
...rs/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
+105
-0
applications/solvers/lagrangian/sprayFoam/EEqn.H
applications/solvers/lagrangian/sprayFoam/EEqn.H
+40
-0
applications/solvers/lagrangian/sprayFoam/Make/files
applications/solvers/lagrangian/sprayFoam/Make/files
+3
-0
applications/solvers/lagrangian/sprayFoam/Make/options
applications/solvers/lagrangian/sprayFoam/Make/options
+53
-0
applications/solvers/lagrangian/sprayFoam/UEqn.H
applications/solvers/lagrangian/sprayFoam/UEqn.H
+27
-0
applications/solvers/lagrangian/sprayFoam/YEqn.H
applications/solvers/lagrangian/sprayFoam/YEqn.H
+49
-0
applications/solvers/lagrangian/sprayFoam/createClouds.H
applications/solvers/lagrangian/sprayFoam/createClouds.H
+9
-0
applications/solvers/lagrangian/sprayFoam/createFieldRefs.H
applications/solvers/lagrangian/sprayFoam/createFieldRefs.H
+3
-0
applications/solvers/lagrangian/sprayFoam/createFields.H
applications/solvers/lagrangian/sprayFoam/createFields.H
+105
-0
applications/solvers/lagrangian/sprayFoam/engineFoam/Make/files
...ations/solvers/lagrangian/sprayFoam/engineFoam/Make/files
+3
-0
applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options
...ions/solvers/lagrangian/sprayFoam/engineFoam/Make/options
+57
-0
applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C
...ions/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C
+134
-0
No files found.
Too many changes to show.
To preserve performance only
798 of 798+
files are displayed.
Plain diff
Email patch
applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files
0 → 100644
View file @
ea17556c
simpleCoalParcelFoam.C
EXE = $(FOAM_APPBIN)/simpleCoalParcelFoam
applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lsampling \
-lcoalCombustion \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
0 → 100644
View file @
ea17556c
MRF
.
correctBoundaryVelocity
(
U
);
tmp
<
fvVectorMatrix
>
tUEqn
(
fvm
::
div
(
phi
,
U
)
+
MRF
.
DDt
(
rho
,
U
)
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
()
*
g
+
parcels
.
SU
(
U
)
+
fvOptions
(
rho
,
U
)
);
fvVectorMatrix
&
UEqn
=
tUEqn
.
ref
();
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
fvOptions
.
correct
(
U
);
applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
0 → 100644
View file @
ea17556c
tmp
<
fv
::
convectionScheme
<
scalar
>>
mvConvection
(
fv
::
convectionScheme
<
scalar
>::
New
(
mesh
,
fields
,
phi
,
mesh
.
divScheme
(
"div(phi,Yi_h)"
)
)
);
{
reaction
->
correct
();
Qdot
=
reaction
->
Qdot
();
volScalarField
Yt
(
0
.
0
*
Y
[
0
]);
forAll
(
Y
,
i
)
{
if
(
i
!=
inertIndex
&&
composition
.
active
(
i
))
{
volScalarField
&
Yi
=
Y
[
i
];
fvScalarMatrix
YEqn
(
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
parcels
.
SYi
(
i
,
Yi
)
+
reaction
->
R
(
Yi
)
+
fvOptions
(
rho
,
Yi
)
);
YEqn
.
relax
();
fvOptions
.
constrain
(
YEqn
);
YEqn
.
solve
(
mesh
.
solver
(
"Yi"
));
fvOptions
.
correct
(
Yi
);
Yi
.
max
(
0
.
0
);
Yt
+=
Yi
;
}
}
Y
[
inertIndex
]
=
scalar
(
1
)
-
Yt
;
Y
[
inertIndex
].
max
(
0
.
0
);
}
applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
0 → 100644
View file @
ea17556c
Info
<<
"
\n
Constructing coal cloud"
<<
endl
;
coalCloud
parcels
(
"reactingCloud1"
,
rho
,
U
,
g
,
slgThermo
);
applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
0 → 100644
View file @
ea17556c
const
volScalarField
&
psi
=
thermo
.
psi
();
const
volScalarField
&
T
=
thermo
.
T
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
0 → 100644
View file @
ea17556c
#include "readGravitationalAcceleration.H"
Info
<<
"Reading thermophysical properties
\n
"
<<
endl
;
autoPtr
<
rhoReactionThermo
>
pThermo
(
rhoReactionThermo
::
New
(
mesh
));
rhoReactionThermo
&
thermo
=
pThermo
();
thermo
.
validate
(
args
.
executable
(),
"h"
,
"e"
);
SLGThermo
slgThermo
(
mesh
,
thermo
);
basicSpecieMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
const
word
inertSpecie
(
thermo
.
get
<
word
>
(
"inertSpecie"
));
if
(
!
composition
.
species
().
found
(
inertSpecie
))
{
FatalIOErrorIn
(
args
.
executable
().
c_str
(),
thermo
)
<<
"Inert specie "
<<
inertSpecie
<<
" not found in available species "
<<
composition
.
species
()
<<
exit
(
FatalIOError
);
}
volScalarField
&
p
=
thermo
.
p
();
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
thermo
.
rho
()
);
Info
<<
"
\n
Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
mesh
.
setFluxRequired
(
p
.
name
());
const
dimensionedScalar
rhoMax
(
"rhoMax"
,
dimDensity
,
GREAT
,
simple
.
dict
());
const
dimensionedScalar
rhoMin
(
"rhoMin"
,
dimDensity
,
Zero
,
simple
.
dict
());
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
compressible
::
turbulenceModel
>
turbulence
(
compressible
::
turbulenceModel
::
New
(
rho
,
U
,
phi
,
thermo
)
);
Info
<<
"Creating reaction model
\n
"
<<
endl
;
autoPtr
<
CombustionModel
<
rhoReactionThermo
>>
reaction
(
CombustionModel
<
rhoReactionThermo
>::
New
(
thermo
,
turbulence
())
);
Info
<<
"Creating multi-variate interpolation scheme
\n
"
<<
endl
;
multivariateSurfaceInterpolationScheme
<
scalar
>::
fieldTable
fields
;
forAll
(
Y
,
i
)
{
fields
.
add
(
Y
[
i
]);
}
fields
.
add
(
thermo
.
he
());
volScalarField
Qdot
(
IOobject
(
"Qdot"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
dimEnergy
/
dimVolume
/
dimTime
,
Zero
)
);
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"
applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
0 → 100644
View file @
ea17556c
{
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1:
thermo
.
rho
()
-=
psi
*
p
;
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
surfaceScalarField
rhorAUf
(
"rhorAUf"
,
fvc
::
interpolate
(
rho
*
rAU
));
volVectorField
HbyA
(
constrainHbyA
(
rAU
*
UEqn
.
H
(),
U
,
p
));
tUEqn
.
clear
();
surfaceScalarField
phiHbyA
(
"phiHbyA"
,
fvc
::
interpolate
(
rho
)
*
fvc
::
flux
(
HbyA
)
);
MRF
.
makeRelative
(
fvc
::
interpolate
(
rho
),
phiHbyA
);
// Update the pressure BCs to ensure flux consistency
constrainPressure
(
p
,
rho
,
U
,
phiHbyA
,
rhorAUf
,
MRF
);
while
(
simple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvc
::
div
(
phiHbyA
)
-
fvm
::
laplacian
(
rhorAUf
,
p
)
==
parcels
.
Srho
()
+
fvOptions
(
psi
,
p
,
rho
.
name
())
);
pEqn
.
solve
();
if
(
simple
.
finalNonOrthogonalIter
())
{
phi
=
phiHbyA
+
pEqn
.
flux
();
}
}
p
.
relax
();
// Second part of thermodynamic density update
thermo
.
rho
()
+=
psi
*
p
;
#include "compressibleContinuityErrs.H"
U
=
HbyA
-
rAU
*
fvc
::
grad
(
p
);
U
.
correctBoundaryConditions
();
fvOptions
.
correct
(
U
);
rho
=
thermo
.
rho
();
rho
=
max
(
rho
,
rhoMin
);
rho
=
min
(
rho
,
rhoMax
);
rho
.
relax
();
Info
<<
"p min/max = "
<<
min
(
p
).
value
()
<<
", "
<<
max
(
p
).
value
()
<<
endl
;
}
applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
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
simpleReactingParcelFoam
Group
grpLagrangianSolvers
Description
Steady-state solver for compressible, turbulent flow with coal particle
clouds and optional sources/constraints.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "coalCloud.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "IOporosityModelList.H"
#include "fvOptions.H"
#include "SLGThermo.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Steady-state solver for compressible, turbulent flow"
" with coal particle clouds and optional sources/constraints."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
simple
.
loop
())
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
parcels
.
evolve
();
// --- Pressure-velocity SIMPLE corrector loop
{
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
#include "pEqn.H"
}
turbulence
->
correct
();
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/sprayFoam/EEqn.H
0 → 100644
View file @
ea17556c
{
volScalarField
&
he
=
thermo
.
he
();
fvScalarMatrix
EEqn
(
fvm
::
ddt
(
rho
,
he
)
+
mvConvection
->
fvmDiv
(
phi
,
he
)
+
fvc
::
ddt
(
rho
,
K
)
+
fvc
::
div
(
phi
,
K
)
+
(
he
.
name
()
==
"e"
?
fvc
::
div
(
fvc
::
absolute
(
phi
/
fvc
::
interpolate
(
rho
),
U
),
p
,
"div(phiv,p)"
)
:
-
dpdt
)
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
he
)
==
rho
*
(
U
&
g
)
+
parcels
.
Sh
(
he
)
+
radiation
->
Sh
(
thermo
,
he
)
+
Qdot
+
fvOptions
(
rho
,
he
)
);
EEqn
.
relax
();
fvOptions
.
constrain
(
EEqn
);
EEqn
.
solve
();
fvOptions
.
correct
(
he
);
thermo
.
correct
();
radiation
->
correct
();
Info
<<
"T gas min/max "
<<
min
(
T
).
value
()
<<
", "
<<
max
(
T
).
value
()
<<
endl
;
}
applications/solvers/lagrangian/sprayFoam/Make/files
0 → 100644
View file @
ea17556c
sprayFoam.C
EXE = $(FOAM_APPBIN)/sprayFoam
applications/solvers/lagrangian/sprayFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-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)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/sprayFoam/UEqn.H
0 → 100644
View file @
ea17556c
// Solve the Momentum equation
MRF
.
correctBoundaryVelocity
(
U
);
tmp
<
fvVectorMatrix
>
tUEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
phi
,
U
)
+
MRF
.
DDt
(
rho
,
U
)
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
()
*
g
+
parcels
.
SU
(
U
)
+
fvOptions
(
rho
,
U
)
);
fvVectorMatrix
&
UEqn
=
tUEqn
.
ref
();
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
fvOptions
.
correct
(
U
);
K
=
0
.
5
*
magSqr
(
U
);
}
applications/solvers/lagrangian/sprayFoam/YEqn.H
0 → 100644
View file @
ea17556c
tmp
<
fv
::
convectionScheme
<
scalar
>>
mvConvection
(
fv
::
convectionScheme
<
scalar
>::
New
(
mesh
,
fields
,
phi
,
mesh
.
divScheme
(
"div(phi,Yi_h)"
)
)
);
{
combustion
->
correct
();
Qdot
=
combustion
->
Qdot
();
volScalarField
Yt
(
0
.
0
*
Y
[
0
]);
forAll
(
Y
,
i
)
{
if
(
i
!=
inertIndex
&&
composition
.
active
(
i
))
{
volScalarField
&
Yi
=
Y
[
i
];
fvScalarMatrix
YEqn
(
fvm
::
ddt
(
rho
,
Yi
)
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
parcels
.
SYi
(
i
,
Yi
)
+
combustion
->
R
(
Yi
)
+
fvOptions
(
rho
,
Yi
)
);
YEqn
.
relax
();
fvOptions
.
constrain
(
YEqn
);
YEqn
.
solve
(
mesh
.
solver
(
"Yi"
));
fvOptions
.
correct
(
Yi
);
Yi
.
max
(
0
.
0
);
Yt
+=
Yi
;
}
}
Y
[
inertIndex
]
=
scalar
(
1
)
-
Yt
;
Y
[
inertIndex
].
max
(
0
.
0
);
}
applications/solvers/lagrangian/sprayFoam/createClouds.H
0 → 100644
View file @
ea17556c
Info
<<
"
\n
Constructing reacting cloud"
<<
endl
;
basicSprayCloud
parcels
(
"sprayCloud"
,
rho
,
U
,
g
,
slgThermo
);
applications/solvers/lagrangian/sprayFoam/createFieldRefs.H
0 → 100644
View file @
ea17556c
const
volScalarField
&
T
=
thermo
.
T
();
const
volScalarField
&
psi
=
thermo
.
psi
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
applications/solvers/lagrangian/sprayFoam/createFields.H
0 → 100644
View file @
ea17556c
#include "readGravitationalAcceleration.H"
Info
<<
"Reading thermophysical properties
\n
"
<<
endl
;
autoPtr
<
psiReactionThermo
>
pThermo
(
psiReactionThermo
::
New
(
mesh
));
psiReactionThermo
&
thermo
=
pThermo
();
thermo
.
validate
(
args
.
executable
(),
"h"
,
"e"
);
SLGThermo
slgThermo
(
mesh
,
thermo
);
basicSpecieMixture
&
composition
=
thermo
.
composition
();
PtrList
<
volScalarField
>&
Y
=
composition
.
Y
();
const
word
inertSpecie
(
thermo
.
get
<
word
>
(
"inertSpecie"
));
if
(
!
composition
.
species
().
found
(
inertSpecie
))
{
FatalIOErrorIn
(
args
.
executable
().
c_str
(),
thermo
)
<<
"Inert specie "
<<
inertSpecie
<<
" not found in available species "
<<
composition
.
species
()
<<
exit
(
FatalIOError
);
}
volScalarField
&
p
=
thermo
.
p
();
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
thermo
.
rho
()
);
Info
<<
"
\n
Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
mesh
.
setFluxRequired
(
p
.
name
());
const
dimensionedScalar
rhoMax
(
"rhoMax"
,
dimDensity
,
GREAT
,
pimple
.
dict
());
const
dimensionedScalar
rhoMin
(
"rhoMin"
,
dimDensity
,
Zero
,
pimple
.
dict
());
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
compressible
::
turbulenceModel
>
turbulence
(
compressible
::
turbulenceModel
::
New
(
rho
,
U
,
phi
,
thermo
)
);
Info
<<
"Creating combustion model
\n
"
<<
endl
;
autoPtr
<
CombustionModel
<
psiReactionThermo
>>
combustion
(
CombustionModel
<
psiReactionThermo
>::
New
(
thermo
,
turbulence
())
);
multivariateSurfaceInterpolationScheme
<
scalar
>::
fieldTable
fields
;
forAll
(
Y
,
i
)
{
fields
.
add
(
Y
[
i
]);
}
fields
.
add
(
thermo
.
he
());
volScalarField
Qdot
(
IOobject
(
"Qdot"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
dimEnergy
/
dimVolume
/
dimTime
,
Zero
)
);
#include "createDpdt.H"
#include "createK.H"
#include "createMRF.H"
#include "createClouds.H"
#include "createRadiationModel.H"
#include "createFvOptions.H"
applications/solvers/lagrangian/sprayFoam/engineFoam/Make/files
0 → 100644
View file @
ea17556c
engineFoam.C
EXE = $(FOAM_APPBIN)/engineFoam
applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I../sprayDyMFoam \
-I.. \
-I../../reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-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)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/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 \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lengine \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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
engineFoam
Description
Transient solver for compressible, turbulent engine flow with a spray
particle cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "engineTime.H"
#include "engineMesh.H"
#include "turbulentFluidThermoModel.H"
#include "basicSprayCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for compressible, turbulent engine flow"
" with a spray particle cloud."
);
#define CREATE_TIME createEngineTime.H
#define CREATE_MESH createEngineMesh.H
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createControl.H"
#include "readEngineTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUf.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
#include "startSummary.H"
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readEngineTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Engine time = "
<<
runTime
.
theta
()
<<
runTime
.
unit
()
<<
endl
;
mesh
.
move
();
parcels
.
evolve
();
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
while
(
pimple
.
loop
())
{
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while
(
pimple
.
correct
())
{
#include "pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
turbulence
->
correct
();
}
}
#include "logSummary.H"
rho
=
thermo
.
rho
();
if
(
runTime
.
write
())
{
combustion
->
Qdot
()().
write
();
}
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
Prev
1
…
29
30
31
32
33
34
35
36
37
…
40
Next
Write
Preview
Markdown
is supported
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