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
828 additions
and
0 deletions
+828
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/EEqn.H
...AM-v2112/applications/solvers/lagrangian/sprayFoam/EEqn.H
+40
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/Make/files
...2112/applications/solvers/lagrangian/sprayFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/Make/options
...12/applications/solvers/lagrangian/sprayFoam/Make/options
+53
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/UEqn.H
...AM-v2112/applications/solvers/lagrangian/sprayFoam/UEqn.H
+27
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/YEqn.H
...AM-v2112/applications/solvers/lagrangian/sprayFoam/YEqn.H
+49
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createClouds.H
.../applications/solvers/lagrangian/sprayFoam/createClouds.H
+9
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createFieldRefs.H
...plications/solvers/lagrangian/sprayFoam/createFieldRefs.H
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createFields.H
.../applications/solvers/lagrangian/sprayFoam/createFields.H
+105
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/files
...ations/solvers/lagrangian/sprayFoam/engineFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options
...ions/solvers/lagrangian/sprayFoam/engineFoam/Make/options
+57
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C
...ions/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C
+134
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/logSummary.H
...ions/solvers/lagrangian/sprayFoam/engineFoam/logSummary.H
+12
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
...ns/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
+11
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/pEqn.H
...AM-v2112/applications/solvers/lagrangian/sprayFoam/pEqn.H
+110
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/rhoEqn.H
...-v2112/applications/solvers/lagrangian/sprayFoam/rhoEqn.H
+49
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
...s/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
...solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
+53
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.C
...rs/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.C
+44
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
...ions/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
+3
-0
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
...ns/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
+60
-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/sprayFoam/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
)
+
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/sprayFoam/Make/files
0 → 100644
View file @
649c29f9
sprayFoam.C
EXE = $(FOAM_APPBIN)/sprayFoam
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/Make/options
0 → 100644
View file @
649c29f9
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
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/UEqn.H
0 → 100644
View file @
649c29f9
// 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
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/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
(
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
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createClouds.H
0 → 100644
View file @
649c29f9
Info
<<
"
\n
Constructing reacting cloud"
<<
endl
;
basicSprayCloud
parcels
(
"sprayCloud"
,
rho
,
U
,
g
,
slgThermo
);
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createFieldRefs.H
0 → 100644
View file @
649c29f9
const
volScalarField
&
T
=
thermo
.
T
();
const
volScalarField
&
psi
=
thermo
.
psi
();
const
label
inertIndex
(
composition
.
species
()[
inertSpecie
]);
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/createFields.H
0 → 100644
View file @
649c29f9
#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"
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/files
0 → 100644
View file @
649c29f9
engineFoam.C
EXE = $(FOAM_APPBIN)/engineFoam
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options
0 → 100644
View file @
649c29f9
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
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.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
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
;
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/logSummary.H
0 → 100644
View file @
649c29f9
Info
<<
"Mean pressure:"
<<
p
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
Info
<<
"Mean temperature:"
<<
T
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
Info
<<
"Mean u':"
<<
(
sqrt
((
2
.
0
/
3
.
0
)
*
turbulence
->
k
()))().
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
logSummaryFile
<<
runTime
.
theta
()
<<
tab
<<
p
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
tab
<<
T
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
tab
<<
(
sqrt
((
2
.
0
/
3
.
0
)
*
turbulence
->
k
()))().
weightedAverage
(
mesh
.
V
()).
value
()
<<
endl
;
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
0 → 100644
View file @
649c29f9
Info
<<
"Total cylinder mass: "
<<
fvc
::
domainIntegrate
(
rho
).
value
()
<<
endl
;
//Info<< "Total fuel mass: "
// << fvc::domainIntegrate(rho*compostion.ft()).value() << endl;
OFstream
logSummaryFile
(
runTime
.
path
()
/
(
"logSummary."
+
runTime
.
timeName
()
+
".dat"
)
);
logSummaryFile
<<
"# CA"
<<
" p"
<<
" T"
<<
" u'"
<<
endl
;
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/pEqn.H
0 → 100644
View file @
649c29f9
rho
=
thermo
.
rho
();
rho
=
max
(
rho
,
rhoMin
);
rho
=
min
(
rho
,
rhoMax
);
rho
.
relax
();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
surfaceScalarField
rhorAUf
(
"rhorAUf"
,
fvc
::
interpolate
(
rho
*
rAU
));
volVectorField
HbyA
(
constrainHbyA
(
rAU
*
UEqn
.
H
(),
U
,
p
));
if
(
pimple
.
nCorrPISO
()
<=
1
)
{
tUEqn
.
clear
();
}
if
(
pimple
.
transonic
())
{
surfaceScalarField
phid
(
"phid"
,
fvc
::
interpolate
(
psi
)
*
(
fvc
::
flux
(
HbyA
)
+
MRF
.
zeroFilter
(
rhorAUf
*
fvc
::
ddtCorr
(
rho
,
U
,
phi
)
/
fvc
::
interpolate
(
rho
)
)
)
);
MRF
.
makeRelative
(
fvc
::
interpolate
(
psi
),
phid
);
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvm
::
ddt
(
psi
,
p
)
+
fvm
::
div
(
phid
,
p
)
-
fvm
::
laplacian
(
rhorAUf
,
p
)
==
parcels
.
Srho
()
+
fvOptions
(
psi
,
p
,
rho
.
name
())
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phi
==
pEqn
.
flux
();
}
}
}
else
{
surfaceScalarField
phiHbyA
(
"phiHbyA"
,
(
fvc
::
flux
(
rho
*
HbyA
)
+
rhorAUf
*
fvc
::
ddtCorr
(
rho
,
U
,
phi
)
)
);
MRF
.
makeRelative
(
fvc
::
interpolate
(
rho
),
phiHbyA
);
// Update the pressure BCs to ensure flux consistency
constrainPressure
(
p
,
rho
,
U
,
phiHbyA
,
rhorAUf
,
MRF
);
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
(
fvm
::
ddt
(
psi
,
p
)
+
fvc
::
div
(
phiHbyA
)
-
fvm
::
laplacian
(
rhorAUf
,
p
)
==
parcels
.
Srho
()
+
fvOptions
(
psi
,
p
,
rho
.
name
())
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
{
phi
=
phiHbyA
+
pEqn
.
flux
();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
// Explicitly relax pressure for momentum corrector
p
.
relax
();
// Recalculate density from the relaxed pressure
rho
=
thermo
.
rho
();
rho
=
max
(
rho
,
rhoMin
);
rho
=
min
(
rho
,
rhoMax
);
rho
.
relax
();
Info
<<
"rho min/max : "
<<
min
(
rho
).
value
()
<<
" "
<<
max
(
rho
).
value
()
<<
endl
;
U
=
HbyA
-
rAU
*
fvc
::
grad
(
p
);
U
.
correctBoundaryConditions
();
fvOptions
.
correct
(
U
);
K
=
0
.
5
*
magSqr
(
U
);
if
(
thermo
.
dpdt
())
{
dpdt
=
fvc
::
ddt
(
p
);
}
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/rhoEqn.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) 2011-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/>.
Global
rhoEqn
Description
Solve the continuity for density.
\*---------------------------------------------------------------------------*/
{
fvScalarMatrix
rhoEqn
(
fvm
::
ddt
(
rho
)
+
fvc
::
div
(
phi
)
==
parcels
.
Srho
(
rho
)
+
fvOptions
(
rho
)
);
rhoEqn
.
solve
();
fvOptions
.
correct
(
rho
);
}
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
0 → 100644
View file @
649c29f9
simpleSprayFoam.C
EXE = $(FOAM_APPBIN)/simpleSprayFoam
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam \
-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)/combustionModels/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianSpray \
-llagrangianTurbulence \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.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
sprayFoam
Group
grpLagrangianSolvers
Description
Steady state solver for compressible, turbulent flow with a spray particle
cloud and optional sources/constraints.
\*---------------------------------------------------------------------------*/
#define CLOUD_BASE_TYPE Spray
#define CLOUD_BASE_TYPE_NAME "spray"
#include "simpleReactingParcelFoam.C"
// ************************************************************************* //
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
0 → 100644
View file @
649c29f9
sprayDyMFoam.C
EXE = $(FOAM_APPBIN)/sprayDyMFoam
OpenFOAM-v2112/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
0 → 100644
View file @
649c29f9
EXE_INC = \
-I.. \
-I../../reactingParcelFoam \
-I../../../compressible/rhoPimpleFoam \
-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)/combustionModels/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-llagrangianSpray \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lthermophysicalProperties \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-ldynamicMesh \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
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