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
649c29f9
Commit
649c29f9
authored
Aug 30, 2023
by
quant
Browse files
Initial commit
parent
89db0b5a
Changes
789
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
871 additions
and
0 deletions
+871
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H
...angian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H
+33
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files
...an/reactingParcelFoam/simpleReactingParcelFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options
.../reactingParcelFoam/simpleReactingParcelFoam/Make/options
+52
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
...angian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
+21
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
...angian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
+48
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H
...eactingParcelFoam/simpleReactingParcelFoam/createClouds.H
+9
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFieldRefs.H
...tingParcelFoam/simpleReactingParcelFoam/createFieldRefs.H
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H
...eactingParcelFoam/simpleReactingParcelFoam/createFields.H
+102
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
...angian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
+55
-0
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C
...lFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C
+111
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
...plications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
+34
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files
...ations/solvers/lagrangian/simpleCoalParcelFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
...ions/solvers/lagrangian/simpleCoalParcelFoam/Make/options
+52
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
...plications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
+21
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
...plications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
+48
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
...ns/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
+9
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
...solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
...ns/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
+102
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
...plications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
+57
-0
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
...rs/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
+105
-0
No files found.
Too many changes to show.
To preserve performance only
789 of 789+
files are displayed.
Plain diff
Email patch
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H
0 → 100644
View file @
649c29f9
{
volScalarField
&
he
=
thermo
.
he
();
fvScalarMatrix
EEqn
(
mvConvection
->
fvmDiv
(
phi
,
he
)
+
(
he
.
name
()
==
"e"
?
fvc
::
div
(
phi
,
volScalarField
(
"Ekp"
,
0
.
5
*
magSqr
(
U
)
+
p
/
rho
))
:
fvc
::
div
(
phi
,
volScalarField
(
"K"
,
0
.
5
*
magSqr
(
U
)))
)
-
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
;
}
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files
0 → 100644
View file @
649c29f9
simpleReactingParcelFoam.C
EXE = $(FOAM_APPBIN)/simpleReactingParcelFoam
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-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/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)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
0 → 100644
View file @
649c29f9
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
);
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
0 → 100644
View file @
649c29f9
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
(
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
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H
0 → 100644
View file @
649c29f9
Info
<<
"
\n
Constructing "
<<
CLOUD_BASE_TYPE_NAME
<<
" cloud"
<<
endl
;
basicReactingTypeCloud
parcels
(
word
(
CLOUD_BASE_TYPE_NAME
)
&
"Cloud1"
,
rho
,
U
,
g
,
slgThermo
);
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFieldRefs.H
0 → 100644
View file @
649c29f9
const
volScalarField
&
psi
=
thermo
.
psi
();
const
volScalarField
&
T
=
thermo
.
T
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H
0 → 100644
View file @
649c29f9
#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 combustion model
\n
"
<<
endl
;
autoPtr
<
CombustionModel
<
rhoReactionThermo
>>
combustion
(
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
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
dimEnergy
/
dimVolume
/
dimTime
,
Zero
)
);
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createFvOptions.H"
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
0 → 100644
View file @
649c29f9
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const
volScalarField
psip0
(
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
();
// Thermodynamic density update
thermo
.
correctRho
(
psi
*
p
-
psip0
);
#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
;
OpenFOAM-v2112/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C
0 → 100644
View file @
649c29f9
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2018 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
Description
Steady-state solver for compressible, turbulent flow with reacting,
multiphase particle clouds and optional sources/constraints.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "IOporosityModelList.H"
#include "fvOptions.H"
#include "SLGThermo.H"
#include "simpleControl.H"
#include "cloudMacros.H"
#ifndef CLOUD_BASE_TYPE
#define CLOUD_BASE_TYPE ReactingMultiphase
//#define CLOUD_BASE_TYPE_NAME "reactingMultiphase" Backwards compat
#define CLOUD_BASE_TYPE_NAME "reacting"
#endif
#include CLOUD_INCLUDE_FILE(CLOUD_BASE_TYPE)
#define basicReactingTypeCloud CLOUD_TYPE(CLOUD_BASE_TYPE)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Steady-state solver for compressible, turbulent flow"
" with reacting, multiphase 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 "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
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
0 → 100644
View file @
649c29f9
{
volScalarField
&
he
=
thermo
.
he
();
fvScalarMatrix
EEqn
(
mvConvection
->
fvmDiv
(
phi
,
he
)
+
(
he
.
name
()
==
"e"
?
fvc
::
div
(
phi
,
volScalarField
(
"Ekp"
,
0
.
5
*
magSqr
(
U
)
+
p
/
rho
))
:
fvc
::
div
(
phi
,
volScalarField
(
"K"
,
0
.
5
*
magSqr
(
U
)))
)
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
he
)
==
rho
*
(
U
&
g
)
+
Qdot
+
parcels
.
Sh
(
he
)
+
radiation
->
Sh
(
thermo
,
he
)
+
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
;
}
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/files
0 → 100644
View file @
649c29f9
simpleCoalParcelFoam.C
EXE = $(FOAM_APPBIN)/simpleCoalParcelFoam
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/Make/options
0 → 100644
View file @
649c29f9
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
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
0 → 100644
View file @
649c29f9
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
);
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
0 → 100644
View file @
649c29f9
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
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createClouds.H
0 → 100644
View file @
649c29f9
Info
<<
"
\n
Constructing coal cloud"
<<
endl
;
coalCloud
parcels
(
"reactingCloud1"
,
rho
,
U
,
g
,
slgThermo
);
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createFieldRefs.H
0 → 100644
View file @
649c29f9
const
volScalarField
&
psi
=
thermo
.
psi
();
const
volScalarField
&
T
=
thermo
.
T
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H
0 → 100644
View file @
649c29f9
#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"
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
0 → 100644
View file @
649c29f9
{
// 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
;
}
OpenFOAM-v2112/applications/solvers/lagrangian/simpleCoalParcelFoam/simpleCoalParcelFoam.C
0 → 100644
View file @
649c29f9
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
;
}
// ************************************************************************* //
Prev
1
…
28
29
30
31
32
33
34
35
36
…
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