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
874 additions
and
0 deletions
+874
-0
applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C
...pledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C
+97
-0
applications/solvers/lagrangian/kinematicParcelFoam/Make/files
...cations/solvers/lagrangian/kinematicParcelFoam/Make/files
+3
-0
applications/solvers/lagrangian/kinematicParcelFoam/Make/options
...tions/solvers/lagrangian/kinematicParcelFoam/Make/options
+42
-0
applications/solvers/lagrangian/kinematicParcelFoam/UEqn.H
applications/solvers/lagrangian/kinematicParcelFoam/UEqn.H
+22
-0
applications/solvers/lagrangian/kinematicParcelFoam/createClouds.H
...ons/solvers/lagrangian/kinematicParcelFoam/createClouds.H
+16
-0
applications/solvers/lagrangian/kinematicParcelFoam/createFieldRefs.H
.../solvers/lagrangian/kinematicParcelFoam/createFieldRefs.H
+1
-0
applications/solvers/lagrangian/kinematicParcelFoam/createFields.H
...ons/solvers/lagrangian/kinematicParcelFoam/createFields.H
+85
-0
applications/solvers/lagrangian/kinematicParcelFoam/kinematicParcelFoam.C
...vers/lagrangian/kinematicParcelFoam/kinematicParcelFoam.C
+155
-0
applications/solvers/lagrangian/kinematicParcelFoam/pEqn.H
applications/solvers/lagrangian/kinematicParcelFoam/pEqn.H
+58
-0
applications/solvers/lagrangian/lagrangianSolversDoc.H
applications/solvers/lagrangian/lagrangianSolversDoc.H
+32
-0
applications/solvers/lagrangian/reactingParcelFoam/EEqn.H
applications/solvers/lagrangian/reactingParcelFoam/EEqn.H
+41
-0
applications/solvers/lagrangian/reactingParcelFoam/Make/files
...ications/solvers/lagrangian/reactingParcelFoam/Make/files
+3
-0
applications/solvers/lagrangian/reactingParcelFoam/Make/options
...ations/solvers/lagrangian/reactingParcelFoam/Make/options
+57
-0
applications/solvers/lagrangian/reactingParcelFoam/UEqn.H
applications/solvers/lagrangian/reactingParcelFoam/UEqn.H
+34
-0
applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
+51
-0
applications/solvers/lagrangian/reactingParcelFoam/createClouds.H
...ions/solvers/lagrangian/reactingParcelFoam/createClouds.H
+9
-0
applications/solvers/lagrangian/reactingParcelFoam/createFieldRefs.H
...s/solvers/lagrangian/reactingParcelFoam/createFieldRefs.H
+5
-0
applications/solvers/lagrangian/reactingParcelFoam/createFields.H
...ions/solvers/lagrangian/reactingParcelFoam/createFields.H
+132
-0
applications/solvers/lagrangian/reactingParcelFoam/createMeshesPostProcess.H
...s/lagrangian/reactingParcelFoam/createMeshesPostProcess.H
+27
-0
applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H
...vers/lagrangian/reactingParcelFoam/createRegionControls.H
+4
-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/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.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-2016 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
icoUncoupledKinematicParcelFoam
Group
grpLagrangianSolvers
Description
Transient solver for the passive transport of a single kinematic
particle cloud.
Uses a pre-calculated velocity field to evolve the cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "basicKinematicCollidingCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for the passive transport"
" of a single kinematic particle cloud"
);
argList
::
addOption
(
"cloud"
,
"name"
,
"specify alternative cloud name. default is 'kinematicCloud'"
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
loop
())
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
Info
<<
"Evolving "
<<
kinematicCloud
.
name
()
<<
endl
;
laminarTransport
.
correct
();
mu
=
laminarTransport
.
nu
()
*
rhoInfValue
;
kinematicCloud
.
evolve
();
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/kinematicParcelFoam/Make/files
0 → 100644
View file @
ea17556c
kinematicParcelFoam.C
EXE = $(FOAM_APPBIN)/kinematicParcelFoam
applications/solvers/lagrangian/kinematicParcelFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I$(FOAM_SOLVERS)/lagrangian/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/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/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)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-latmosphericModels \
-lregionModels \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/kinematicParcelFoam/UEqn.H
0 → 100644
View file @
ea17556c
MRF
.
correctBoundaryVelocity
(
U
);
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
U
)
+
fvm
::
div
(
phi
,
U
)
+
MRF
.
DDt
(
U
)
+
turbulence
->
divDevReff
(
U
)
==
parcels
.
SU
(
U
,
true
)
+
fvOptions
(
U
)
);
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
fvOptions
.
correct
(
U
);
}
applications/solvers/lagrangian/kinematicParcelFoam/createClouds.H
0 → 100644
View file @
ea17556c
const
word
kinematicCloudName
(
args
.
getOrDefault
<
word
>
(
"cloud"
,
"kinematicCloud"
)
);
Info
<<
"Constructing kinematicCloud "
<<
kinematicCloudName
<<
endl
;
basicKinematicCloud
parcels
(
kinematicCloudName
,
rhoInf
,
U
,
muc
,
g
);
applications/solvers/lagrangian/kinematicParcelFoam/createFieldRefs.H
0 → 100644
View file @
ea17556c
regionModels
::
surfaceFilmModel
&
surfaceFilm
=
tsurfaceFilm
();
applications/solvers/lagrangian/kinematicParcelFoam/createFields.H
0 → 100644
View file @
ea17556c
#include "readGravitationalAcceleration.H"
Info
<<
"Reading field p
\n
"
<<
endl
;
volScalarField
p
(
IOobject
(
"p"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
Info
<<
"
\n
Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include "createPhi.H"
singlePhaseTransportModel
laminarTransport
(
U
,
phi
);
dimensionedScalar
rhoInfValue
(
"rhoInf"
,
dimDensity
,
laminarTransport
);
volScalarField
rhoInf
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
mesh
,
rhoInfValue
);
volScalarField
muc
(
IOobject
(
"muc"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
rhoInf
*
laminarTransport
.
nu
()
);
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
incompressible
::
turbulenceModel
>
turbulence
(
incompressible
::
turbulenceModel
::
New
(
U
,
phi
,
laminarTransport
)
);
label
pRefCell
=
0
;
scalar
pRefValue
=
0
.
0
;
setRefCell
(
p
,
pimple
.
dict
(),
pRefCell
,
pRefValue
);
mesh
.
setFluxRequired
(
p
.
name
());
#include "createMRF.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createFvOptions.H"
applications/solvers/lagrangian/kinematicParcelFoam/kinematicParcelFoam.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) 2021 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
kinematicParcelFoam
Group
grpLagrangianSolvers
Description
Transient solver for incompressible, turbulent flow with kinematic,
particle cloud, and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "surfaceFilmModel.H"
#include "basicKinematicCloud.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for incompressible, turbulent flow"
" with kinematic particle clouds"
" and surface film modelling."
);
#define CREATE_MESH createMeshesPostProcess.H
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "initContinuityErrs.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRegionControls.H"
#include "createUfIfPresent.H"
turbulence
->
validate
();
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readDyMControls.H"
#include "CourantNo.H"
#include "setMultiRegionDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
// Store the particle positions
parcels
.
storeGlobalPositions
();
// Do any mesh changes
mesh
.
update
();
if
(
solvePrimaryRegion
&&
mesh
.
changing
())
{
MRF
.
update
();
if
(
correctPhi
)
{
// Calculate absolute flux
// from the mapped surface velocity
phi
=
mesh
.
Sf
()
&
Uf
();
#include "../../incompressible/pimpleFoam/correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc
::
makeRelative
(
phi
,
U
);
}
if
(
checkMeshCourantNo
)
{
#include "meshCourantNo.H"
}
}
parcels
.
evolve
();
surfaceFilm
.
evolve
();
if
(
solvePrimaryRegion
)
{
// --- PIMPLE loop
while
(
pimple
.
loop
())
{
#include "UEqn.H"
// --- Pressure corrector loop
while
(
pimple
.
correct
())
{
#include "pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
laminarTransport
.
correct
();
turbulence
->
correct
();
}
}
}
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/kinematicParcelFoam/pEqn.H
0 → 100644
View file @
ea17556c
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
volVectorField
HbyA
(
constrainHbyA
(
rAU
*
UEqn
.
H
(),
U
,
p
));
surfaceScalarField
phiHbyA
(
"phiHbyA"
,
fvc
::
flux
(
HbyA
));
if
(
pimple
.
ddtCorr
())
{
phiHbyA
+=
MRF
.
zeroFilter
(
fvc
::
interpolate
(
rAU
)
*
fvc
::
ddtCorr
(
U
,
phi
,
Uf
));
}
MRF
.
makeRelative
(
phiHbyA
);
if
(
p
.
needReference
())
{
fvc
::
makeRelative
(
phiHbyA
,
U
);
adjustPhi
(
phiHbyA
,
U
,
p
);
fvc
::
makeAbsolute
(
phiHbyA
,
U
);
}
// Update the pressure BCs to ensure flux consistency
constrainPressure
(
p
,
U
,
phiHbyA
,
rAU
,
MRF
);
// Non-orthogonal pressure corrector loop
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvm
::
laplacian
(
rAU
,
p
)
==
fvc
::
div
(
phiHbyA
)
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phi
=
phiHbyA
-
pEqn
.
flux
();
}
}
#include "continuityErrs.H"
p
.
relax
();
U
=
HbyA
-
rAU
*
fvc
::
grad
(
p
);
U
.
correctBoundaryConditions
();
fvOptions
.
correct
(
U
);
// Correct rhoUf if the mesh is moving
fvc
::
correctUf
(
Uf
,
U
,
phi
);
// Make the fluxes relative to the mesh motion
fvc
::
makeRelative
(
phi
,
U
);
applications/solvers/lagrangian/lagrangianSolversDoc.H
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 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/>.
\defgroup grpLagrangianSolvers Lagrangian solvers
@{
\ingroup grpSolvers
This group contains Lagrangian solvers.
@}
\*---------------------------------------------------------------------------*/
applications/solvers/lagrangian/reactingParcelFoam/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
)
+
surfaceFilm
.
Sh
()
+
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/reactingParcelFoam/Make/files
0 → 100644
View file @
ea17556c
reactingParcelFoam.C
EXE = $(FOAM_APPBIN)/reactingParcelFoam
applications/solvers/lagrangian/reactingParcelFoam/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)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/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)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-ldynamicMesh \
-ldynamicFvMesh \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lthermophysicalProperties \
-lSLGThermo \
-lchemistryModel \
-lregionModels \
-lradiationModels \
-lsurfaceFilmModels \
-lsurfaceFilmDerivedFvPatchFields \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lODE \
-lcombustionModels \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/reactingParcelFoam/UEqn.H
0 → 100644
View file @
ea17556c
MRF
.
correctBoundaryVelocity
(
U
);
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
phi
,
U
)
+
MRF
.
DDt
(
rho
,
U
)
+
turbulence
->
divDevRhoReff
(
U
)
==
parcels
.
SU
(
U
)
+
fvOptions
(
rho
,
U
)
);
UEqn
.
relax
();
fvOptions
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
fvc
::
reconstruct
(
(
-
ghf
*
fvc
::
snGrad
(
rho
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
);
fvOptions
.
correct
(
U
);
K
=
0
.
5
*
magSqr
(
U
);
}
applications/solvers/lagrangian/reactingParcelFoam/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
)
+
fvOptions
(
rho
,
Yi
)
+
combustion
->
R
(
Yi
)
+
surfaceFilm
.
Srho
(
i
)
);
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/reactingParcelFoam/createClouds.H
0 → 100644
View file @
ea17556c
Info
<<
"
\n
Constructing reacting cloud"
<<
endl
;
basicReactingTypeCloud
parcels
(
"reactingCloud1"
,
rho
,
U
,
g
,
slgThermo
);
applications/solvers/lagrangian/reactingParcelFoam/createFieldRefs.H
0 → 100644
View file @
ea17556c
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
const
volScalarField
&
T
=
thermo
.
T
();
const
volScalarField
&
psi
=
thermo
.
psi
();
regionModels
::
surfaceFilmModel
&
surfaceFilm
=
tsurfaceFilm
();
applications/solvers/lagrangian/reactingParcelFoam/createFields.H
0 → 100644
View file @
ea17556c
#include "createRDeltaT.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
)
&&
composition
.
species
().
size
()
>
0
)
{
FatalIOErrorIn
(
args
.
executable
().
c_str
(),
thermo
)
<<
"Inert specie "
<<
inertSpecie
<<
" not found in available species "
<<
composition
.
species
()
<<
exit
(
FatalIOError
);
}
Info
<<
"Creating field rho
\n
"
<<
endl
;
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
thermo
.
rho
()
);
volScalarField
&
p
=
thermo
.
p
();
Info
<<
"
\n
Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
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
())
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField
p_rgh
(
IOobject
(
"p_rgh"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh
=
p
-
rho
*
gh
;
pressureControl
pressureControl
(
p
,
rho
,
pimple
.
dict
(),
false
);
mesh
.
setFluxRequired
(
p_rgh
.
name
());
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 "createDpdt.H"
#include "createK.H"
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createFvOptions.H"
applications/solvers/lagrangian/reactingParcelFoam/createMeshesPostProcess.H
0 → 100644
View file @
ea17556c
#include "createMesh.H"
IOdictionary
filmDict
(
IOobject
(
"surfaceFilmProperties"
,
runTime
.
constant
(),
runTime
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
)
);
const
word
filmRegionName
=
filmDict
.
get
<
word
>
(
"region"
);
fvMesh
filmMesh
(
IOobject
(
filmRegionName
,
runTime
.
timeName
(),
runTime
,
IOobject
::
MUST_READ
)
);
applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H
0 → 100644
View file @
ea17556c
bool
solvePrimaryRegion
(
pimple
.
dict
().
getOrDefault
(
"solvePrimaryRegion"
,
true
)
);
Prev
1
…
27
28
29
30
31
32
33
34
35
…
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