mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'release-v1812'
This commit is contained in:
29
Allwmake
29
Allwmake
@ -14,15 +14,24 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
|
|||||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
. $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 "========================================"
|
echo "========================================"
|
||||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||||
echo "Starting ${WM_PROJECT_DIR##*/} ${0##*}"
|
echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*}"
|
||||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||||
|
echo "========================================"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Compile wmake tools
|
# Compile tools for wmake
|
||||||
(cd "${WM_DIR:-wmake}/src" && make)
|
"${WM_DIR:-wmake}"/src/Allmake
|
||||||
|
|
||||||
# Compile ThirdParty libraries and applications
|
# Compile ThirdParty libraries and applications
|
||||||
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
||||||
@ -51,6 +60,13 @@ then
|
|||||||
(cd $WM_PROJECT_DIR/modules 2>/dev/null && wmake -all)
|
(cd $WM_PROJECT_DIR/modules 2>/dev/null && wmake -all)
|
||||||
fi
|
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
|
# Some summary information
|
||||||
echo
|
echo
|
||||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||||
@ -59,4 +75,11 @@ echo " ${WM_PROJECT_DIR##*/}"
|
|||||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||||
echo
|
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,7 +1,6 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
OpenFOAM(R) is Copyright (C) 2011 OpenFOAM Foundation
|
OpenFOAM(R) is released by OpenCFD Ltd. via www.openfoam.com
|
||||||
Contact: OpenFOAM Foundation (OpenFOAM.Foundation@gmail.com)
|
|
||||||
|
|
||||||
You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms
|
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
|
of GNU General Public License version 3, which is displayed below, or
|
||||||
|
|||||||
5
META-INFO/.gitignore
vendored
Normal file
5
META-INFO/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Do not track build information
|
||||||
|
build-info
|
||||||
|
|
||||||
|
# Do not track time-stamp
|
||||||
|
time-stamp
|
||||||
84
META-INFO/README.md
Normal file
84
META-INFO/README.md
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
# META-INFO
|
||||||
|
|
||||||
|
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
|
||||||
2
META-INFO/api-info
Normal file
2
META-INFO/api-info
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
api=1812
|
||||||
|
patch=0
|
||||||
@ -1,12 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
|
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
if have_fftw
|
if have_fftw
|
||||||
then
|
then
|
||||||
wmake
|
wmake $targetType
|
||||||
else
|
else
|
||||||
echo "==> skip dnsFoam solver (no FFTW)"
|
echo "==> skip dnsFoam solver (no FFTW)"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -44,9 +44,14 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Direct numerical simulation for boxes of isotropic turbulence."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMeshNoClear.H"
|
#include "createMeshNoClear.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -31,11 +31,6 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
"DT",
|
|
||||||
dimArea/dimTime,
|
|
||||||
transportProperties
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createFvOptions.H"
|
#include "createFvOptions.H"
|
||||||
|
|||||||
@ -59,9 +59,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "addCheckCaseOptions.H"
|
argList::addNote
|
||||||
#include "setRootCase.H"
|
(
|
||||||
|
"Laplace equation solver for a scalar quantity."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "addCheckCaseOptions.H"
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,4 @@
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("DT")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -60,8 +60,12 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Overset Laplace equation solver for a scalar quantity."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createNamedDynamicFvMesh.H"
|
#include "createNamedDynamicFvMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
volVectorField gradT(fvc::grad(T));
|
volVectorField gradT(fvc::grad(T));
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,9 @@ if (args.found("initialiseUBCs"))
|
|||||||
// Construct a pressure field
|
// Construct a pressure field
|
||||||
// If it is available read it otherwise construct from the velocity BCs
|
// If it is available read it otherwise construct from the velocity BCs
|
||||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||||
word pName("p");
|
|
||||||
|
|
||||||
// Update name of the pressure field from the command-line option
|
// Allow override from command-line -pName option
|
||||||
args.readIfPresent("pName", pName);
|
const word pName = args.opt<word>("pName", "p");
|
||||||
|
|
||||||
// Infer the pressure BCs from the velocity
|
// Infer the pressure BCs from the velocity
|
||||||
wordList pBCTypes
|
wordList pBCTypes
|
||||||
|
|||||||
@ -38,10 +38,9 @@ if (args.found("initialiseUBCs"))
|
|||||||
// Construct a pressure field
|
// Construct a pressure field
|
||||||
// If it is available read it otherwise construct from the velocity BCs
|
// If it is available read it otherwise construct from the velocity BCs
|
||||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||||
word pName("p");
|
|
||||||
|
|
||||||
// Update name of the pressure field from the command-line option
|
// Allow override from command-line -pName option
|
||||||
args.readIfPresent("pName", pName);
|
const word pName = args.opt<word>("pName", "p");
|
||||||
|
|
||||||
// Infer the pressure BCs from the velocity
|
// Infer the pressure BCs from the velocity
|
||||||
wordList pBCTypes
|
wordList pBCTypes
|
||||||
|
|||||||
@ -97,6 +97,11 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Overset potential flow solver which solves for the velocity potential"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"pName",
|
"pName",
|
||||||
@ -125,10 +130,10 @@ int main(int argc, char *argv[])
|
|||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"withFunctionObjects",
|
"withFunctionObjects",
|
||||||
"execute functionObjects"
|
"Execute functionObjects"
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createNamedDynamicFvMesh.H"
|
#include "createNamedDynamicFvMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -94,6 +94,11 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Potential flow solver which solves for the velocity potential"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"pName",
|
"pName",
|
||||||
@ -122,11 +127,11 @@ int main(int argc, char *argv[])
|
|||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"withFunctionObjects",
|
"withFunctionObjects",
|
||||||
"execute functionObjects"
|
"Execute functionObjects"
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -47,12 +47,7 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
"DT",
|
|
||||||
dimArea/dimTime,
|
|
||||||
transportProperties
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createPhi.H"
|
#include "createPhi.H"
|
||||||
|
|
||||||
|
|||||||
@ -61,8 +61,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Passive scalar transport equation solver."
|
||||||
|
);
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -86,10 +86,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for compressible premixed/partially-premixed combustion with"
|
||||||
|
" turbulence modelling."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -115,7 +121,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|||||||
@ -71,8 +71,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for compressible premixed/partially-premixed combustion with"
|
||||||
|
" turbulence modelling."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
|
|
||||||
@ -101,8 +106,8 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
// Indicators for refinement. Note: before runTime++
|
// Indicators for refinement.
|
||||||
// only for post-processing reasons.
|
// Note: before ++runTime only for post-processing reasons.
|
||||||
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
||||||
volScalarField normalisedGradP
|
volScalarField normalisedGradP
|
||||||
(
|
(
|
||||||
@ -112,7 +117,7 @@ int main(int argc, char *argv[])
|
|||||||
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
||||||
tmagGradP.clear();
|
tmagGradP.clear();
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::XiGModels::basicSubGrid::basicSubGrid
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
k1(readScalar(XiGModelCoeffs_.lookup("k1"))),
|
k1(XiGModelCoeffs_.get<scalar>("k1")),
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ bool Foam::XiGModels::basicSubGrid::read(const dictionary& XiGProperties)
|
|||||||
{
|
{
|
||||||
XiGModel::read(XiGProperties);
|
XiGModel::read(XiGProperties);
|
||||||
|
|
||||||
XiGModelCoeffs_.lookup("k1") >> k1;
|
XiGModelCoeffs_.readEntry("k1", k1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
|||||||
{
|
{
|
||||||
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
PDRDragModelCoeffs_.read("drag", on_);
|
PDRDragModelCoeffs_.readEntry("drag", on_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,8 +165,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
|
|||||||
{
|
{
|
||||||
PDRDragModel::read(PDRProperties);
|
PDRDragModel::read(PDRProperties);
|
||||||
|
|
||||||
PDRDragModelCoeffs_.read("Csu", Csu.value());
|
PDRDragModelCoeffs_.readEntry("Csu", Csu.value());
|
||||||
PDRDragModelCoeffs_.read("Csk", Csk.value());
|
PDRDragModelCoeffs_.readEntry("Csk", Csk.value());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,13 +49,10 @@ Foam::XiEqModels::Gulder::Gulder
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||||
SuMin_(0.01*Su.average()),
|
SuMin_(0.01*Su.average()),
|
||||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||||
subGridSchelkin_
|
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin"))
|
||||||
(
|
|
||||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
|
||||||
)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -96,9 +93,9 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
|||||||
{
|
{
|
||||||
XiEqModel::read(XiEqProperties);
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,15 +49,12 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
XiEqExp_(XiEqModelCoeffs_.get<scalar>("XiEqExp")),
|
||||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")),
|
||||||
SuMin_(0.01*Su.average()),
|
SuMin_(0.01*Su.average()),
|
||||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||||
subGridSchelkin_
|
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")),
|
||||||
(
|
|
||||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
|
||||||
),
|
|
||||||
MaModel
|
MaModel
|
||||||
(
|
(
|
||||||
Su.mesh().lookupObject<IOdictionary>("combustionProperties"),
|
Su.mesh().lookupObject<IOdictionary>("combustionProperties"),
|
||||||
@ -147,11 +144,11 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
|||||||
{
|
{
|
||||||
XiEqModel::read(XiEqProperties);
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
|
XiEqModelCoeffs_.readEntry("XiEqExp", XiEqExp_);
|
||||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
|
XiEqModelCoeffs_.readEntry("lCoef", lCoef_);
|
||||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::XiEqModel::XiEqModel
|
|||||||
(
|
(
|
||||||
XiEqProperties.subDict
|
XiEqProperties.subDict
|
||||||
(
|
(
|
||||||
word(XiEqProperties.lookup("XiEqModel")) + "Coeffs"
|
XiEqProperties.get<word>("XiEqModel") + "Coeffs"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
@ -142,10 +142,10 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
|
|
||||||
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
||||||
|
|
||||||
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
const scalarField deltaUp(upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0));
|
||||||
|
|
||||||
// Re use tN
|
// Re use tN
|
||||||
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
|
N.primitiveFieldRef() = upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0);
|
||||||
|
|
||||||
return tN;
|
return tN;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
|||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(propDict.lookup("XiEqModel"));
|
const word modelType(propDict.get<word>("XiEqModel"));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::XiEqModels::instability::instability
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))),
|
XiEqIn(XiEqModelCoeffs_.get<scalar>("XiEqIn")),
|
||||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
|
|||||||
{
|
{
|
||||||
XiEqModel::read(XiEqProperties);
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
XiEqModelCoeffs_.lookup("XiEqIn") >> XiEqIn;
|
XiEqModelCoeffs_.readEntry("XiEqIn", XiEqIn);
|
||||||
|
|
||||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
return XiEqModel_->read(XiEqModelCoeffs_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
|||||||
{
|
{
|
||||||
XiGModel::read(XiGProperties);
|
XiGModel::read(XiGProperties);
|
||||||
|
|
||||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
|
XiGModelCoeffs_.readEntry("GEtaCoef", GEtaCoef_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::XiGModel::XiGModel
|
|||||||
(
|
(
|
||||||
XiGProperties.subDict
|
XiGProperties.subDict
|
||||||
(
|
(
|
||||||
word(XiGProperties.lookup("XiGModel")) + "Coeffs"
|
XiGProperties.get<word>("XiGModel") + "Coeffs"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
|||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(propDict.lookup("XiGModel"));
|
const word modelType(propDict.get<word>("XiGModel"));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
GIn_(XiGModelCoeffs_.lookup("GIn")),
|
GIn_("GIn", dimless/dimTime, XiGModelCoeffs_),
|
||||||
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
|
lambdaIn_("lambdaIn", dimLength, XiGModelCoeffs_),
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
|
|||||||
{
|
{
|
||||||
XiGModel::read(XiGProperties);
|
XiGModel::read(XiGProperties);
|
||||||
|
|
||||||
XiGModelCoeffs_.lookup("GIn") >> GIn_;
|
XiGModelCoeffs_.readEntry("GIn", GIn_);
|
||||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
|
XiGModelCoeffs_.readEntry("lambdaIn", lambdaIn_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::XiModel::XiModel
|
|||||||
(
|
(
|
||||||
XiProperties.subDict
|
XiProperties.subDict
|
||||||
(
|
(
|
||||||
word(XiProperties.lookup("XiModel")) + "Coeffs"
|
XiProperties.get<word>("XiModel") + "Coeffs"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
|||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(propDict.lookup("XiModel"));
|
const word modelType(propDict.get<word>("XiModel"));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Foam::XiModels::algebraic::algebraic
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||||
XiGModel_(XiGModel::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);
|
XiModel::read(XiProperties);
|
||||||
|
|
||||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::XiModels::transport::transport
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||||
XiGModel_(XiGModel::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);
|
XiModel::read(XiProperties);
|
||||||
|
|
||||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,8 +53,8 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
||||||
ll(readScalar(polyDict.lookup("lowerLimit"))),
|
ll(polyDict.get<scalar>("lowerLimit")),
|
||||||
ul(readScalar(polyDict.lookup("upperLimit"))),
|
ul(polyDict.get<scalar>("upperLimit")),
|
||||||
llv(polyPhi(ll, *this)),
|
llv(polyPhi(ll, *this)),
|
||||||
ulv(polyPhi(ul, *this)),
|
ulv(polyPhi(ul, *this)),
|
||||||
lu(0)
|
lu(0)
|
||||||
@ -75,39 +75,30 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
|||||||
(
|
(
|
||||||
IFstream
|
IFstream
|
||||||
(
|
(
|
||||||
fileName
|
dict.get<fileName>("fuelFile")
|
||||||
(
|
|
||||||
dict.lookup("fuelFile")
|
|
||||||
)
|
|
||||||
)()
|
)()
|
||||||
).optionalSubDict(typeName + "Coeffs")
|
).optionalSubDict(typeName + "Coeffs")
|
||||||
),
|
),
|
||||||
LFL_
|
LFL_
|
||||||
(
|
(
|
||||||
readScalar
|
coeffsDict_.getCompat<scalar>
|
||||||
(
|
|
||||||
coeffsDict_.lookupCompat
|
|
||||||
(
|
(
|
||||||
"lowerFlammabilityLimit",
|
"lowerFlammabilityLimit",
|
||||||
{{"lowerFlamabilityLimit", 1712}}
|
{{"lowerFlamabilityLimit", 1712}}
|
||||||
)
|
)
|
||||||
)
|
|
||||||
),
|
),
|
||||||
UFL_
|
UFL_
|
||||||
(
|
(
|
||||||
readScalar
|
coeffsDict_.getCompat<scalar>
|
||||||
(
|
|
||||||
coeffsDict_.lookupCompat
|
|
||||||
(
|
(
|
||||||
"upperFlammabilityLimit",
|
"upperFlammabilityLimit",
|
||||||
{{"upperFlamabilityLimit", 1712}}
|
{{"upperFlamabilityLimit", 1712}}
|
||||||
)
|
)
|
||||||
)
|
|
||||||
),
|
),
|
||||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||||
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
||||||
Texp_(readScalar(coeffsDict_.lookup("Texp"))),
|
Texp_(coeffsDict_.get<scalar>("Texp")),
|
||||||
pexp_(readScalar(coeffsDict_.lookup("pexp"))),
|
pexp_(coeffsDict_.get<scalar>("pexp")),
|
||||||
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
||||||
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
||||||
{
|
{
|
||||||
@ -417,7 +408,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
|||||||
(
|
(
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -458,7 +449,7 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const
|
|||||||
psiuReactionThermo_.Tu(),
|
psiuReactionThermo_.Tu(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,9 +67,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for compressible premixed/partially-premixed combustion with"
|
||||||
|
" turbulence modelling."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -107,7 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -65,11 +65,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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_TIME createEngineTime.H
|
||||||
#define CREATE_MESH createEngineMesh.H
|
#define CREATE_MESH createEngineMesh.H
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
#include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -95,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (Pstream::master())
|
|||||||
(
|
(
|
||||||
new OFstream
|
new OFstream
|
||||||
(
|
(
|
||||||
runTime.rootPath()/runTime.globalCaseName()
|
runTime.globalPath()
|
||||||
/("logSummary." + runTime.timeName() + ".dat")
|
/("logSummary." + runTime.timeName() + ".dat")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -65,10 +65,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for compressible premixed/partially-premixed combustion with"
|
||||||
|
" turbulence modelling."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -92,7 +98,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|||||||
@ -12,34 +12,34 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word SuModel
|
const word SuModel
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("SuModel")
|
combustionProperties.get<word>("SuModel")
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigmaExt
|
dimensionedScalar sigmaExt
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("sigmaExt")
|
"sigmaExt", dimless/dimTime, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
word XiModel
|
const word XiModel
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiModel")
|
combustionProperties.get<word>("XiModel")
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar XiCoef
|
dimensionedScalar XiCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiCoef")
|
"XiCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar XiShapeCoef
|
dimensionedScalar XiShapeCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("XiShapeCoef")
|
"XiShapeCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar uPrimeCoef
|
dimensionedScalar uPrimeCoef
|
||||||
(
|
(
|
||||||
combustionProperties.lookup("uPrimeCoef")
|
"uPrimeCoef", dimless, combustionProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
ignition ign(combustionProperties, runTime, mesh);
|
ignition ign(combustionProperties, runTime, mesh);
|
||||||
|
|||||||
@ -32,7 +32,6 @@ Description
|
|||||||
provide comparison against other chemistry solvers, that uses a single cell
|
provide comparison against other chemistry solvers, that uses a single cell
|
||||||
mesh, and fields created from the initial conditions.
|
mesh, and fields created from the initial conditions.
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
@ -49,13 +48,19 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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();
|
argList::noParallel();
|
||||||
|
|
||||||
#define CREATE_MESH createSingleCellMesh.H
|
#define CREATE_MESH createSingleCellMesh.H
|
||||||
#define NO_CONTROL
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createSingleCellMesh.H"
|
#include "createSingleCellMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
@ -73,7 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "solveChemistry.H"
|
#include "solveChemistry.H"
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar p0 = readScalar(initialConditions.lookup("p"));
|
scalar p0 = initialConditions.get<scalar>("p");
|
||||||
scalar T0 = readScalar(initialConditions.lookup("T"));
|
scalar T0 = initialConditions.get<scalar>("T");
|
||||||
|
|
||||||
#include "createBaseFields.H"
|
#include "createBaseFields.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
runTime.controlDict().read("adjustTimeStep", adjustTimeStep);
|
runTime.controlDict().readEntry("adjustTimeStep", adjustTimeStep);
|
||||||
|
|
||||||
runTime.controlDict().read("maxDeltaT", maxDeltaT);
|
runTime.controlDict().readEntry("maxDeltaT", maxDeltaT);
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
word constProp(initialConditions.lookup("constantProperty"));
|
word constProp(initialConditions.get<word>("constantProperty"));
|
||||||
if ((constProp != "pressure") && (constProp != "volume"))
|
if (constProp != "pressure" && constProp != "volume")
|
||||||
{
|
{
|
||||||
FatalError << "in initialConditions, unknown constantProperty type "
|
FatalError << "in initialConditions, unknown constantProperty type "
|
||||||
<< constProp << nl << " Valid types are: pressure volume."
|
<< constProp << nl << " Valid types are: pressure volume."
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
word fractionBasis(initialConditions.lookup("fractionBasis"));
|
word fractionBasis(initialConditions.get<word>("fractionBasis"));
|
||||||
if ((fractionBasis != "mass") && (fractionBasis != "mole"))
|
if (fractionBasis != "mass" && fractionBasis != "mole")
|
||||||
{
|
{
|
||||||
FatalError << "in initialConditions, unknown fractionBasis type " << nl
|
FatalError << "in initialConditions, unknown fractionBasis type " << nl
|
||||||
<< "Valid types are: mass or mole."
|
<< "Valid types are: mass or mole."
|
||||||
@ -40,7 +40,7 @@
|
|||||||
const word& name = Y[i].name();
|
const word& name = Y[i].name();
|
||||||
if (fractions.found(name))
|
if (fractions.found(name))
|
||||||
{
|
{
|
||||||
X0[i] = readScalar(fractions.lookup(name));
|
X0[i] = fractions.get<scalar>(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
const word& name = Y[i].name();
|
const word& name = Y[i].name();
|
||||||
if (fractions.found(name))
|
if (fractions.found(name))
|
||||||
{
|
{
|
||||||
Y0[i] = readScalar(fractions.lookup(name));
|
Y0[i] = fractions.get<scalar>(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,11 +45,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for cold-flow in internal combustion engines."
|
||||||
|
);
|
||||||
|
|
||||||
#define CREATE_TIME createEngineTime.H
|
#define CREATE_TIME createEngineTime.H
|
||||||
#define CREATE_MESH createEngineMesh.H
|
#define CREATE_MESH createEngineMesh.H
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
#include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -74,7 +79,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Engine time = " << runTime.theta() << runTime.unit()
|
Info<< "Engine time = " << runTime.theta() << runTime.unit()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (Pstream::master())
|
|||||||
(
|
(
|
||||||
new OFstream
|
new OFstream
|
||||||
(
|
(
|
||||||
runTime.rootPath()/runTime.globalCaseName()
|
runTime.globalPath()
|
||||||
/("logSummary." + runTime.timeName() + ".dat")
|
/("logSummary." + runTime.timeName() + ".dat")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -8,7 +8,7 @@ SLGThermo slgThermo(mesh, thermo);
|
|||||||
basicSpecieMixture& composition = thermo.composition();
|
basicSpecieMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||||
if (!composition.species().found(inertSpecie))
|
if (!composition.species().found(inertSpecie))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||||
|
|||||||
@ -50,10 +50,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -79,7 +85,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setMultiRegionDeltaT.H"
|
#include "setMultiRegionDeltaT.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
|||||||
basicSpecieMixture& composition = thermo.composition();
|
basicSpecieMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||||
if (!composition.species().found(inertSpecie))
|
if (!composition.species().found(inertSpecie))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||||
|
|||||||
@ -47,10 +47,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for combustion with chemical reactions"
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -85,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
|||||||
basicSpecieMixture& composition = thermo.composition();
|
basicSpecieMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||||
if (!composition.species().found(inertSpecie))
|
if (!composition.species().found(inertSpecie))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Group
|
|||||||
grpCombustionSolvers
|
grpCombustionSolvers
|
||||||
|
|
||||||
Description
|
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.
|
thermodynamics package with enhanced buoyancy treatment.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -47,10 +47,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -85,7 +92,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
|
|||||||
basicSpecieMixture& composition = thermo.composition();
|
basicSpecieMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
const word inertSpecie(thermo.get<word>("inertSpecie"));
|
||||||
if (!composition.species().found(inertSpecie))
|
if (!composition.species().found(inertSpecie))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Group
|
|||||||
grpCombustionSolvers
|
grpCombustionSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for combustion with chemical reactions using density based
|
Solver for combustion with chemical reactions using density-based
|
||||||
thermodynamics package.
|
thermodynamics package.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -48,10 +48,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for combustion with chemical reactions using density-based"
|
||||||
|
" thermodynamics package."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -87,7 +93,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ License
|
|||||||
const dictionary& pimpleDict = pimple.dict();
|
const dictionary& pimpleDict = pimple.dict();
|
||||||
|
|
||||||
// Maximum flow Courant number
|
// Maximum flow Courant number
|
||||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
scalar maxCo(pimpleDict.get<scalar>("maxCo"));
|
||||||
|
|
||||||
// Maximum time scale
|
// Maximum time scale
|
||||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT));
|
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT));
|
||||||
@ -118,7 +118,7 @@ License
|
|||||||
if (Yref.found(Yi.name()))
|
if (Yref.found(Yi.name()))
|
||||||
{
|
{
|
||||||
foundY = true;
|
foundY = true;
|
||||||
scalar Yrefi = readScalar(Yref.lookup(Yi.name()));
|
const scalar Yrefi = Yref.get<scalar>(Yi.name());
|
||||||
|
|
||||||
rDeltaTY.field() = max
|
rDeltaTY.field() = max
|
||||||
(
|
(
|
||||||
@ -170,7 +170,7 @@ License
|
|||||||
rDeltaT = max
|
rDeltaT = max
|
||||||
(
|
(
|
||||||
rDeltaT,
|
rDeltaT,
|
||||||
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
|
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
|||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
accommodationCoeff_(dict.get<scalar>("accommodationCoeff")),
|
||||||
Twall_("Twall", dict, p.size()),
|
Twall_("Twall", dict, p.size()),
|
||||||
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
||||||
{
|
{
|
||||||
@ -94,10 +94,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
|||||||
|| mag(accommodationCoeff_) > 2.0
|
|| mag(accommodationCoeff_) > 2.0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "unphysical accommodationCoeff specified"
|
||||||
dict
|
|
||||||
) << "unphysical accommodationCoeff specified"
|
|
||||||
<< "(0 < accommodationCoeff <= 1)" << endl
|
<< "(0 < accommodationCoeff <= 1)" << endl
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
|||||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||||
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
||||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
accommodationCoeff_(dict.get<scalar>("accommodationCoeff")),
|
||||||
Uwall_("Uwall", dict, p.size()),
|
Uwall_("Uwall", dict, p.size()),
|
||||||
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
||||||
curvature_(dict.lookupOrDefault("curvature", true))
|
curvature_(dict.lookupOrDefault("curvature", true))
|
||||||
@ -96,10 +96,8 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
|||||||
|| mag(accommodationCoeff_) > 2.0
|
|| mag(accommodationCoeff_) > 2.0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "unphysical accommodationCoeff_ specified"
|
||||||
dict
|
|
||||||
) << "unphysical accommodationCoeff_ specified"
|
|
||||||
<< "(0 < accommodationCoeff_ <= 1)" << endl
|
<< "(0 < accommodationCoeff_ <= 1)" << endl
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -120,7 +118,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->refValue() = *this;
|
this->refValue() = *this;
|
||||||
this->valueFraction() = scalar(1.0);
|
this->valueFraction() = scalar(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,8 +28,9 @@ Group
|
|||||||
grpCompressibleSolvers grpMovingMeshSolvers
|
grpCompressibleSolvers grpMovingMeshSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Density-based compressible flow solver based on central-upwind schemes of
|
Density-based compressible flow solver based on central-upwind
|
||||||
Kurganov and Tadmor with support for mesh-motion and topology changes.
|
schemes of Kurganov and Tadmor
|
||||||
|
with support for mesh-motion and topology changes.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -47,10 +48,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
@ -76,7 +84,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -28,8 +28,8 @@ Group
|
|||||||
grpCompressibleSolvers
|
grpCompressibleSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Density-based compressible flow solver based on central-upwind schemes of
|
Density-based compressible flow solver based on central-upwind
|
||||||
Kurganov and Tadmor.
|
schemes of Kurganov and Tadmor.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -45,11 +45,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
@ -160,7 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
if (!local)
|
if (!local)
|
||||||
{
|
{
|
||||||
const scalar T0 = readScalar(eosDict.lookup("T0"));
|
const scalar T0 = eosDict.get<scalar>("T0");
|
||||||
const scalar p0 = readScalar(eosDict.lookup("p0"));
|
const scalar p0 = eosDict.get<scalar>("p0");
|
||||||
|
|
||||||
he = thermo.he(p, pow(p/p0, (gamma - scalar(1))/gamma)*T0);
|
he = thermo.he(p, pow(p/p0, (gamma - scalar(1))/gamma)*T0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,10 +58,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -81,7 +88,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -21,27 +21,33 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Application
|
Global
|
||||||
foamVersionString.C
|
continuityErrs
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Print the OpenFOAM version strings.
|
Calculates and prints the continuity errors.
|
||||||
|
|
||||||
Simultaneously the smallest possible program to use a minimal bit of
|
|
||||||
the OpenFOAM library
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include "foamVersion.H"
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
{
|
||||||
std::cout
|
dimensionedScalar totalMass = fvc::domainIntegrate(cellMask*rho);
|
||||||
<< "version " << Foam::FOAMversion << "\n"
|
|
||||||
<< "build " << Foam::FOAMbuild << "\n";
|
|
||||||
|
|
||||||
return 0;
|
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,11 +1,84 @@
|
|||||||
CorrectPhi
|
if (mesh.changing())
|
||||||
(
|
{
|
||||||
U,
|
volVectorField::Boundary& bfld = U.boundaryFieldRef();
|
||||||
phi,
|
forAll(bfld, patchi)
|
||||||
p,
|
{
|
||||||
rho,
|
if (bfld[patchi].fixesValue())
|
||||||
psi,
|
{
|
||||||
dimensionedScalar("rAUf", dimTime, 1),
|
bfld[patchi].initEvaluate();
|
||||||
divrhoU,
|
}
|
||||||
pimple
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,11 +1,4 @@
|
|||||||
#include "createTimeControls.H"
|
bool ddtCorr
|
||||||
|
|
||||||
bool correctPhi
|
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault("correctPhi", true)
|
pimple.dict().lookupOrDefault("ddtCorr", true)
|
||||||
);
|
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
|
||||||
(
|
|
||||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<psiThermo> pThermo
|
autoPtr<fluidThermo> pThermo
|
||||||
(
|
(
|
||||||
psiThermo::New(mesh)
|
fluidThermo::New(mesh)
|
||||||
);
|
);
|
||||||
psiThermo& thermo = pThermo();
|
fluidThermo& thermo = pThermo();
|
||||||
thermo.validate(args.executable(), "h", "e");
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
@ -39,6 +39,8 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
pressureControl pressureControl(p, rho, pimple.dict(), false);
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
dimensionedScalar rhoMax
|
||||||
(
|
(
|
||||||
dimensionedScalar::lookupOrDefault
|
dimensionedScalar::lookupOrDefault
|
||||||
@ -63,42 +65,25 @@ dimensionedScalar rhoMin
|
|||||||
|
|
||||||
mesh.setFluxRequired(p.name());
|
mesh.setFluxRequired(p.name());
|
||||||
|
|
||||||
Info<< "Creating field dpdt\n" << endl;
|
#include "createDpdt.H"
|
||||||
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
|
//- Overset specific
|
||||||
|
|
||||||
// Add solver-specific interpolations
|
// Add solver-specific interpolations
|
||||||
{
|
{
|
||||||
dictionary oversetDict;
|
wordHashSet& nonInt =
|
||||||
oversetDict.add("U", true);
|
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||||
oversetDict.add("p", true);
|
|
||||||
oversetDict.add("HbyA", true);
|
|
||||||
oversetDict.add("grad(p)", true);
|
|
||||||
|
|
||||||
const_cast<dictionary&>
|
nonInt.insert("HbyA");
|
||||||
(
|
nonInt.insert("grad(p)");
|
||||||
mesh.schemesDict()
|
nonInt.insert("surfaceIntegrate(phi)");
|
||||||
).add
|
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||||
(
|
nonInt.insert("cellMask");
|
||||||
"oversetInterpolationRequired",
|
nonInt.insert("cellDisplacement");
|
||||||
oversetDict,
|
nonInt.insert("interpolatedCells");
|
||||||
true
|
nonInt.insert("cellInterpolationWeight");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mask field for zeroing out contributions on hole cells
|
// Mask field for zeroing out contributions on hole cells
|
||||||
|
|||||||
@ -38,10 +38,11 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "psiThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "bound.H"
|
#include "bound.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
@ -53,16 +54,22 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for compressible turbulent flow.\n"
|
||||||
|
"With optional mesh motion and mesh topology changes."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createControl.H"
|
#include "createDyMControls.H"
|
||||||
#include "createRDeltaT.H"
|
#include "createRDeltaT.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
#include "createFvOptions.H"
|
#include "createFvOptions.H"
|
||||||
#include "createRhoUf.H"
|
#include "createRhoUfIfPresent.H"
|
||||||
#include "createControls.H"
|
#include "createControls.H"
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
@ -80,16 +87,24 @@ int main(int argc, char *argv[])
|
|||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
// Store divrhoU from the previous mesh so that it can be mapped
|
// Store divrhoU from the previous mesh so that it can be mapped
|
||||||
// and used in correctPhi to ensure the corrected phi has the
|
// and used in correctPhi to ensure the corrected phi has the
|
||||||
// same divergence
|
// same divergence
|
||||||
volScalarField divrhoU
|
autoPtr<volScalarField> divrhoU;
|
||||||
|
if (correctPhi)
|
||||||
|
{
|
||||||
|
divrhoU.reset
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
(
|
(
|
||||||
"divrhoU",
|
"divrhoU",
|
||||||
fvc::div(fvc::absolute(phi, rho, U))
|
fvc::div(fvc::absolute(phi, rho, U))
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (LTS)
|
if (LTS)
|
||||||
{
|
{
|
||||||
@ -101,45 +116,78 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Store momentum to set rhoUf for introduced faces.
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
volVectorField rhoU("rhoU", rho*U);
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||||
|
{
|
||||||
|
|
||||||
// Do any mesh changes
|
// Do any mesh changes
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
if (mesh.changing())
|
if (mesh.changing())
|
||||||
{
|
{
|
||||||
|
MRF.update();
|
||||||
|
|
||||||
#include "setCellMask.H"
|
#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];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mesh.changing() && correctPhi)
|
|
||||||
{
|
|
||||||
// Calculate absolute flux from the mapped surface velocity
|
// Calculate absolute flux from the mapped surface velocity
|
||||||
phi = mesh.Sf() & rhoUf;
|
phi = mesh.Sf() & rhoUf();
|
||||||
|
|
||||||
|
if (correctPhi)
|
||||||
|
{
|
||||||
#include "correctPhi.H"
|
#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
|
// Make the fluxes relative to the mesh-motion
|
||||||
fvc::makeRelative(phi, rho, U);
|
fvc::makeRelative(phi, rho, U);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mesh.changing() && checkMeshCourantNo)
|
if (checkMeshCourantNo)
|
||||||
{
|
{
|
||||||
#include "meshCourantNo.H"
|
#include "meshCourantNo.H"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
if (pimple.firstIter() && !pimple.SIMPLErho())
|
||||||
Info<< "rhoEqn max/min : " << max(rho).value()
|
|
||||||
<< " " << min(rho).value() << endl;
|
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
while (pimple.loop())
|
|
||||||
{
|
{
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "EEqn.H"
|
#include "EEqn.H"
|
||||||
|
|
||||||
@ -155,6 +203,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
runTime.printExecutionTime(Info);
|
runTime.printExecutionTime(Info);
|
||||||
|
|||||||
@ -1,81 +1,94 @@
|
|||||||
|
if (!pimple.SIMPLErho())
|
||||||
|
{
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
}
|
||||||
rho = min(rho, rhoMax);
|
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||||
rho.relax();
|
// pressure solution
|
||||||
|
const volScalarField psip0(psi*p);
|
||||||
|
|
||||||
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
|
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||||
|
mesh.interpolate(rAU);
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
surfaceScalarField rhorAUf("rhorAUf", faceMask*fvc::interpolate(rho*rAU));
|
|
||||||
volVectorField HbyA("HbyA", U);
|
volVectorField HbyA("HbyA", U);
|
||||||
HbyA = constrainHbyA(cellMask*rAU*UEqn.H(), U, p);
|
|
||||||
|
HbyA = constrainHbyA(rAU*UEqn.H(), U, p);
|
||||||
|
|
||||||
if (pimple.nCorrPISO() <= 1)
|
if (pimple.nCorrPISO() <= 1)
|
||||||
{
|
{
|
||||||
tUEqn.clear();
|
tUEqn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pimple.transonic())
|
|
||||||
{
|
|
||||||
surfaceScalarField phid
|
|
||||||
(
|
|
||||||
"phid",
|
|
||||||
fvc::interpolate(psi)
|
|
||||||
*(
|
|
||||||
fvc::flux(HbyA)
|
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
fvc::makeRelative(phid, psi, U);
|
|
||||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(psi, p)
|
|
||||||
+ fvm::div(phid, p)
|
|
||||||
- fvm::laplacian(rhorAUf, p)
|
|
||||||
==
|
|
||||||
fvOptions(psi, p, rho.name())
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
|
||||||
{
|
|
||||||
phi == pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
surfaceScalarField phiHbyA
|
surfaceScalarField phiHbyA
|
||||||
(
|
(
|
||||||
"phiHbyA",
|
"phiHbyA",
|
||||||
fvc::flux(rho*HbyA)
|
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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);
|
fvc::makeRelative(phiHbyA, rho, U);
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
if (pimple.transonic())
|
||||||
{
|
{
|
||||||
// Pressure corrector
|
surfaceScalarField phid
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
"phid",
|
||||||
+ fvc::div(phiHbyA)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||||
- fvm::laplacian(rhorAUf, p)
|
);
|
||||||
|
|
||||||
|
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())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
while (pimple.correctNonOrthogonal())
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
|
||||||
|
|
||||||
|
// Relax the pressure equation to ensure diagonal-dominance
|
||||||
|
pEqn.relax();
|
||||||
|
|
||||||
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
|
if (pimple.finalNonOrthogonalIter())
|
||||||
|
{
|
||||||
|
phi = phiHbyA + pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fvScalarMatrix pDDtEqn
|
||||||
|
(
|
||||||
|
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||||
|
+ fvc::div(phiHbyA)
|
||||||
|
==
|
||||||
|
fvOptions(psi, p, rho.name())
|
||||||
|
);
|
||||||
|
|
||||||
|
while (pimple.correctNonOrthogonal())
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
@ -91,25 +104,24 @@ else
|
|||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
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));
|
volVectorField gradP(fvc::grad(p));
|
||||||
//mesh.interpolate(gradP);
|
//mesh.interpolate(gradP);
|
||||||
U = HbyA - rAU*cellMask*gradP;
|
U = cellMask*(HbyA - rAU*gradP);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
|
if (pressureControl.limit(p))
|
||||||
{
|
{
|
||||||
rhoUf = fvc::interpolate(rho*U);
|
p.correctBoundaryConditions();
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
}
|
||||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
|
||||||
|
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax) ;
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
{
|
||||||
|
// Correct rhoUf if the mesh is moving
|
||||||
|
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
@ -121,3 +133,9 @@ if (thermo.dpdt())
|
|||||||
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
surfaceScalarField faceMask
|
||||||
|
(
|
||||||
|
localMin<scalar>(mesh).interpolate(cellMask)
|
||||||
|
);
|
||||||
|
phi *= faceMask;
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|
||||||
|
|
||||||
|
ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true);
|
||||||
|
|||||||
@ -52,10 +52,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createDyMControls.H"
|
#include "createDyMControls.H"
|
||||||
@ -106,7 +112,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Group
|
|||||||
grpCompressibleSolvers
|
grpCompressibleSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Overset steady-state solver for turbulent flow of compressible fluids.
|
Overset steady-state solver for compressible turbulent flow.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -47,10 +47,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Overset steady-state solver for compressible turbulent flow"
|
||||||
|
);
|
||||||
|
|
||||||
#define CREATE_MESH createUpdatedDynamicFvMesh.H
|
#define CREATE_MESH createUpdatedDynamicFvMesh.H
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createUpdatedDynamicFvMesh.H"
|
#include "createUpdatedDynamicFvMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -28,8 +28,8 @@ Group
|
|||||||
grpCompressibleSolvers
|
grpCompressibleSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state solver for turbulent flow of compressible fluids, with
|
Steady-state solver for compressible turbulent flow,
|
||||||
implicit or explicit porosity treatment and optional sources.
|
with implicit or explicit porosity treatment and optional sources.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -45,10 +45,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Group
|
|||||||
grpCompressibleSolvers
|
grpCompressibleSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state solver for turbulent flow of compressible fluids.
|
Steady-state solver for compressible turbulent flow.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -43,10 +43,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Steady-state solver for compressible turbulent flow."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -45,9 +45,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createDynamicFvMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "createDyMControls.H"
|
#include "createDyMControls.H"
|
||||||
@ -81,7 +88,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -43,10 +43,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for trans-sonic/supersonic, turbulent flow"
|
||||||
|
" of a compressible gas."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -40,10 +40,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for trans-sonic/supersonic, laminar flow"
|
||||||
|
" of a compressible liquid."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -28,8 +28,8 @@ Group
|
|||||||
grpDiscreteMethodsSolvers
|
grpDiscreteMethodsSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Direct simulation Monte Carlo (DSMC) solver for, transient, multi-species
|
Direct simulation Monte Carlo (DSMC) solver
|
||||||
flows.
|
for transient, multi-species flows.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -40,11 +40,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Direct simulation Monte Carlo (DSMC) solver"
|
||||||
|
" for transient, multi-species flows."
|
||||||
|
);
|
||||||
|
|
||||||
#define NO_CONTROL
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|||||||
@ -37,8 +37,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Equilibrate and/or precondition molecular dynamics systems."
|
||||||
|
);
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ IOdictionary mdEquilibrationDict
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar targetTemperature = readScalar
|
scalar targetTemperature
|
||||||
(
|
(
|
||||||
mdEquilibrationDict.lookup("targetTemperature")
|
mdEquilibrationDict.get<scalar>("targetTemperature")
|
||||||
);
|
);
|
||||||
|
|||||||
@ -39,10 +39,15 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Molecular dynamics solver for fluid dynamics."
|
||||||
|
);
|
||||||
|
|
||||||
#define NO_CONTROL
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|||||||
@ -14,12 +14,16 @@
|
|||||||
|
|
||||||
dimensionedScalar epsilon0
|
dimensionedScalar epsilon0
|
||||||
(
|
(
|
||||||
physicalProperties.lookup("epsilon0")
|
"epsilon0",
|
||||||
|
dimensionSet(-1, -3, 4, 0, 0, 2, 0),
|
||||||
|
physicalProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar k
|
dimensionedScalar k
|
||||||
(
|
(
|
||||||
physicalProperties.lookup("k")
|
"k",
|
||||||
|
dimensionSet(-1, 0, 2, 0, 0, 1, 0),
|
||||||
|
physicalProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "addCheckCaseOptions.H"
|
argList::addNote
|
||||||
#include "setRootCase.H"
|
(
|
||||||
|
"Solver for electrostatics."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "addCheckCaseOptions.H"
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|||||||
@ -47,26 +47,31 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solver for the magnetic field generated by permanent magnets."
|
||||||
|
);
|
||||||
|
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noH",
|
"noH",
|
||||||
"do not write the magnetic field intensity field"
|
"Do not write the magnetic field intensity field"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noB",
|
"noB",
|
||||||
"do not write the magnetic flux density field"
|
"Do not write the magnetic flux density field"
|
||||||
);
|
);
|
||||||
|
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"HdotGradH",
|
"HdotGradH",
|
||||||
"write the paramagnetic particle force field"
|
"Write the paramagnetic particle force field"
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
@ -78,7 +83,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Calculating the magnetic field potential" << endl;
|
Info<< "Calculating the magnetic field potential" << endl;
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,10 +58,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -16,21 +16,21 @@ dimensionedScalar strike
|
|||||||
(
|
(
|
||||||
"strike",
|
"strike",
|
||||||
dimLength,
|
dimLength,
|
||||||
financialProperties.lookup("strike")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar r
|
dimensionedScalar r
|
||||||
(
|
(
|
||||||
"r",
|
"r",
|
||||||
dimless/dimTime,
|
dimless/dimTime,
|
||||||
financialProperties.lookup("r")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigma
|
dimensionedScalar sigma
|
||||||
(
|
(
|
||||||
"sigma",
|
"sigma",
|
||||||
dimensionSet(0, 0, -0.5, 0, 0),
|
dimensionSet(0, 0, -0.5, 0, 0),
|
||||||
financialProperties.lookup("sigma")
|
financialProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar sigmaSqr = sqr(sigma);
|
dimensionedScalar sigmaSqr = sqr(sigma);
|
||||||
|
|||||||
@ -40,11 +40,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Solves the Black-Scholes equation to price commodities."
|
||||||
|
);
|
||||||
|
|
||||||
#define NO_CONTROL
|
#define NO_CONTROL
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|||||||
0
applications/solvers/finiteArea/liquidFilmFoam/Make/files
Executable file → Normal file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/files
Executable file → Normal file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/options
Executable file → Normal file
0
applications/solvers/finiteArea/liquidFilmFoam/Make/options
Executable file → Normal file
@ -47,7 +47,13 @@ Author
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for incompressible, laminar flow"
|
||||||
|
" of Newtonian fluids in liquid film formulation."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFaMesh.H"
|
#include "createFaMesh.H"
|
||||||
@ -67,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "capillaryCourantNo.H"
|
#include "capillaryCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
@ -138,7 +144,7 @@ int main(int argc, char *argv[])
|
|||||||
Us.correctBoundaryConditions();
|
Us.correctBoundaryConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runTime.outputTime())
|
if (runTime.writeTime())
|
||||||
{
|
{
|
||||||
vsm.mapToVolume(h, H.boundaryFieldRef());
|
vsm.mapToVolume(h, H.boundaryFieldRef());
|
||||||
vsm.mapToVolume(Us, U.boundaryFieldRef());
|
vsm.mapToVolume(Us, U.boundaryFieldRef());
|
||||||
|
|||||||
@ -10,32 +10,12 @@ IOdictionary transportProperties
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar mug
|
dimensionedScalar mug("mug", dimViscosity, transportProperties);
|
||||||
(
|
dimensionedScalar mul("mul", dimViscosity, transportProperties);
|
||||||
transportProperties.lookup("mug")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar mul
|
dimensionedScalar rhog("rhog", dimDensity, transportProperties);
|
||||||
(
|
dimensionedScalar rhol("rhol", dimDensity, transportProperties);
|
||||||
transportProperties.lookup("mul")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar sigma
|
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("sigma")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhol
|
dimensionedScalar h0("h0", dimLength, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("rhol")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhog
|
|
||||||
(
|
|
||||||
transportProperties.lookup("rhog")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar h0
|
|
||||||
(
|
|
||||||
transportProperties.lookup("h0")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
surfactantFoam.C
|
sphereSurfactantFoam.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/sphereSurfactantFoam
|
EXE = $(FOAM_APPBIN)/sphereSurfactantFoam
|
||||||
|
|||||||
@ -12,25 +12,13 @@ areaScalarField Cs
|
|||||||
aMesh
|
aMesh
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensioned<scalar> Cs0
|
dimensionedScalar Cs0("Cs0", dimMass/dimArea, 1.0);
|
||||||
(
|
|
||||||
"Cs0",
|
|
||||||
dimensionSet(1, -2, 0, 0, 0, 0, 0),
|
|
||||||
1.0
|
|
||||||
);
|
|
||||||
|
|
||||||
const areaVectorField& R = aMesh.areaCentres();
|
const areaVectorField& R = aMesh.areaCentres();
|
||||||
|
|
||||||
Cs = Cs0*(1.0 + R.component(vector::X)/mag(R));
|
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
|
areaVectorField Us
|
||||||
(
|
(
|
||||||
|
|||||||
@ -41,10 +41,14 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Passive finiteArea scalar transport on a sphere"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
#include "createFaMesh.H"
|
#include "createFaMesh.H"
|
||||||
#include "createFaFields.H"
|
#include "createFaFields.H"
|
||||||
#include "createVolFields.H"
|
#include "createVolFields.H"
|
||||||
@ -29,10 +29,7 @@ IOdictionary transportProperties
|
|||||||
|
|
||||||
Info<< "Reading diffusivity D\n" << endl;
|
Info<< "Reading diffusivity D\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar Ds
|
dimensionedScalar Ds("Ds", dimViscosity, transportProperties);
|
||||||
(
|
|
||||||
transportProperties.lookup("Ds")
|
|
||||||
);
|
|
||||||
|
|
||||||
areaVectorField Us
|
areaVectorField Us
|
||||||
(
|
(
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Group
|
|||||||
grpFiniteAreaSolvers
|
grpFiniteAreaSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Passive scalar transport equation solver.
|
Passive scalar transport finiteArea equation solver.
|
||||||
|
|
||||||
\heading Solver details
|
\heading Solver details
|
||||||
The equation is given by:
|
The equation is given by:
|
||||||
@ -65,7 +65,12 @@ Author
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Passive scalar transport finiteArea equation solver."
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFaMesh.H"
|
#include "createFaMesh.H"
|
||||||
|
|||||||
@ -59,10 +59,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -84,7 +91,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -59,10 +59,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Steady-state solver for buoyant, turbulent flow"
|
||||||
|
" of incompressible fluids."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
|
|||||||
@ -47,10 +47,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Transient solver for buoyant, turbulent fluid flow"
|
||||||
|
" of compressible fluids, including radiation."
|
||||||
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
@ -73,7 +79,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
++runTime;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -44,10 +44,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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 "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCase.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createControl.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