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
1117 additions
and
0 deletions
+1117
-0
applications/solvers/lagrangian/sprayFoam/engineFoam/logSummary.H
...ions/solvers/lagrangian/sprayFoam/engineFoam/logSummary.H
+12
-0
applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
...ns/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
+11
-0
applications/solvers/lagrangian/sprayFoam/pEqn.H
applications/solvers/lagrangian/sprayFoam/pEqn.H
+110
-0
applications/solvers/lagrangian/sprayFoam/rhoEqn.H
applications/solvers/lagrangian/sprayFoam/rhoEqn.H
+49
-0
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
...s/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
+3
-0
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
...solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
+53
-0
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.C
...rs/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.C
+44
-0
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
...ions/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
+3
-0
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
...ns/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
+60
-0
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
...ications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
+121
-0
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
.../solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
+169
-0
applications/solvers/lagrangian/sprayFoam/sprayFoam.C
applications/solvers/lagrangian/sprayFoam/sprayFoam.C
+137
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/files
...olvers/lagrangian/uncoupledKinematicParcelFoam/Make/files
+3
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options
...vers/lagrangian/uncoupledKinematicParcelFoam/Make/options
+36
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H
...rs/lagrangian/uncoupledKinematicParcelFoam/createFields.H
+65
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files
...aticParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files
+3
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options
...icParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options
+42
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.C
...dKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.C
+96
-0
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C
...coupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C
+92
-0
applications/solvers/multiphase/MPPICInterFoam/Allwclean
applications/solvers/multiphase/MPPICInterFoam/Allwclean
+8
-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/sprayFoam/engineFoam/logSummary.H
0 → 100644
View file @
ea17556c
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
;
applications/solvers/lagrangian/sprayFoam/engineFoam/startSummary.H
0 → 100644
View file @
ea17556c
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
;
applications/solvers/lagrangian/sprayFoam/pEqn.H
0 → 100644
View file @
ea17556c
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
);
}
applications/solvers/lagrangian/sprayFoam/rhoEqn.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) 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
);
}
// ************************************************************************* //
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/files
0 → 100644
View file @
ea17556c
simpleSprayFoam.C
EXE = $(FOAM_APPBIN)/simpleSprayFoam
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/lagrangian/sprayFoam/simpleSprayFoam/simpleSprayFoam.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
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"
// ************************************************************************* //
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files
0 → 100644
View file @
ea17556c
sprayDyMFoam.C
EXE = $(FOAM_APPBIN)/sprayDyMFoam
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
0 → 100644
View file @
ea17556c
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
,
rhoUf
)
/
fvc
::
interpolate
(
rho
)
)
)
);
fvc
::
makeRelative
(
phid
,
psi
,
U
);
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
)
+
MRF
.
zeroFilter
(
rhorAUf
*
fvc
::
ddtCorr
(
rho
,
U
,
rhoUf
))
);
fvc
::
makeRelative
(
phiHbyA
,
rho
,
U
);
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
);
{
rhoUf
=
fvc
::
interpolate
(
rho
*
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
n
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
if
(
thermo
.
dpdt
())
{
dpdt
=
fvc
::
ddt
(
p
);
if
(
mesh
.
moving
())
{
dpdt
-=
fvc
::
div
(
fvc
::
meshPhi
(
rho
,
U
),
p
);
}
}
applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-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
sprayDyMFoam
Group
grpLagrangianSolvers grpMovingMeshSolvers
Description
Transient solver for compressible, turbulent flow with a spray particle
cloud, with optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "turbulenceModel.H"
#include "basicSprayCloud.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "radiationModel.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for compressible, turbulent flow"
" with a spray particle cloud.
\n
"
"With optional mesh motion and mesh topology changes.
\n
"
);
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUf.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readDyMControls.H"
{
// Store divrhoU from the previous time-step/mesh for the correctPhi
volScalarField
divrhoU
(
"divrhoU"
,
fvc
::
div
(
fvc
::
absolute
(
phi
,
rho
,
U
))
);
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
// Store momentum to set rhoUf for introduced faces.
volVectorField
rhoU
(
"rhoU"
,
rho
*
U
);
// Store the particle positions
parcels
.
storeGlobalPositions
();
// Do any mesh changes
mesh
.
update
();
if
(
mesh
.
changing
())
{
MRF
.
update
();
if
(
correctPhi
)
{
// Calculate absolute flux from the mapped surface velocity
phi
=
mesh
.
Sf
()
&
rhoUf
;
#include "correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc
::
makeRelative
(
phi
,
rho
,
U
);
}
if
(
checkMeshCourantNo
)
{
#include "meshCourantNo.H"
}
}
}
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
();
}
}
rho
=
thermo
.
rho
();
if
(
runTime
.
write
())
{
combustion
->
Qdot
()().
write
();
}
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/sprayFoam/sprayFoam.C
0 → 100644
View file @
ea17556c
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
-------------------------------------------------------------------------------
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
Transient solver for compressible, turbulent flow with a spray particle
cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.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 flow"
" with a spray particle cloud."
);
#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 "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence
->
validate
();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
parcels
.
evolve
();
if
(
pimple
.
solveFlow
())
{
#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
();
if
(
runTime
.
write
())
{
combustion
->
Qdot
()().
write
();
}
}
else
{
if
(
runTime
.
writeTime
())
{
parcels
.
write
();
}
}
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/files
0 → 100644
View file @
ea17556c
uncoupledKinematicParcelFoam.C
EXE = $(FOAM_APPBIN)/uncoupledKinematicParcelFoam
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-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)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/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 \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lradiationModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H
0 → 100644
View file @
ea17556c
#include "readGravitationalAcceleration.H"
Info
<<
"Reading thermophysical properties
\n
"
<<
endl
;
autoPtr
<
psiThermo
>
pThermo
(
psiThermo
::
New
(
mesh
)
);
psiThermo
&
thermo
=
pThermo
();
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"
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
compressible
::
turbulenceModel
>
turbulence
(
compressible
::
turbulenceModel
::
New
(
rho
,
U
,
phi
,
thermo
)
);
const
word
kinematicCloudName
(
args
.
getOrDefault
<
word
>
(
"cloud"
,
"kinematicCloud"
)
);
Info
<<
"Constructing kinematicCloud "
<<
kinematicCloudName
<<
endl
;
basicKinematicCloud
kinematicCloud
(
kinematicCloudName
,
rho
,
U
,
thermo
.
mu
(),
g
);
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files
0 → 100644
View file @
ea17556c
uncoupledKinematicParcelDyMFoam.C
EXE = $(FOAM_APPBIN)/uncoupledKinematicParcelDyMFoam
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I.. \
-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)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lradiationModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.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) 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
uncoupledKinematicParcelDyMFoam
Description
Transient solver for the passive transport of a particle cloud.
Uses a pre-calculated velocity field to evolve the cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "basicKinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for the passive transport of a particle cloud"
" with optional mesh motion"
"Uses a pre-calculated velocity field to evolve the cloud."
);
argList
::
addOption
(
"cloudName"
,
"name"
,
"specify alternative cloud name. default is 'kinematicCloud'"
);
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
#include "compressibleCourantNo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
loop
())
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
kinematicCloud
.
storeGlobalPositions
();
mesh
.
update
();
U
.
correctBoundaryConditions
();
Info
<<
"Evolving "
<<
kinematicCloud
.
name
()
<<
endl
;
kinematicCloud
.
evolve
();
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.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
uncoupledKinematicParcelFoam
Group
grpLagrangianSolvers
Description
Transient solver for the passive transport of a particle cloud.
Uses a pre-calculated velocity field to evolve the cloud.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "basicKinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for the passive transport of a particle cloud.
\n
"
"Uses a pre-calculated velocity field to evolve the cloud."
);
argList
::
addOption
(
"cloud"
,
"name"
,
"specify alternative cloud name. default is 'kinematicCloud'"
);
#define NO_CONTROL
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "compressibleCourantNo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
loop
())
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
Info
<<
"Evolving "
<<
kinematicCloud
.
name
()
<<
endl
;
kinematicCloud
.
evolve
();
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/multiphase/MPPICInterFoam/Allwclean
0 → 100644
View file @
ea17556c
#!/bin/sh
cd
"
${
0
%/*
}
"
||
exit
# Run from this directory
#------------------------------------------------------------------------------
wclean libso compressibleTwoPhaseMixtureTurbulenceModels
wclean
#------------------------------------------------------------------------------
Prev
1
…
30
31
32
33
34
35
36
37
38
…
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