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
887 additions
and
0 deletions
+887
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C
...rangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C
+87
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
...solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
...lvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
+18
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C
...ications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C
+45
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
...lications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
...cations/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
+42
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/Make/files
...-v2112/applications/solvers/lagrangian/DPMFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/Make/options
...2112/applications/solvers/lagrangian/DPMFoam/Make/options
+40
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/UcEqn.H
...OAM-v2112/applications/solvers/lagrangian/DPMFoam/UcEqn.H
+31
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/continuityErrs.H
.../applications/solvers/lagrangian/DPMFoam/continuityErrs.H
+50
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/createFields.H
...12/applications/solvers/lagrangian/DPMFoam/createFields.H
+175
-0
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/pEqn.H
...FOAM-v2112/applications/solvers/lagrangian/DPMFoam/pEqn.H
+50
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H
.../applications/solvers/lagrangian/coalChemistryFoam/EEqn.H
+41
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/Make/files
...lications/solvers/lagrangian/coalChemistryFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/Make/options
...cations/solvers/lagrangian/coalChemistryFoam/Make/options
+53
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H
.../applications/solvers/lagrangian/coalChemistryFoam/UEqn.H
+25
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H
.../applications/solvers/lagrangian/coalChemistryFoam/YEqn.H
+50
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C
.../solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C
+145
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H
...tions/solvers/lagrangian/coalChemistryFoam/createClouds.H
+19
-0
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/createFieldRefs.H
...ns/solvers/lagrangian/coalChemistryFoam/createFieldRefs.H
+4
-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/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.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) 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/>.
\*---------------------------------------------------------------------------*/
#include "DPMIncompressibleTurbulenceModel.H"
#include "singlePhaseTransportModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTurbulenceModelTypes
(
volScalarField
,
geometricOneField
,
incompressibleTurbulenceModel
,
DPMIncompressibleTurbulenceModel
,
singlePhaseTransportModel
);
makeBaseTurbulenceModel
(
volScalarField
,
geometricOneField
,
incompressibleTurbulenceModel
,
DPMIncompressibleTurbulenceModel
,
singlePhaseTransportModel
);
#define makeLaminarModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, laminar, Type)
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, LES, Type)
#include "Stokes.H"
makeLaminarModel
(
Stokes
);
#include "kEpsilon.H"
makeRASModel
(
kEpsilon
);
#include "realizableKE.H"
makeRASModel
(
realizableKE
);
#include "kOmegaSST.H"
makeRASModel
(
kOmegaSST
);
#include "Smagorinsky.H"
makeLESModel
(
Smagorinsky
);
#include "kEqn.H"
makeLESModel
(
kEqn
);
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
0 → 100644
View file @
649c29f9
DPMTurbulenceModels.C
LIB = $(FOAM_LIBBIN)/libDPMTurbulenceModels
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lcompressibleTransportModels \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.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-2014 OpenFOAM Foundation
-------------------------------------------------------------------------------
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
MPPICFoam
Group
grpLagrangianSolvers
Description
Transient solver for the coupled transport of a single kinematic particle
cloud including the effect of the volume fraction of particles on the
continuous phase. Multi-Phase Particle In Cell (MPPIC) modeling is used to
represent collisions without resolving particle-particle interactions.
\*---------------------------------------------------------------------------*/
#define MPPIC
#include "DPMFoam.C"
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
0 → 100644
View file @
649c29f9
MPPICFoam.C
EXE = $(FOAM_APPBIN)/MPPICFoam
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I.. \
-I../DPMTurbulenceModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lradiationModels \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lDPMTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/Make/files
0 → 100644
View file @
649c29f9
DPMFoam.C
EXE = $(FOAM_APPBIN)/DPMFoam
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I./DPMTurbulenceModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lradiationModels \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lDPMTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/UcEqn.H
0 → 100644
View file @
649c29f9
fvVectorMatrix
UcEqn
(
fvm
::
ddt
(
alphac
,
Uc
)
+
fvm
::
div
(
alphaPhic
,
Uc
)
-
fvm
::
Sp
(
fvc
::
ddt
(
alphac
)
+
fvc
::
div
(
alphaPhic
),
Uc
)
+
continuousPhaseTurbulence
->
divDevRhoReff
(
Uc
)
==
(
1
.
0
/
rhoc
)
*
cloudSU
);
UcEqn
.
relax
();
volScalarField
rAUc
(
1
.
0
/
UcEqn
.
A
());
surfaceScalarField
rAUcf
(
"Dp"
,
fvc
::
interpolate
(
rAUc
));
surfaceScalarField
phicForces
(
fvc
::
flux
(
rAUc
*
cloudVolSUSu
/
rhoc
)
+
rAUcf
*
(
g
&
mesh
.
Sf
())
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UcEqn
==
fvc
::
reconstruct
(
phicForces
/
rAUcf
-
fvc
::
snGrad
(
p
)
*
mesh
.
magSf
()
)
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/continuityErrs.H
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 OpenFOAM Foundation
-------------------------------------------------------------------------------
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/>.
Global
continuityErrs
Description
Calculates and prints the continuity errors.
\*---------------------------------------------------------------------------*/
{
volScalarField
contErr
(
fvc
::
ddt
(
alphac
)
+
fvc
::
div
(
alphacf
*
phic
));
scalar
sumLocalContErr
=
runTime
.
deltaTValue
()
*
mag
(
contErr
)().
weightedAverage
(
mesh
.
V
()).
value
();
scalar
globalContErr
=
runTime
.
deltaTValue
()
*
contErr
.
weightedAverage
(
mesh
.
V
()).
value
();
cumulativeContErr
+=
globalContErr
;
Info
<<
"time step continuity errors : sum local = "
<<
sumLocalContErr
<<
", global = "
<<
globalContErr
<<
", cumulative = "
<<
cumulativeContErr
<<
endl
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/createFields.H
0 → 100644
View file @
649c29f9
#include "readGravitationalAcceleration.H"
word
continuousPhaseName
(
IOdictionary
(
IOobject
(
"transportProperties"
,
runTime
.
constant
(),
mesh
,
IOobject
::
MUST_READ
)
).
get
<
word
>
(
"continuousPhase"
)
);
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
Uc
(
IOobject
(
IOobject
::
groupName
(
"U"
,
continuousPhaseName
),
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
Info
<<
"Reading field p
\n
"
<<
endl
;
volScalarField
p
(
IOobject
(
"p"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
Info
<<
"Reading/calculating continuous-phase face flux field phic
\n
"
<<
endl
;
surfaceScalarField
phic
(
IOobject
(
IOobject
::
groupName
(
"phi"
,
continuousPhaseName
),
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
linearInterpolate
(
Uc
)
&
mesh
.
Sf
()
);
label
pRefCell
=
0
;
scalar
pRefValue
=
0
.
0
;
setRefCell
(
p
,
pimple
.
dict
(),
pRefCell
,
pRefValue
);
mesh
.
setFluxRequired
(
p
.
name
());
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
singlePhaseTransportModel
continuousPhaseTransport
(
Uc
,
phic
);
dimensionedScalar
rhocValue
(
IOobject
::
groupName
(
"rho"
,
continuousPhaseName
),
dimDensity
,
continuousPhaseTransport
);
volScalarField
rhoc
(
IOobject
(
rhocValue
.
name
(),
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
mesh
,
rhocValue
);
volScalarField
muc
(
IOobject
(
IOobject
::
groupName
(
"mu"
,
continuousPhaseName
),
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
rhoc
*
continuousPhaseTransport
.
nu
()
);
Info
<<
"Creating field alphac
\n
"
<<
endl
;
// alphac must be constructed before the cloud
// so that the drag-models can find it
volScalarField
alphac
(
IOobject
(
IOobject
::
groupName
(
"alpha"
,
continuousPhaseName
),
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
dimless
,
Zero
)
);
const
word
kinematicCloudName
(
args
.
getOrDefault
<
word
>
(
"cloud"
,
"kinematicCloud"
)
);
Info
<<
"Constructing kinematicCloud "
<<
kinematicCloudName
<<
endl
;
basicKinematicTypeCloud
kinematicCloud
(
kinematicCloudName
,
rhoc
,
Uc
,
muc
,
g
);
// Particle fraction upper limit
scalar
alphacMin
(
1
.
0
-
(
kinematicCloud
.
particleProperties
().
subDict
(
"constantProperties"
)
.
get
<
scalar
>
(
"alphaMax"
)
)
);
// Update alphac from the particle locations
alphac
=
max
(
1
.
0
-
kinematicCloud
.
theta
(),
alphacMin
);
alphac
.
correctBoundaryConditions
();
surfaceScalarField
alphacf
(
"alphacf"
,
fvc
::
interpolate
(
alphac
));
surfaceScalarField
alphaPhic
(
IOobject
::
groupName
(
"alphaPhi"
,
continuousPhaseName
),
alphacf
*
phic
);
autoPtr
<
DPMIncompressibleTurbulenceModel
<
singlePhaseTransportModel
>>
continuousPhaseTurbulence
(
DPMIncompressibleTurbulenceModel
<
singlePhaseTransportModel
>::
New
(
alphac
,
Uc
,
alphaPhic
,
phic
,
continuousPhaseTransport
)
);
OpenFOAM-v2112/applications/solvers/lagrangian/DPMFoam/pEqn.H
0 → 100644
View file @
649c29f9
{
volVectorField
HbyA
(
constrainHbyA
(
rAUc
*
UcEqn
.
H
(),
Uc
,
p
));
surfaceScalarField
phiHbyA
(
"phiHbyA"
,
(
fvc
::
flux
(
HbyA
)
+
alphacf
*
rAUcf
*
fvc
::
ddtCorr
(
Uc
,
phic
)
)
);
if
(
p
.
needReference
())
{
adjustPhi
(
phiHbyA
,
Uc
,
p
);
}
phiHbyA
+=
phicForces
;
// Update the pressure BCs to ensure flux consistency
constrainPressure
(
p
,
Uc
,
phiHbyA
,
rAUcf
);
// Non-orthogonal pressure corrector loop
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvm
::
laplacian
(
alphacf
*
rAUcf
,
p
)
==
fvc
::
ddt
(
alphac
)
+
fvc
::
div
(
alphacf
*
phiHbyA
)
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phic
=
phiHbyA
-
pEqn
.
flux
()
/
alphacf
;
p
.
relax
();
Uc
=
HbyA
+
rAUc
*
fvc
::
reconstruct
((
phicForces
-
pEqn
.
flux
()
/
alphacf
)
/
rAUcf
);
Uc
.
correctBoundaryConditions
();
}
}
}
#include "continuityErrs.H"
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H
0 → 100644
View file @
649c29f9
{
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
)
+
Qdot
+
coalParcels
.
Sh
(
he
)
+
limestoneParcels
.
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/coalChemistryFoam/Make/files
0 → 100644
View file @
649c29f9
coalChemistryFoam.C
EXE = $(FOAM_APPBIN)/coalChemistryFoam
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/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)/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)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lcoalCombustion\
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lregionModels \
-lsurfaceFilmModels \
-lODE \
-lcombustionModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H
0 → 100644
View file @
649c29f9
MRF
.
correctBoundaryVelocity
(
U
);
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
phi
,
U
)
+
MRF
.
DDt
(
rho
,
U
)
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
()
*
g
+
coalParcels
.
SU
(
U
)
+
limestoneParcels
.
SU
(
U
)
+
fvOptions
(
rho
,
U
)
);
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
fvOptions
.
correct
(
U
);
K
=
0
.
5
*
magSqr
(
U
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/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
YiEqn
(
fvm
::
ddt
(
rho
,
Yi
)
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
coalParcels
.
SYi
(
i
,
Yi
)
+
combustion
->
R
(
Yi
)
+
fvOptions
(
rho
,
Yi
)
);
YiEqn
.
relax
();
fvOptions
.
constrain
(
YiEqn
);
YiEqn
.
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/coalChemistryFoam/coalChemistryFoam.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) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
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
coalChemistryFoam
Group
grpLagrangianSolvers
Description
Transient solver for compressible, turbulent flow, with coal and limestone
particle clouds, an energy source, and combustion.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "basicThermoCloud.H"
#include "coalCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "fvOptions.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for compressible, turbulent flow"
" with coal and limestone clouds, energy sources and combustion."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "initContinuityErrs.H"
turbulence
->
validate
();
if
(
!
LTS
)
{
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readTimeControls.H"
if
(
LTS
)
{
#include "setRDeltaT.H"
}
else
{
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
}
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
rhoEffLagrangian
=
coalParcels
.
rhoEff
()
+
limestoneParcels
.
rhoEff
();
pDyn
=
0
.
5
*
rho
*
magSqr
(
U
);
coalParcels
.
evolve
();
limestoneParcels
.
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
();
}
}
rho
=
thermo
.
rho
();
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H
0 → 100644
View file @
649c29f9
Info
<<
"
\n
Constructing coal cloud"
<<
endl
;
coalCloud
coalParcels
(
"coalCloud1"
,
rho
,
U
,
g
,
slgThermo
);
Info
<<
"
\n
Constructing limestone cloud"
<<
endl
;
basicThermoCloud
limestoneParcels
(
"limestoneCloud1"
,
rho
,
U
,
g
,
slgThermo
);
OpenFOAM-v2112/applications/solvers/lagrangian/coalChemistryFoam/createFieldRefs.H
0 → 100644
View file @
649c29f9
const
volScalarField
&
T
=
thermo
.
T
();
const
volScalarField
&
psi
=
thermo
.
psi
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
Prev
1
…
25
26
27
28
29
30
31
32
33
…
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