Compare commits
2 Commits
OpenFOAM-v
...
feature-nu
| Author | SHA1 | Date | |
|---|---|---|---|
| 15ae6fcaac | |||
| 2a799fe728 |
31
.gitignore
vendored
31
.gitignore
vendored
@ -12,7 +12,7 @@
|
||||
# File-browser settings - anywhere
|
||||
.directory
|
||||
|
||||
# Backup/recovery versions - anywhere
|
||||
# CVS recovered versions - anywhere
|
||||
.#*
|
||||
|
||||
# Objects and archives - anywhere
|
||||
@ -23,7 +23,7 @@
|
||||
# Derived files
|
||||
lex.yy.c
|
||||
|
||||
# Core dumps
|
||||
# Corefiles
|
||||
core
|
||||
|
||||
# Dependency files - anywhere
|
||||
@ -47,21 +47,22 @@ platforms/
|
||||
# Reinstate wmake rules that might look like build directories
|
||||
!/wmake/rules/*/
|
||||
|
||||
# Doxygen generated
|
||||
# doxygen generated documentation
|
||||
doc/Doxygen/html
|
||||
doc/Doxygen/latex
|
||||
doc/Doxygen/man
|
||||
doc/Doxygen/DTAGS
|
||||
|
||||
# Generated files in the main and doc directories
|
||||
# Generated files in the main directory (e.g. ReleaseNotes-?.?.html)
|
||||
# and in the doc directory
|
||||
/*.html
|
||||
/doc/*.html
|
||||
|
||||
# Untracked configuration/preferences files
|
||||
# Untracked configuration files
|
||||
/etc/prefs.csh
|
||||
/etc/prefs.sh
|
||||
/etc/config.csh/prefs.*
|
||||
/etc/config.sh/prefs.*
|
||||
/etc/config.csh/prefs.csh
|
||||
/etc/config.sh/prefs.sh
|
||||
/wmake/rules/General/mplibUSER*
|
||||
|
||||
# Source packages - anywhere
|
||||
@ -72,11 +73,19 @@ doc/Doxygen/DTAGS
|
||||
*.tgz
|
||||
*.gtgz
|
||||
|
||||
# Ignore tags or project files in the main directory
|
||||
/.cproject
|
||||
/.dir-locals.el
|
||||
/.project
|
||||
# Ignore the persistent .build tag in the main directory
|
||||
/.build
|
||||
|
||||
# Ignore .timeStamp in the main directory
|
||||
/.timeStamp
|
||||
|
||||
# Ignore .tags in the main directory
|
||||
/.tags
|
||||
|
||||
# Ignore project files in the main directory
|
||||
/.cproject
|
||||
/.project
|
||||
/.dir-locals.el
|
||||
|
||||
# Ignore the test directory
|
||||
/tutorialsTest
|
||||
|
||||
6
Allwmake
6
Allwmake
@ -18,7 +18,7 @@ fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Preamble. Report tools or at least the mpirun location
|
||||
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/list_tools ]
|
||||
then sh "$WM_PROJECT_DIR"/wmake/scripts/list_tools || true
|
||||
then . "$WM_PROJECT_DIR"/wmake/scripts/list_tools
|
||||
else
|
||||
echo "mpirun=$(command -v mpirun || true)"
|
||||
fi
|
||||
@ -73,10 +73,10 @@ echo
|
||||
applications/Allwmake $targetType $*
|
||||
|
||||
# Additional components/modules
|
||||
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
|
||||
if [ "$FOAM_MODULE_PREFIX" = false ]
|
||||
then
|
||||
echo "========================================"
|
||||
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
|
||||
echo "OpenFOAM modules disabled (prefix=false)"
|
||||
echo
|
||||
elif [ -d "$WM_PROJECT_DIR/modules" ]
|
||||
then
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Contributors to OpenFOAM
|
||||
|
||||
The following is a list of known contributors to OpenFOAM.
|
||||
The following is an list of known contributors to OpenFOAM.
|
||||
It is likely incomplete...
|
||||
|
||||
## Contributors (alphabetical by surname)
|
||||
@ -8,7 +8,6 @@ It is likely incomplete...
|
||||
- William Bainbridge
|
||||
- Gabriel Barajas
|
||||
- Kutalmis Bercin
|
||||
- Ivor Clifford
|
||||
- Greg Collecutt
|
||||
- Jonathan Cranford
|
||||
- Sergio Ferraris
|
||||
@ -24,7 +23,6 @@ It is likely incomplete...
|
||||
- Hrvoje Jasak
|
||||
- Alexander Kabat vel Job
|
||||
- Thilo Knacke
|
||||
- Shannon Leakey
|
||||
- Tommaso Lucchini
|
||||
- Graham Macpherson
|
||||
- Alexey Matveichev
|
||||
@ -34,14 +32,12 @@ It is likely incomplete...
|
||||
- Haakan Nilsson
|
||||
- Niklas Nordin
|
||||
- Mark Olesen
|
||||
- Victor Olesen
|
||||
- Evangelos Papoutsis-Kiachagias
|
||||
- Vaggelis Papoutsis
|
||||
- Juho Peltola
|
||||
- Johan Roenby
|
||||
- Henrik Rusche
|
||||
- Bruno Santos
|
||||
- Henning Scheufler
|
||||
- Richard Smith
|
||||
- Prashant Sonakar
|
||||
- Hilary Spencer
|
||||
- Gavin Tabor
|
||||
@ -51,7 +47,4 @@ It is likely incomplete...
|
||||
- Norbert Weber
|
||||
- Henry Weller
|
||||
- Niklas Wikstrom
|
||||
- Guanyang Xue
|
||||
- Thorsten Zirwes
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
@ -3,9 +3,8 @@
|
||||
Meta-information is generally for OpenFOAM internal use only.
|
||||
|
||||
The format, content and meaning may be changed at anytime without
|
||||
prior notice.
|
||||
If any of these are changed, these are some of places that will need
|
||||
to be updated accordingly:
|
||||
notice. If any of these are changed, these are some of places that
|
||||
will need to be updated accordingly:
|
||||
|
||||
- bin/foamEtcFile
|
||||
- bin/tools/foamConfigurePaths
|
||||
@ -39,7 +38,7 @@ Format: `date +%y%m`
|
||||
|
||||
- 4-digit year-month (YYMM) integer corresponding to the major
|
||||
release or in unusual cases an intermediate release.
|
||||
Example, `2106` for the June-2021 release.
|
||||
Example, `1712` for the Dec-2017 release.
|
||||
|
||||
|
||||
#### patch
|
||||
@ -79,9 +78,9 @@ the saved information needs synchronization. The command
|
||||
|
||||
### Notes
|
||||
|
||||
The saved information is split into two separate files.
|
||||
The `api-info` file contains more permanent information,
|
||||
whereas the `build-info` is more transient in nature.
|
||||
The saved information is split into two separate files. The `api-info`
|
||||
contains more permanent information, whereas the `build-info` is more
|
||||
transient in nature.
|
||||
|
||||
----
|
||||
2021-06-09
|
||||
2020-06-23
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
api=2106
|
||||
patch=0
|
||||
api=2006
|
||||
patch=201012
|
||||
|
||||
74
README.md
74
README.md
@ -11,7 +11,7 @@ individual and group contributors, integrations
|
||||
[governance guided activities](https://www.openfoam.com/governance/).
|
||||
|
||||
|
||||
## License
|
||||
## Copyright
|
||||
|
||||
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
|
||||
@ -27,11 +27,10 @@ may redistribute files.
|
||||
OpenCFD Ltd grants use of its OpenFOAM trademark by Third Parties on a
|
||||
licence basis. ESI Group and OpenFOAM Foundation Ltd are currently
|
||||
permitted to use the Name and agreed Domain Name. For information on
|
||||
trademark use, please refer to the
|
||||
[trademark policy guidelines][link trademark].
|
||||
trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
|
||||
|
||||
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have
|
||||
any questions about the use of the OpenFOAM trademark.
|
||||
any questions on the use of the OpenFOAM trademark.
|
||||
|
||||
Violations of the Trademark are monitored, and will be duly prosecuted.
|
||||
|
||||
@ -40,9 +39,9 @@ Violations of the Trademark are monitored, and will be duly prosecuted.
|
||||
|
||||
If OpenFOAM has already been compiled on your system, simply source
|
||||
the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
|
||||
For example, for the OpenFOAM-v2106 version:
|
||||
For example, for the OpenFOAM-v1912 version:
|
||||
```
|
||||
source /installation/path/OpenFOAM-v2106/etc/bashrc
|
||||
source /installation/path/OpenFOAM-v1912/etc/bashrc
|
||||
```
|
||||
|
||||
## Compiling OpenFOAM
|
||||
@ -56,11 +55,6 @@ guides:
|
||||
| [ThirdParty][repo third] | [readme][link third-readme] | [system requirements][link third-require] | [build][link third-build] |
|
||||
|
||||
|
||||
If you need to modify the versions or locations of ThirdParty
|
||||
software, please read how the
|
||||
[OpenFOAM configuration][wiki-config] is structured.
|
||||
|
||||
|
||||
## How do I know which version I am currently using?
|
||||
|
||||
The value of the `$WM_PROJECT_DIR` or even `$WM_PROJECT_VERSION` are
|
||||
@ -69,19 +63,19 @@ not guaranteed to have any correspondence to the OpenFOAM release
|
||||
information is embedded into each application. For example, as
|
||||
displayed from `blockMesh -help`:
|
||||
```
|
||||
Using: OpenFOAM-com (2012) - visit www.openfoam.com
|
||||
Build: b830beb5ea-20210429 (patch=210414)
|
||||
Using: OpenFOAM-v1812.local (1812) - visit www.openfoam.com
|
||||
Build: 65d6551ff7-20190530 (patch=190531)
|
||||
Arch: LSB;label=32;scalar=64
|
||||
```
|
||||
This output contains all of the more interesting information that we need:
|
||||
|
||||
| item | value |
|
||||
|-----------------------|---------------|
|
||||
| version | com (eg, local development branch) |
|
||||
| api | 2012 |
|
||||
| commit | b830beb5ea |
|
||||
| author date | 20210429 |
|
||||
| patch-level | (20)210414 |
|
||||
| version | v1812.local |
|
||||
| api | 1812 |
|
||||
| commit | 65d6551ff7 |
|
||||
| author date | 20190530 |
|
||||
| patch-level | (20)190531 |
|
||||
| label/scalar size | 32/64 bits |
|
||||
|
||||
The Arch information may also include the `solveScalar` size
|
||||
@ -96,19 +90,19 @@ when OpenFOAM has not yet been compiled:
|
||||
```
|
||||
$ wmake -build-info
|
||||
make
|
||||
api = 2012
|
||||
patch = 210414
|
||||
api = 1812
|
||||
patch = 190531
|
||||
branch = master
|
||||
build = 308af39136-20210426
|
||||
build = 65d6551ff7-20190530
|
||||
```
|
||||
Similar information is available with `foamEtcFile`, using the
|
||||
`-show-api` or `-show-patch` options. For example,
|
||||
```
|
||||
$ foamEtcFile -show-api
|
||||
2012
|
||||
1812
|
||||
|
||||
$ foamEtcFile -show-patch
|
||||
210414
|
||||
190531
|
||||
```
|
||||
This output will generally be the easiest to parse for scripts.
|
||||
The `$FOAM_API` convenience environment variable may not reflect the
|
||||
@ -127,8 +121,8 @@ These 3rd-party sources are normally located in a directory parallel
|
||||
to the OpenFOAM directory. For example,
|
||||
```
|
||||
/path/parent
|
||||
|-- OpenFOAM-v2106
|
||||
\-- ThirdParty-v2106
|
||||
|-- OpenFOAM-v1912
|
||||
\-- ThirdParty-v1912
|
||||
```
|
||||
There are, however, many cases where this simple convention is inadequate:
|
||||
|
||||
@ -136,7 +130,7 @@ There are, however, many cases where this simple convention is inadequate:
|
||||
operating system or cluster installation provides it)
|
||||
|
||||
* When we have changed the OpenFOAM directory name to some arbitrary
|
||||
directory name, e.g. openfoam-sandbox2106, etc..
|
||||
directory name, e.g. openfoam-sandbox1912, etc..
|
||||
|
||||
* When we would like any additional 3rd party software to be located
|
||||
inside of the OpenFOAM directory to ensure that the installation is
|
||||
@ -156,14 +150,17 @@ when locating the ThirdParty directory with the following precedence:
|
||||
2. PREFIX/ThirdParty-VERSION
|
||||
* this corresponds to the traditional approach
|
||||
3. PREFIX/ThirdParty-vAPI
|
||||
* allows for an updated value of VERSION, *eg*, `v2106-myCustom`,
|
||||
* allows for an updated value of VERSION, *eg*, `v1912-myCustom`,
|
||||
without requiring a renamed ThirdParty. The API value would still
|
||||
be `2106` and the original `ThirdParty-v2106/` would be found.
|
||||
be `1912` and the original `ThirdParty-v1912/` would be found.
|
||||
4. PREFIX/ThirdParty-API
|
||||
* same as the previous example, but using an unadorned API value.
|
||||
* this is the same as the previous example, but using an unadorned
|
||||
API value. This also makes sense if the chosen version name also
|
||||
uses the unadorned API value in its naming, *eg*,
|
||||
`1912-patch190131`, `1912.19W03`
|
||||
5. PREFIX/ThirdParty-common
|
||||
* permits maximum reuse for various versions, for experienced
|
||||
users who are aware of potential version incompatibilities
|
||||
* permits maximum reuse for various versions, for experienced user
|
||||
who are aware of potential version incompatibilities
|
||||
|
||||
If none of these directories are found to be suitable, it reverts to
|
||||
using PROJECT/ThirdParty as a dummy location (even if the directory
|
||||
@ -187,30 +184,27 @@ ThirdParty directory will contain either an `Allwmake` file or a
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[link trademark]: https://www.openfoam.com/opencfd-limited-trade-mark-policy
|
||||
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
[wiki-config]: https://develop.openfoam.com/Development/openfoam/-/wikis/configuring
|
||||
|
||||
|
||||
## Useful Links
|
||||
|
||||
- Download [source](https://dl.openfoam.com/source/) and [download and installation instructions](http://www.openfoam.com/download/)
|
||||
- Download [source](https://sourceforge.net/projects/openfoam/files/) and [download and installation instructions](http://www.openfoam.com/download/)
|
||||
- [Documentation](http://www.openfoam.com/documentation)
|
||||
- [Reporting bugs/issues/feature requests](http://www.openfoam.com/code/bug-reporting.php)
|
||||
- [Issue tracker](https://develop.openfoam.com/Development/openfoam/-/issues)
|
||||
- [Code wiki](https://develop.openfoam.com/Development/openfoam/-/wikis/) and [General wiki](http://wiki.openfoam.com/)
|
||||
- [Governance](http://www.openfoam.com/governance/), [Governance Projects](https://www.openfoam.com/governance/projects)
|
||||
- [Issue tracker](https://develop.openfoam.com/Development/openfoam/issues)
|
||||
- [Wiki](http://wiki.openfoam.com/) and [code wiki](https://develop.openfoam.com/Development/openfoam/wikis/)
|
||||
- [Community](http://www.openfoam.com/community/), [Governance](http://www.openfoam.com/governance/)
|
||||
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
|
||||
|
||||
Copyright 2016-2021 OpenCFD Ltd
|
||||
Copyright 2016-2020 OpenCFD Ltd
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_fftw
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if have_fftw
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
acousticFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/acousticFoam
|
||||
@ -1,14 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOption/lnInclude \
|
||||
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lregionFaModels
|
||||
@ -1,99 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-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
|
||||
acousticFoam
|
||||
|
||||
Group
|
||||
grpAcousticSolvers
|
||||
|
||||
Description
|
||||
Acoustic solver solving the acoustic pressure wave equation.
|
||||
|
||||
\f[
|
||||
\ddt2{pa} - c^2 \laplacian{pa} = 0
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
c | Sound speed
|
||||
pa | Acoustic pressure
|
||||
\endvartable
|
||||
|
||||
SourceFiles
|
||||
acousticFoam.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fvOptions.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Acoustic solver solving the acoustic pressure wave equation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createRegionControls.H"
|
||||
|
||||
#include "readTransportProperties.H"
|
||||
#include "createFields.H"
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "paEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,15 +0,0 @@
|
||||
|
||||
Info << "\nReading pa" << endl;
|
||||
|
||||
volScalarField pa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
@ -1,8 +0,0 @@
|
||||
fvSolution solutionDict(runTime);
|
||||
|
||||
const dictionary& pimpleDict = solutionDict.subDict("PIMPLE");
|
||||
|
||||
bool solvePrimaryRegion
|
||||
(
|
||||
pimpleDict.getOrDefault("solvePrimaryRegion", true)
|
||||
);
|
||||
@ -1,15 +0,0 @@
|
||||
|
||||
fvScalarMatrix paEqn
|
||||
(
|
||||
fvm::d2dt2(pa) - sqr(c0)*fvc::laplacian(pa)
|
||||
);
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
paEqn.relax();
|
||||
paEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
pa.correctBoundaryConditions();
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "\nReading transportProperties" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar c0("c0", dimVelocity, transportProperties);
|
||||
|
||||
dimensionedScalar rho("rho", dimDensity, transportProperties);
|
||||
|
||||
scalar MaxCo =
|
||||
max(mesh.surfaceInterpolation::deltaCoeffs()*c0).value()
|
||||
*runTime.deltaT().value();
|
||||
|
||||
Info<< "Max acoustic Courant Number = " << MaxCo << endl;
|
||||
@ -160,7 +160,7 @@ int main(int argc, char *argv[])
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n";
|
||||
Info<< "\n end\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ int main(int argc, char *argv[])
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n";
|
||||
Info<< "\n end\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -145,7 +144,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -6,13 +6,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lthermophysicalProperties
|
||||
-lchemistryModel
|
||||
|
||||
@ -93,8 +93,8 @@ int main(int argc, char *argv[])
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "Number of steps = " << runTime.timeIndex() << nl;
|
||||
Info<< "End\n" << endl;
|
||||
Info << "Number of steps = " << runTime.timeIndex() << endl;
|
||||
Info << "End" << nl << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso BCs
|
||||
wclean
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
(
|
||||
wmake $targetType BCs \
|
||||
&& wmake $targetType \
|
||||
&& wmake $targetType rhoCentralDyMFoam \
|
||||
)
|
||||
(wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
dynamicFvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
|
||||
@ -44,7 +44,11 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward Declarations
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
class magnet;
|
||||
Istream& operator>>(Istream&, magnet&);
|
||||
Ostream& operator<<(Ostream&, const magnet&);
|
||||
|
||||
@ -14,9 +14,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionFaModels/lnInclude
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
@ -30,8 +28,4 @@ EXE_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lradiationModels \
|
||||
-lfvOptions \
|
||||
-lfaOptions \
|
||||
-lregionModels \
|
||||
-lsampling \
|
||||
-lregionFaModels
|
||||
-lregionModels
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
phaseSystem = $(LIB_SRC)/phaseSystemModels/reactingEuler
|
||||
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(FOAM_SOLVERS)/multiphase/reactingTwoPhaseEulerFoam \
|
||||
-I${phaseSystem}/twoPhaseSystem/lnInclude \
|
||||
-I${phaseSystem}/twoPhaseCompressibleTurbulenceModels/lnInclude \
|
||||
-I${phaseSystem}/multiphaseSystem/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam \
|
||||
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/lnInclude \
|
||||
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/phaseSystems/lnInclude \
|
||||
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/interfacialModels/lnInclude \
|
||||
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/interfacialCompositionModels/lnInclude \
|
||||
-I./fluid \
|
||||
-I../solid \
|
||||
-I../fluid \
|
||||
@ -23,17 +23,18 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lsolidThermo \
|
||||
-ltwoPhaseReactingTurbulenceModels \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lradiationModels \
|
||||
-lregionModels \
|
||||
-lreactingMultiphaseSystem \
|
||||
-lsampling \
|
||||
-lreactingTwoPhaseSystem \
|
||||
-ltwoPhaseReactingTurbulenceModels
|
||||
-lreactingPhaseSystem
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
solidFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/solidFoam
|
||||
@ -1,24 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidThermo \
|
||||
-lradiationModels \
|
||||
-lspecie
|
||||
@ -1,4 +0,0 @@
|
||||
const volScalarField& rho = trho();
|
||||
volScalarField& h = thermo.he();
|
||||
const volScalarField& betav = *betavPtr;
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<solidThermo> pThermo(solidThermo::New(mesh));
|
||||
solidThermo& thermo = pThermo();
|
||||
|
||||
tmp<volScalarField> trho = thermo.rho();
|
||||
|
||||
autoPtr<coordinateSystem> coordinatesPtr;
|
||||
autoPtr<volSymmTensorField> taniAlpha;
|
||||
|
||||
if (!thermo.isotropic())
|
||||
{
|
||||
Info<< "Adding coordinateSystem\n" << endl;
|
||||
coordinatesPtr = coordinateSystem::New
|
||||
(
|
||||
mesh,
|
||||
thermo,
|
||||
coordinateSystem::typeName_()
|
||||
);
|
||||
|
||||
tmp<volVectorField> tkappaByCp = thermo.Kappa()/thermo.Cp();
|
||||
|
||||
taniAlpha.reset
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Anialpha",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedSymmTensor(tkappaByCp().dimensions(), Zero),
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
);
|
||||
volSymmTensorField& aniAlpha = *taniAlpha;
|
||||
|
||||
aniAlpha.primitiveFieldRef() =
|
||||
coordinatesPtr->transformPrincipal
|
||||
(
|
||||
mesh.cellCentres(),
|
||||
tkappaByCp()
|
||||
);
|
||||
aniAlpha.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
IOobject betavSolidIO
|
||||
(
|
||||
"betavSolid",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
autoPtr<volScalarField> betavPtr;
|
||||
if (betavSolidIO.typeHeaderOk<volScalarField>(true))
|
||||
{
|
||||
betavPtr.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
betavSolidIO,
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
betavPtr.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"betavSolid",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("1", dimless, scalar(1))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#include "createRadiationModel.H"
|
||||
#include "createFvOptions.H"
|
||||
@ -1,38 +0,0 @@
|
||||
{
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
fvm::ddt(betav*rho, h)
|
||||
- (
|
||||
thermo.isotropic()
|
||||
? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
|
||||
: fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
|
||||
)
|
||||
==
|
||||
fvOptions(rho, h)
|
||||
);
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
surfaceScalarField phihMesh
|
||||
(
|
||||
fvc::interpolate(betav*rho*h)*mesh.phi()
|
||||
);
|
||||
|
||||
hEqn -= fvc::div(phihMesh);
|
||||
}
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
fvOptions.constrain(hEqn);
|
||||
|
||||
hEqn.solve(); //mesh.solver(h.select(finalIter)));
|
||||
|
||||
fvOptions.correct(h);
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "Min/max T:" << min(thermo.T()).value() << ' '
|
||||
<< max(thermo.T()).value() << endl;
|
||||
|
||||
radiation->correct();
|
||||
}
|
||||
@ -1,121 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Application
|
||||
solidFoam
|
||||
|
||||
Group
|
||||
grpHeatTransferSolvers
|
||||
|
||||
Description
|
||||
Solver for energy transport and thermodynamics on a solid.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "solidThermo.H"
|
||||
#include "radiationModel.H"
|
||||
#include "fvOptions.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "coordinateSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for energy transport and thermodynamics on a solid"
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nEvolving thermodynamics\n" << endl;
|
||||
|
||||
if (mesh.solutionDict().found("SIMPLE"))
|
||||
{
|
||||
simpleControl simple(mesh);
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
#include "hEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter())
|
||||
{
|
||||
mesh.update();
|
||||
}
|
||||
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "hEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -75,10 +75,9 @@ int main(int argc, char *argv[])
|
||||
// Compute all sensitivities
|
||||
om.computeSensitivities();
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
dynamicFvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso DPMTurbulenceModels
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType DPMTurbulenceModels
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,13 +36,13 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "DPMIncompressibleTurbulenceModel.H"
|
||||
#include "PhaseIncompressibleTurbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "CorrectPhi.H"
|
||||
|
||||
#ifdef MPPIC
|
||||
#include "basicKinematicCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicCloud
|
||||
#include "basicKinematicMPPICCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicMPPICCloud
|
||||
#else
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicCollidingCloud
|
||||
@ -111,6 +110,7 @@ int main(int argc, char *argv[])
|
||||
continuousPhaseTransport.correct();
|
||||
muc = rhoc*continuousPhaseTransport.nu();
|
||||
|
||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
||||
kinematicCloud.evolve();
|
||||
|
||||
// Update continuous phase volume fraction field
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../.. \
|
||||
-I../../DPMTurbulenceModels \
|
||||
-I../DPMTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../DPMTurbulenceModels \
|
||||
-I../DPMTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,12 +38,12 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "DPMIncompressibleTurbulenceModel.H"
|
||||
#include "PhaseIncompressibleTurbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
#ifdef MPPIC
|
||||
#include "basicKinematicCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicCloud
|
||||
#include "basicKinematicMPPICCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicMPPICCloud
|
||||
#else
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
#define basicKinematicTypeCloud basicKinematicCollidingCloud
|
||||
@ -118,12 +117,6 @@ int main(int argc, char *argv[])
|
||||
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())
|
||||
{
|
||||
|
||||
@ -1,186 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::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::fvVectorMatrix>
|
||||
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::divDevRhoReff
|
||||
(
|
||||
volVectorField& U
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
|
||||
return divDevReff(U);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,144 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 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 source term for the momentum equation
|
||||
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "DPMIncompressibleTurbulenceModel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "DPMIncompressibleTurbulenceModel.H"
|
||||
#include "PhaseIncompressibleTurbulenceModel.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeTurbulenceModel.H"
|
||||
@ -36,12 +36,12 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTurbulenceModelTypes
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
geometricOneField,
|
||||
incompressibleTurbulenceModel,
|
||||
DPMIncompressibleTurbulenceModel,
|
||||
PhaseIncompressibleTurbulenceModel,
|
||||
singlePhaseTransportModel
|
||||
);
|
||||
|
||||
@ -50,21 +50,21 @@ makeBaseTurbulenceModel
|
||||
volScalarField,
|
||||
geometricOneField,
|
||||
incompressibleTurbulenceModel,
|
||||
DPMIncompressibleTurbulenceModel,
|
||||
PhaseIncompressibleTurbulenceModel,
|
||||
singlePhaseTransportModel
|
||||
);
|
||||
|
||||
#define makeLaminarModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, laminar, Type)
|
||||
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, laminar, Type)
|
||||
|
||||
#define makeRASModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, RAS, Type)
|
||||
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, RAS, Type)
|
||||
|
||||
#define makeLESModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, LES, Type)
|
||||
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, LES, Type)
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../DPMTurbulenceModels \
|
||||
-I../DPMTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I./DPMTurbulenceModels \
|
||||
-I./DPMTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
@ -13,6 +13,7 @@ EXE_INC = \
|
||||
-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
|
||||
|
||||
|
||||
@ -160,11 +160,10 @@ surfaceScalarField alphaPhic
|
||||
alphacf*phic
|
||||
);
|
||||
|
||||
|
||||
autoPtr<DPMIncompressibleTurbulenceModel<singlePhaseTransportModel>>
|
||||
autoPtr<PhaseIncompressibleTurbulenceModel<singlePhaseTransportModel>>
|
||||
continuousPhaseTurbulence
|
||||
(
|
||||
DPMIncompressibleTurbulenceModel<singlePhaseTransportModel>::New
|
||||
PhaseIncompressibleTurbulenceModel<singlePhaseTransportModel>::New
|
||||
(
|
||||
alphac,
|
||||
Uc,
|
||||
|
||||
@ -2,8 +2,6 @@ EXE_INC = \
|
||||
-I../reactingParcelFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I${LIB_SRC}/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I${LIB_SRC}/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
@ -29,8 +27,6 @@ EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-lsampling \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
|
||||
@ -23,7 +23,6 @@ surfaceScalarField phiHbyA
|
||||
+ phig
|
||||
);
|
||||
|
||||
fvc::makeRelative(phiHbyA, rho, U);
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
@ -82,15 +81,7 @@ else if (pimple.SIMPLErho())
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
// Correct rhoUf if the mesh is moving
|
||||
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
|
||||
if (mesh.moving())
|
||||
{
|
||||
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I${LIB_SRC}/sampling/lnInclude \
|
||||
-I${LIB_SRC}/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
@ -30,8 +28,6 @@ EXE_LIBS = \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lspecie \
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,8 +37,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "rhoReactionThermo.H"
|
||||
#include "CombustionModel.H"
|
||||
@ -47,7 +47,6 @@ Description
|
||||
#include "fvOptions.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureControl.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
#include "fvcSmooth.H"
|
||||
#include "cloudMacros.H"
|
||||
@ -77,13 +76,13 @@ int main(int argc, char *argv[])
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createRegionControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createRhoUfIfPresent.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
@ -99,23 +98,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readDyMControls.H"
|
||||
|
||||
// Store divrhoU from the previous mesh
|
||||
// so that it can be mapped and used in correctPhi
|
||||
// to ensure the corrected phi has the same divergence
|
||||
autoPtr<volScalarField> divrhoU;
|
||||
if (solvePrimaryRegion && correctPhi)
|
||||
{
|
||||
divrhoU.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"divrhoU",
|
||||
fvc::div(fvc::absolute(phi, rho, U))
|
||||
)
|
||||
);
|
||||
}
|
||||
#include "readTimeControls.H"
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
@ -131,44 +114,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Store momentum to set rhoUf for introduced faces.
|
||||
autoPtr<volVectorField> rhoU;
|
||||
if (solvePrimaryRegion && rhoUf.valid())
|
||||
{
|
||||
rhoU.reset(new volVectorField("rhoU", rho*U));
|
||||
}
|
||||
|
||||
// Store the particle positions
|
||||
parcels.storeGlobalPositions();
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (solvePrimaryRegion && mesh.changing())
|
||||
{
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
MRF.update();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
// Calculate absolute flux
|
||||
// from the mapped surface velocity
|
||||
phi = mesh.Sf() & rhoUf();
|
||||
|
||||
#include "../../compressible/rhoPimpleFoam/correctPhi.H"
|
||||
|
||||
// Make the fluxes relative to the mesh-motion
|
||||
fvc::makeRelative(phi, rho, U);
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
parcels.evolve();
|
||||
surfaceFilm.evolve();
|
||||
|
||||
@ -206,7 +151,7 @@ int main(int argc, char *argv[])
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ License
|
||||
);
|
||||
}
|
||||
|
||||
// Update the boundary values of the reciprocal time-step
|
||||
// Update tho boundary values of the reciprocal time-step
|
||||
rDeltaT.correctBoundaryConditions();
|
||||
|
||||
// Spatially smooth the time scale field
|
||||
|
||||
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -122,7 +121,9 @@ int main(int argc, char *argv[])
|
||||
combustion->Qdot()().write();
|
||||
}
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso compressibleTwoPhaseMixtureTurbulenceModels
|
||||
wclean libso CompressibleTwoPhaseMixtureTurbulenceModels
|
||||
wclean
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType compressibleTwoPhaseMixtureTurbulenceModels
|
||||
wmake $targetType CompressibleTwoPhaseMixtureTurbulenceModels
|
||||
wmake $targetType
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 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 "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "immiscibleIncompressibleTwoPhaseMixture.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeTurbulenceModel.H"
|
||||
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
geometricOneField,
|
||||
incompressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
immiscibleIncompressibleTwoPhaseMixture
|
||||
);
|
||||
|
||||
makeBaseTurbulenceModel
|
||||
(
|
||||
volScalarField,
|
||||
volScalarField,
|
||||
compressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
immiscibleIncompressibleTwoPhaseMixture
|
||||
);
|
||||
|
||||
#define makeLaminarModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
laminar, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeRASModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
RAS, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeLESModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
LES, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
#include "kEqn.H"
|
||||
makeLESModel(kEqn);
|
||||
|
||||
#include "kOmega.H"
|
||||
makeRASModel(kOmega);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
CompressibleTwoPhaseMixtureTurbulenceModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libCompressibleTwoPhaseMixtureTurbulenceModels
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,7 +52,7 @@ Description
|
||||
#include "CorrectPhi.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
#include "basicKinematicCloud.H"
|
||||
#include "basicKinematicMPPICCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
interFoamPath = $(FOAM_SOLVERS)/multiphase/interFoam
|
||||
|
||||
EXE_INC = \
|
||||
-I../VoF \
|
||||
-I$(FOAM_SOLVERS)/multiphase/interFoam \
|
||||
-I./IncompressibleTwoPhaseMixtureTurbulenceModels/lnInclude \
|
||||
-I$(interFoamPath) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
@ -37,4 +40,4 @@ EXE_LIBS = \
|
||||
-lsampling \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lcompressibleTwoPhaseMixtureTurbulenceModels
|
||||
-lCompressibleTwoPhaseMixtureTurbulenceModels
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
compressibleTwoPhaseMixtureTurbulenceModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleTwoPhaseMixtureTurbulenceModels
|
||||
@ -1,96 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 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 "PhaseCompressibleTurbulenceModel.H"
|
||||
#include "immiscibleIncompressibleTwoPhaseMixture.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeTurbulenceModel.H"
|
||||
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
geometricOneField,
|
||||
incompressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
immiscibleIncompressibleTwoPhaseMixture
|
||||
);
|
||||
|
||||
makeBaseTurbulenceModel
|
||||
(
|
||||
volScalarField,
|
||||
volScalarField,
|
||||
compressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
immiscibleIncompressibleTwoPhaseMixture
|
||||
);
|
||||
|
||||
#define makeLaminarModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
laminar, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeRASModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
RAS, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeLESModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
( \
|
||||
immiscibleIncompressibleTwoPhaseMixturePhaseCompressibleTurbulenceModel,\
|
||||
LES, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
#include "kEqn.H"
|
||||
makeLESModel(kEqn);
|
||||
|
||||
#include "kOmega.H"
|
||||
makeRASModel(kOmega);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -147,7 +147,7 @@ volScalarField alphacRho(alphac*rho);
|
||||
alphacRho.oldTime();
|
||||
|
||||
Info<< "Constructing kinematicCloud " << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
basicKinematicMPPICCloud kinematicCloud
|
||||
(
|
||||
"kinematicCloud",
|
||||
rho,
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso twoPhaseMixtureThermo
|
||||
wclean libso surfaceTensionModels
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType twoPhaseMixtureThermo
|
||||
@ -11,6 +12,5 @@ wmake $targetType
|
||||
wmake $targetType compressibleInterDyMFoam
|
||||
wmake $targetType compressibleInterFilmFoam
|
||||
wmake $targetType compressibleInterIsoFoam
|
||||
wmake $targetType overCompressibleInterDyMFoam
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T)
|
||||
- fvm::laplacian(turbulence.alphaEff(), T)
|
||||
+ (
|
||||
divUp()// - contErr/rho*p
|
||||
divUp - contErr/rho*p
|
||||
+ (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))() - contErr*K
|
||||
)
|
||||
*(
|
||||
|
||||
@ -39,7 +39,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTurbulenceModelTypes
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
volScalarField,
|
||||
@ -71,38 +71,22 @@ makeBaseTurbulenceModel
|
||||
makeTemplatedTurbulenceModel \
|
||||
(fluidThermoPhaseCompressibleTurbulenceModel, LES, Type)
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Laminar models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
#include "Maxwell.H"
|
||||
makeLaminarModel(Maxwell);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// RAS models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "kOmegaSST.H"
|
||||
makeRASModel(kOmegaSST);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// LES models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
#include "kEqn.H"
|
||||
makeLESModel(kEqn);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -83,7 +83,7 @@ VoFPatchTransfer::VoFPatchTransfer
|
||||
pbm.size() - film.regionMesh().globalData().processorPatches().size()
|
||||
);
|
||||
|
||||
wordRes patchNames;
|
||||
wordReList patchNames;
|
||||
if (coeffDict_.readIfPresent("patches", patchNames))
|
||||
{
|
||||
patchIDs_ = pbm.patchSet(patchNames).sortedToc();
|
||||
|
||||
@ -144,11 +144,10 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource
|
||||
),
|
||||
curTimeIndex_(-1)
|
||||
{
|
||||
fieldNames_.resize(2);
|
||||
fieldNames_.setSize(2);
|
||||
fieldNames_[0] = "U";
|
||||
fieldNames_[1] = "T";
|
||||
|
||||
fv::option::resetApplied();
|
||||
applied_.setSize(fieldNames_.size(), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,6 +41,10 @@ bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict)
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
overCompressibleInterDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overCompressibleInterDyMFoam
|
||||
@ -1,40 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../../VoF \
|
||||
-I../../interFoam/overInterDyMFoam \
|
||||
-I../twoPhaseMixtureThermo \
|
||||
-I../VoFphaseCompressibleTurbulenceModels/lnInclude \
|
||||
-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/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/incompressible/pimpleFoam/overPimpleDyMFoam \
|
||||
-I$(LIB_SRC)/overset/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
-ltwoPhaseProperties \
|
||||
-linterfaceProperties \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lVoFphaseCompressibleTurbulenceModels \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-loverset \
|
||||
-lwaveModels
|
||||
@ -1,28 +0,0 @@
|
||||
{
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T)
|
||||
- fvm::laplacian(turbulence.alphaEff(), T)
|
||||
+ (
|
||||
divUp()// - contErr/rho*p
|
||||
+ (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))() - contErr*K
|
||||
)
|
||||
*(
|
||||
alpha1()/mixture.thermo1().Cv()()
|
||||
+ alpha2()/mixture.thermo2().Cv()()
|
||||
)
|
||||
==
|
||||
fvOptions(rho, T)
|
||||
);
|
||||
|
||||
TEqn.relax();
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
TEqn.solve();
|
||||
|
||||
fvOptions.correct(T);
|
||||
|
||||
mixture.correctThermo();
|
||||
mixture.correct();
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||
- fvm::Sp(contErr, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence.divDevRhoReff(U)
|
||||
==
|
||||
fvOptions(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
cellMask*fvc::reconstruct
|
||||
(
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
- fvc::snGrad(p_rgh)
|
||||
) * mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvOptions.correct(U);
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Sp",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dgdt.dimensions(), Zero)
|
||||
);
|
||||
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Su",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dgdt.dimensions(), Zero)
|
||||
);
|
||||
|
||||
forAll(dgdt, celli)
|
||||
{
|
||||
if (dgdt[celli] > 0.0)
|
||||
{
|
||||
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
|
||||
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
|
||||
}
|
||||
else if (dgdt[celli] < 0.0)
|
||||
{
|
||||
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField::Internal divU
|
||||
(
|
||||
mesh.moving()
|
||||
? fvc::div(phi + mesh.phi())
|
||||
: fvc::div(phi)
|
||||
);
|
||||
@ -1,138 +0,0 @@
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
Info<< "Reading field p_rgh\n" << endl;
|
||||
volScalarField p_rgh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p_rgh",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
|
||||
twoPhaseMixtureThermo mixture(U, phi);
|
||||
|
||||
volScalarField& alpha1(mixture.alpha1());
|
||||
volScalarField& alpha2(mixture.alpha2());
|
||||
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
const volScalarField& rho1 = mixture.thermo1().rho();
|
||||
const volScalarField& rho2 = mixture.thermo2().rho();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
alpha1*rho1 + alpha2*rho2
|
||||
);
|
||||
|
||||
|
||||
dimensionedScalar pMin
|
||||
(
|
||||
"pMin",
|
||||
dimPressure,
|
||||
mixture
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
#include "gh.H"
|
||||
|
||||
|
||||
// Mass flux
|
||||
// Initialisation does not matter because rhoPhi is reset after the
|
||||
// alpha1 solution before it is used in the U equation.
|
||||
surfaceScalarField rhoPhi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rhoPhi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
fvc::interpolate(rho)*phi
|
||||
);
|
||||
|
||||
volScalarField dgdt(alpha1*fvc::div(phi));
|
||||
|
||||
#include "createAlphaFluxes.H"
|
||||
|
||||
// Construct compressible turbulence model
|
||||
compressibleInterPhaseTransportModel turbulence
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
rhoPhi,
|
||||
alphaPhi10,
|
||||
mixture
|
||||
);
|
||||
|
||||
#include "createK.H"
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("HbyA");
|
||||
nonInt.insert("grad(p_rgh)");
|
||||
nonInt.insert("nHat");
|
||||
nonInt.insert("surfaceIntegrate(phi)");
|
||||
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("cellDisplacement");
|
||||
nonInt.insert("interpolatedCells");
|
||||
nonInt.insert("cellInterpolationWeight");
|
||||
nonInt.insert("pcorr");
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
|
||||
// Create bool field with interpolated cells
|
||||
#include "createInterpolatedCells.H"
|
||||
@ -1,240 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
overCompressibleInterDyMFoam
|
||||
|
||||
Group
|
||||
grpMultiphaseSolvers
|
||||
|
||||
Description
|
||||
Solver for two compressible, non-isothermal, immiscible fluids using VOF
|
||||
(i.e. volume of fluid) phase-fraction based interface capturing approach.
|
||||
|
||||
This solver supports dynamic mesh motions including overset cases.
|
||||
|
||||
The momentum and other fluid properties are of the "mixture" and a single
|
||||
momentum equation is solved.
|
||||
|
||||
Either mixture or two-phase transport modelling may be selected. In the
|
||||
mixture approach, a single laminar, RAS or LES model is selected to model
|
||||
the momentum stress. In the Euler-Euler two-phase approach separate
|
||||
laminar, RAS or LES selected models are selected for each of the phases.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "CMULES.H"
|
||||
#include "EulerDdtScheme.H"
|
||||
#include "CrankNicolsonDdtScheme.H"
|
||||
#include "subCycle.H"
|
||||
#include "compressibleInterPhaseTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "transform.H"
|
||||
#include "fvMeshSubset.H"
|
||||
#include "oversetAdjustPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for two compressible, non-isothermal, immiscible fluids"
|
||||
" using VOF phase-fraction based interface capturing approach.\n"
|
||||
"Supports dynamic mesh motions including overset cases."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createTimeControls.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "createFields.H"
|
||||
|
||||
volScalarField& p = mixture.p();
|
||||
volScalarField& T = mixture.T();
|
||||
const volScalarField& psi1 = mixture.thermo1().psi();
|
||||
const volScalarField& psi2 = mixture.thermo2().psi();
|
||||
|
||||
#include "correctPhi.H"
|
||||
#include "createUf.H"
|
||||
|
||||
if (!LTS)
|
||||
{
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
}
|
||||
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.H"
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "CourantNo.H"
|
||||
#include "alphaCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
Info<< "Execution time for mesh.update() = "
|
||||
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||
<< " s" << endl;
|
||||
|
||||
// Do not apply previous time-step mesh compression flux
|
||||
// if the mesh topology changed
|
||||
if (mesh.topoChanging())
|
||||
{
|
||||
talphaPhi1Corr0.clear();
|
||||
}
|
||||
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
// Update cellMask field for blocking out hole cells
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
|
||||
faceMask =
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime());
|
||||
|
||||
// Zero Uf on old faceMask (H-I)
|
||||
Uf *= faceMask;
|
||||
|
||||
const surfaceVectorField Uint(fvc::interpolate(U));
|
||||
// Update Uf and phi on new C-I faces
|
||||
Uf += (1-faceMask)*Uint;
|
||||
|
||||
// Update Uf boundary
|
||||
forAll(Uf.boundaryField(), patchI)
|
||||
{
|
||||
Uf.boundaryFieldRef()[patchI] =
|
||||
Uint.boundaryField()[patchI];
|
||||
}
|
||||
|
||||
phi = mesh.Sf() & Uf;
|
||||
|
||||
// Correct phi on individual regions
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
mixture.correct();
|
||||
|
||||
// Zero phi on current H-I
|
||||
faceMask = localMin<scalar>(mesh).interpolate(cellMask);
|
||||
|
||||
phi *= faceMask;
|
||||
U *= cellMask;
|
||||
|
||||
// Make the flux relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
}
|
||||
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
#include "alphaControls.H"
|
||||
#include "compressibleAlphaEqnSubCycle.H"
|
||||
|
||||
const surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
rhoPhi *= faceMask;
|
||||
|
||||
turbulence.correctPhasePhi();
|
||||
|
||||
#include "UEqn.H"
|
||||
volScalarField divUp("divUp", fvc::div(fvc::absolute(phi, U), p));
|
||||
#include "TEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence.correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,177 +0,0 @@
|
||||
{
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
|
||||
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
phiHbyA +=
|
||||
MRF.zeroFilter
|
||||
(
|
||||
fvc::interpolate(rho*rAU)*faceMaskOld*fvc::ddtCorr(U, Uf)
|
||||
);
|
||||
}
|
||||
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
surfaceScalarField phig
|
||||
(
|
||||
(
|
||||
mixture.surfaceTensionForce()
|
||||
- ghf*fvc::snGrad(rho)
|
||||
)*faceMask*rAUf*mesh.magSf()
|
||||
);
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
||||
|
||||
tmp<fvScalarMatrix> p_rghEqnComp1;
|
||||
tmp<fvScalarMatrix> p_rghEqnComp2;
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
#include "rhofs.H"
|
||||
|
||||
surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi);
|
||||
surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi);
|
||||
|
||||
p_rghEqnComp1 =
|
||||
pos(alpha1)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f)
|
||||
- (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
|
||||
)/rho1
|
||||
- fvc::ddt(alpha1) - fvc::div(alphaPhi1)
|
||||
+ (alpha1/rho1)
|
||||
*correction
|
||||
(
|
||||
psi1*fvm::ddt(p_rgh)
|
||||
+ fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
|
||||
)
|
||||
);
|
||||
p_rghEqnComp1.ref().relax();
|
||||
|
||||
p_rghEqnComp2 =
|
||||
pos(alpha2)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f)
|
||||
- (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
|
||||
)/rho2
|
||||
- fvc::ddt(alpha2) - fvc::div(alphaPhi2)
|
||||
+ (alpha2/rho2)
|
||||
*correction
|
||||
(
|
||||
psi2*fvm::ddt(p_rgh)
|
||||
+ fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
|
||||
)
|
||||
);
|
||||
p_rghEqnComp2.ref().relax();
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "rhofs.H"
|
||||
|
||||
p_rghEqnComp1 =
|
||||
pos(alpha1)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f)
|
||||
- (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
|
||||
)/rho1
|
||||
- fvc::ddt(alpha1) - fvc::div(alphaPhi1)
|
||||
+ (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh))
|
||||
);
|
||||
|
||||
p_rghEqnComp2 =
|
||||
pos(alpha2)
|
||||
*(
|
||||
(
|
||||
fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f)
|
||||
- (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
|
||||
)/rho2
|
||||
- fvc::ddt(alpha2) - fvc::div(alphaPhi2)
|
||||
+ (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh))
|
||||
);
|
||||
}
|
||||
|
||||
// Cache p_rgh prior to solve for density update
|
||||
volScalarField p_rgh_0(p_rgh);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqnIncomp
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rAUf, p_rgh)
|
||||
);
|
||||
|
||||
solve
|
||||
(
|
||||
p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp,
|
||||
mesh.solver(p_rgh.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
|
||||
p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
|
||||
|
||||
dgdt =
|
||||
(
|
||||
alpha1*(p_rghEqnComp2 & p_rgh)
|
||||
- alpha2*(p_rghEqnComp1 & p_rgh)
|
||||
);
|
||||
|
||||
phi = phiHbyA + p_rghEqnIncomp.flux();
|
||||
|
||||
U =
|
||||
cellMask*
|
||||
(
|
||||
HbyA
|
||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf)
|
||||
);
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(fvc::absolute(phi, U)/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
// Zero faces H-I for transport Eq after pEq
|
||||
phi *= faceMask;
|
||||
|
||||
// Update densities from change in p_rgh
|
||||
mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0));
|
||||
mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0));
|
||||
|
||||
rho = alpha1*rho1 + alpha2*rho2;
|
||||
|
||||
// Correct p_rgh for consistency with p and the updated densities
|
||||
p_rgh = p - rho*gh;
|
||||
p_rgh.correctBoundaryConditions();
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso multiphaseMixtureThermo
|
||||
wclean
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType multiphaseMixtureThermo
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -46,6 +45,9 @@ namespace Foam
|
||||
defineTypeNameAndDebug(multiphaseMixtureThermo, 0);
|
||||
}
|
||||
|
||||
const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad =
|
||||
Foam::constant::mathematical::pi/180.0;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,23 +59,24 @@ class multiphaseMixtureThermo
|
||||
{
|
||||
public:
|
||||
|
||||
//- Symmetric pair of interface names
|
||||
class interfacePair
|
||||
:
|
||||
public Pair<word>
|
||||
{
|
||||
public:
|
||||
|
||||
// Always use symmetric hashing
|
||||
using hasher = Pair<word>::symmHasher;
|
||||
|
||||
// Always use symmetric hashing (alias)
|
||||
using hash = Pair<word>::symmHasher;
|
||||
struct hash
|
||||
{
|
||||
label operator()(const interfacePair& key) const
|
||||
{
|
||||
return word::hash()(key.first()) + word::hash()(key.second());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
interfacePair() = default;
|
||||
interfacePair() {} // = default
|
||||
|
||||
interfacePair(const word& alpha1Name, const word& alpha2Name)
|
||||
:
|
||||
@ -96,7 +97,11 @@ public:
|
||||
const interfacePair& b
|
||||
)
|
||||
{
|
||||
return (0 != Pair<word>::compare(a, b));
|
||||
return
|
||||
(
|
||||
((a.first() == b.first()) && (a.second() == b.second()))
|
||||
|| ((a.first() == b.second()) && (a.second() == b.first()))
|
||||
);
|
||||
}
|
||||
|
||||
friend bool operator!=
|
||||
@ -112,7 +117,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
// Private data
|
||||
|
||||
//- Dictionary of phases
|
||||
PtrDictionary<phaseModel> phases_;
|
||||
@ -134,8 +139,12 @@ private:
|
||||
//- Stabilisation for normalisation of the interface normal
|
||||
const dimensionedScalar deltaN_;
|
||||
|
||||
//- Conversion factor for degrees into radians
|
||||
static const scalar convertToRad;
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
void calcAlphas();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso mixtureViscosityModels
|
||||
wclean libso relativeVelocityModels
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake $targetType mixtureViscosityModels
|
||||
|
||||
@ -36,7 +36,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTurbulenceModelTypes
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
geometricOneField,
|
||||
volScalarField,
|
||||
@ -78,29 +78,15 @@ makeBaseTurbulenceModel
|
||||
Type \
|
||||
)
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Laminar models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// RAS models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "buoyantKEpsilon.H"
|
||||
makeRASModel(buoyantKEpsilon);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// LES models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wclean libso phasesSystem
|
||||
wclean libso massTransferModels
|
||||
wclean libso CompressibleMultiPhaseTurbulenceModels
|
||||
wclean libso laserDTRM
|
||||
wclean
|
||||
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmakeLnInclude massTransferModels
|
||||
wmake $targetType phasesSystem
|
||||
wmake $targetType massTransferModels
|
||||
wmake $targetType CompressibleMultiPhaseTurbulenceModels
|
||||
wmake $targetType laserDTRM
|
||||
wmake $targetType
|
||||
|
||||
|
||||
@ -0,0 +1,74 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 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 "CompressibleTurbulenceModel.H"
|
||||
#include "compressibleTurbulenceModel.H"
|
||||
#include "multiphaseSystem.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeTurbulenceModel.H"
|
||||
|
||||
#include "ThermalDiffusivity.H"
|
||||
|
||||
#include "laminarModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
makeBaseTurbulenceModel
|
||||
(
|
||||
geometricOneField,
|
||||
volScalarField,
|
||||
compressibleTurbulenceModel,
|
||||
CompressibleTurbulenceModel,
|
||||
ThermalDiffusivity,
|
||||
multiphaseSystem
|
||||
);
|
||||
|
||||
#define makeLaminarModel(Type) \
|
||||
makeTemplatedLaminarModel \
|
||||
(multiphaseSystemCompressibleTurbulenceModel, laminar, Type)
|
||||
|
||||
#define makeRASModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(multiphaseSystemCompressibleTurbulenceModel, RAS, Type)
|
||||
|
||||
#define makeLESModel(Type) \
|
||||
makeTemplatedTurbulenceModel \
|
||||
(multiphaseSystemCompressibleTurbulenceModel, LES, Type)
|
||||
|
||||
#include "Stokes.H"
|
||||
makeLaminarModel(Stokes);
|
||||
|
||||
#include "kEpsilon.H"
|
||||
makeRASModel(kEpsilon);
|
||||
|
||||
#include "Smagorinsky.H"
|
||||
makeLESModel(Smagorinsky);
|
||||
|
||||
#include "kEqn.H"
|
||||
makeLESModel(kEqn);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
CompressibleMultiPhaseTurbulenceModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libCompressibleMultiPhaseTurbulenceModels
|
||||
@ -1,13 +1,10 @@
|
||||
phaseSystem = $(LIB_SRC)/phaseSystemModels/multiphaseInter
|
||||
|
||||
EXE_INC = \
|
||||
-I${phaseSystem}/phasesSystem/lnInclude \
|
||||
-I${phaseSystem}/compressibleMultiPhaseTurbulenceModels/lnInclude \
|
||||
-I./phasesSystem/lnInclude \
|
||||
-I./CompressibleMultiPhaseTurbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude\
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
@ -15,23 +12,22 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/multiphase/interFoam
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-ldynamicFvMesh \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lcompressibleTransportModels \
|
||||
-lradiationModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lIncompressibleMultiphaseSystems \
|
||||
-lCompressibleMultiPhaseTurbulenceModels \
|
||||
-lmassTransferModels \
|
||||
-lsolidThermo \
|
||||
-lsolidSpecie \
|
||||
-ltwoPhaseProperties \
|
||||
-llaserDTRM \
|
||||
-lincompressibleMultiphaseSystems \
|
||||
-lcompressibleMultiPhaseTurbulenceModels
|
||||
-llaserDTRM
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -42,14 +42,16 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "subCycle.H"
|
||||
#include "multiphaseSystem.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "fixedFluxPressureFvPatchScalarField.H"
|
||||
#include "radiationModel.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "HashPtrTable.H"
|
||||
#include "fvcDDt.H"
|
||||
#include "zeroField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -68,18 +70,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createDyMControls.H"
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
|
||||
#include "initCorrectPhi.H"
|
||||
#include "createUfIfPresent.H"
|
||||
|
||||
#include "createFvOptions.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
@ -91,8 +89,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readDyMControls.H"
|
||||
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "alphaCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
@ -108,28 +105,6 @@ int main(int argc, char *argv[])
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
gh = (g & mesh.C()) - ghRef;
|
||||
ghf = (g & mesh.Cf()) - ghRef;
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
// Calculate absolute flux
|
||||
// from the mapped surface velocity
|
||||
phi = mesh.Sf() & Uf();
|
||||
|
||||
#include "correctPhi.H"
|
||||
|
||||
// Make the flux relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "UEqn.H"
|
||||
#include "YEqns.H"
|
||||
#include "TEqn.H"
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
phaseSystem = $(LIB_SRC)/phaseSystemModels/multiphaseInter
|
||||
|
||||
EXE_INC = \
|
||||
-I${phaseSystem}/phasesSystem/lnInclude \
|
||||
-I../phasesSystem/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
@ -11,5 +9,4 @@ LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-llagrangian \
|
||||
-lradiationModels \
|
||||
-lincompressibleMultiphaseSystems
|
||||
-lradiationModels
|
||||
|
||||
@ -593,6 +593,8 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
|
||||
labelField reflectingCells(mesh_.nCells(), -1);
|
||||
|
||||
autoPtr<interpolationCellPoint<vector>> nHatIntrPtr;
|
||||
|
||||
UPtrList<reflectionModel> reflectionUPtr;
|
||||
|
||||
if (reflectionSwitch_)
|
||||
@ -651,7 +653,10 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
}
|
||||
}
|
||||
|
||||
interpolationCellPoint<vector> nHatInterp(nHat);
|
||||
nHatIntrPtr.reset
|
||||
(
|
||||
new interpolationCellPoint<vector>(nHat)
|
||||
);
|
||||
|
||||
DTRMParticle::trackingData td
|
||||
(
|
||||
@ -660,7 +665,7 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
eInterp,
|
||||
EInterp,
|
||||
TInterp,
|
||||
nHatInterp,
|
||||
nHatIntrPtr,
|
||||
reflectingCells,
|
||||
reflectionUPtr,
|
||||
Q_
|
||||
@ -702,7 +707,7 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
Pstream::gatherList(p0);
|
||||
Pstream::scatterList(p0);
|
||||
|
||||
for (const int proci : Pstream::allProcs())
|
||||
for (label proci = 0; proci < Pstream::nProcs(); ++proci)
|
||||
{
|
||||
const pointField& pos = positions[proci];
|
||||
const pointField& pfinal = p0[proci];
|
||||
|
||||
@ -0,0 +1,276 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 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::InterfaceCompositionModel
|
||||
|
||||
Description
|
||||
Base class for interface composition models, templated on the two
|
||||
thermodynamic models either side of the interface.
|
||||
|
||||
SourceFiles
|
||||
InterfaceCompositionModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef InterfaceCompositionModel_H
|
||||
#define InterfaceCompositionModel_H
|
||||
|
||||
#include "interfaceCompositionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class phaseModel;
|
||||
class phasePair;
|
||||
template <class ThermoType> class pureMixture;
|
||||
template <class ThermoType> class multiComponentMixture;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class InterfaceCompositionModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Thermo, class OtherThermo>
|
||||
class InterfaceCompositionModel
|
||||
:
|
||||
public interfaceCompositionModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Thermo (from)
|
||||
const Thermo& fromThermo_;
|
||||
|
||||
//- Other Thermo (to)
|
||||
const OtherThermo& toThermo_;
|
||||
|
||||
//- Lewis number
|
||||
const dimensionedScalar Le_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Get a reference to the local thermo for a pure mixture
|
||||
template<class ThermoType>
|
||||
const typename pureMixture<ThermoType>::thermoType&
|
||||
getLocalThermo
|
||||
(
|
||||
const word& speciesName,
|
||||
const pureMixture<ThermoType>& globalThermo
|
||||
) const;
|
||||
|
||||
//- Get a reference to the local thermo for a multi component mixture
|
||||
template<class ThermoType>
|
||||
const typename multiComponentMixture<ThermoType>::thermoType&
|
||||
getLocalThermo
|
||||
(
|
||||
const word& speciesName,
|
||||
const multiComponentMixture<ThermoType>& globalThermo
|
||||
) const;
|
||||
|
||||
//- Return mass fraction for a pureMixture equal to one
|
||||
template<class ThermoType>
|
||||
tmp<volScalarField> getSpecieMassFraction
|
||||
(
|
||||
const word& speciesName,
|
||||
const pureMixture<ThermoType>& thermo
|
||||
) const;
|
||||
|
||||
//- Return mass fraction for speciesName
|
||||
template<class ThermoType>
|
||||
tmp<volScalarField> getSpecieMassFraction
|
||||
(
|
||||
const word& speciesName,
|
||||
const multiComponentMixture<ThermoType>& thermo
|
||||
) const;
|
||||
|
||||
//- Return moleculas weight of the mixture for pureMixture [Kg/mol]
|
||||
template<class ThermoType>
|
||||
tmp<volScalarField> MwMixture
|
||||
(
|
||||
const pureMixture<ThermoType>& thermo
|
||||
) const;
|
||||
|
||||
//- Return moleculas weight of the mixture for multiComponentMixture
|
||||
// [Kg/mol]
|
||||
template<class ThermoType>
|
||||
tmp<volScalarField> MwMixture
|
||||
(
|
||||
const multiComponentMixture<ThermoType>&
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Construct from components
|
||||
InterfaceCompositionModel(const dictionary& dict, const phasePair& pair);
|
||||
|
||||
//- Destructor
|
||||
~InterfaceCompositionModel() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Mass fraction difference between the interface and the field
|
||||
virtual tmp<volScalarField> dY
|
||||
(
|
||||
const word& speciesName,
|
||||
const volScalarField& Tf
|
||||
) const;
|
||||
|
||||
//- Reference mass fraction for species based models
|
||||
virtual tmp<volScalarField> Yf
|
||||
(
|
||||
const word& speciesName,
|
||||
const volScalarField& Tf
|
||||
) const;
|
||||
|
||||
//- Mass diffusivity of the local thermo
|
||||
virtual tmp<volScalarField> D
|
||||
(
|
||||
const word& speciesName
|
||||
) const;
|
||||
|
||||
//- Latent heat (to - from)(thermo - otherThermo)
|
||||
virtual tmp<volScalarField> L
|
||||
(
|
||||
const word& speciesName,
|
||||
const volScalarField& Tf
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Instantiation for multi-component (from) to single-component (to)
|
||||
#define makeInterfaceDispSpecieMixtureType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
|
||||
\
|
||||
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
|
||||
Type##Thermo##Comp##Mix##Phys; \
|
||||
\
|
||||
typedef OtherThermo<OtherComp, OtherMix<OtherPhys>> \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
|
||||
\
|
||||
addInterfaceCompositionToRunTimeSelectionTable \
|
||||
( \
|
||||
Type, \
|
||||
Type##Thermo##Comp##Mix##Phys, \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
|
||||
)
|
||||
|
||||
|
||||
// Instantiation for single-component (from) to multi-component (to)
|
||||
#define makeInterfaceContSpecieMixtureType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
|
||||
\
|
||||
typedef Thermo<Comp, Mix<Phys>> \
|
||||
Type##Thermo##Comp##Mix##Phys; \
|
||||
\
|
||||
typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys>>> \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
|
||||
\
|
||||
addInterfaceCompositionToRunTimeSelectionTable \
|
||||
( \
|
||||
Type, \
|
||||
Type##Thermo##Comp##Mix##Phys, \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
|
||||
)
|
||||
|
||||
|
||||
// Instantiation for single-component-single-component pairs
|
||||
#define makeInterfacePureType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
|
||||
\
|
||||
typedef Thermo<Comp, Mix<Phys>> \
|
||||
Type##Thermo##Comp##Mix##Phys; \
|
||||
\
|
||||
typedef OtherThermo<OtherComp, OtherMix<OtherPhys>> \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
|
||||
\
|
||||
addInterfaceCompositionToRunTimeSelectionTable \
|
||||
( \
|
||||
Type, \
|
||||
Type##Thermo##Comp##Mix##Phys, \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
|
||||
)
|
||||
|
||||
|
||||
// Instantiation for multi-component-multi-component pairs
|
||||
#define makeSpecieInterfaceSpecieMixtures(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
|
||||
\
|
||||
typedef Thermo<Comp, SpecieMixture<Mix<Phys>>> \
|
||||
Type##Thermo##Comp##Mix##Phys; \
|
||||
\
|
||||
typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys>>> \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys; \
|
||||
\
|
||||
addInterfaceCompositionToRunTimeSelectionTable \
|
||||
( \
|
||||
Type, \
|
||||
Type##Thermo##Comp##Mix##Phys, \
|
||||
Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys \
|
||||
)
|
||||
|
||||
|
||||
// Addition to the run-time selection table
|
||||
#define addInterfaceCompositionToRunTimeSelectionTable(Type, Thermo, OtherThermo)\
|
||||
\
|
||||
typedef Type<Thermo, OtherThermo> \
|
||||
Type##Thermo##OtherThermo; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Type##Thermo##OtherThermo, \
|
||||
( \
|
||||
word(Type##Thermo##OtherThermo::typeName_()) + "<" \
|
||||
+ word(Thermo::typeName) + "," \
|
||||
+ word(OtherThermo::typeName) + ">" \
|
||||
).c_str(), \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
interfaceCompositionModel, \
|
||||
Type##Thermo##OtherThermo, \
|
||||
dictionary \
|
||||
)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "InterfaceCompositionModel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -214,7 +214,7 @@ namespace Foam
|
||||
);
|
||||
|
||||
|
||||
// From pure solid phase (const) to phase (Boussinesq)
|
||||
// From pure phase (solidThermo) to phase (Boussinesq)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
@ -228,7 +228,7 @@ namespace Foam
|
||||
BoussinesqFluidEThermoPhysics
|
||||
);
|
||||
|
||||
// From pure solid phase (const) to phase (rho const)
|
||||
// From pure phase (solidThermo) to phase (rho const)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
@ -242,35 +242,7 @@ namespace Foam
|
||||
constRhoHThermoPhysics
|
||||
);
|
||||
|
||||
// From pure solid phase (const) to phase (tabulated)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hConstSolidThermoPhysics,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
tabulatedThermoPhysics
|
||||
);
|
||||
|
||||
// From pure solid phase (const) to phase (poly)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hConstSolidThermoPhysics,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
icoPoly8HThermoPhysics
|
||||
);
|
||||
|
||||
// From pure solid phase (poly) to flow phase (poly)
|
||||
// From pure phase (all-poly solidThermo) to phase (ico-rho)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
@ -284,20 +256,6 @@ namespace Foam
|
||||
icoPoly8HThermoPhysics
|
||||
);
|
||||
|
||||
// From pure solid phase (poly) to flow phase (tabulated)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hPolyTranspPolyIcoSolidThermoPhysics,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
tabulatedThermoPhysics
|
||||
);
|
||||
|
||||
// From pure phase (exp-Transp, hPower solidThermo) to phase (ico-rho)
|
||||
makeInterfacePureType
|
||||
(
|
||||
@ -356,7 +314,7 @@ namespace Foam
|
||||
hConstSolidThermoPhysics
|
||||
);
|
||||
|
||||
//From pure phase (poly) to solid phase (exp)
|
||||
//From pure liquid phase (ico-rho) to pure phase (exp-Transp, hPower solidThermo)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
@ -370,62 +328,6 @@ namespace Foam
|
||||
hPowerSolidThermoPhysics
|
||||
);
|
||||
|
||||
//From pure phase (poly) to solid phase (poly)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
icoPoly8HThermoPhysics,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hPolyTranspPolyIcoSolidThermoPhysics
|
||||
);
|
||||
|
||||
//From pure phase (poly) to solid phase (const)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
icoPoly8HThermoPhysics,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hConstSolidThermoPhysics
|
||||
);
|
||||
|
||||
//From pure phase (tabulated) to solid phase (poly)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
tabulatedThermoPhysics,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hPolyTranspPolyIcoSolidThermoPhysics
|
||||
);
|
||||
|
||||
//From pure phase (tabulated) to solid phase (const)
|
||||
makeInterfacePureType
|
||||
(
|
||||
Lee,
|
||||
heRhoThermo,
|
||||
rhoThermo,
|
||||
pureMixture,
|
||||
tabulatedThermoPhysics,
|
||||
heSolidThermo,
|
||||
solidThermo,
|
||||
pureMixture,
|
||||
hConstSolidThermoPhysics
|
||||
);
|
||||
|
||||
|
||||
|
||||
// interfaceHeatResistance model definitions
|
||||
@ -159,7 +159,7 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::KSu
|
||||
{
|
||||
return
|
||||
(
|
||||
-coeff*pos(Tactivate_ - refValue)
|
||||
coeff*pos(Tactivate_ - refValue)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
interfaceCompositionModel/interfaceCompositionModel.C
|
||||
interfaceCompositionModel/interfaceCompositionModelNew.C
|
||||
InterfaceCompositionModel/InterfaceCompositionModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libmassTransferModels
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user