Compare commits
46 Commits
OpenFOAM-v
...
maintenanc
| Author | SHA1 | Date | |
|---|---|---|---|
| aa02bf904e | |||
| cd79ac6fd5 | |||
| 5619d509c5 | |||
| a52aa33069 | |||
| dd8598ecde | |||
| 964dcb5b53 | |||
| 3166fc0b73 | |||
| 89e7775f90 | |||
| 40c713c48c | |||
| 9cfdb2cc40 | |||
| b9eedb35d1 | |||
| 9c076da13a | |||
| 7782a66e88 | |||
| 4b2a4ed9ec | |||
| a031c194b8 | |||
| e5d2c89f9a | |||
| 641cb490b4 | |||
| f51edbf79e | |||
| 3357b86ab5 | |||
| e9d156ce54 | |||
| dba1bc24ca | |||
| 3c13e7eebf | |||
| 91dd591ff6 | |||
| ecef4c1473 | |||
| 15e7967fb7 | |||
| 5db18df6bc | |||
| cab600d567 | |||
| 868045b2e1 | |||
| ef652062ec | |||
| 5782af39f5 | |||
| fd49e4dd24 | |||
| 8831dfc58b | |||
| 3e29b9c3aa | |||
| cf2630dd1a | |||
| 86e593b58e | |||
| c332b2cbc8 | |||
| bd48ca4920 | |||
| be740dcb06 | |||
| 186ab01b31 | |||
| ef1324a1b0 | |||
| 108d14967a | |||
| 41e93f735f | |||
| 7670bd0e13 | |||
| 5ff5b0afc4 | |||
| 68e7c21d2f | |||
| fa026a13a1 |
29
Allwmake
29
Allwmake
@ -14,24 +14,15 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Preamble. Report compiler version
|
||||
case "$WM_COMPILER" in
|
||||
Gcc*) gcc --version 2>/dev/null | sed -ne '1p' ;;
|
||||
Clang*) clang --version 2>/dev/null | sed -ne '1p' ;;
|
||||
esac
|
||||
# Preamble. Report mpirun location
|
||||
command -v mpirun 2>/dev/null || true
|
||||
|
||||
echo "========================================"
|
||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||
echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*}"
|
||||
echo "Starting ${WM_PROJECT_DIR##*/} ${0##*}"
|
||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
# Compile tools for wmake
|
||||
"${WM_DIR:-wmake}"/src/Allmake
|
||||
# Compile wmake tools
|
||||
(cd "${WM_DIR:-wmake}/src" && make)
|
||||
|
||||
# Compile ThirdParty libraries and applications
|
||||
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
||||
@ -60,13 +51,6 @@ then
|
||||
(cd $WM_PROJECT_DIR/modules 2>/dev/null && wmake -all)
|
||||
fi
|
||||
|
||||
# Count files in given directory. Ignore "Test-*" binaries.
|
||||
_foamCountDirEntries()
|
||||
{
|
||||
(cd "$1" 2>/dev/null && find -mindepth 1 -maxdepth 1 -type f 2>/dev/null) |\
|
||||
sed -e '\@/Test-@d' | wc -l
|
||||
}
|
||||
|
||||
# Some summary information
|
||||
echo
|
||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||
@ -75,11 +59,4 @@ echo " ${WM_PROJECT_DIR##*/}"
|
||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo
|
||||
echo " api = $(wmakeBuildInfo -show-api 2>/dev/null)"
|
||||
echo " patch = $(wmakeBuildInfo -show-patch 2>/dev/null)"
|
||||
echo " bin = $(_foamCountDirEntries $FOAM_APPBIN) entries"
|
||||
echo " lib = $(_foamCountDirEntries $FOAM_LIBBIN) entries"
|
||||
echo
|
||||
echo "========================================"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
3
COPYING
3
COPYING
@ -1,6 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
OpenFOAM(R) is released by OpenCFD Ltd. via www.openfoam.com
|
||||
OpenFOAM(R) is Copyright (C) 2011 OpenFOAM Foundation
|
||||
Contact: OpenFOAM Foundation (OpenFOAM.Foundation@gmail.com)
|
||||
|
||||
You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms
|
||||
of GNU General Public License version 3, which is displayed below, or
|
||||
|
||||
4
META-INFO/.gitignore
vendored
4
META-INFO/.gitignore
vendored
@ -3,3 +3,7 @@ build-info
|
||||
|
||||
# Do not track time-stamp
|
||||
time-stamp
|
||||
|
||||
# Do not track any manifest files
|
||||
Manifest.txt
|
||||
manifest.txt
|
||||
|
||||
@ -2,83 +2,4 @@
|
||||
|
||||
Meta-information is for OpenFOAM internal use only.
|
||||
|
||||
Do not rely on any files or any file contents in this directory,
|
||||
or even the existence of this directory.
|
||||
|
||||
The format, content and meaning may be changed at anytime without
|
||||
notice.
|
||||
|
||||
The information is provided here for internal documentation purposes.
|
||||
|
||||
## api-info
|
||||
|
||||
This file and its contents are to be tracked by git.
|
||||
|
||||
- File content (api) generated by wmakeBuildInfo from OPENFOAM define
|
||||
in `wmake/rules/General/general`
|
||||
|
||||
- File content (patch) is manually generated content.
|
||||
|
||||
|
||||
## build-info
|
||||
|
||||
This file is *never* to be tracked by git, but may be present in shipped
|
||||
source archives.
|
||||
|
||||
- File content (branch, build) generated by wmakeBuildInfo from git
|
||||
information and cached from previous wmake (api)
|
||||
|
||||
|
||||
## Content types
|
||||
|
||||
### api
|
||||
|
||||
- 4-digit year-month (YYMM) integer corresponding to the major
|
||||
release or in unusual cases an intermediate release.
|
||||
|
||||
- Format is year-month, as per `date +%y%m`.
|
||||
Eg, `1712` for the Dec-2017 release.
|
||||
|
||||
|
||||
### patch
|
||||
|
||||
- 6-digit year-month-day (YYMMDD) integer corresponding to a patch-level
|
||||
for the given **released** API.
|
||||
Development branches have a patch value of `0`.
|
||||
|
||||
- Format is year-month-day, as per `date +%y%m%d`.
|
||||
|
||||
- The first release is by definition unpatched, and thus carries
|
||||
a patch value of `0`. If this release were to be patched the following
|
||||
day, the patch level would jump accordingly.
|
||||
|
||||
The patch value is only meaningful together with the api value.
|
||||
|
||||
|
||||
## Flow of information
|
||||
|
||||
Changes in the build information must be reflected in information
|
||||
available in the final binaries. Conversely, it is necessary for later
|
||||
distributions to have a record of the same information.
|
||||
|
||||
| property | source | saved |
|
||||
|-----------|---------------------------|------------|
|
||||
| api | wmake/rules | api-info |
|
||||
| patch | manual (api-info) | build-info |
|
||||
| branch | git | build-info |
|
||||
| build | git | build-info |
|
||||
|
||||
|
||||
The command `wmakeBuildInfo -check` is used to determine if
|
||||
the saved information needs synchronization. The command
|
||||
`wmakeBuildInfo -update` preforms the synchronitzation.
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
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.
|
||||
|
||||
----
|
||||
2018-11-29
|
||||
(Backport from 1812)
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
api=1812
|
||||
patch=0
|
||||
api=1806
|
||||
patch=200131
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if have_fftw
|
||||
then
|
||||
wmake $targetType
|
||||
wmake
|
||||
else
|
||||
echo "==> skip dnsFoam solver (no FFTW)"
|
||||
fi
|
||||
|
||||
@ -44,14 +44,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Direct numerical simulation for boxes of isotropic turbulence."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMeshNoClear.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -31,6 +31,11 @@ IOdictionary transportProperties
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
dimensionedScalar DT
|
||||
(
|
||||
"DT",
|
||||
dimArea/dimTime,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
#include "createFvOptions.H"
|
||||
|
||||
@ -59,13 +59,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Laplace equation solver for a scalar quantity."
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
|
||||
@ -47,4 +47,7 @@
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
);
|
||||
|
||||
@ -60,12 +60,8 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Overset Laplace equation solver for a scalar quantity."
|
||||
);
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedDynamicFvMesh.H"
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
if (runTime.writeTime())
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
volVectorField gradT(fvc::grad(T));
|
||||
|
||||
|
||||
@ -38,9 +38,10 @@ if (args.found("initialiseUBCs"))
|
||||
// Construct a pressure field
|
||||
// If it is available read it otherwise construct from the velocity BCs
|
||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||
word pName("p");
|
||||
|
||||
// Allow override from command-line -pName option
|
||||
const word pName = args.opt<word>("pName", "p");
|
||||
// Update name of the pressure field from the command-line option
|
||||
args.readIfPresent("pName", pName);
|
||||
|
||||
// Infer the pressure BCs from the velocity
|
||||
wordList pBCTypes
|
||||
|
||||
@ -38,9 +38,10 @@ if (args.found("initialiseUBCs"))
|
||||
// Construct a pressure field
|
||||
// If it is available read it otherwise construct from the velocity BCs
|
||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||
word pName("p");
|
||||
|
||||
// Allow override from command-line -pName option
|
||||
const word pName = args.opt<word>("pName", "p");
|
||||
// Update name of the pressure field from the command-line option
|
||||
args.readIfPresent("pName", pName);
|
||||
|
||||
// Infer the pressure BCs from the velocity
|
||||
wordList pBCTypes
|
||||
|
||||
@ -97,11 +97,6 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Overset potential flow solver which solves for the velocity potential"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"pName",
|
||||
@ -130,10 +125,10 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption
|
||||
(
|
||||
"withFunctionObjects",
|
||||
"Execute functionObjects"
|
||||
"execute functionObjects"
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedDynamicFvMesh.H"
|
||||
|
||||
|
||||
@ -94,11 +94,6 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Potential flow solver which solves for the velocity potential"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"pName",
|
||||
@ -127,11 +122,11 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption
|
||||
(
|
||||
"withFunctionObjects",
|
||||
"Execute functionObjects"
|
||||
"execute functionObjects"
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
|
||||
@ -47,7 +47,12 @@ IOdictionary transportProperties
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
dimensionedScalar DT
|
||||
(
|
||||
"DT",
|
||||
dimArea/dimTime,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
@ -61,13 +61,8 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Passive scalar transport equation solver."
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
|
||||
@ -86,16 +86,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -121,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
@ -71,13 +71,8 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
|
||||
@ -106,8 +101,8 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
// Indicators for refinement.
|
||||
// Note: before ++runTime only for post-processing reasons.
|
||||
// Indicators for refinement. Note: before runTime++
|
||||
// only for post-processing reasons.
|
||||
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
||||
volScalarField normalisedGradP
|
||||
(
|
||||
@ -117,7 +112,7 @@ int main(int argc, char *argv[])
|
||||
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
||||
tmagGradP.clear();
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::XiGModels::basicSubGrid::basicSubGrid
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
k1(XiGModelCoeffs_.get<scalar>("k1")),
|
||||
k1(readScalar(XiGModelCoeffs_.lookup("k1"))),
|
||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -104,7 +104,7 @@ bool Foam::XiGModels::basicSubGrid::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("k1", k1);
|
||||
XiGModelCoeffs_.lookup("k1") >> k1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
||||
{
|
||||
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
||||
|
||||
PDRDragModelCoeffs_.readEntry("drag", on_);
|
||||
PDRDragModelCoeffs_.read("drag", on_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -165,8 +165,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
|
||||
{
|
||||
PDRDragModel::read(PDRProperties);
|
||||
|
||||
PDRDragModelCoeffs_.readEntry("Csu", Csu.value());
|
||||
PDRDragModelCoeffs_.readEntry("Csk", Csk.value());
|
||||
PDRDragModelCoeffs_.read("Csu", Csu.value());
|
||||
PDRDragModelCoeffs_.read("Csk", Csk.value());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -49,10 +49,13 @@ Foam::XiEqModels::Gulder::Gulder
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin"))
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -93,9 +96,9 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -49,12 +49,15 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||
XiEqExp_(XiEqModelCoeffs_.get<scalar>("XiEqExp")),
|
||||
lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")),
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
),
|
||||
MaModel
|
||||
(
|
||||
Su.mesh().lookupObject<IOdictionary>("combustionProperties"),
|
||||
@ -144,11 +147,11 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("XiEqExp", XiEqExp_);
|
||||
XiEqModelCoeffs_.readEntry("lCoef", lCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
|
||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::XiEqModel::XiEqModel
|
||||
(
|
||||
XiEqProperties.subDict
|
||||
(
|
||||
XiEqProperties.get<word>("XiEqModel") + "Coeffs"
|
||||
word(XiEqProperties.lookup("XiEqModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
@ -142,10 +142,10 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
|
||||
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
||||
|
||||
const scalarField deltaUp(upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0));
|
||||
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
||||
|
||||
// Re use tN
|
||||
N.primitiveFieldRef() = upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0);
|
||||
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
|
||||
|
||||
return tN;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
||||
const volScalarField& Su
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("XiEqModel"));
|
||||
const word modelType(propDict.lookup("XiEqModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::XiEqModels::instability::instability
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqIn(XiEqModelCoeffs_.get<scalar>("XiEqIn")),
|
||||
XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))),
|
||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -73,7 +73,7 @@ bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqIn", XiEqIn);
|
||||
XiEqModelCoeffs_.lookup("XiEqIn") >> XiEqIn;
|
||||
|
||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef"))
|
||||
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
||||
{}
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("GEtaCoef", GEtaCoef_);
|
||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::XiGModel::XiGModel
|
||||
(
|
||||
XiGProperties.subDict
|
||||
(
|
||||
XiGProperties.get<word>("XiGModel") + "Coeffs"
|
||||
word(XiGProperties.lookup("XiGModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
||||
const volScalarField& Su
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("XiGModel"));
|
||||
const word modelType(propDict.lookup("XiGModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GIn_("GIn", dimless/dimTime, XiGModelCoeffs_),
|
||||
lambdaIn_("lambdaIn", dimLength, XiGModelCoeffs_),
|
||||
GIn_(XiGModelCoeffs_.lookup("GIn")),
|
||||
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
|
||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("GIn", GIn_);
|
||||
XiGModelCoeffs_.readEntry("lambdaIn", lambdaIn_);
|
||||
XiGModelCoeffs_.lookup("GIn") >> GIn_;
|
||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ Foam::XiModel::XiModel
|
||||
(
|
||||
XiProperties.subDict
|
||||
(
|
||||
XiProperties.get<word>("XiModel") + "Coeffs"
|
||||
word(XiProperties.lookup("XiModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("XiModel"));
|
||||
const word modelType(propDict.lookup("XiModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::XiModels::algebraic::algebraic
|
||||
)
|
||||
:
|
||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||
{}
|
||||
@ -89,7 +89,7 @@ bool Foam::XiModels::algebraic::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ Foam::XiModels::transport::transport
|
||||
)
|
||||
:
|
||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||
{}
|
||||
@ -136,7 +136,7 @@ bool Foam::XiModels::transport::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
|
||||
)
|
||||
:
|
||||
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
||||
ll(polyDict.get<scalar>("lowerLimit")),
|
||||
ul(polyDict.get<scalar>("upperLimit")),
|
||||
ll(readScalar(polyDict.lookup("lowerLimit"))),
|
||||
ul(readScalar(polyDict.lookup("upperLimit"))),
|
||||
llv(polyPhi(ll, *this)),
|
||||
ulv(polyPhi(ul, *this)),
|
||||
lu(0)
|
||||
@ -75,30 +75,39 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
dict.get<fileName>("fuelFile")
|
||||
fileName
|
||||
(
|
||||
dict.lookup("fuelFile")
|
||||
)
|
||||
)()
|
||||
).optionalSubDict(typeName + "Coeffs")
|
||||
),
|
||||
LFL_
|
||||
(
|
||||
coeffsDict_.getCompat<scalar>
|
||||
readScalar
|
||||
(
|
||||
"lowerFlammabilityLimit",
|
||||
{{"lowerFlamabilityLimit", 1712}}
|
||||
coeffsDict_.lookupCompat
|
||||
(
|
||||
"lowerFlammabilityLimit",
|
||||
{{"lowerFlamabilityLimit", 1712}}
|
||||
)
|
||||
)
|
||||
),
|
||||
UFL_
|
||||
(
|
||||
coeffsDict_.getCompat<scalar>
|
||||
readScalar
|
||||
(
|
||||
"upperFlammabilityLimit",
|
||||
{{"upperFlamabilityLimit", 1712}}
|
||||
coeffsDict_.lookupCompat
|
||||
(
|
||||
"upperFlammabilityLimit",
|
||||
{{"upperFlamabilityLimit", 1712}}
|
||||
)
|
||||
)
|
||||
),
|
||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
||||
Texp_(coeffsDict_.get<scalar>("Texp")),
|
||||
pexp_(coeffsDict_.get<scalar>("pexp")),
|
||||
Texp_(readScalar(coeffsDict_.lookup("Texp"))),
|
||||
pexp_(readScalar(coeffsDict_.lookup("pexp"))),
|
||||
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
||||
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
||||
{
|
||||
@ -408,7 +417,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
||||
(
|
||||
dimensionedScalar
|
||||
(
|
||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
||||
)*ft/(scalar(1) - ft)
|
||||
);
|
||||
}
|
||||
@ -449,7 +458,7 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const
|
||||
psiuReactionThermo_.Tu(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
||||
)*ft/(scalar(1) - ft)
|
||||
);
|
||||
}
|
||||
|
||||
@ -67,15 +67,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -113,7 +107,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -65,17 +65,11 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling in internal combustion engines."
|
||||
);
|
||||
|
||||
#define CREATE_TIME createEngineTime.H
|
||||
#define CREATE_MESH createEngineMesh.H
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createEngineTime.H"
|
||||
#include "createEngineMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -101,7 +95,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ if (Pstream::master())
|
||||
(
|
||||
new OFstream
|
||||
(
|
||||
runTime.globalPath()
|
||||
runTime.rootPath()/runTime.globalCaseName()
|
||||
/("logSummary." + runTime.timeName() + ".dat")
|
||||
)
|
||||
);
|
||||
|
||||
@ -65,16 +65,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -98,7 +92,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
@ -12,34 +12,34 @@
|
||||
)
|
||||
);
|
||||
|
||||
const word SuModel
|
||||
word SuModel
|
||||
(
|
||||
combustionProperties.get<word>("SuModel")
|
||||
combustionProperties.lookup("SuModel")
|
||||
);
|
||||
|
||||
dimensionedScalar sigmaExt
|
||||
(
|
||||
"sigmaExt", dimless/dimTime, combustionProperties
|
||||
combustionProperties.lookup("sigmaExt")
|
||||
);
|
||||
|
||||
const word XiModel
|
||||
word XiModel
|
||||
(
|
||||
combustionProperties.get<word>("XiModel")
|
||||
combustionProperties.lookup("XiModel")
|
||||
);
|
||||
|
||||
dimensionedScalar XiCoef
|
||||
(
|
||||
"XiCoef", dimless, combustionProperties
|
||||
combustionProperties.lookup("XiCoef")
|
||||
);
|
||||
|
||||
dimensionedScalar XiShapeCoef
|
||||
(
|
||||
"XiShapeCoef", dimless, combustionProperties
|
||||
combustionProperties.lookup("XiShapeCoef")
|
||||
);
|
||||
|
||||
dimensionedScalar uPrimeCoef
|
||||
(
|
||||
"uPrimeCoef", dimless, combustionProperties
|
||||
combustionProperties.lookup("uPrimeCoef")
|
||||
);
|
||||
|
||||
ignition ign(combustionProperties, runTime, mesh);
|
||||
|
||||
@ -32,6 +32,7 @@ Description
|
||||
provide comparison against other chemistry solvers, that uses a single cell
|
||||
mesh, and fields created from the initial conditions.
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
@ -48,19 +49,13 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for chemistry problems, designed for use on single cell cases"
|
||||
" to provide comparison against other chemistry solvers"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
|
||||
#define CREATE_MESH createSingleCellMesh.H
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createSingleCellMesh.H"
|
||||
#include "createFields.H"
|
||||
@ -78,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "solveChemistry.H"
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
)
|
||||
);
|
||||
|
||||
scalar p0 = initialConditions.get<scalar>("p");
|
||||
scalar T0 = initialConditions.get<scalar>("T");
|
||||
scalar p0 = readScalar(initialConditions.lookup("p"));
|
||||
scalar T0 = readScalar(initialConditions.lookup("T"));
|
||||
|
||||
#include "createBaseFields.H"
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
runTime.controlDict().readEntry("adjustTimeStep", adjustTimeStep);
|
||||
runTime.controlDict().read("adjustTimeStep", adjustTimeStep);
|
||||
|
||||
runTime.controlDict().readEntry("maxDeltaT", maxDeltaT);
|
||||
runTime.controlDict().read("maxDeltaT", maxDeltaT);
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
word constProp(initialConditions.get<word>("constantProperty"));
|
||||
if (constProp != "pressure" && constProp != "volume")
|
||||
word constProp(initialConditions.lookup("constantProperty"));
|
||||
if ((constProp != "pressure") && (constProp != "volume"))
|
||||
{
|
||||
FatalError << "in initialConditions, unknown constantProperty type "
|
||||
<< constProp << nl << " Valid types are: pressure volume."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
word fractionBasis(initialConditions.get<word>("fractionBasis"));
|
||||
if (fractionBasis != "mass" && fractionBasis != "mole")
|
||||
word fractionBasis(initialConditions.lookup("fractionBasis"));
|
||||
if ((fractionBasis != "mass") && (fractionBasis != "mole"))
|
||||
{
|
||||
FatalError << "in initialConditions, unknown fractionBasis type " << nl
|
||||
<< "Valid types are: mass or mole."
|
||||
@ -40,7 +40,7 @@
|
||||
const word& name = Y[i].name();
|
||||
if (fractions.found(name))
|
||||
{
|
||||
X0[i] = fractions.get<scalar>(name);
|
||||
X0[i] = readScalar(fractions.lookup(name));
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
const word& name = Y[i].name();
|
||||
if (fractions.found(name))
|
||||
{
|
||||
Y0[i] = fractions.get<scalar>(name);
|
||||
Y0[i] = readScalar(fractions.lookup(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,16 +45,11 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for cold-flow in internal combustion engines."
|
||||
);
|
||||
|
||||
#define CREATE_TIME createEngineTime.H
|
||||
#define CREATE_MESH createEngineMesh.H
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createEngineTime.H"
|
||||
#include "createEngineMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -79,7 +74,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Engine time = " << runTime.theta() << runTime.unit()
|
||||
<< endl;
|
||||
|
||||
@ -8,7 +8,7 @@ if (Pstream::master())
|
||||
(
|
||||
new OFstream
|
||||
(
|
||||
runTime.globalPath()
|
||||
runTime.rootPath()/runTime.globalCaseName()
|
||||
/("logSummary." + runTime.timeName() + ".dat")
|
||||
)
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ SLGThermo slgThermo(mesh, thermo);
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
|
||||
@ -50,16 +50,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for fires and turbulent diffusion flames"
|
||||
" with reacting particle clouds, surface film and pyrolysis modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -85,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
#include "setMultiRegionDeltaT.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
|
||||
@ -47,15 +47,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for combustion with chemical reactions"
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -90,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpCombustionSolvers
|
||||
|
||||
Description
|
||||
Solver for combustion with chemical reactions using a density-based
|
||||
Solver for combustion with chemical reactions using a density based
|
||||
thermodynamics package with enhanced buoyancy treatment.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -47,17 +47,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for combustion with chemical reactions using density-based"
|
||||
" thermodynamics package,"
|
||||
" with enhanced buoyancy treatment."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -92,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpCombustionSolvers
|
||||
|
||||
Description
|
||||
Solver for combustion with chemical reactions using density-based
|
||||
Solver for combustion with chemical reactions using density based
|
||||
thermodynamics package.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -48,16 +48,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for combustion with chemical reactions using density-based"
|
||||
" thermodynamics package."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -93,7 +87,7 @@ int main(int argc, char *argv[])
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
const dictionary& pimpleDict = pimple.dict();
|
||||
|
||||
// Maximum flow Courant number
|
||||
scalar maxCo(pimpleDict.get<scalar>("maxCo"));
|
||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
||||
|
||||
// Maximum time scale
|
||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT));
|
||||
@ -118,7 +118,7 @@ License
|
||||
if (Yref.found(Yi.name()))
|
||||
{
|
||||
foundY = true;
|
||||
const scalar Yrefi = Yref.get<scalar>(Yi.name());
|
||||
scalar Yrefi = readScalar(Yref.lookup(Yi.name()));
|
||||
|
||||
rDeltaTY.field() = max
|
||||
(
|
||||
@ -170,7 +170,7 @@ License
|
||||
rDeltaT = max
|
||||
(
|
||||
rDeltaT,
|
||||
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
|
||||
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||
accommodationCoeff_(dict.get<scalar>("accommodationCoeff")),
|
||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
||||
Twall_("Twall", dict, p.size()),
|
||||
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
||||
{
|
||||
@ -94,8 +94,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
|| mag(accommodationCoeff_) > 2.0
|
||||
)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "unphysical accommodationCoeff specified"
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << "unphysical accommodationCoeff specified"
|
||||
<< "(0 < accommodationCoeff <= 1)" << endl
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
||||
accommodationCoeff_(dict.get<scalar>("accommodationCoeff")),
|
||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
||||
Uwall_("Uwall", dict, p.size()),
|
||||
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
||||
curvature_(dict.lookupOrDefault("curvature", true))
|
||||
@ -96,8 +96,10 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
|| mag(accommodationCoeff_) > 2.0
|
||||
)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "unphysical accommodationCoeff_ specified"
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << "unphysical accommodationCoeff_ specified"
|
||||
<< "(0 < accommodationCoeff_ <= 1)" << endl
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -118,7 +120,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
else
|
||||
{
|
||||
this->refValue() = *this;
|
||||
this->valueFraction() = scalar(1);
|
||||
this->valueFraction() = scalar(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,9 +28,8 @@ Group
|
||||
grpCompressibleSolvers grpMovingMeshSolvers
|
||||
|
||||
Description
|
||||
Density-based compressible flow solver based on central-upwind
|
||||
schemes of Kurganov and Tadmor
|
||||
with support for mesh-motion and topology changes.
|
||||
Density-based compressible flow solver based on central-upwind schemes of
|
||||
Kurganov and Tadmor with support for mesh-motion and topology changes.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -48,17 +47,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Density-based compressible flow solver based on central-upwind"
|
||||
" schemes of Kurganov and Tadmor.\n"
|
||||
"With support for mesh-motion and topology changes."
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createFields.H"
|
||||
@ -84,7 +76,7 @@ int main(int argc, char *argv[])
|
||||
#include "readTimeControls.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -28,8 +28,8 @@ Group
|
||||
grpCompressibleSolvers
|
||||
|
||||
Description
|
||||
Density-based compressible flow solver based on central-upwind
|
||||
schemes of Kurganov and Tadmor.
|
||||
Density-based compressible flow solver based on central-upwind schemes of
|
||||
Kurganov and Tadmor.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -45,17 +45,11 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Density-based compressible flow solver based on central-upwind"
|
||||
" schemes of Kurganov and Tadmor."
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
@ -166,7 +160,7 @@ int main(int argc, char *argv[])
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
|
||||
if (!local)
|
||||
{
|
||||
const scalar T0 = eosDict.get<scalar>("T0");
|
||||
const scalar p0 = eosDict.get<scalar>("p0");
|
||||
const scalar T0 = readScalar(eosDict.lookup("T0"));
|
||||
const scalar p0 = readScalar(eosDict.lookup("p0"));
|
||||
|
||||
he = thermo.he(p, pow(p/p0, (gamma - scalar(1))/gamma)*T0);
|
||||
}
|
||||
|
||||
@ -58,17 +58,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for laminar or turbulent flow"
|
||||
" of weakly compressible fluids for low Mach number"
|
||||
" aeroacoustic applications."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -88,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2018 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/>.
|
||||
|
||||
Global
|
||||
continuityErrs
|
||||
|
||||
Description
|
||||
Calculates and prints the continuity errors.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
dimensionedScalar totalMass = fvc::domainIntegrate(cellMask*rho);
|
||||
|
||||
scalar sumLocalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(mag(cellMask*(rho - thermo.rho())))/totalMass
|
||||
).value();
|
||||
|
||||
scalar globalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(cellMask*(rho - thermo.rho()))/totalMass
|
||||
).value();
|
||||
|
||||
cumulativeContErr += globalContErr;
|
||||
|
||||
Info<< "time step continuity errors : sum local = " << sumLocalContErr
|
||||
<< ", global = " << globalContErr
|
||||
<< ", cumulative = " << cumulativeContErr
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,84 +1,11 @@
|
||||
if (mesh.changing())
|
||||
{
|
||||
volVectorField::Boundary& bfld = U.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].initEvaluate();
|
||||
}
|
||||
}
|
||||
|
||||
surfaceScalarField::Boundary& phiBfld = phi.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].evaluate();
|
||||
|
||||
phiBfld[patchi] =
|
||||
rho.boundaryField()[patchi]
|
||||
* (
|
||||
bfld[patchi]
|
||||
& mesh.Sf().boundaryField()[patchi]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Initialize BCs list for pcorr to zero-gradient
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
forAll(p.boundaryField(), patchi)
|
||||
{
|
||||
if (p.boundaryField()[patchi].fixesValue())
|
||||
{
|
||||
pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pcorr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(p.dimensions(), Zero),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
{
|
||||
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::ddt(psi, pcorr)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rAUf, pcorr)
|
||||
==
|
||||
divrhoU()
|
||||
);
|
||||
|
||||
pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter())));
|
||||
//Bypass virtual layer
|
||||
//mesh.fvMesh::solve(pcorrEqn, d);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pcorrEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
CorrectPhi
|
||||
(
|
||||
U,
|
||||
phi,
|
||||
p,
|
||||
rho,
|
||||
psi,
|
||||
dimensionedScalar("rAUf", dimTime, 1),
|
||||
divrhoU,
|
||||
pimple
|
||||
);
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
bool ddtCorr
|
||||
#include "createTimeControls.H"
|
||||
|
||||
bool correctPhi
|
||||
(
|
||||
pimple.dict().lookupOrDefault("ddtCorr", true)
|
||||
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||
);
|
||||
|
||||
bool checkMeshCourantNo
|
||||
(
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||
);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<fluidThermo> pThermo
|
||||
autoPtr<psiThermo> pThermo
|
||||
(
|
||||
fluidThermo::New(mesh)
|
||||
psiThermo::New(mesh)
|
||||
);
|
||||
fluidThermo& thermo = pThermo();
|
||||
psiThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
@ -39,8 +39,6 @@ volVectorField U
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
pressureControl pressureControl(p, rho, pimple.dict(), false);
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
@ -65,25 +63,42 @@ dimensionedScalar rhoMin
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
#include "createDpdt.H"
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(p.dimensions()/dimTime, Zero)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
#include "createK.H"
|
||||
|
||||
//- Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("U", true);
|
||||
oversetDict.add("p", true);
|
||||
oversetDict.add("HbyA", true);
|
||||
oversetDict.add("grad(p)", true);
|
||||
|
||||
nonInt.insert("HbyA");
|
||||
nonInt.insert("grad(p)");
|
||||
nonInt.insert("surfaceIntegrate(phi)");
|
||||
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("cellDisplacement");
|
||||
nonInt.insert("interpolatedCells");
|
||||
nonInt.insert("cellInterpolationWeight");
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
|
||||
@ -38,11 +38,10 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "bound.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureControl.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "fvOptions.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
@ -54,22 +53,16 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for compressible turbulent flow.\n"
|
||||
"With optional mesh motion and mesh topology changes."
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "createControl.H"
|
||||
#include "createRDeltaT.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "createRhoUfIfPresent.H"
|
||||
#include "createRhoUf.H"
|
||||
#include "createControls.H"
|
||||
|
||||
turbulence->validate();
|
||||
@ -87,107 +80,66 @@ int main(int argc, char *argv[])
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.H"
|
||||
#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 (correctPhi)
|
||||
{
|
||||
divrhoU.reset
|
||||
// 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
|
||||
volScalarField divrhoU
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"divrhoU",
|
||||
fvc::div(fvc::absolute(phi, rho, U))
|
||||
)
|
||||
"divrhoU",
|
||||
fvc::div(fvc::absolute(phi, rho, U))
|
||||
);
|
||||
|
||||
if (LTS)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Store momentum to set rhoUf for introduced faces.
|
||||
volVectorField rhoU("rhoU", rho*U);
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
#include "setCellMask.H"
|
||||
}
|
||||
|
||||
if (mesh.changing() && correctPhi)
|
||||
{
|
||||
// Calculate absolute flux from the mapped surface velocity
|
||||
phi = mesh.Sf() & rhoUf;
|
||||
|
||||
#include "correctPhi.H"
|
||||
|
||||
// Make the fluxes relative to the mesh-motion
|
||||
fvc::makeRelative(phi, rho, U);
|
||||
}
|
||||
}
|
||||
|
||||
if (LTS)
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "setRDeltaT.H"
|
||||
}
|
||||
else
|
||||
{
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
#include "rhoEqn.H"
|
||||
Info<< "rhoEqn max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
MRF.update();
|
||||
|
||||
#include "setCellMask.H"
|
||||
|
||||
const surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
|
||||
// Zero Uf on old faceMask (H-I)
|
||||
rhoUf() *= faceMaskOld;
|
||||
|
||||
surfaceVectorField rhoUfint(fvc::interpolate(rho*U));
|
||||
|
||||
// Update Uf and phi on new C-I faces
|
||||
rhoUf() += (1-faceMaskOld)*rhoUfint;
|
||||
|
||||
// Update Uf boundary
|
||||
forAll(rhoUf().boundaryField(), patchI)
|
||||
{
|
||||
rhoUf().boundaryFieldRef()[patchI] =
|
||||
rhoUfint.boundaryField()[patchI];
|
||||
}
|
||||
|
||||
// Calculate absolute flux from the mapped surface velocity
|
||||
phi = mesh.Sf() & rhoUf();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
// Zero phi on current H-I
|
||||
const surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
|
||||
phi *= faceMask;
|
||||
U *= cellMask;
|
||||
|
||||
// Make the fluxes relative to the mesh-motion
|
||||
fvc::makeRelative(phi, rho, U);
|
||||
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
if (pimple.firstIter() && !pimple.SIMPLErho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
@ -203,8 +155,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
|
||||
@ -1,93 +1,80 @@
|
||||
if (!pimple.SIMPLErho())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||
// pressure solution
|
||||
const volScalarField psip0(psi*p);
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
mesh.interpolate(rAU);
|
||||
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
|
||||
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rhorAUf("rhorAUf", faceMask*fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA("HbyA", U);
|
||||
|
||||
HbyA = constrainHbyA(rAU*UEqn.H(), U, p);
|
||||
HbyA = constrainHbyA(cellMask*rAU*UEqn.H(), U, p);
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
tUEqn.clear();
|
||||
}
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
|
||||
phiHbyA +=
|
||||
faceMaskOld*MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf));
|
||||
}
|
||||
|
||||
fvc::makeRelative(phiHbyA, rho, U);
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
fvc::flux(HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
||||
)
|
||||
);
|
||||
|
||||
phiHbyA -= fvc::interpolate(psi*p)*phiHbyA/fvc::interpolate(rho);
|
||||
|
||||
fvScalarMatrix pDDtEqn
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||
+ fvc::div(phiHbyA) + fvm::div(phid, p)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
);
|
||||
fvc::makeRelative(phid, psi, U);
|
||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
|
||||
|
||||
// Relax the pressure equation to ensure diagonal-dominance
|
||||
pEqn.relax();
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fvScalarMatrix pDDtEqn
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||
+ fvc::div(phiHbyA)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
"phiHbyA",
|
||||
fvc::flux(rho*HbyA)
|
||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
||||
);
|
||||
|
||||
fvc::makeRelative(phiHbyA, rho, U);
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
@ -104,24 +91,25 @@ else
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Recalculate density from the relaxed pressure
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
volVectorField gradP(fvc::grad(p));
|
||||
//mesh.interpolate(gradP);
|
||||
U = cellMask*(HbyA - rAU*gradP);
|
||||
U = HbyA - rAU*cellMask*gradP;
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax) ;
|
||||
rho = thermo.rho();
|
||||
|
||||
{
|
||||
// Correct rhoUf if the mesh is moving
|
||||
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
@ -133,9 +121,3 @@ if (thermo.dpdt())
|
||||
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
}
|
||||
|
||||
surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
phi *= faceMask;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
#include "readTimeControls.H"
|
||||
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||
|
||||
checkMeshCourantNo =
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
|
||||
ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true);
|
||||
|
||||
@ -52,16 +52,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for compressible turbulent flow.\n"
|
||||
"With optional mesh motion and mesh topology changes."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
@ -112,7 +106,7 @@ int main(int argc, char *argv[])
|
||||
#include "setDeltaT.H"
|
||||
}
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpCompressibleSolvers
|
||||
|
||||
Description
|
||||
Overset steady-state solver for compressible turbulent flow.
|
||||
Overset steady-state solver for turbulent flow of compressible fluids.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -47,15 +47,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Overset steady-state solver for compressible turbulent flow"
|
||||
);
|
||||
|
||||
#define CREATE_MESH createUpdatedDynamicFvMesh.H
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createUpdatedDynamicFvMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -28,8 +28,8 @@ Group
|
||||
grpCompressibleSolvers
|
||||
|
||||
Description
|
||||
Steady-state solver for compressible turbulent flow,
|
||||
with implicit or explicit porosity treatment and optional sources.
|
||||
Steady-state solver for turbulent flow of compressible fluids, with
|
||||
implicit or explicit porosity treatment and optional sources.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -45,16 +45,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Steady-state solver for compressible turbulent flow,"
|
||||
"with implicit or explicit porosity treatment and optional sources."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -28,7 +28,7 @@ Group
|
||||
grpCompressibleSolvers
|
||||
|
||||
Description
|
||||
Steady-state solver for compressible turbulent flow.
|
||||
Steady-state solver for turbulent flow of compressible fluids.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -43,15 +43,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Steady-state solver for compressible turbulent flow."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -45,16 +45,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for trans-sonic/supersonic, turbulent flow"
|
||||
" of a compressible gas.\n"
|
||||
"With optional mesh motion and mesh topology changes."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
@ -88,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -43,16 +43,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for trans-sonic/supersonic, turbulent flow"
|
||||
" of a compressible gas."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -40,16 +40,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for trans-sonic/supersonic, laminar flow"
|
||||
" of a compressible liquid."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -28,8 +28,8 @@ Group
|
||||
grpDiscreteMethodsSolvers
|
||||
|
||||
Description
|
||||
Direct simulation Monte Carlo (DSMC) solver
|
||||
for transient, multi-species flows.
|
||||
Direct simulation Monte Carlo (DSMC) solver for, transient, multi-species
|
||||
flows.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -40,17 +40,11 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Direct simulation Monte Carlo (DSMC) solver"
|
||||
" for transient, multi-species flows."
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
@ -37,13 +37,8 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Equilibrate and/or precondition molecular dynamics systems."
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ IOdictionary mdEquilibrationDict
|
||||
)
|
||||
);
|
||||
|
||||
scalar targetTemperature
|
||||
scalar targetTemperature = readScalar
|
||||
(
|
||||
mdEquilibrationDict.get<scalar>("targetTemperature")
|
||||
mdEquilibrationDict.lookup("targetTemperature")
|
||||
);
|
||||
|
||||
@ -39,15 +39,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Molecular dynamics solver for fluid dynamics."
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
@ -14,16 +14,12 @@
|
||||
|
||||
dimensionedScalar epsilon0
|
||||
(
|
||||
"epsilon0",
|
||||
dimensionSet(-1, -3, 4, 0, 0, 2, 0),
|
||||
physicalProperties
|
||||
physicalProperties.lookup("epsilon0")
|
||||
);
|
||||
|
||||
dimensionedScalar k
|
||||
(
|
||||
"k",
|
||||
dimensionSet(-1, 0, 2, 0, 0, 1, 0),
|
||||
physicalProperties
|
||||
physicalProperties.lookup("k")
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -38,13 +38,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for electrostatics."
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
@ -47,31 +47,26 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for the magnetic field generated by permanent magnets."
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noH",
|
||||
"Do not write the magnetic field intensity field"
|
||||
"do not write the magnetic field intensity field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noB",
|
||||
"Do not write the magnetic flux density field"
|
||||
"do not write the magnetic flux density field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"HdotGradH",
|
||||
"Write the paramagnetic particle force field"
|
||||
"write the paramagnetic particle force field"
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
@ -83,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Calculating the magnetic field potential" << endl;
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
|
||||
@ -58,17 +58,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for magnetohydrodynamics (MHD):"
|
||||
" incompressible, laminar flow of a conducting fluid"
|
||||
" under the influence of a magnetic field."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -16,21 +16,21 @@ dimensionedScalar strike
|
||||
(
|
||||
"strike",
|
||||
dimLength,
|
||||
financialProperties
|
||||
financialProperties.lookup("strike")
|
||||
);
|
||||
|
||||
dimensionedScalar r
|
||||
(
|
||||
"r",
|
||||
dimless/dimTime,
|
||||
financialProperties
|
||||
financialProperties.lookup("r")
|
||||
);
|
||||
|
||||
dimensionedScalar sigma
|
||||
(
|
||||
"sigma",
|
||||
dimensionSet(0, 0, -0.5, 0, 0),
|
||||
financialProperties
|
||||
financialProperties.lookup("sigma")
|
||||
);
|
||||
|
||||
dimensionedScalar sigmaSqr = sqr(sigma);
|
||||
|
||||
@ -40,16 +40,11 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solves the Black-Scholes equation to price commodities."
|
||||
);
|
||||
|
||||
#define NO_CONTROL
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
0
applications/solvers/finiteArea/liquidFilmFoam/Make/files
Normal file → Executable file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/files
Normal file → Executable file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/options
Normal file → Executable file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/options
Normal file → Executable file
@ -47,13 +47,7 @@ Author
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for incompressible, laminar flow"
|
||||
" of Newtonian fluids in liquid film formulation."
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFaMesh.H"
|
||||
@ -73,7 +67,7 @@ int main(int argc, char *argv[])
|
||||
#include "capillaryCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
@ -144,7 +138,7 @@ int main(int argc, char *argv[])
|
||||
Us.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
if (runTime.writeTime())
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
vsm.mapToVolume(h, H.boundaryFieldRef());
|
||||
vsm.mapToVolume(Us, U.boundaryFieldRef());
|
||||
|
||||
@ -10,12 +10,32 @@ IOdictionary transportProperties
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar mug("mug", dimViscosity, transportProperties);
|
||||
dimensionedScalar mul("mul", dimViscosity, transportProperties);
|
||||
dimensionedScalar mug
|
||||
(
|
||||
transportProperties.lookup("mug")
|
||||
);
|
||||
|
||||
dimensionedScalar rhog("rhog", dimDensity, transportProperties);
|
||||
dimensionedScalar rhol("rhol", dimDensity, transportProperties);
|
||||
dimensionedScalar mul
|
||||
(
|
||||
transportProperties.lookup("mul")
|
||||
);
|
||||
|
||||
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties);
|
||||
dimensionedScalar sigma
|
||||
(
|
||||
transportProperties.lookup("sigma")
|
||||
);
|
||||
|
||||
dimensionedScalar h0("h0", dimLength, transportProperties);
|
||||
dimensionedScalar rhol
|
||||
(
|
||||
transportProperties.lookup("rhol")
|
||||
);
|
||||
|
||||
dimensionedScalar rhog
|
||||
(
|
||||
transportProperties.lookup("rhog")
|
||||
);
|
||||
|
||||
dimensionedScalar h0
|
||||
(
|
||||
transportProperties.lookup("h0")
|
||||
);
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
sphereSurfactantFoam.C
|
||||
surfactantFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/sphereSurfactantFoam
|
||||
|
||||
@ -12,13 +12,25 @@ areaScalarField Cs
|
||||
aMesh
|
||||
);
|
||||
|
||||
dimensionedScalar Cs0("Cs0", dimMass/dimArea, 1.0);
|
||||
dimensioned<scalar> Cs0
|
||||
(
|
||||
"Cs0",
|
||||
dimensionSet(1, -2, 0, 0, 0, 0, 0),
|
||||
1.0
|
||||
);
|
||||
|
||||
const areaVectorField& R = aMesh.areaCentres();
|
||||
|
||||
Cs = Cs0*(1.0 + R.component(vector::X)/mag(R));
|
||||
|
||||
dimensionedScalar Ds("Ds", dimViscosity, 1.0);
|
||||
|
||||
dimensioned<scalar> Ds
|
||||
(
|
||||
"Ds",
|
||||
dimensionSet(0, 2, -1, 0, 0, 0, 0),
|
||||
1.0
|
||||
);
|
||||
|
||||
|
||||
areaVectorField Us
|
||||
(
|
||||
@ -36,7 +48,7 @@ areaVectorField Us
|
||||
|
||||
dimensioned<scalar> Uinf("Uinf", dimVelocity, 1.0);
|
||||
|
||||
forAll(Us, faceI)
|
||||
forAll (Us, faceI)
|
||||
{
|
||||
Us[faceI].x() =
|
||||
Uinf.value()*(0.25*(3.0 + sqr(R[faceI].x()/mag(R[faceI]))) - 1.0);
|
||||
|
||||
@ -41,14 +41,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Passive finiteArea scalar transport on a sphere"
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
#include "createFaMesh.H"
|
||||
#include "createFaFields.H"
|
||||
#include "createVolFields.H"
|
||||
@ -29,7 +29,10 @@ IOdictionary transportProperties
|
||||
|
||||
Info<< "Reading diffusivity D\n" << endl;
|
||||
|
||||
dimensionedScalar Ds("Ds", dimViscosity, transportProperties);
|
||||
dimensionedScalar Ds
|
||||
(
|
||||
transportProperties.lookup("Ds")
|
||||
);
|
||||
|
||||
areaVectorField Us
|
||||
(
|
||||
|
||||
@ -30,7 +30,7 @@ Group
|
||||
grpFiniteAreaSolvers
|
||||
|
||||
Description
|
||||
Passive scalar transport finiteArea equation solver.
|
||||
Passive scalar transport equation solver.
|
||||
|
||||
\heading Solver details
|
||||
The equation is given by:
|
||||
@ -65,12 +65,7 @@ Author
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Passive scalar transport finiteArea equation solver."
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFaMesh.H"
|
||||
|
||||
@ -59,17 +59,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for buoyant, turbulent flow"
|
||||
" of incompressible fluids.\n"
|
||||
"Uses the Boussinesq approximation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -91,7 +84,7 @@ int main(int argc, char *argv[])
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -59,16 +59,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Steady-state solver for buoyant, turbulent flow"
|
||||
" of incompressible fluids."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
@ -47,16 +47,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for buoyant, turbulent fluid flow"
|
||||
" of compressible fluids, including radiation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -79,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
||||
@ -44,16 +44,10 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Steady-state solver for buoyant, turbulent fluid flow"
|
||||
" of compressible fluids, including radiation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user