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
1240 additions
and
0 deletions
+1240
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options
...s/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options
+48
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files
...ications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files
+3
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options
...ations/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options
+47
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/correctPhic.H
...tions/solvers/lagrangian/DPMFoam/DPMDyMFoam/correctPhic.H
+11
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/createUcf.H
...cations/solvers/lagrangian/DPMFoam/DPMDyMFoam/createUcf.H
+51
-0
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
+62
-0
applications/solvers/lagrangian/DPMFoam/DPMFoam.C
applications/solvers/lagrangian/DPMFoam/DPMFoam.C
+155
-0
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.C
...am/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.C
+210
-0
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.H
...am/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.H
+156
-0
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C
...rangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C
+87
-0
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
...solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
+3
-0
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
...lvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
+18
-0
applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C
...ications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.C
+45
-0
applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
+3
-0
applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
...cations/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
+42
-0
applications/solvers/lagrangian/DPMFoam/Make/files
applications/solvers/lagrangian/DPMFoam/Make/files
+3
-0
applications/solvers/lagrangian/DPMFoam/Make/options
applications/solvers/lagrangian/DPMFoam/Make/options
+40
-0
applications/solvers/lagrangian/DPMFoam/UcEqn.H
applications/solvers/lagrangian/DPMFoam/UcEqn.H
+31
-0
applications/solvers/lagrangian/DPMFoam/continuityErrs.H
applications/solvers/lagrangian/DPMFoam/continuityErrs.H
+50
-0
applications/solvers/lagrangian/DPMFoam/createFields.H
applications/solvers/lagrangian/DPMFoam/createFields.H
+175
-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/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options
0 → 100644
View file @
ea17556c
EXE_INC = \
-I.. \
-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)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/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 \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files
0 → 100644
View file @
ea17556c
DPMDyMFoam.C
EXE = $(FOAM_APPBIN)/DPMDyMFoam
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options
0 → 100644
View file @
ea17556c
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)/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 \
-lspecie \
-lradiationModels \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lDPMTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lsampling \
-lregionFaModels \
-lfiniteArea \
-lfaOptions
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/correctPhic.H
0 → 100644
View file @
ea17556c
CorrectPhi
(
Uc
,
phic
,
p
,
dimensionedScalar
(
"rAUf"
,
dimTime
,
1
),
geometricZeroField
(),
pimple
);
#include "continuityErrs.H"
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/createUcf.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) 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/>.
Global
createUcf
Description
Creates and initialises the velocity velocity field Ucf.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"Reading/calculating continuous phase face velocity Ucf
\n
"
<<
endl
;
surfaceVectorField
Ucf
(
IOobject
(
"Ucf"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
fvc
::
interpolate
(
Uc
)
);
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
0 → 100644
View file @
ea17556c
{
volVectorField
HbyA
(
constrainHbyA
(
rAUc
*
UcEqn
.
H
(),
Uc
,
p
));
surfaceScalarField
phiHbyA
(
"phiHbyA"
,
(
fvc
::
flux
(
HbyA
)
+
alphacf
*
rAUcf
*
fvc
::
ddtCorr
(
Uc
,
Ucf
)
)
);
if
(
p
.
needReference
())
{
fvc
::
makeRelative
(
phiHbyA
,
Uc
);
adjustPhi
(
phiHbyA
,
Uc
,
p
);
fvc
::
makeAbsolute
(
phiHbyA
,
Uc
);
}
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
();
{
Ucf
=
fvc
::
interpolate
(
Uc
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Ucf
+=
n
*
(
phic
/
mesh
.
magSf
()
-
(
n
&
Ucf
));
}
// Make the fluxes relative to the mesh motion
fvc
::
makeRelative
(
phic
,
Uc
);
}
}
}
#include "continuityErrs.H"
applications/solvers/lagrangian/DPMFoam/DPMFoam.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) 2013-2016 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
DPMFoam
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.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "DPMIncompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#ifdef MPPIC
#include "basicKinematicCloud.H"
#define basicKinematicTypeCloud basicKinematicCloud
#else
#include "basicKinematicCollidingCloud.H"
#define basicKinematicTypeCloud basicKinematicCollidingCloud
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"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."
);
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 "createTimeControls.H"
#include "createFields.H"
#include "initContinuityErrs.H"
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
runTime
.
run
())
{
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
continuousPhaseTransport
.
correct
();
muc
=
rhoc
*
continuousPhaseTransport
.
nu
();
Info
<<
"Evolving "
<<
kinematicCloud
.
name
()
<<
endl
;
kinematicCloud
.
evolve
();
// Update continuous phase volume fraction field
alphac
=
max
(
1
.
0
-
kinematicCloud
.
theta
(),
alphacMin
);
alphac
.
correctBoundaryConditions
();
alphacf
=
fvc
::
interpolate
(
alphac
);
alphaPhic
=
alphacf
*
phic
;
fvVectorMatrix
cloudSU
(
kinematicCloud
.
SU
(
Uc
));
volVectorField
cloudVolSUSu
(
IOobject
(
"cloudVolSUSu"
,
runTime
.
timeName
(),
mesh
),
mesh
,
dimensionedVector
(
cloudSU
.
dimensions
()
/
dimVolume
,
Zero
),
zeroGradientFvPatchVectorField
::
typeName
);
cloudVolSUSu
.
primitiveFieldRef
()
=
-
cloudSU
.
source
()
/
mesh
.
V
();
cloudVolSUSu
.
correctBoundaryConditions
();
cloudSU
.
source
()
=
Zero
;
// cloudVolSUSu.primitiveFieldRef() =
// (cloudSU.diag()*Uc() - cloudSU.source())/mesh.V();
// cloudVolSUSu.correctBoundaryConditions();
// cloudSU.source() = cloudSU.diag()*Uc();
// --- Pressure-velocity PIMPLE corrector loop
while
(
pimple
.
loop
())
{
#include "UcEqn.H"
// --- PISO loop
while
(
pimple
.
correct
())
{
#include "pEqn.H"
}
if
(
pimple
.
turbCorr
())
{
continuousPhaseTurbulence
->
correct
();
}
}
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.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) 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"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class
TransportModel
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
DPMIncompressibleTurbulenceModel
(
const
word
&
type
,
const
volScalarField
&
alpha
,
const
geometricOneField
&
rho
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
alphaRhoPhi
,
const
surfaceScalarField
&
phi
,
const
TransportModel
&
transportModel
,
const
word
&
propertiesName
)
:
TurbulenceModel
<
volScalarField
,
geometricOneField
,
incompressibleTurbulenceModel
,
TransportModel
>
(
alpha
,
rho
,
U
,
alphaRhoPhi
,
phi
,
transportModel
,
propertiesName
)
{}
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
template
<
class
TransportModel
>
Foam
::
autoPtr
<
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
New
(
const
volScalarField
&
alpha
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
alphaRhoPhi
,
const
surfaceScalarField
&
phi
,
const
TransportModel
&
transportModel
,
const
word
&
propertiesName
)
{
return
autoPtr
<
DPMIncompressibleTurbulenceModel
>
(
static_cast
<
DPMIncompressibleTurbulenceModel
*>
(
TurbulenceModel
<
volScalarField
,
geometricOneField
,
incompressibleTurbulenceModel
,
TransportModel
>::
New
(
alpha
,
geometricOneField
(),
U
,
alphaRhoPhi
,
phi
,
transportModel
,
propertiesName
).
ptr
())
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
pPrime
()
const
{
return
tmp
<
volScalarField
>::
New
(
IOobject
(
IOobject
::
groupName
(
"pPrime"
,
this
->
alphaRhoPhi_
.
group
()),
this
->
runTime_
.
timeName
(),
this
->
mesh_
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
this
->
mesh_
,
dimensionedScalar
(
dimPressure
,
Zero
)
);
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
surfaceScalarField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
pPrimef
()
const
{
return
tmp
<
surfaceScalarField
>::
New
(
IOobject
(
IOobject
::
groupName
(
"pPrimef"
,
this
->
alphaRhoPhi_
.
group
()),
this
->
runTime_
.
timeName
(),
this
->
mesh_
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
this
->
mesh_
,
dimensionedScalar
(
dimPressure
,
Zero
)
);
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
volSymmTensorField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
devReff
()
const
{
return
devRhoReff
();
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
volSymmTensorField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
devReff
(
const
volVectorField
&
U
)
const
{
return
devRhoReff
(
U
);
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
fvVectorMatrix
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
divDevReff
(
volVectorField
&
U
)
const
{
return
divDevRhoReff
(
U
);
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
volSymmTensorField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
devRhoReff
()
const
{
NotImplemented
;
return
devReff
();
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
volSymmTensorField
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
devRhoReff
(
const
volVectorField
&
U
)
const
{
NotImplemented
;
return
nullptr
;
}
template
<
class
TransportModel
>
Foam
::
tmp
<
Foam
::
fvVectorMatrix
>
Foam
::
DPMIncompressibleTurbulenceModel
<
TransportModel
>::
divDevRhoReff
(
volVectorField
&
U
)
const
{
NotImplemented
;
return
divDevReff
(
U
);
}
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMIncompressibleTurbulenceModel.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) 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/>.
Class
Foam::DPMIncompressibleTurbulenceModel
Description
Templated abstract base class for volumen occupancy incompressible
turbulence models.
SourceFiles
DPMIncompressibleTurbulenceModel.C
\*---------------------------------------------------------------------------*/
#ifndef DPMIncompressibleTurbulenceModel_H
#define DPMIncompressibleTurbulenceModel_H
#include "TurbulenceModel.H"
#include "incompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class DPMIncompressibleTurbulenceModel Declaration
\*---------------------------------------------------------------------------*/
template
<
class
TransportModel
>
class
DPMIncompressibleTurbulenceModel
:
public
TurbulenceModel
<
volScalarField
,
geometricOneField
,
incompressibleTurbulenceModel
,
TransportModel
>
{
public:
typedef
volScalarField
alphaField
;
typedef
geometricOneField
rhoField
;
typedef
TransportModel
transportModel
;
// Constructors
//- Construct
DPMIncompressibleTurbulenceModel
(
const
word
&
type
,
const
alphaField
&
alpha
,
const
geometricOneField
&
rho
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
alphaRhoPhi
,
const
surfaceScalarField
&
phi
,
const
TransportModel
&
transportModel
,
const
word
&
propertiesName
);
// Selectors
//- Return a reference to the selected turbulence model
static
autoPtr
<
DPMIncompressibleTurbulenceModel
>
New
(
const
alphaField
&
alpha
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
alphaRhoPhi
,
const
surfaceScalarField
&
phi
,
const
TransportModel
&
transportModel
,
const
word
&
propertiesName
=
turbulenceModel
::
propertiesName
);
//- Destructor
virtual
~
DPMIncompressibleTurbulenceModel
()
=
default
;
// Member Functions
//- Return the phase-pressure'
// (derivative of phase-pressure w.r.t. phase-fraction)
virtual
tmp
<
volScalarField
>
pPrime
()
const
;
//- Return the face-phase-pressure'
// (derivative of phase-pressure w.r.t. phase-fraction)
virtual
tmp
<
surfaceScalarField
>
pPrimef
()
const
;
//- Return the effective stress tensor
virtual
tmp
<
volSymmTensorField
>
devReff
()
const
;
//- Return the effective stress tensor based on a given velocity field
virtual
tmp
<
volSymmTensorField
>
devReff
(
const
volVectorField
&
U
)
const
;
//- Return the source term for the momentum equation
virtual
tmp
<
fvVectorMatrix
>
divDevReff
(
volVectorField
&
U
)
const
;
//- Return the effective stress tensor
virtual
tmp
<
volSymmTensorField
>
devRhoReff
()
const
;
//- Return the effective stress tensor based on a given velocity field
virtual
tmp
<
volSymmTensorField
>
devRhoReff
(
const
volVectorField
&
U
)
const
;
//- Return the source term for the momentum equation
virtual
tmp
<
fvVectorMatrix
>
divDevRhoReff
(
volVectorField
&
U
)
const
;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "DPMIncompressibleTurbulenceModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.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) 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
);
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/files
0 → 100644
View file @
ea17556c
DPMTurbulenceModels.C
LIB = $(FOAM_LIBBIN)/libDPMTurbulenceModels
applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/lagrangian/DPMFoam/MPPICFoam/MPPICFoam.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) 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"
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/files
0 → 100644
View file @
ea17556c
MPPICFoam.C
EXE = $(FOAM_APPBIN)/MPPICFoam
applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/lagrangian/DPMFoam/Make/files
0 → 100644
View file @
ea17556c
DPMFoam.C
EXE = $(FOAM_APPBIN)/DPMFoam
applications/solvers/lagrangian/DPMFoam/Make/options
0 → 100644
View file @
ea17556c
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
applications/solvers/lagrangian/DPMFoam/UcEqn.H
0 → 100644
View file @
ea17556c
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
()
)
);
}
applications/solvers/lagrangian/DPMFoam/continuityErrs.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) 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
;
}
// ************************************************************************* //
applications/solvers/lagrangian/DPMFoam/createFields.H
0 → 100644
View file @
ea17556c
#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
)
);
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