Compare commits
37 Commits
rpmbuild-2
...
maintenanc
| Author | SHA1 | Date | |
|---|---|---|---|
| 45fe65f83e | |||
| cdce0585f2 | |||
| 714040678a | |||
| b8ec4e12e1 | |||
| e9a9d4c297 | |||
| c6a651cc46 | |||
| be3eee6c12 | |||
| 07fd1aec5b | |||
| 7f646223bb | |||
| c24a8c26ee | |||
| d88d1d53aa | |||
| 74248c7469 | |||
| 70873eb647 | |||
| 219c520f0b | |||
| ad00fed4aa | |||
| 198a215445 | |||
| c8da996ace | |||
| 1e3cf9630e | |||
| e35df56231 | |||
| 1c0af6ecbc | |||
| d36f988d97 | |||
| 680baba1b5 | |||
| 346770e0d9 | |||
| b28502b3a8 | |||
| 9e123313a7 | |||
| 92fa08cf12 | |||
| 21301e3aba | |||
| c9b6b090ca | |||
| 838d6bc0b0 | |||
| 5dbd697db5 | |||
| a0721f7d00 | |||
| 68fe3cc35c | |||
| 860b7f503d | |||
| 2ba590ec0b | |||
| 84aa61e650 | |||
| e9df8d9366 | |||
| 4645a440e1 |
32
.gitignore
vendored
32
.gitignore
vendored
@ -4,7 +4,6 @@
|
||||
# Editor and misc backup files - anywhere
|
||||
*~
|
||||
.*~
|
||||
.*.swp
|
||||
*.bak
|
||||
*.bak[0-9][0-9]
|
||||
\#*\#
|
||||
@ -12,7 +11,7 @@
|
||||
# File-browser settings - anywhere
|
||||
.directory
|
||||
|
||||
# Backup/recovery versions - anywhere
|
||||
# CVS recovered versions - anywhere
|
||||
.#*
|
||||
|
||||
# Objects and archives - anywhere
|
||||
@ -23,7 +22,7 @@
|
||||
# Derived files
|
||||
lex.yy.c
|
||||
|
||||
# Core dumps
|
||||
# Corefiles
|
||||
core
|
||||
|
||||
# Dependency files - anywhere
|
||||
@ -47,21 +46,22 @@ platforms/
|
||||
# Reinstate wmake rules that might look like build directories
|
||||
!/wmake/rules/*/
|
||||
|
||||
# Doxygen generated
|
||||
# doxygen generated documentation
|
||||
doc/Doxygen/html
|
||||
doc/Doxygen/latex
|
||||
doc/Doxygen/man
|
||||
doc/Doxygen/DTAGS
|
||||
|
||||
# Generated files in the main and doc directories
|
||||
# Generated files in the main directory (e.g. ReleaseNotes-?.?.html)
|
||||
# and in the doc directory
|
||||
/*.html
|
||||
/doc/*.html
|
||||
|
||||
# Untracked configuration/preferences files
|
||||
# Untracked configuration files
|
||||
/etc/prefs.csh
|
||||
/etc/prefs.sh
|
||||
/etc/config.csh/prefs.*
|
||||
/etc/config.sh/prefs.*
|
||||
/etc/config.csh/prefs.csh
|
||||
/etc/config.sh/prefs.sh
|
||||
/wmake/rules/General/mplibUSER*
|
||||
|
||||
# Source packages - anywhere
|
||||
@ -72,11 +72,19 @@ doc/Doxygen/DTAGS
|
||||
*.tgz
|
||||
*.gtgz
|
||||
|
||||
# Ignore tags or project files in the main directory
|
||||
/.cproject
|
||||
/.dir-locals.el
|
||||
/.project
|
||||
# Ignore the persistent .build tag in the main directory
|
||||
/.build
|
||||
|
||||
# Ignore .timeStamp in the main directory
|
||||
/.timeStamp
|
||||
|
||||
# Ignore .tags in the main directory
|
||||
/.tags
|
||||
|
||||
# Ignore project files in the main directory
|
||||
/.cproject
|
||||
/.project
|
||||
/.dir-locals.el
|
||||
|
||||
# Ignore the test directory
|
||||
/tutorialsTest
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
<!--
|
||||
*** Please read this first! ***
|
||||
|
||||
Before opening a new issue, make sure to search for keywords in the issues
|
||||
filtered by the "bug" label and check to see if it has already been reported
|
||||
|
||||
You can see how your report will be rendered on the platform by using the
|
||||
"preview" tab above
|
||||
-->
|
||||
|
||||
<!--
|
||||
All text between these markers are comments and will not be present in the
|
||||
report
|
||||
-->
|
||||
|
||||
### Summary
|
||||
|
||||
<!-- Summarize the bug encountered concisely -->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!-- How one can reproduce the issue - this is very important -->
|
||||
|
||||
### Example case
|
||||
|
||||
<!--
|
||||
If possible, please create a SMALL example and attach it to your report
|
||||
|
||||
If you are using an older version of OpenFOAM this will also determine
|
||||
whether the bug has been fixed in a more recent version
|
||||
-->
|
||||
|
||||
### What is the current *bug* behaviour?
|
||||
|
||||
<!-- What actually happens -->
|
||||
|
||||
### What is the expected *correct* behavior?
|
||||
|
||||
<!-- What you should see instead -->
|
||||
|
||||
### Relevant logs and/or images
|
||||
|
||||
<!--
|
||||
Paste any relevant logs - please use code blocks (```) to format console
|
||||
output, logs, and code as it's very hard to read otherwise.
|
||||
-->
|
||||
|
||||
### Environment information
|
||||
|
||||
<!--
|
||||
Providing details of your set-up can help us identify any issues, e.g.
|
||||
OpenFOAM version : v1806|v1812|v1906 etc
|
||||
Operating system : ubuntu|openSUSE|centos etc
|
||||
Hardware info : any info that may help?
|
||||
Compiler : gcc|intel|clang etc
|
||||
-->
|
||||
|
||||
- OpenFOAM version :
|
||||
- Operating system :
|
||||
- Hardware info :
|
||||
- Compiler :
|
||||
|
||||
### Possible fixes
|
||||
|
||||
<!--
|
||||
If you can, link to the line of code that might be responsible for the
|
||||
problem
|
||||
|
||||
The "/label ~bug" text is a gitlab flag that will add the "bug" label to this
|
||||
issue
|
||||
-->
|
||||
|
||||
/label ~bug
|
||||
@ -1,31 +0,0 @@
|
||||
### Functionality to add/problem to solve
|
||||
|
||||
(Brief scope)
|
||||
|
||||
|
||||
### Target audience
|
||||
|
||||
(Who will benefit from the changes?)
|
||||
(What type of cases?)
|
||||
|
||||
|
||||
### Proposal
|
||||
|
||||
(How are we going to solve the problem?)
|
||||
|
||||
|
||||
### What does success look like, and how can we measure that?
|
||||
|
||||
(What are the success factors and acceptance criteria? e.g. test cases, error margins)
|
||||
|
||||
|
||||
### Links / references
|
||||
|
||||
(Links to literature, supporting information)
|
||||
|
||||
|
||||
### Funding
|
||||
|
||||
(Does the functionality already exist/is sponsorship available?)
|
||||
|
||||
/label ~feature
|
||||
@ -1,20 +0,0 @@
|
||||
### Summary
|
||||
|
||||
(Summarize the changes concisely)
|
||||
|
||||
|
||||
### Resolved bugs (If applicable)
|
||||
|
||||
(Links to issues)
|
||||
|
||||
|
||||
### Details of new models (If applicable)
|
||||
|
||||
(New options, user inputs etc)
|
||||
(Images are nice :))
|
||||
|
||||
|
||||
### Risks
|
||||
|
||||
(Possible regressions?)
|
||||
(Changes to user inputs?)
|
||||
19
.gitmodules
vendored
19
.gitmodules
vendored
@ -1,19 +0,0 @@
|
||||
[submodule "cfmesh"]
|
||||
path = modules/cfmesh
|
||||
url = https://develop.openfoam.com/Community/integration-cfmesh.git
|
||||
[submodule "avalanche"]
|
||||
path = modules/avalanche
|
||||
url = https://develop.openfoam.com/Community/avalanche.git
|
||||
[submodule "adios"]
|
||||
path = modules/adios
|
||||
url = https://develop.openfoam.com/Community/adiosfoam.git
|
||||
[submodule "OpenQBMM"]
|
||||
path = modules/OpenQBMM
|
||||
url = https://github.com/OpenQBMM/OpenQBMM.git
|
||||
branch = openfoam.com
|
||||
[submodule "visualization"]
|
||||
path = modules/visualization
|
||||
url = https://develop.openfoam.com/modules/visualization.git
|
||||
[submodule "external-solver"]
|
||||
path = modules/external-solver
|
||||
url = https://develop.openfoam.com/Modules/external-solver.git
|
||||
80
Allwmake
80
Allwmake
@ -1,65 +1,36 @@
|
||||
#!/bin/sh
|
||||
# Run from OPENFOAM top-level directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
|
||||
cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
|
||||
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
|
||||
echo "Argument parse error";
|
||||
else
|
||||
[ -d "$WM_PROJECT_DIR" -a -f "$WM_PROJECT_DIR/etc/bashrc" ] || {
|
||||
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Preamble. Report tools or at least the mpirun location
|
||||
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/list_tools ]
|
||||
then sh "$WM_PROJECT_DIR"/wmake/scripts/list_tools || true
|
||||
else
|
||||
echo "mpirun=$(command -v mpirun || true)"
|
||||
fi
|
||||
echo
|
||||
# Report compiler information
|
||||
compiler="$(wmake -show-path-cxx 2>/dev/null || true)"
|
||||
if [ -x "$compiler" ]
|
||||
then
|
||||
echo "compiler=$compiler"
|
||||
"$compiler" --version 2>/dev/null | sed -ne '1p'
|
||||
else
|
||||
echo "compiler=unknown"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "========================================"
|
||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||
echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*/}"
|
||||
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
|
||||
echo "Starting ${WM_PROJECT_DIR##*/} ${0##*}"
|
||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
# Compile tools for wmake
|
||||
"${WM_DIR:-wmake}"/src/Allmake
|
||||
# Compile wmake tools
|
||||
(cd "${WM_DIR:-wmake}/src" && make)
|
||||
|
||||
# Compile ThirdParty libraries and applications
|
||||
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
||||
then
|
||||
if [ -e "$WM_THIRD_PARTY_DIR"/Allwmake.override ]
|
||||
then
|
||||
if [ -x "$WM_THIRD_PARTY_DIR"/Allwmake.override ]
|
||||
then "$WM_THIRD_PARTY_DIR"/Allwmake.override
|
||||
fi
|
||||
elif [ -x "$WM_THIRD_PARTY_DIR"/Allwmake ]
|
||||
then "$WM_THIRD_PARTY_DIR"/Allwmake
|
||||
else
|
||||
echo "Skip ThirdParty (no Allwmake* files)"
|
||||
fi
|
||||
$WM_THIRD_PARTY_DIR/Allwmake
|
||||
else
|
||||
echo "Skip ThirdParty (no directory)"
|
||||
echo "No ThirdParty directory found - skipping"
|
||||
fi
|
||||
|
||||
echo "========================================"
|
||||
@ -72,37 +43,12 @@ echo "Compile OpenFOAM applications"
|
||||
echo
|
||||
applications/Allwmake $targetType $*
|
||||
|
||||
# Additional components/modules
|
||||
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
|
||||
then
|
||||
echo "========================================"
|
||||
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
|
||||
echo
|
||||
elif [ -d "$WM_PROJECT_DIR/modules" ]
|
||||
then
|
||||
(cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all)
|
||||
fi
|
||||
|
||||
# Count files in given directory. Ignore "Test-*" binaries.
|
||||
_foamCountDirEntries()
|
||||
{
|
||||
(cd "$1" 2>/dev/null && find . -mindepth 1 -maxdepth 1 -type f 2>/dev/null) |\
|
||||
sed -e '\@/Test-@d' | wc -l
|
||||
}
|
||||
|
||||
# Some summary information
|
||||
echo
|
||||
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
|
||||
echo "========================================"
|
||||
echo " ${WM_PROJECT_DIR##*/}"
|
||||
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
|
||||
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo
|
||||
echo " api = $(etc/openfoam -show-api 2>/dev/null)"
|
||||
echo " patch = $(etc/openfoam -show-patch 2>/dev/null)"
|
||||
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
|
||||
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
|
||||
echo
|
||||
echo "========================================"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
79
BuildIssues.txt
Normal file
79
BuildIssues.txt
Normal file
@ -0,0 +1,79 @@
|
||||
OpenFOAM-1706
|
||||
==================
|
||||
Known Build Issues
|
||||
==================
|
||||
|
||||
--------------
|
||||
Intel Compiler
|
||||
--------------
|
||||
|
||||
Since OpenFOAM uses C++11, a fairly recent version is required.
|
||||
The Intel compiler - icc (ICC) 17.0.1 20161005 is ok, but the
|
||||
initial release - icc (ICC) 17.0.0 20160721 - has a bug that
|
||||
will result in these types of error messages.
|
||||
|
||||
MatrixSpaceI.H(492): error: no instance of overloaded function
|
||||
"Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::Block<SubTensor,
|
||||
BRowStart, BColStart>::operator=" matches the specified type
|
||||
|
||||
|
||||
---
|
||||
VTK
|
||||
---
|
||||
|
||||
If using the runTimePostProcessing to create on-the-fly images, you
|
||||
can simply just compile ParaView and these libraries will be used.
|
||||
|
||||
If you elect to use a separate VTK compilation (for example for
|
||||
off-screen rendering), it is advisable to reuse the VTK libraries that
|
||||
are provided with ParaView by making an appropriate symlink
|
||||
prior to using makeVTK. This doesn't just reduce disk-space, but works
|
||||
much better than using the VTK tar file.
|
||||
|
||||
Using runTimePostProcessing with the 'plain' VTK libraries does
|
||||
generally work, but does not exit cleanly:
|
||||
|
||||
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
|
||||
undefined symbol: _ZN33vtkFilteringInformationKeyManager13ClassFinalizeEv
|
||||
|
||||
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonDataModel-7.1.so.1:
|
||||
undefined symbol: _ZN49vtkInformationQuadratureSchemeDefinitionVectorKeyD1Ev
|
||||
|
||||
This error appears to be suppressed if VTK is compiled with a Debug build-type.
|
||||
|
||||
|
||||
-------------------------
|
||||
Building on older systems
|
||||
-------------------------
|
||||
|
||||
If the system gcc is too old for building OpenFOAM, a third-party gcc or
|
||||
clang/llvm installation can be used. If building clang/llvm, note that
|
||||
there are also minimum gcc/g++ requirements there:
|
||||
|
||||
Min gcc/g++
|
||||
=========== ==========
|
||||
4.4 llvm-3.4.2
|
||||
4.7 llvm-3.5.2 - llvm-3.7.0
|
||||
|
||||
|
||||
If your system compiler is too old to build the minimum required gcc or
|
||||
clang/llvm, it is just simply too old.
|
||||
|
||||
|
||||
-------------------------
|
||||
Building with spack
|
||||
-------------------------
|
||||
|
||||
If you are building with spack, note that the depends_on for paraview
|
||||
resolves poorly. The +qt dependency (for building the reader module)
|
||||
may need to be specified as a preference by including the following in
|
||||
your `~/.spack/packages.yaml` file:
|
||||
|
||||
packages:
|
||||
paraview:
|
||||
variants: +qt
|
||||
|
||||
It appears that spack will otherwise ignore any paraview+qt version
|
||||
and attempt to install a paraview~qt version instead.
|
||||
|
||||
--
|
||||
@ -1,56 +0,0 @@
|
||||
# Contributors to OpenFOAM
|
||||
|
||||
The following is an list of known contributors to OpenFOAM.
|
||||
It is likely incomplete...
|
||||
|
||||
## Contributors (alphabetical by surname)
|
||||
|
||||
- William Bainbridge
|
||||
- Gabriel Barajas
|
||||
- Kutalmis Bercin
|
||||
- Ivor Clifford
|
||||
- Greg Collecutt
|
||||
- Jonathan Cranford
|
||||
- Sergio Ferraris
|
||||
- Matej Forman
|
||||
- Marian Fuchs
|
||||
- Pawan Ghildiyal
|
||||
- Chris Greenshields
|
||||
- Bernhard Gschaider
|
||||
- Andrew Heather
|
||||
- David Hill
|
||||
- Mattijs Janssens
|
||||
- Andrew Jackson
|
||||
- Hrvoje Jasak
|
||||
- Alexander Kabat vel Job
|
||||
- Thilo Knacke
|
||||
- Tommaso Lucchini
|
||||
- Graham Macpherson
|
||||
- Alexey Matveichev
|
||||
- Karl Meredith
|
||||
- Laurence McGlashan
|
||||
- Timo Niemi
|
||||
- Haakan Nilsson
|
||||
- Niklas Nordin
|
||||
- Mark Olesen
|
||||
- Victor Olesen
|
||||
- Evangelos Papoutsis-Kiachagias
|
||||
- Juho Peltola
|
||||
- Johan Roenby
|
||||
- Henrik Rusche
|
||||
- Bruno Santos
|
||||
- Henning Scheufler
|
||||
- Richard Smith
|
||||
- Prashant Sonakar
|
||||
- Hilary Spencer
|
||||
- Gavin Tabor
|
||||
- Zeljko Tukovic
|
||||
- Eugene De Villiers
|
||||
- Yi Wang
|
||||
- Norbert Weber
|
||||
- Henry Weller
|
||||
- Niklas Wikstrom
|
||||
- Thorsten Zirwes
|
||||
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
3
COPYING
3
COPYING
@ -1,6 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
OpenFOAM(R) is released by OpenCFD Ltd. via www.openfoam.com
|
||||
OpenFOAM(R) is Copyright (C) 2011 OpenFOAM Foundation
|
||||
Contact: OpenFOAM Foundation (OpenFOAM.Foundation@gmail.com)
|
||||
|
||||
You may use, distribute and copy the OpenFOAM CFD Toolbox under the terms
|
||||
of GNU General Public License version 3, which is displayed below, or
|
||||
|
||||
5
META-INFO/.gitignore
vendored
5
META-INFO/.gitignore
vendored
@ -5,6 +5,5 @@ build-info
|
||||
time-stamp
|
||||
|
||||
# Do not track any manifest files
|
||||
*[Mm]anifest.txt
|
||||
|
||||
####
|
||||
Manifest.txt
|
||||
manifest.txt
|
||||
|
||||
@ -1,86 +1,5 @@
|
||||
## META-INFO
|
||||
# META-INFO
|
||||
|
||||
Meta-information is generally for OpenFOAM internal use only.
|
||||
Meta-information is for OpenFOAM internal use only.
|
||||
|
||||
The format, content and meaning may be changed at anytime without
|
||||
notice. If any of these are changed, these are some of places that
|
||||
will need to be updated accordingly:
|
||||
|
||||
- bin/foamEtcFile
|
||||
- bin/tools/foamConfigurePaths
|
||||
- bin/tools/foamPackRelease
|
||||
- etc/openfoam
|
||||
- wmake/scripts/wmake-build-info
|
||||
|
||||
### api-info
|
||||
|
||||
This file and its contents are to be tracked by git.
|
||||
|
||||
- File content (api) generated by `wmake -build-info` from the
|
||||
`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 `wmake -build-info` from
|
||||
git information and cached from previous wmake (api)
|
||||
|
||||
|
||||
### Content types
|
||||
|
||||
#### api
|
||||
|
||||
Format: `date +%y%m`
|
||||
|
||||
- 4-digit year-month (YYMM) integer corresponding to the major
|
||||
release or in unusual cases an intermediate release.
|
||||
Example, `1712` for the Dec-2017 release.
|
||||
|
||||
|
||||
#### patch
|
||||
|
||||
Format: `date +%y%m%d`
|
||||
|
||||
- 6-digit year-month-day (YYMMDD) integer corresponding to a patch-level
|
||||
for the given **released** API.
|
||||
- The first release can have a patch value of `0` or `1` which
|
||||
indicates that it is unpatched or just released. Alternatively
|
||||
it can have a patch value corresponding to the release date.
|
||||
|
||||
The patch value is only meaningful together with the api value.
|
||||
However, for *development* branches, the patch level should not be
|
||||
ascribed too much meaning, but will often correspond to the last
|
||||
merge with a *maintenance* (*eg*, `master`) branch.
|
||||
|
||||
|
||||
### 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 `wmake -build-info -check` is used to determine if
|
||||
the saved information needs synchronization. The command
|
||||
`wmake -build-info -update` performs the synchronization.
|
||||
|
||||
|
||||
### 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.
|
||||
|
||||
----
|
||||
2020-06-23
|
||||
(Backport from 1812)
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
api=2012
|
||||
patch=220610
|
||||
api=1706
|
||||
patch=180618
|
||||
|
||||
210
README.md
210
README.md
@ -1,210 +1,26 @@
|
||||
## About OpenFOAM
|
||||
OpenFOAM is a free, open source CFD software [released and developed by OpenCFD Ltd since 2004](http://www.openfoam.com/history/).
|
||||
It has a large user base across most areas of engineering and science, from both commercial and academic organisations.
|
||||
OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics.
|
||||
[See documentation](http://www.openfoam.com/documentation)
|
||||
# About OpenFOAM
|
||||
OpenFOAM is a free, open source CFD software [released and developed primarily by OpenCFD Ltd](http://www.openfoam.com) since 2004. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
|
||||
|
||||
OpenFOAM is professionally released every six months to include
|
||||
customer sponsored developments and contributions from the community -
|
||||
individual and group contributors, integrations
|
||||
(eg, from FOAM-extend and OpenFOAM Foundation Ltd) as well as
|
||||
[governance guided activities](https://www.openfoam.com/governance/).
|
||||
OpenFOAM+ is professionally released every six months to include customer sponsored developments and contributions from the community, including the OpenFOAM Foundation. Releases designated OpenFOAM+ contain several man years of client-sponsored developments of which much has been transferred to, but not released in the OpenFOAM Foundation branch.
|
||||
|
||||
|
||||
## Copyright
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version. See the file COPYING in this directory or
|
||||
[http://www.gnu.org/licenses/](http://www.gnu.org/licenses), for a
|
||||
description of the GNU General Public License terms under which you
|
||||
may redistribute files.
|
||||
# Copyright
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses), for a description of the GNU General Public License terms under which you can copy the files.
|
||||
|
||||
|
||||
## OpenFOAM Trademark
|
||||
# OpenFOAM Trademark
|
||||
OpenCFD Ltd grants use of the OpenFOAM trademark by Third Parties on a licence basis. ESI Group and the OpenFOAM Foundation Ltd are currently permitted to use the Name and agreed Domain Name. For information on trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
|
||||
|
||||
OpenCFD Ltd grants use of its OpenFOAM trademark by Third Parties on a
|
||||
licence basis. ESI Group and OpenFOAM Foundation Ltd are currently
|
||||
permitted to use the Name and agreed Domain Name. For information on
|
||||
trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
|
||||
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark.
|
||||
|
||||
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have
|
||||
any questions on the use of the OpenFOAM trademark.
|
||||
|
||||
Violations of the Trademark are monitored, and will be duly prosecuted.
|
||||
Violations of the Trademark are continuously monitored, and will be duly prosecuted.
|
||||
|
||||
|
||||
## Using OpenFOAM
|
||||
|
||||
If OpenFOAM has already been compiled on your system, simply source
|
||||
the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
|
||||
For example, for the OpenFOAM-v1912 version:
|
||||
```
|
||||
source /installation/path/OpenFOAM-v1912/etc/bashrc
|
||||
```
|
||||
|
||||
## Compiling OpenFOAM
|
||||
|
||||
If you are compiling OpenFOAM from source, please see the relevant
|
||||
guides:
|
||||
|
||||
| Location | Readme | Requirements | Build |
|
||||
|-------------|-----------|--------------|-------|
|
||||
| [OpenFOAM][repo openfoam] | [readme][link openfoam-readme] | [system requirements][link openfoam-require] | [build][link openfoam-build] |
|
||||
| [ThirdParty][repo third] | [readme][link third-readme] | [system requirements][link third-require] | [build][link third-build] |
|
||||
|
||||
|
||||
## How do I know which version I am currently using?
|
||||
|
||||
The value of the `$WM_PROJECT_DIR` or even `$WM_PROJECT_VERSION` are
|
||||
not guaranteed to have any correspondence to the OpenFOAM release
|
||||
(API) value. If OpenFOAM has already been compiled, the build-time
|
||||
information is embedded into each application. For example, as
|
||||
displayed from `blockMesh -help`:
|
||||
```
|
||||
Using: OpenFOAM-v1812.local (1812) - visit www.openfoam.com
|
||||
Build: 65d6551ff7-20190530 (patch=190531)
|
||||
Arch: LSB;label=32;scalar=64
|
||||
```
|
||||
This output contains all of the more interesting information that we need:
|
||||
|
||||
| item | value |
|
||||
|-----------------------|---------------|
|
||||
| version | v1812.local |
|
||||
| api | 1812 |
|
||||
| commit | 65d6551ff7 |
|
||||
| author date | 20190530 |
|
||||
| patch-level | (20)190531 |
|
||||
| label/scalar size | 32/64 bits |
|
||||
|
||||
The Arch information may also include the `solveScalar` size
|
||||
if different than the `scalar` size.
|
||||
|
||||
As can be seen in this example, the git build information is
|
||||
supplemented by the date when the last change was authored, which can
|
||||
be helpful when the repository contains local changes. If you simply
|
||||
wish to know the current API and patch levels directly, the
|
||||
`wmake -build-info` provides the relevant information even
|
||||
when OpenFOAM has not yet been compiled:
|
||||
```
|
||||
$ wmake -build-info
|
||||
make
|
||||
api = 1812
|
||||
patch = 190531
|
||||
branch = master
|
||||
build = 65d6551ff7-20190530
|
||||
```
|
||||
Similar information is available with `foamEtcFile`, using the
|
||||
`-show-api` or `-show-patch` options. For example,
|
||||
```
|
||||
$ foamEtcFile -show-api
|
||||
1812
|
||||
|
||||
$ foamEtcFile -show-patch
|
||||
190531
|
||||
```
|
||||
This output will generally be the easiest to parse for scripts.
|
||||
The `$FOAM_API` convenience environment variable may not reflect the
|
||||
patching changes made within the currently active environment and
|
||||
should be used with caution.
|
||||
|
||||
|
||||
## ThirdParty directory
|
||||
|
||||
OpenFOAM normally ships with a directory of 3rd-party software and
|
||||
build scripts for some 3rd-party software that is either necessary or
|
||||
at least highly useful for OpenFOAM, but which are not necessarily
|
||||
readily available on every operating system or cluster installation.
|
||||
|
||||
These 3rd-party sources are normally located in a directory parallel
|
||||
to the OpenFOAM directory. For example,
|
||||
```
|
||||
/path/parent
|
||||
|-- OpenFOAM-v1912
|
||||
\-- ThirdParty-v1912
|
||||
```
|
||||
There are, however, many cases where this simple convention is inadequate:
|
||||
|
||||
* When no additional 3rd party software is actually required (ie, the
|
||||
operating system or cluster installation provides it)
|
||||
|
||||
* When we have changed the OpenFOAM directory name to some arbitrary
|
||||
directory name, e.g. openfoam-sandbox1912, etc..
|
||||
|
||||
* When we would like any additional 3rd party software to be located
|
||||
inside of the OpenFOAM directory to ensure that the installation is
|
||||
encapsulated within a single directory structure. This can be
|
||||
necessary for cluster installations, or may simply be a convenient
|
||||
means of performing a software rollout for individual workstations.
|
||||
|
||||
* When we have many different OpenFOAM directories for testing or
|
||||
developing various different features but wish to use or reuse the
|
||||
same 3rd party software for them all.
|
||||
|
||||
The solution for these problems is a newer, more intelligent discovery
|
||||
when locating the ThirdParty directory with the following precedence:
|
||||
|
||||
1. PROJECT/ThirdParty
|
||||
* for single-directory installations
|
||||
2. PREFIX/ThirdParty-VERSION
|
||||
* this corresponds to the traditional approach
|
||||
3. PREFIX/ThirdParty-vAPI
|
||||
* allows for an updated value of VERSION, *eg*, `v1912-myCustom`,
|
||||
without requiring a renamed ThirdParty. The API value would still
|
||||
be `1912` and the original `ThirdParty-v1912/` would be found.
|
||||
4. PREFIX/ThirdParty-API
|
||||
* this is the same as the previous example, but using an unadorned
|
||||
API value. This also makes sense if the chosen version name also
|
||||
uses the unadorned API value in its naming, *eg*,
|
||||
`1912-patch190131`, `1912.19W03`
|
||||
5. PREFIX/ThirdParty-common
|
||||
* permits maximum reuse for various versions, for experienced user
|
||||
who are aware of potential version incompatibilities
|
||||
|
||||
If none of these directories are found to be suitable, it reverts to
|
||||
using PROJECT/ThirdParty as a dummy location (even if the directory
|
||||
does not exist). This is a safe fallback value since it is within the
|
||||
OpenFOAM directory structure and can be trusted to have no negative
|
||||
side-effects. In the above, the following notation has been used:
|
||||
|
||||
| name | value | meaning |
|
||||
|---------------|---------------|---------------|
|
||||
| PROJECT | `$WM_PROJECT_DIR` | The OpenFOAM directory |
|
||||
| PREFIX | `dirname $WM_PROJECT_DIR` | The OpenFOAM parent directory |
|
||||
| API | `foamEtcFiles -show-api` | The api or release version |
|
||||
| VERSION | `$WM_PROJECT_VERSION` | The version we have chosen |
|
||||
|
||||
To reduce the potential of false positive matches (perhaps some other
|
||||
software also uses ThirdParty-xxx for its naming), the directory test
|
||||
is accompanied by a OpenFOAM-specific sanity test. The OpenFOAM
|
||||
ThirdParty directory will contain either an `Allwmake` file or a
|
||||
`platforms/` directory.
|
||||
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
|
||||
## Useful Links
|
||||
|
||||
- Download [source](https://dl.openfoam.com/source/) and [download and installation instructions](http://www.openfoam.com/download/)
|
||||
# Useful Links
|
||||
- [Download and installation instructions](http://www.openfoam.com/download/)
|
||||
- [Documentation](http://www.openfoam.com/documentation)
|
||||
- [Reporting bugs/issues/feature requests](http://www.openfoam.com/code/bug-reporting.php)
|
||||
- [Issue tracker](https://develop.openfoam.com/Development/openfoam/-/issues)
|
||||
- [Code wiki](https://develop.openfoam.com/Development/openfoam/-/wikis/) and [general wiki](http://wiki.openfoam.com/)
|
||||
- [Community](http://www.openfoam.com/community/), [Governance](http://www.openfoam.com/governance/)
|
||||
- [OpenFOAM Community](http://www.openfoam.com/community/)
|
||||
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
|
||||
|
||||
Copyright 2016-2020 OpenCFD Ltd
|
||||
Copyright 2016-2017 OpenCFD Ltd
|
||||
|
||||
@ -1,26 +1,22 @@
|
||||
#!/bin/sh
|
||||
# Run from OPENFOAM applications/ directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmake -check-dir "$WM_PROJECT_DIR/applications" 2>/dev/null || {
|
||||
cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR/applications" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR/applications"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
|
||||
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
|
||||
echo "Argument parse error";
|
||||
else
|
||||
[ -d "$WM_PROJECT_DIR" -a -f "$WM_PROJECT_DIR/etc/bashrc" ] || {
|
||||
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
wmake -all $targetType solvers
|
||||
wmake -all $targetType utilities
|
||||
|
||||
# Optional
|
||||
## wmake -all $targetType tools
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_fftw
|
||||
#------------------------------------------------------------------------------
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
if have_fftw
|
||||
if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
|
||||
[ "${FFTW_ARCH_PATH##*-}" = system -a -f "/usr/include/fftw3.h" ]
|
||||
then
|
||||
wmake $targetType
|
||||
wmake
|
||||
else
|
||||
echo "==> skip dnsFoam solver (no FFTW)"
|
||||
fi
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/randomProcesses/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/randomProcesses/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lrandomProcesses \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lrandomProcesses
|
||||
-lmeshTools
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -46,14 +44,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Direct numerical simulation for boxes of isotropic turbulence."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMeshNoClear.H"
|
||||
#include "createControl.H"
|
||||
@ -62,13 +55,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
label ntot = 1;
|
||||
forAll(K.nn(), idim)
|
||||
{
|
||||
ntot *= K.nn()[idim];
|
||||
}
|
||||
const scalar recRootN = 1.0/Foam::sqrt(scalar(ntot));
|
||||
|
||||
Info<< nl << "Starting time loop" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
@ -80,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
fft::reverseTransform
|
||||
(
|
||||
K/(mag(K) + 1.0e-6) ^ forceGen.newField(), K.nn()
|
||||
)*recRootN
|
||||
)
|
||||
);
|
||||
|
||||
#include "globalProperties.H"
|
||||
@ -140,7 +126,9 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
acousticFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/acousticFoam
|
||||
@ -1,14 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOption/lnInclude \
|
||||
-I$(LIB_SRC)/regionFaModels/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lregionFaModels
|
||||
@ -1,99 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
acousticFoam
|
||||
|
||||
Group
|
||||
grpAcousticSolvers
|
||||
|
||||
Description
|
||||
Acoustic solver solving the acoustic pressure wave equation.
|
||||
|
||||
\f[
|
||||
\ddt2{pa} - c^2 \laplacian{pa} = 0
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
c | Sound speed
|
||||
pa | Acoustic pressure
|
||||
\endvartable
|
||||
|
||||
SourceFiles
|
||||
acousticFoam.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fvOptions.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Acoustic solver solving the acoustic pressure wave equation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createRegionControls.H"
|
||||
|
||||
#include "readTransportProperties.H"
|
||||
#include "createFields.H"
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "paEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,15 +0,0 @@
|
||||
|
||||
Info << "\nReading pa" << endl;
|
||||
|
||||
volScalarField pa
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pa",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
@ -1,8 +0,0 @@
|
||||
fvSolution solutionDict(runTime);
|
||||
|
||||
const dictionary& pimpleDict = solutionDict.subDict("PIMPLE");
|
||||
|
||||
bool solvePrimaryRegion
|
||||
(
|
||||
pimpleDict.getOrDefault("solvePrimaryRegion", true)
|
||||
);
|
||||
@ -1,15 +0,0 @@
|
||||
|
||||
fvScalarMatrix paEqn
|
||||
(
|
||||
fvm::d2dt2(pa) - sqr(c0)*fvc::laplacian(pa)
|
||||
);
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
paEqn.relax();
|
||||
paEqn.solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
pa.correctBoundaryConditions();
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
Info<< "\nReading transportProperties" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar c0("c0", dimVelocity, transportProperties);
|
||||
|
||||
dimensionedScalar rho("rho", dimDensity, transportProperties);
|
||||
|
||||
scalar MaxCo =
|
||||
max(mesh.surfaceInterpolation::deltaCoeffs()*c0).value()
|
||||
*runTime.deltaT().value();
|
||||
|
||||
Info<< "Max acoustic Courant Number = " << MaxCo << endl;
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -14,36 +14,26 @@ volScalarField T
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
volScalarField DT
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"DT",
|
||||
runTime.timeName(),
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimViscosity, Zero)
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
if (!DT.headerOk())
|
||||
{
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
DT = dimensionedScalar("DT", dimViscosity, transportProperties);
|
||||
}
|
||||
|
||||
#include "createFvOptions.H"
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT
|
||||
(
|
||||
"DT",
|
||||
dimArea/dimTime,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,21 +59,15 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Laplace equation solver for a scalar quantity."
|
||||
);
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -102,7 +93,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "write.H"
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
overLaplacianDyMFoam.C
|
||||
laplacianDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overLaplacianDyMFoam
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/overset/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-loverset
|
||||
|
||||
@ -13,6 +13,23 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
// Add overset specific interpolations
|
||||
{
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("T", true);
|
||||
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
@ -30,4 +47,7 @@
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
);
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
laplacianFoam
|
||||
|
||||
Group
|
||||
grpBasicSolvers
|
||||
|
||||
Description
|
||||
Laplace equation solver for a scalar quantity.
|
||||
|
||||
\heading Solver details
|
||||
The solver is applicable to, e.g. for thermal diffusion in a solid. The
|
||||
equation is given by:
|
||||
|
||||
\f[
|
||||
\ddt{T} = \div \left( D_T \grad T \right)
|
||||
\f]
|
||||
|
||||
Where:
|
||||
\vartable
|
||||
T | Scalar field which is solved for, e.g. temperature
|
||||
D_T | Diffusion coefficient
|
||||
\endvartable
|
||||
|
||||
\heading Required fields
|
||||
\plaintable
|
||||
T | Scalar field which is solved for, e.g. temperature
|
||||
\endplaintable
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fvOptions.H"
|
||||
#include "simpleControl.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createNamedDynamicFvMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nCalculating temperature distribution\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
mesh.update();
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(T) - fvm::laplacian(DT, T)
|
||||
==
|
||||
fvOptions(T)
|
||||
);
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
TEqn.solve();
|
||||
fvOptions.correct(T);
|
||||
}
|
||||
|
||||
#include "write.H"
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,115 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
overLaplacianDyMFoam
|
||||
|
||||
Group
|
||||
grpBasicSolvers
|
||||
|
||||
Description
|
||||
Laplace equation solver for a scalar quantity.
|
||||
|
||||
\heading Solver details
|
||||
The solver is applicable to, e.g. for thermal diffusion in a solid. The
|
||||
equation is given by:
|
||||
|
||||
\f[
|
||||
\ddt{T} = \div \left( D_T \grad T \right)
|
||||
\f]
|
||||
|
||||
Where:
|
||||
\vartable
|
||||
T | Scalar field which is solved for, e.g. temperature
|
||||
D_T | Diffusion coefficient
|
||||
\endvartable
|
||||
|
||||
\heading Required fields
|
||||
\plaintable
|
||||
T | Scalar field which is solved for, e.g. temperature
|
||||
\endplaintable
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fvOptions.H"
|
||||
#include "simpleControl.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Overset Laplace equation solver for a scalar quantity."
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedDynamicFvMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nCalculating temperature distribution\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
mesh.update();
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(T) - fvm::laplacian(DT, T)
|
||||
==
|
||||
fvOptions(T)
|
||||
);
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
TEqn.solve();
|
||||
fvOptions.correct(T);
|
||||
}
|
||||
|
||||
#include "write.H"
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,4 +1,4 @@
|
||||
if (runTime.writeTime())
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
volVectorField gradT(fvc::grad(T));
|
||||
|
||||
|
||||
@ -41,18 +41,6 @@
|
||||
gradT.component(vector::Z)
|
||||
);
|
||||
|
||||
volVectorField DTgradT
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"flux",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
DT*gradT
|
||||
);
|
||||
|
||||
runTime.write();
|
||||
}
|
||||
|
||||
@ -5,5 +5,5 @@ const dictionary& potentialFlow
|
||||
|
||||
const int nNonOrthCorr
|
||||
(
|
||||
potentialFlow.getOrDefault<int>("nNonOrthogonalCorrectors", 0)
|
||||
potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0)
|
||||
);
|
||||
|
||||
@ -13,7 +13,7 @@ volVectorField U
|
||||
);
|
||||
|
||||
// Initialise the velocity internal field to zero
|
||||
U = dimensionedVector(U.dimensions(), Zero);
|
||||
U = dimensionedVector("0", U.dimensions(), Zero);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
@ -28,7 +28,7 @@ surfaceScalarField phi
|
||||
fvc::flux(U)
|
||||
);
|
||||
|
||||
if (args.found("initialiseUBCs"))
|
||||
if (args.optionFound("initialiseUBCs"))
|
||||
{
|
||||
U.correctBoundaryConditions();
|
||||
phi = fvc::flux(U);
|
||||
@ -38,9 +38,10 @@ if (args.found("initialiseUBCs"))
|
||||
// Construct a pressure field
|
||||
// If it is available read it otherwise construct from the velocity BCs
|
||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||
word pName("p");
|
||||
|
||||
// Allow override from command-line -pName option
|
||||
const word pName = args.getOrDefault<word>("pName", "p");
|
||||
// Update name of the pressure field from the command-line option
|
||||
args.optionReadIfPresent("pName", pName);
|
||||
|
||||
// Infer the pressure BCs from the velocity
|
||||
wordList pBCTypes
|
||||
@ -57,6 +58,9 @@ forAll(U.boundaryField(), patchi)
|
||||
}
|
||||
}
|
||||
|
||||
// Note that registerObject is false for the pressure field. The pressure
|
||||
// field in this solver doesn't have a physical value during the solution.
|
||||
// It shouldn't be looked up and used by sub models or boundary conditions.
|
||||
Info<< "Constructing pressure field " << pName << nl << endl;
|
||||
volScalarField p
|
||||
(
|
||||
@ -66,10 +70,11 @@ volScalarField p
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(sqr(dimVelocity), Zero),
|
||||
dimensionedScalar(pName, sqr(dimVelocity), 0),
|
||||
pBCTypes
|
||||
);
|
||||
|
||||
@ -100,7 +105,7 @@ volScalarField Phi
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimLength*dimVelocity, Zero),
|
||||
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
|
||||
PhiBCTypes
|
||||
);
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
overPotentialFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overPotentialFoam
|
||||
@ -1,13 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/overset/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-lsampling \
|
||||
-loverset
|
||||
@ -1,9 +0,0 @@
|
||||
const dictionary& potentialFlow
|
||||
(
|
||||
mesh.solutionDict().subDict("potentialFlow")
|
||||
);
|
||||
|
||||
const int nNonOrthCorr
|
||||
(
|
||||
potentialFlow.getOrDefault<int>("nNonOrthogonalCorrectors", 0)
|
||||
);
|
||||
@ -1,138 +0,0 @@
|
||||
Info<< "Reading velocity field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
// Initialise the velocity internal field to zero
|
||||
U = dimensionedVector(U.dimensions(), Zero);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::flux(U)
|
||||
);
|
||||
|
||||
if (args.found("initialiseUBCs"))
|
||||
{
|
||||
U.correctBoundaryConditions();
|
||||
phi = fvc::flux(U);
|
||||
}
|
||||
|
||||
|
||||
// Construct a pressure field
|
||||
// If it is available read it otherwise construct from the velocity BCs
|
||||
// converting fixed-value BCs to zero-gradient and vice versa.
|
||||
|
||||
// Allow override from command-line -pName option
|
||||
const word pName = args.getOrDefault<word>("pName", "p");
|
||||
|
||||
// Infer the pressure BCs from the velocity
|
||||
wordList pBCTypes
|
||||
(
|
||||
U.boundaryField().size(),
|
||||
fixedValueFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll(U.boundaryField(), patchi)
|
||||
{
|
||||
if (U.boundaryField()[patchi].fixesValue())
|
||||
{
|
||||
pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
// Note that registerObject is false for the pressure field. The pressure
|
||||
// field in this solver doesn't have a physical value during the solution.
|
||||
// It shouldn't be looked up and used by sub models or boundary conditions.
|
||||
Info<< "Constructing pressure field " << pName << nl << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
pName,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(sqr(dimVelocity), Zero),
|
||||
pBCTypes
|
||||
);
|
||||
|
||||
// Infer the velocity potential BCs from the pressure
|
||||
wordList PhiBCTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll(p.boundaryField(), patchi)
|
||||
{
|
||||
if (p.boundaryField()[patchi].fixesValue())
|
||||
{
|
||||
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Constructing velocity potential field Phi\n" << endl;
|
||||
volScalarField Phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimLength*dimVelocity, Zero),
|
||||
PhiBCTypes
|
||||
);
|
||||
|
||||
label PhiRefCell = 0;
|
||||
scalar PhiRefValue = 0;
|
||||
setRefCell
|
||||
(
|
||||
Phi,
|
||||
potentialFlow.dict(),
|
||||
PhiRefCell,
|
||||
PhiRefValue
|
||||
);
|
||||
mesh.setFluxRequired(Phi.name());
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("interpolatedCells");
|
||||
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
// Create bool field with interpolated cells
|
||||
#include "createInterpolatedCells.H"
|
||||
@ -1,265 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
overPotentialFoam
|
||||
|
||||
Group
|
||||
grpBasicSolvers
|
||||
|
||||
Description
|
||||
Potential flow solver which solves for the velocity potential, to
|
||||
calculate the flux-field, from which the velocity field is obtained by
|
||||
reconstructing the flux.
|
||||
|
||||
\heading Solver details
|
||||
The potential flow solution is typically employed to generate initial fields
|
||||
for full Navier-Stokes codes. The flow is evolved using the equation:
|
||||
|
||||
\f[
|
||||
\laplacian \Phi = \div(\vec{U})
|
||||
\f]
|
||||
|
||||
Where:
|
||||
\vartable
|
||||
\Phi | Velocity potential [m2/s]
|
||||
\vec{U} | Velocity [m/s]
|
||||
\endvartable
|
||||
|
||||
The corresponding pressure field could be calculated from the divergence
|
||||
of the Euler equation:
|
||||
|
||||
\f[
|
||||
\laplacian p + \div(\div(\vec{U}\otimes\vec{U})) = 0
|
||||
\f]
|
||||
|
||||
but this generates excessive pressure variation in regions of large
|
||||
velocity gradient normal to the flow direction. A better option is to
|
||||
calculate the pressure field corresponding to velocity variation along the
|
||||
stream-lines:
|
||||
|
||||
\f[
|
||||
\laplacian p + \div(\vec{F}\cdot\div(\vec{U}\otimes\vec{U})) = 0
|
||||
\f]
|
||||
where the flow direction tensor \f$\vec{F}\f$ is obtained from
|
||||
\f[
|
||||
\vec{F} = \hat{\vec{U}}\otimes\hat{\vec{U}}
|
||||
\f]
|
||||
|
||||
\heading Required fields
|
||||
\plaintable
|
||||
U | Velocity [m/s]
|
||||
\endplaintable
|
||||
|
||||
\heading Optional fields
|
||||
\plaintable
|
||||
p | Kinematic pressure [m2/s2]
|
||||
Phi | Velocity potential [m2/s]
|
||||
| Generated from p (if present) or U if not present
|
||||
\endplaintable
|
||||
|
||||
\heading Options
|
||||
\plaintable
|
||||
-writep | write the Euler pressure
|
||||
-writePhi | Write the final velocity potential
|
||||
-initialiseUBCs | Update the velocity boundaries before solving for Phi
|
||||
\endplaintable
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "pisoControl.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Overset potential flow solver which solves for the velocity potential"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"pName",
|
||||
"pName",
|
||||
"Name of the pressure field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"initialiseUBCs",
|
||||
"Initialise U boundary conditions"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writePhi",
|
||||
"Write the final velocity potential field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writep",
|
||||
"Calculate and write the Euler pressure field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"withFunctionObjects",
|
||||
"Execute functionObjects"
|
||||
);
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedDynamicFvMesh.H"
|
||||
|
||||
pisoControl potentialFlow(mesh, "potentialFlow");
|
||||
|
||||
#include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< nl << "Calculating potential flow" << endl;
|
||||
|
||||
mesh.update();
|
||||
|
||||
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
|
||||
|
||||
// Since solver contains no time loop it would never execute
|
||||
// function objects so do it ourselves
|
||||
runTime.functionObjects().start();
|
||||
|
||||
MRF.makeRelative(phi);
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal velocity potential corrector loop
|
||||
while (potentialFlow.correct())
|
||||
{
|
||||
phi = fvc::flux(U);
|
||||
|
||||
while (potentialFlow.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix PhiEqn
|
||||
(
|
||||
fvm::laplacian(faceMask, Phi)
|
||||
==
|
||||
fvc::div(phi)
|
||||
);
|
||||
|
||||
PhiEqn.setReference(PhiRefCell, PhiRefValue);
|
||||
PhiEqn.solve();
|
||||
|
||||
if (potentialFlow.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= PhiEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
MRF.makeAbsolute(phi);
|
||||
|
||||
Info<< "Continuity error = "
|
||||
<< mag(fvc::div(phi))().weightedAverage(mesh.V()).value()
|
||||
<< endl;
|
||||
|
||||
U = fvc::reconstruct(phi);
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
Info<< "Interpolated velocity error = "
|
||||
<< (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// Write U and phi
|
||||
U.write();
|
||||
phi.write();
|
||||
|
||||
// Optionally write Phi
|
||||
if (args.found("writePhi"))
|
||||
{
|
||||
Phi.write();
|
||||
}
|
||||
|
||||
// Calculate the pressure field from the Euler equation
|
||||
if (args.found("writep"))
|
||||
{
|
||||
Info<< nl << "Calculating approximate pressure field" << endl;
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell
|
||||
(
|
||||
p,
|
||||
potentialFlow.dict(),
|
||||
pRefCell,
|
||||
pRefValue
|
||||
);
|
||||
|
||||
// Calculate the flow-direction filter tensor
|
||||
volScalarField magSqrU(magSqr(U));
|
||||
volSymmTensorField F(sqr(U)/(magSqrU + SMALL*average(magSqrU)));
|
||||
|
||||
// Calculate the divergence of the flow-direction filtered div(U*U)
|
||||
// Filtering with the flow-direction generates a more reasonable
|
||||
// pressure distribution in regions of high velocity gradient in the
|
||||
// direction of the flow
|
||||
volScalarField divDivUU
|
||||
(
|
||||
fvc::div
|
||||
(
|
||||
F & fvc::div(phi, U),
|
||||
"div(div(phi,U))"
|
||||
)
|
||||
);
|
||||
|
||||
// Solve a Poisson equation for the approximate pressure
|
||||
while (potentialFlow.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(p) + divDivUU
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
}
|
||||
|
||||
p.write();
|
||||
}
|
||||
|
||||
runTime.functionObjects().end();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -84,7 +81,6 @@ Description
|
||||
\heading Options
|
||||
\plaintable
|
||||
-writep | write the Euler pressure
|
||||
-writephi | Write the final volumetric flux
|
||||
-writePhi | Write the final velocity potential
|
||||
-initialiseUBCs | Update the velocity boundaries before solving for Phi
|
||||
\endplaintable
|
||||
@ -98,11 +94,6 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Potential flow solver which solves for the velocity potential"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"pName",
|
||||
@ -116,12 +107,6 @@ int main(int argc, char *argv[])
|
||||
"Initialise U boundary conditions"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writephi",
|
||||
"Write the final volumetric flux field"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writePhi",
|
||||
@ -137,12 +122,10 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption
|
||||
(
|
||||
"withFunctionObjects",
|
||||
"Execute functionObjects"
|
||||
"execute functionObjects"
|
||||
);
|
||||
|
||||
#include "addRegionOption.H"
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
@ -193,23 +176,18 @@ int main(int argc, char *argv[])
|
||||
<< (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value()
|
||||
<< endl;
|
||||
|
||||
// Write U
|
||||
// Write U and phi
|
||||
U.write();
|
||||
phi.write();
|
||||
|
||||
// Optionally write the volumetric flux, phi
|
||||
if (args.found("writephi"))
|
||||
{
|
||||
phi.write();
|
||||
}
|
||||
|
||||
// Optionally write velocity potential, Phi
|
||||
if (args.found("writePhi"))
|
||||
// Optionally write Phi
|
||||
if (args.optionFound("writePhi"))
|
||||
{
|
||||
Phi.write();
|
||||
}
|
||||
|
||||
// Calculate the pressure field from the Euler equation
|
||||
if (args.found("writep"))
|
||||
if (args.optionFound("writep"))
|
||||
{
|
||||
Info<< nl << "Calculating approximate pressure field" << endl;
|
||||
|
||||
@ -257,7 +235,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
runTime.functionObjects().end();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
@ -47,8 +47,11 @@ IOdictionary transportProperties
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
dimensionedScalar DT
|
||||
(
|
||||
"DT",
|
||||
dimArea/dimTime,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
#include "createFvOptions.H"
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,19 +61,14 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Passive scalar transport equation solver."
|
||||
);
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -4,9 +4,6 @@ EXE_INC = \
|
||||
-IXiModels/XiGModels/XiGModel \
|
||||
-IPDRModels/dragModels/PDRDragModel \
|
||||
-IlaminarFlameSpeed/SCOPE \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
@ -15,14 +12,15 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lengine \
|
||||
-lmeshTools \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lcompressibleTransportModels \
|
||||
@ -30,4 +28,6 @@ EXE_LIBS = \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
-ldynamicFvMesh
|
||||
-lfiniteVolume \
|
||||
-ldynamicFvMesh \
|
||||
-lfvOptions
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -35,7 +33,7 @@ Description
|
||||
|
||||
Combusting RANS code using the b-Xi two-equation model.
|
||||
Xi may be obtained by either the solution of the Xi transport
|
||||
equation or from an algebraic expression. Both approaches are
|
||||
equation or from an algebraic exression. Both approaches are
|
||||
based on Gulder's flame speed correlation which has been shown
|
||||
to be appropriate by comparison with the results from the
|
||||
spectral model.
|
||||
@ -66,7 +64,7 @@ Description
|
||||
CR | Drag tensor (1/m)
|
||||
CT | Turbulence generation parameter (1/m)
|
||||
Nv | Number of obstacles in cell per unit volume (m^-2)
|
||||
nsv | Tensor whose diagonal indicates the number to subtract from
|
||||
nsv | Tensor whose diagonal indicates the number to substract from
|
||||
| Nv to get the number of obstacles crossing the flow in each
|
||||
| direction.
|
||||
\endplaintable
|
||||
@ -80,6 +78,7 @@ Description
|
||||
#include "XiModel.H"
|
||||
#include "PDRDragModel.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "bound.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
@ -88,16 +87,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -105,6 +97,7 @@ int main(int argc, char *argv[])
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
@ -123,7 +116,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
@ -157,7 +150,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "\nExecutionTime = "
|
||||
<< runTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
}
|
||||
|
||||
Info<< "\n end\n";
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,7 +30,7 @@ Description
|
||||
|
||||
Combusting RANS code using the b-Xi two-equation model.
|
||||
Xi may be obtained by either the solution of the Xi transport
|
||||
equation or from an algebraic expression. Both approaches are
|
||||
equation or from an algebraic exression. Both approaches are
|
||||
based on Gulder's flame speed correlation which has been shown
|
||||
to be appropriate by comparison with the results from the
|
||||
spectral model.
|
||||
@ -65,6 +63,7 @@ Description
|
||||
#include "XiModel.H"
|
||||
#include "PDRDragModel.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "bound.H"
|
||||
#include "dynamicRefineFvMesh.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -73,13 +72,8 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
|
||||
@ -108,8 +102,8 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
// Indicators for refinement.
|
||||
// Note: before ++runTime only for post-processing reasons.
|
||||
// Indicators for refinement. Note: before runTime++
|
||||
// only for postprocessing reasons.
|
||||
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
||||
volScalarField normalisedGradP
|
||||
(
|
||||
@ -119,7 +113,7 @@ int main(int argc, char *argv[])
|
||||
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
||||
tmagGradP.clear();
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||
|
||||
@ -128,20 +122,20 @@ int main(int argc, char *argv[])
|
||||
fvc::makeAbsolute(phi, rho, U);
|
||||
|
||||
// Test : disable refinement for some cells
|
||||
bitSet& protectedCell =
|
||||
PackedBoolList& protectedCell =
|
||||
refCast<dynamicRefineFvMesh>(mesh).protectedCell();
|
||||
|
||||
if (protectedCell.empty())
|
||||
{
|
||||
protectedCell.setSize(mesh.nCells());
|
||||
protectedCell = false;
|
||||
protectedCell = 0;
|
||||
}
|
||||
|
||||
forAll(betav, celli)
|
||||
{
|
||||
if (betav[celli] < 0.99)
|
||||
{
|
||||
protectedCell.set(celli);
|
||||
protectedCell[celli] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +198,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "\nExecutionTime = "
|
||||
<< runTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
}
|
||||
|
||||
Info<< "\n end\n";
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,7 +103,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(Nv.dimensions(), Zero)
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
||||
);
|
||||
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
|
||||
|
||||
@ -120,7 +118,12 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
Zero
|
||||
)
|
||||
);
|
||||
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -27,7 +25,7 @@ Class
|
||||
Foam::XiEqModels::basicSubGrid
|
||||
|
||||
Description
|
||||
Basic sub-grid obstacle flame-wrinkling enhancement factor model.
|
||||
Basic sub-grid obstacle flame-wrinking enhancement factor model.
|
||||
Details supplied by J Puttock 2/7/06.
|
||||
|
||||
<b> Sub-grid flame area generation </b>
|
||||
@ -96,11 +94,11 @@ class basicSubGrid
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
basicSubGrid(const basicSubGrid&) = delete;
|
||||
//- Disallow copy construct
|
||||
basicSubGrid(const basicSubGrid&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const basicSubGrid&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const basicSubGrid&);
|
||||
|
||||
|
||||
public:
|
||||
@ -127,7 +125,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,7 +49,7 @@ Foam::XiGModels::basicSubGrid::basicSubGrid
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
k1(XiGModelCoeffs_.get<scalar>("k1")),
|
||||
k1(readScalar(XiGModelCoeffs_.lookup("k1"))),
|
||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -106,7 +104,7 @@ bool Foam::XiGModels::basicSubGrid::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("k1", k1);
|
||||
XiGModelCoeffs_.lookup("k1") >> k1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,7 +26,7 @@ Class
|
||||
|
||||
Description
|
||||
|
||||
Basic sub-grid obstacle flame-wrinkling generation rate coefficient model.
|
||||
Basic sub-grid obstacle flame-wrinking generation rate coefficient model.
|
||||
Details supplied by J Puttock 2/7/06.
|
||||
|
||||
\f$ G_{sub} \f$ denotes the generation coefficient and it is given by
|
||||
@ -84,11 +82,11 @@ class basicSubGrid
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
basicSubGrid(const basicSubGrid&) = delete;
|
||||
//- Disallow copy construct
|
||||
basicSubGrid(const basicSubGrid&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const basicSubGrid&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const basicSubGrid&);
|
||||
|
||||
|
||||
public:
|
||||
@ -115,7 +113,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling generation rate
|
||||
//- Return the flame-wrinking generation rate
|
||||
virtual tmp<volScalarField> G() const;
|
||||
|
||||
//- Return the flame diffusivity
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,14 +58,14 @@ Foam::PDRDragModel::PDRDragModel
|
||||
(
|
||||
PDRProperties.subDict
|
||||
(
|
||||
PDRProperties.get<word>("PDRDragModel") + "Coeffs"
|
||||
word(PDRProperties.lookup("PDRDragModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
turbulence_(turbulence),
|
||||
rho_(rho),
|
||||
U_(U),
|
||||
phi_(phi),
|
||||
on_(PDRDragModelCoeffs_.get<bool>("drag"))
|
||||
on_(PDRDragModelCoeffs_.lookup("drag"))
|
||||
{}
|
||||
|
||||
|
||||
@ -83,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
||||
{
|
||||
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
||||
|
||||
PDRDragModelCoeffs_.readEntry("drag", on_);
|
||||
PDRDragModelCoeffs_.lookup("drag") >> on_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -69,18 +67,18 @@ protected:
|
||||
const volVectorField& U_;
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
bool on_;
|
||||
Switch on_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
PDRDragModel(const PDRDragModel&) = delete;
|
||||
//- Disallow copy construct
|
||||
PDRDragModel(const PDRDragModel&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const PDRDragModel&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const PDRDragModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,32 +29,32 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const dictionary& PDRProperties,
|
||||
const compressible::RASModel& turbulence,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
const word modelType(dict.get<word>("PDRDragModel"));
|
||||
const word modelType(PDRProperties.lookup("PDRDragModel"));
|
||||
|
||||
Info<< "Selecting drag model " << modelType << endl;
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"PDRDragModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown PDRDragModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid PDRDragModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<PDRDragModel>
|
||||
(cstrIter()(dict, turbulence, rho, U, phi));
|
||||
(cstrIter()(PDRProperties, turbulence, rho, U, phi));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,7 +104,12 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedSymmTensor(dimMass/dimTime/dimVolume, Zero)
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
dimMass/dimTime/pow(dimLength, 3),
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -140,7 +143,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -167,8 +170,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
|
||||
{
|
||||
PDRDragModel::read(PDRProperties);
|
||||
|
||||
PDRDragModelCoeffs_.readEntry("Csu", Csu.value());
|
||||
PDRDragModelCoeffs_.readEntry("Csk", Csk.value());
|
||||
PDRDragModelCoeffs_.lookup("Csu") >> Csu.value();
|
||||
PDRDragModelCoeffs_.lookup("Csk") >> Csk.value();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -110,11 +108,11 @@ class basic
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
basic(const basic&) = delete;
|
||||
//- Disallow copy construct
|
||||
basic(const basic&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const basic&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const basic&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -72,7 +69,7 @@ PDRkEpsilon::PDRkEpsilon
|
||||
|
||||
C4_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"C4",
|
||||
coeffDict_,
|
||||
@ -97,8 +94,10 @@ bool PDRkEpsilon::read()
|
||||
C4_.readIfPresent(coeffDict_);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -130,7 +129,7 @@ void PDRkEpsilon::correct()
|
||||
volScalarField G(GName(), rho_*nut_*(tgradU() && dev(twoSymm(tgradU()))));
|
||||
tgradU.clear();
|
||||
|
||||
// Update epsilon and G at the wall
|
||||
// Update espsilon and G at the wall
|
||||
epsilon_.boundaryFieldRef().updateCoeffs();
|
||||
|
||||
// Add the blockage generation term so that it is included consistently
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -31,7 +29,7 @@ Description
|
||||
corresponding to PDR basic drag model (\link basic.H \endlink)
|
||||
|
||||
The default model coefficients correspond to the following:
|
||||
\verbatim
|
||||
@verbatim
|
||||
PDRkEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
@ -43,7 +41,7 @@ Description
|
||||
sigmaEps 1.3;
|
||||
Prt 1.0; // only for compressible
|
||||
}
|
||||
\endverbatim
|
||||
@endverbatim
|
||||
|
||||
The turbulence source term \f$ G_{R} \f$ appears in the
|
||||
\f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,10 +49,13 @@ Foam::XiEqModels::Gulder::Gulder
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin"))
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -95,9 +96,9 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -72,11 +70,11 @@ class Gulder
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
Gulder(const Gulder&) = delete;
|
||||
//- Disallow copy construct
|
||||
Gulder(const Gulder&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const Gulder&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const Gulder&);
|
||||
|
||||
|
||||
public:
|
||||
@ -103,7 +101,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -29,7 +27,7 @@ Class
|
||||
Description
|
||||
Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation
|
||||
with a linear correction function to give a plausible profile for XiEq.
|
||||
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE
|
||||
See @link SCOPELaminarFlameSpeed.H @endlink for details on the SCOPE
|
||||
laminar flame speed model.
|
||||
|
||||
SourceFiles
|
||||
@ -68,11 +66,11 @@ class SCOPEBlend
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
SCOPEBlend(const SCOPEBlend&) = delete;
|
||||
//- Disallow copy construct
|
||||
SCOPEBlend(const SCOPEBlend&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const SCOPEBlend&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const SCOPEBlend&);
|
||||
|
||||
|
||||
public:
|
||||
@ -99,7 +97,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,12 +49,15 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||
XiEqExp_(XiEqModelCoeffs_.get<scalar>("XiEqExp")),
|
||||
lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")),
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
),
|
||||
MaModel
|
||||
(
|
||||
Su.mesh().lookupObject<IOdictionary>("combustionProperties"),
|
||||
@ -104,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
epsilon.mesh(),
|
||||
dimensionedScalar(dimless, Zero)
|
||||
dimensionedScalar("XiEq", dimless, 0.0)
|
||||
)
|
||||
);
|
||||
volScalarField& xieq = tXiEq.ref();
|
||||
@ -146,11 +147,11 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("XiEqExp", XiEqExp_);
|
||||
XiEqModelCoeffs_.readEntry("lCoef", lCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
|
||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -86,11 +84,11 @@ class SCOPEXiEq
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
SCOPEXiEq(const SCOPEXiEq&) = delete;
|
||||
//- Disallow copy construct
|
||||
SCOPEXiEq(const SCOPEXiEq&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const SCOPEXiEq&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const SCOPEXiEq&);
|
||||
|
||||
|
||||
public:
|
||||
@ -117,7 +115,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -50,7 +48,7 @@ Foam::XiEqModel::XiEqModel
|
||||
(
|
||||
XiEqProperties.subDict
|
||||
(
|
||||
XiEqProperties.get<word>("XiEqModel") + "Coeffs"
|
||||
word(XiEqProperties.lookup("XiEqModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
@ -112,7 +110,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(Nv.dimensions(), Zero)
|
||||
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
||||
)
|
||||
);
|
||||
volScalarField& N = tN.ref();
|
||||
@ -129,7 +127,12 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
Zero
|
||||
)
|
||||
);
|
||||
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
||||
@ -144,10 +147,10 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
|
||||
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
||||
|
||||
const scalarField deltaUp(upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0));
|
||||
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
||||
|
||||
// Re use tN
|
||||
N.primitiveFieldRef() = upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0);
|
||||
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
|
||||
|
||||
return tN;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -81,11 +79,11 @@ private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
XiEqModel(const XiEqModel&) = delete;
|
||||
//- Disallow copy construct
|
||||
XiEqModel(const XiEqModel&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const XiEqModel&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const XiEqModel&);
|
||||
|
||||
|
||||
public:
|
||||
@ -146,7 +144,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const
|
||||
{
|
||||
return turbulence_.muEff();
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,30 +29,30 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const dictionary& propDict,
|
||||
const psiuReactionThermo& thermo,
|
||||
const compressible::RASModel& turbulence,
|
||||
const volScalarField& Su
|
||||
)
|
||||
{
|
||||
const word modelType(dict.get<word>("XiEqModel"));
|
||||
const word modelType(propDict.lookup("XiEqModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"XiEqModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiEqModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiEqModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<XiEqModel>(cstrIter()(dict, thermo, turbulence, Su));
|
||||
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,7 +49,7 @@ Foam::XiEqModels::instability::instability
|
||||
)
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqIn(XiEqModelCoeffs_.get<scalar>("XiEqIn")),
|
||||
XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))),
|
||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -75,7 +73,7 @@ bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.readEntry("XiEqIn", XiEqIn);
|
||||
XiEqModelCoeffs_.lookup("XiEqIn") >> XiEqIn;
|
||||
|
||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -29,7 +27,7 @@ Class
|
||||
Description
|
||||
This is the equilibrium level of the flame wrinkling generated by
|
||||
instability. It is a constant (default 2.5). It is used in
|
||||
\link XiModel.H \endlink.
|
||||
@link XiModel.H @endlink.
|
||||
|
||||
SourceFiles
|
||||
instability.C
|
||||
@ -67,11 +65,11 @@ class instability
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
instability(const instability&) = delete;
|
||||
//- Disallow copy construct
|
||||
instability(const instability&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const instability&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const instability&);
|
||||
|
||||
|
||||
public:
|
||||
@ -98,7 +96,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
//- Return the flame-wrinking XiEq
|
||||
virtual tmp<volScalarField> XiEq() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,7 +49,7 @@ Foam::XiGModels::KTS::KTS
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef"))
|
||||
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
||||
{}
|
||||
|
||||
|
||||
@ -78,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("GEtaCoef", GEtaCoef_);
|
||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,11 +60,11 @@ class KTS
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
KTS(const KTS&) = delete;
|
||||
//- Disallow copy construct
|
||||
KTS(const KTS&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const KTS&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const KTS&);
|
||||
|
||||
|
||||
public:
|
||||
@ -93,7 +91,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling generation rate
|
||||
//- Return the flame-wrinking generation rate
|
||||
virtual tmp<volScalarField> G() const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -50,7 +48,7 @@ Foam::XiGModel::XiGModel
|
||||
(
|
||||
XiGProperties.subDict
|
||||
(
|
||||
XiGProperties.get<word>("XiGModel") + "Coeffs"
|
||||
word(XiGProperties.lookup("XiGModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -72,11 +70,11 @@ private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
XiGModel(const XiGModel&) = delete;
|
||||
//- Disallow copy construct
|
||||
XiGModel(const XiGModel&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const XiGModel&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const XiGModel&);
|
||||
|
||||
|
||||
public:
|
||||
@ -137,7 +135,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling generation rate
|
||||
//- Return the flame-wrinking genration rate
|
||||
virtual tmp<volScalarField> G() const = 0;
|
||||
|
||||
//- Return the flame diffusivity
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,30 +29,30 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const dictionary& propDict,
|
||||
const psiuReactionThermo& thermo,
|
||||
const compressible::RASModel& turbulence,
|
||||
const volScalarField& Su
|
||||
)
|
||||
{
|
||||
const word modelType(dict.get<word>("XiGModel"));
|
||||
const word modelType(propDict.lookup("XiGModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"XiGModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiGModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiGModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<XiGModel>(cstrIter()(dict, thermo, turbulence, Su));
|
||||
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
|
||||
)
|
||||
:
|
||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||
GIn_("GIn", dimless/dimTime, XiGModelCoeffs_),
|
||||
lambdaIn_("lambdaIn", dimLength, XiGModelCoeffs_),
|
||||
GIn_(XiGModelCoeffs_.lookup("GIn")),
|
||||
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
|
||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||
{}
|
||||
|
||||
@ -88,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.readEntry("GIn", GIn_);
|
||||
XiGModelCoeffs_.readEntry("lambdaIn", lambdaIn_);
|
||||
XiGModelCoeffs_.lookup("GIn") >> GIn_;
|
||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -27,7 +25,7 @@ Class
|
||||
Foam::XiGModels::instabilityG
|
||||
|
||||
Description
|
||||
Flame-surface instabilityG flame-wrinkling generation rate coefficient model
|
||||
Flame-surface instabilityG flame-wrinking generation rate coefficient model
|
||||
used in \link XiModel.H \endlink.
|
||||
|
||||
See Technical Report SH/RE/01R for details on the PDR modelling.
|
||||
@ -59,7 +57,7 @@ class instabilityG
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Flame instabilityG wrinkling generation rate coefficient
|
||||
//- Flame instabilityG wrinling generation rate coefficient
|
||||
dimensionedScalar GIn_;
|
||||
|
||||
//- InstabilityG length-scale
|
||||
@ -71,11 +69,11 @@ class instabilityG
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
instabilityG(const instabilityG&) = delete;
|
||||
//- Disallow copy construct
|
||||
instabilityG(const instabilityG&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const instabilityG&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const instabilityG&);
|
||||
|
||||
|
||||
public:
|
||||
@ -102,7 +100,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling generation rate
|
||||
//- Return the flame-wrinking generation rate
|
||||
virtual tmp<volScalarField> G() const;
|
||||
|
||||
//- Return the flame diffusivity
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -53,7 +51,7 @@ Foam::XiModel::XiModel
|
||||
(
|
||||
XiProperties.subDict
|
||||
(
|
||||
XiProperties.get<word>("XiModel") + "Coeffs"
|
||||
word(XiProperties.lookup("XiModel")) + "Coeffs"
|
||||
)
|
||||
),
|
||||
thermo_(thermo),
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -124,7 +122,7 @@ protected:
|
||||
const volScalarField& b_;
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
//- Flame wrinkling field
|
||||
//- Flame wrinking field
|
||||
volScalarField Xi_;
|
||||
|
||||
|
||||
@ -132,11 +130,11 @@ private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
XiModel(const XiModel&) = delete;
|
||||
//- Disallow copy construct
|
||||
XiModel(const XiModel&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const XiModel&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const XiModel&);
|
||||
|
||||
|
||||
public:
|
||||
@ -209,7 +207,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling Xi
|
||||
//- Return the flame-wrinking Xi
|
||||
virtual const volScalarField& Xi() const
|
||||
{
|
||||
return Xi_;
|
||||
@ -229,10 +227,10 @@ public:
|
||||
)
|
||||
{}
|
||||
|
||||
//- Correct the flame-wrinkling Xi
|
||||
//- Correct the flame-wrinking Xi
|
||||
virtual void correct() = 0;
|
||||
|
||||
//- Correct the flame-wrinkling Xi using the given convection scheme
|
||||
//- Correct the flame-wrinking Xi using the given convection scheme
|
||||
virtual void correct(const fv::convectionScheme<scalar>&)
|
||||
{
|
||||
correct();
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,7 +29,7 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const dictionary& propDict,
|
||||
const psiuReactionThermo& thermo,
|
||||
const compressible::RASModel& turbulence,
|
||||
const volScalarField& Su,
|
||||
@ -41,25 +38,25 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
const word modelType(dict.get<word>("XiModel"));
|
||||
const word modelType(propDict.lookup("XiModel"));
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"XiModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<XiModel>
|
||||
(cstrIter()(dict, thermo, turbulence, Su, rho, b, phi));
|
||||
(cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +52,7 @@ Foam::XiModels::algebraic::algebraic
|
||||
)
|
||||
:
|
||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||
{}
|
||||
@ -91,7 +89,7 @@ bool Foam::XiModels::algebraic::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -69,11 +67,11 @@ class algebraic
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
algebraic(const algebraic&) = delete;
|
||||
//- Disallow copy construct
|
||||
algebraic(const algebraic&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const algebraic&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const algebraic&);
|
||||
|
||||
|
||||
public:
|
||||
@ -106,7 +104,7 @@ public:
|
||||
//- Return the flame diffusivity
|
||||
virtual tmp<volScalarField> Db() const;
|
||||
|
||||
//- Correct the flame-wrinkling Xi
|
||||
//- Correct the flame-wrinking Xi
|
||||
virtual void correct();
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,11 +55,11 @@ class fixed
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
fixed(const fixed&) = delete;
|
||||
//- Disallow copy construct
|
||||
fixed(const fixed&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const fixed&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const fixed&);
|
||||
|
||||
|
||||
public:
|
||||
@ -91,7 +89,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the flame-wrinkling Xi
|
||||
//- Correct the flame-wrinking Xi
|
||||
virtual void correct()
|
||||
{}
|
||||
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,7 +57,7 @@ Foam::XiModels::transport::transport
|
||||
)
|
||||
:
|
||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||
{}
|
||||
@ -138,7 +136,7 @@ bool Foam::XiModels::transport::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -69,11 +67,11 @@ class transport
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
transport(const transport&) = delete;
|
||||
//- Disallow copy construct
|
||||
transport(const transport&);
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const transport&) = delete;
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const transport&);
|
||||
|
||||
|
||||
public:
|
||||
@ -115,13 +113,13 @@ public:
|
||||
fields.add(Xi_);
|
||||
}
|
||||
|
||||
//- Correct the flame-wrinkling Xi
|
||||
//- Correct the flame-wrinking Xi
|
||||
virtual void correct()
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
//- Correct the flame-wrinkling Xi using the given convection scheme
|
||||
//- Correct the flame-wrinking Xi using the given convection scheme
|
||||
virtual void correct(const fv::convectionScheme<scalar>& mvConvection);
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -7,7 +7,7 @@ autoPtr<psiuReactionThermo> pThermo
|
||||
psiuReactionThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "ha", "ea");
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
basicMultiComponentMixture& composition = thermo.composition();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
@ -165,7 +165,7 @@ IOdictionary PDRProperties
|
||||
autoPtr<PDRDragModel> drag = PDRDragModel::New
|
||||
(
|
||||
PDRProperties,
|
||||
*turbulence,
|
||||
turbulence,
|
||||
rho,
|
||||
U,
|
||||
phi
|
||||
@ -176,7 +176,7 @@ autoPtr<XiModel> flameWrinkling = XiModel::New
|
||||
(
|
||||
PDRProperties,
|
||||
thermo,
|
||||
*turbulence,
|
||||
turbulence,
|
||||
Su,
|
||||
rho,
|
||||
b,
|
||||
@ -215,4 +215,3 @@ flameWrinkling->addXi(fields);
|
||||
#include "createK.H"
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,8 +53,8 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
|
||||
)
|
||||
:
|
||||
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
||||
ll(polyDict.get<scalar>("lowerLimit")),
|
||||
ul(polyDict.get<scalar>("upperLimit")),
|
||||
ll(readScalar(polyDict.lookup("lowerLimit"))),
|
||||
ul(readScalar(polyDict.lookup("upperLimit"))),
|
||||
llv(polyPhi(ll, *this)),
|
||||
ulv(polyPhi(ul, *this)),
|
||||
lu(0)
|
||||
@ -75,32 +73,21 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
||||
(
|
||||
dictionary
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
dict.get<fileName>("fuelFile")
|
||||
)()
|
||||
IFstream
|
||||
(
|
||||
fileName
|
||||
(
|
||||
dict.lookup("fuelFile")
|
||||
)
|
||||
)()
|
||||
).optionalSubDict(typeName + "Coeffs")
|
||||
),
|
||||
LFL_
|
||||
(
|
||||
coeffsDict_.getCompat<scalar>
|
||||
(
|
||||
"lowerFlammabilityLimit",
|
||||
{{"lowerFlamabilityLimit", 1712}}
|
||||
)
|
||||
),
|
||||
UFL_
|
||||
(
|
||||
coeffsDict_.getCompat<scalar>
|
||||
(
|
||||
"upperFlammabilityLimit",
|
||||
{{"upperFlamabilityLimit", 1712}}
|
||||
)
|
||||
),
|
||||
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
|
||||
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
|
||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
||||
Texp_(coeffsDict_.get<scalar>("Texp")),
|
||||
pexp_(coeffsDict_.get<scalar>("pexp")),
|
||||
Texp_(readScalar(coeffsDict_.lookup("Texp"))),
|
||||
pexp_(readScalar(coeffsDict_.lookup("pexp"))),
|
||||
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
||||
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
||||
{
|
||||
@ -158,19 +145,19 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
|
||||
{
|
||||
if (phi < LFL_ || phi > UFL_)
|
||||
{
|
||||
// Return 0 beyond the flammability limits
|
||||
// Return 0 beyond the flamibility limits
|
||||
return scalar(0);
|
||||
}
|
||||
else if (phi < SuPolyL_.ll)
|
||||
{
|
||||
// Use linear interpolation between the low end of the
|
||||
// lower polynomial and the lower flammability limit
|
||||
// lower polynomial and the lower flamibility limit
|
||||
return SuPolyL_.llv*(phi - LFL_)/(SuPolyL_.ll - LFL_);
|
||||
}
|
||||
else if (phi > SuPolyU_.ul)
|
||||
{
|
||||
// Use linear interpolation between the upper end of the
|
||||
// upper polynomial and the upper flammability limit
|
||||
// upper polynomial and the upper flamibility limit
|
||||
return SuPolyU_.ulv*(UFL_ - phi)/(UFL_ - SuPolyU_.ul);
|
||||
}
|
||||
else if (phi < SuPolyL_.lu)
|
||||
@ -268,7 +255,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
dimensionedScalar("Su0", dimVelocity, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -317,7 +304,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
dimensionedScalar("Su0", dimVelocity, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -371,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
phi.mesh(),
|
||||
dimensionedScalar(dimless, Zero)
|
||||
dimensionedScalar("Ma", dimless, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -410,7 +397,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
||||
(
|
||||
dimensionedScalar
|
||||
(
|
||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
||||
)*ft/(scalar(1) - ft)
|
||||
);
|
||||
}
|
||||
@ -451,7 +438,7 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const
|
||||
psiuReactionThermo_.Tu(),
|
||||
dimensionedScalar
|
||||
(
|
||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
||||
psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio")
|
||||
)*ft/(scalar(1) - ft)
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -111,10 +109,10 @@ class SCOPE
|
||||
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- Lower flammability limit
|
||||
//- Lower flamability limit
|
||||
scalar LFL_;
|
||||
|
||||
//- Upper flammability limit
|
||||
//- Upper flamability limit
|
||||
scalar UFL_;
|
||||
|
||||
//- Lower Su polynomial
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
@ -2,10 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,7 +26,7 @@ Global
|
||||
|
||||
Description
|
||||
Reset the timestep to maintain a constant maximum courant Number.
|
||||
Reduction of time-step is immediate but increase is damped to avoid
|
||||
Reduction of time-step is imediate but increase is damped to avoid
|
||||
unstable oscillations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
@ -9,13 +6,12 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lengine \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
@ -23,4 +19,8 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels
|
||||
-llaminarFlameSpeedModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-lmeshTools
|
||||
|
||||
@ -2,9 +2,9 @@ EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
@ -18,10 +18,10 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-ldynamicMesh \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lengine \
|
||||
-lturbulenceModels \
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,7 +33,7 @@ Description
|
||||
|
||||
Combusting RANS code using the b-Xi two-equation model.
|
||||
Xi may be obtained by either the solution of the Xi transport
|
||||
equation or from an algebraic expression. Both approaches are
|
||||
equation or from an algebraic exression. Both approaches are
|
||||
based on Gulder's flame speed correlation which has been shown
|
||||
to be appropriate by comparison with the results from the
|
||||
spectral model.
|
||||
@ -70,15 +67,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createControl.H"
|
||||
@ -86,6 +77,7 @@ int main(int argc, char *argv[])
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createRhoUf.H"
|
||||
#include "createControls.H"
|
||||
@ -116,7 +108,7 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
@ -144,8 +136,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
Info<< "rho min/max : " << min(rho).value() << " " << max(rho).value()
|
||||
<< endl;
|
||||
Info<< "rhoEqn max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
@ -178,7 +170,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
bool correctPhi
|
||||
(
|
||||
pimple.dict().getOrDefault("correctPhi", true)
|
||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
||||
);
|
||||
|
||||
bool checkMeshCourantNo
|
||||
(
|
||||
pimple.dict().getOrDefault("checkMeshCourantNo", false)
|
||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
||||
);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "readTimeControls.H"
|
||||
|
||||
correctPhi = pimple.dict().getOrDefault("correctPhi", true);
|
||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
||||
|
||||
checkMeshCourantNo =
|
||||
pimple.dict().getOrDefault("checkMeshCourantNo", false);
|
||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
XiEngineFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/XiEngineFoam
|
||||
@ -1,27 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lengine \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels
|
||||
@ -1,157 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
XiEngineFoam
|
||||
|
||||
Description
|
||||
Solver for internal combustion engines.
|
||||
|
||||
Combusting RANS code using the b-Xi two-equation model.
|
||||
Xi may be obtained by either the solution of the Xi transport
|
||||
equation or from an algebraic expression. Both approaches are
|
||||
based on Gulder's flame speed correlation which has been shown
|
||||
to be appropriate by comparison with the results from the
|
||||
spectral model.
|
||||
|
||||
Strain effects are encorporated directly into the Xi equation
|
||||
but not in the algebraic approximation. Further work need to be
|
||||
done on this issue, particularly regarding the enhanced removal rate
|
||||
caused by flame compression. Analysis using results of the spectral
|
||||
model will be required.
|
||||
|
||||
For cases involving very lean Propane flames or other flames which are
|
||||
very strain-sensitive, a transport equation for the laminar flame
|
||||
speed is present. This equation is derived using heuristic arguments
|
||||
involving the strain time scale and the strain-rate at extinction.
|
||||
the transport velocity is the same as that for the Xi equation.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "OFstream.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Solver for compressible premixed/partially-premixed combustion with"
|
||||
" turbulence modelling in internal combustion engines."
|
||||
);
|
||||
|
||||
#define CREATE_TIME createEngineTime.H
|
||||
#define CREATE_MESH createEngineMesh.H
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createEngineTime.H"
|
||||
#include "createEngineMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "readCombustionProperties.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createRhoUf.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readEngineTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
#include "startSummary.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readEngineTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
++runTime;
|
||||
|
||||
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
||||
|
||||
mesh.move();
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
||||
#include "ftEqn.H"
|
||||
#include "bEqn.H"
|
||||
#include "EauEqn.H"
|
||||
#include "EaEqn.H"
|
||||
|
||||
if (!ign.ignited())
|
||||
{
|
||||
thermo.heu() == thermo.he();
|
||||
}
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
#include "logSummary.H"
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user