mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
8
Allwmake
8
Allwmake
@ -5,15 +5,15 @@ set -x
|
|||||||
# wmake is required for subsequent targets
|
# wmake is required for subsequent targets
|
||||||
( cd wmake/src && make )
|
( cd wmake/src && make )
|
||||||
|
|
||||||
|
# build ThirdParty sources
|
||||||
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
||||||
|
|
||||||
( cd src && ./Allwmake )
|
src/Allwmake
|
||||||
|
applications/Allwmake
|
||||||
( cd applications && ./Allwmake )
|
|
||||||
|
|
||||||
if [ "$1" = doc ]
|
if [ "$1" = doc ]
|
||||||
then
|
then
|
||||||
( cd doc && ./Allwmake )
|
doc/Allwmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
197
README.html
197
README.html
@ -1,197 +0,0 @@
|
|||||||
OpenFOAM README for version 1.5
|
|
||||||
|
|
||||||
1 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 2 of the License, or (at your option) any later version.
|
|
||||||
See the file COPYING in this directory, for a description of the GNU General Public License terms under which you can
|
|
||||||
copy the files.
|
|
||||||
|
|
||||||
2 System requirements
|
|
||||||
|
|
||||||
OpenFOAM is developed and tested on Linux, but should work with other Unix style systems. To check your system setup,
|
|
||||||
execute the foamSystemCheck script in the bin/ directory of the OpenFOAM installation. If no problems are reported,
|
|
||||||
proceed to "3. Installation"; otherwise contact your system administrator.
|
|
||||||
|
|
||||||
If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the section "Running OpenFOAM in 32-bit mode".
|
|
||||||
|
|
||||||
2.1 Qt (from http://trolltech.com/products/qt)
|
|
||||||
|
|
||||||
The ParaView 3.3 visualisation package requires that Qt version 4.3.x MUST be installed on the system. Earlier or more
|
|
||||||
recent versions (4.2.x or 4.4.x) will NOT work. To check whether Qt4 is installed, and the version, type:
|
|
||||||
|
|
||||||
* qmake <div id="table-of-contents">
|
|
||||||
<h2>Table of Contents</h2>
|
|
||||||
<div id="text-table-of-contents">
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-1">1 Copyright</a></li>
|
|
||||||
<li><a href="#sec-2">2 System requirements</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-2.1">2.1 Qt (from http://trolltech.com/products/qt)</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-3">3 Installation</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-3.1">3.1 Installation in alternative locations</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-4">4 Building from Sources (Optional)</a></li>
|
|
||||||
<li><a href="#sec-5">5 Testing the installation</a></li>
|
|
||||||
<li><a href="#sec-6">6 Getting Started</a></li>
|
|
||||||
<li><a href="#sec-7">7 Compiling Paraview 3.3 and the PV3FoamReader module</a></li>
|
|
||||||
<li><a href="#sec-8">8 Documentation</a></li>
|
|
||||||
<li><a href="#sec-9">9 Help</a></li>
|
|
||||||
<li><a href="#sec-10">10 Reporting Bugs in OpenFOAM</a></li>
|
|
||||||
<li><a href="#sec-11">11 Running OpenFOAM in 32-bit mode on 64-bit machines</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
–version
|
|
||||||
|
|
||||||
The ParaView binary executables in the ThirdParty distribution will only work with PRECISELY the same version of Qt
|
|
||||||
with which it was compiled. The 64-bit version of ParaView was compiled with Qt-4.3.1 (with openSuSE-10.3) and the
|
|
||||||
32-bit version of ParaView was compiled with Qt-4.3.2 (with ubuntu-7.10). If the user finds that a ParaView binary
|
|
||||||
fails to run, then it is almost certainly due to a conflict in compiled and installed Qt versions and they will need to
|
|
||||||
consult the section below on "Compiling ParaView and the PV3FoamReader module."
|
|
||||||
|
|
||||||
The default versions of Qt used by some GNU/Linux releases are as follows.
|
|
||||||
|
|
||||||
* ubuntu-7.10: Version 4.3.2
|
|
||||||
* ubuntu-8.04: Version 4.3.4
|
|
||||||
* openSuSE-10.2: Version 4.2.1 - too old
|
|
||||||
* openSuSE-10.3: Version 4.3.1
|
|
||||||
* openSuSE-11.0: Version 4.4.0 - too new
|
|
||||||
|
|
||||||
Compilation and running of ParaView has been successful using the libraries downloaded in the "libqt4-dev" package on
|
|
||||||
ubuntu.
|
|
||||||
|
|
||||||
If you don't have an appropriate version of Qt installed you can download the sources from TrollTech e.g.: ftp://
|
|
||||||
ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2 and compile and install in /usr/local or some other
|
|
||||||
location that does to conflict with the pre-installed version.
|
|
||||||
|
|
||||||
3 Installation
|
|
||||||
|
|
||||||
Download and unpack the files in the $HOME/OpenFOAM directory as described in: http://www.OpenFOAM.org/download.html
|
|
||||||
|
|
||||||
The environment variable settings are contained in files in an etc/ directory in the OpenFOAM release. e.g. in
|
|
||||||
|
|
||||||
* $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
|
|
||||||
* where <VERSION> corresponds to the version 1.4, 1.5, …
|
|
||||||
|
|
||||||
* EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the etc/bashrc file by adding the following
|
|
||||||
line to the end of your $HOME/.bashrc file:
|
|
||||||
|
|
||||||
+ . $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/bashrc
|
|
||||||
|
|
||||||
Then update the environment variables by sourcing the $HOME/.bashrc file by typing in the terminal:
|
|
||||||
|
|
||||||
+ . $HOME/.bashrc
|
|
||||||
|
|
||||||
* OR, if running tcsh or csh, source the etc/cshrc file by adding the following line to the end of your $HOME/.cshrc
|
|
||||||
file:
|
|
||||||
|
|
||||||
+ source $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/cshrc
|
|
||||||
|
|
||||||
Then update the environment variables by sourcing the $HOME/.cshrc file by typing in the terminal:
|
|
||||||
|
|
||||||
+ source $HOME/.cshrc
|
|
||||||
|
|
||||||
3.1 Installation in alternative locations
|
|
||||||
|
|
||||||
OpenFOAM may also be installed in alternative locations. However, the installation directory should be network
|
|
||||||
available (e.g., NFS) if parallel calculations are planned.
|
|
||||||
|
|
||||||
The environment variable 'FOAM_INST_DIR' can be used to find and source the appropriate resource file. Here is a bash/
|
|
||||||
ksh/sh example:
|
|
||||||
|
|
||||||
* export FOAM_INST_DIR=/data/app/OpenFOAM
|
|
||||||
* foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
|
|
||||||
* [ -f $foamDotFile ] && . $foamDotFile
|
|
||||||
|
|
||||||
and a csh/tcsh example:
|
|
||||||
|
|
||||||
* setenv FOAM_INST_DIR /data/app/OpenFOAM
|
|
||||||
* foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
|
|
||||||
* if ( -f $foamDotFile ) source $foamDotFile
|
|
||||||
|
|
||||||
The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts of the OpenFOAM installation.
|
|
||||||
|
|
||||||
4 Building from Sources (Optional)
|
|
||||||
|
|
||||||
If you cannot find an appropriate binary pack for your platform, you can build the complete OpenFOAM from the
|
|
||||||
source-pack. You will first need to compile or obtain a recent version of gcc (we recomend gcc-4.3.?) for your
|
|
||||||
platform, which may be obtained from http://gcc.gnu.org/.
|
|
||||||
|
|
||||||
Install the compiler in $WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/ and
|
|
||||||
change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and $WM_PROJECT_DIR/etc/settings.csh appropriately and
|
|
||||||
finally update the environment variables as in section 3.
|
|
||||||
|
|
||||||
Now go to the top-level source directory $WM_PROJECT_DIR and execute the top-level build script './Allwmake'. In
|
|
||||||
principle this will build everything, but if problems occur with the build order it may be necessary to update the
|
|
||||||
environment variables and re-execute 'Allwmake'. If you experience difficulties with building the source-pack, or your
|
|
||||||
platform is not currently supported, please contact <enquiries@OpenCFD.co.uk> to negotiate a support contract and we
|
|
||||||
will do the port and maintain it for future releases.
|
|
||||||
|
|
||||||
5 Testing the installation
|
|
||||||
|
|
||||||
To check your installation setup, execute the 'foamInstallationTest' script (in the bin/ directory of the OpenFOAM
|
|
||||||
installation). If no problems are reported, proceed to getting started with OpenFOAM; otherwise, go back and check you
|
|
||||||
have installed the software correctly and/or contact your system administrator.
|
|
||||||
|
|
||||||
6 Getting Started
|
|
||||||
|
|
||||||
Create a project directory within the $HOME/OpenFOAM directory named <USER>-<VERSION> (e.g. 'chris-1.5' for user chris
|
|
||||||
and OpenFOAM version 1.5) and create a directory named 'run' within it, e.g. by typing:
|
|
||||||
|
|
||||||
* mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
|
|
||||||
|
|
||||||
Copy the 'tutorial' examples directory in the OpenFOAM distribution to the 'run' directory. If the OpenFOAM environment
|
|
||||||
variables are set correctly, then the following command will be correct:
|
|
||||||
|
|
||||||
* cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
|
|
||||||
|
|
||||||
Run the first example case of incompressible laminar flow in a cavity:
|
|
||||||
|
|
||||||
* cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/icoFoam/cavity
|
|
||||||
* blockMesh
|
|
||||||
* icoFoam
|
|
||||||
* paraFoam
|
|
||||||
|
|
||||||
7 Compiling Paraview 3.3 and the PV3FoamReader module
|
|
||||||
|
|
||||||
A version of Qt 4.3.x must be installed to compile ParaView. The compilation is a fairly simple process using the
|
|
||||||
supplied buildParaView3.3-cvs script that has worked is our tests with other packages supplied in the ThirdParty
|
|
||||||
directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following:
|
|
||||||
|
|
||||||
* cd $FOAM_INST_DIR/ThirdParty
|
|
||||||
* rm -rf ParaView3.3-cvs/platforms
|
|
||||||
* buildParaView3.3-cvs
|
|
||||||
|
|
||||||
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the usual manner as follows:
|
|
||||||
|
|
||||||
* cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
|
|
||||||
* ./Allwclean
|
|
||||||
* ./Allwmake
|
|
||||||
|
|
||||||
8 Documentation
|
|
||||||
|
|
||||||
http://www.OpenFOAM.org/doc
|
|
||||||
|
|
||||||
9 Help
|
|
||||||
|
|
||||||
http://www.OpenFOAM.org http://www.OpenFOAM.org/discussion.html
|
|
||||||
|
|
||||||
10 Reporting Bugs in OpenFOAM
|
|
||||||
|
|
||||||
http://www.OpenFOAM.org/bugs.html
|
|
||||||
|
|
||||||
11 Running OpenFOAM in 32-bit mode on 64-bit machines
|
|
||||||
|
|
||||||
Linux users with a 64-bit machine may install either the OpenFOAM 32-bit version (linux) or the OpenFOAM 64-bit version
|
|
||||||
(linux64), or both. The 64-bit is the default mode on a 64-bit machine. To use an installed 32-bit version, the user
|
|
||||||
must set the environment variable WM_ARCH_OPTION to 32 before sourcing the etc/bashrc (or etc/cshrc) file.
|
|
||||||
|
|
||||||
Date: 26 August 2008
|
|
||||||
|
|
||||||
HTML generated by org-mode 6.06b in emacs 23
|
|
||||||
|
|
||||||
@ -10,7 +10,7 @@
|
|||||||
OpenFOAM-1.5 is is a significant upgrade to version 1.4 in ways which are
|
OpenFOAM-1.5 is is a significant upgrade to version 1.4 in ways which are
|
||||||
outlined below. This release passes all our standard tests and the tutorials
|
outlined below. This release passes all our standard tests and the tutorials
|
||||||
have been broadly checked. If there are any bugs, please report them using
|
have been broadly checked. If there are any bugs, please report them using
|
||||||
the instructions set out in: http://www.openfoam.org/bugs.html.
|
the instructions set out in: http://www.OpenFOAM.org/bugs.html.
|
||||||
|
|
||||||
Most of the developments for this release are in: new applications, e.g. for
|
Most of the developments for this release are in: new applications, e.g. for
|
||||||
multiphase flow and cavitation, buoyancy-flow and heat transfer, high speed
|
multiphase flow and cavitation, buoyancy-flow and heat transfer, high speed
|
||||||
|
|||||||
@ -1,208 +0,0 @@
|
|||||||
OpenFOAM release notes for version 1.5
|
|
||||||
|
|
||||||
1 Overview
|
|
||||||
|
|
||||||
OpenFOAM-1.5 is is a significant upgrade to version 1.4 in ways which are
|
|
||||||
outlined below. This release passes all our standard tests and the tutorials
|
|
||||||
have been broadly checked. If there are any bugs, please report them using the
|
|
||||||
instructions set out in: http://www.openfoam.org/bugs.html.
|
|
||||||
|
|
||||||
Most of the developments for this release are in: new applications, e.g. for
|
|
||||||
multiphase flow and cavitation, buoyancy-flow and heat transfer, high speed
|
|
||||||
flows and even molecular dynamics; new utilities, e.g. for meshing and case
|
|
||||||
monitoring; and, new modelling, e.g. in Lagrangian particle tracking,
|
|
||||||
radiation and rotating frames of reference. With these new applications come
|
|
||||||
numerous new example cases.
|
|
||||||
|
|
||||||
2 GNU/Linux version
|
|
||||||
|
|
||||||
The 64bit binary packs of the OpenFOAM release were compiled on a machine
|
|
||||||
running SuSE GNU/Linux version 10.3 and the 32bit on a machine running Ubuntu
|
|
||||||
GNU/Linux version 7.1 and also tested on Ubuntu 8.04. We recommend that users
|
|
||||||
run OpenFOAM on one of these or a similar recent version of GNU/Linux. This
|
|
||||||
release has also been successfully compiled and tested on older GNU/Linux
|
|
||||||
releases but this re<div id="table-of-contents">
|
|
||||||
<h2>Table of Contents</h2>
|
|
||||||
<div id="text-table-of-contents">
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-1">1 Overview</a></li>
|
|
||||||
<li><a href="#sec-2">2 GNU/Linux version</a></li>
|
|
||||||
<li><a href="#sec-3">3 C++ Compiler version</a></li>
|
|
||||||
<li><a href="#sec-4">4 Developments to solvers (applications)</a></li>
|
|
||||||
<li><a href="#sec-5">5 Automatic mesher</a></li>
|
|
||||||
<li><a href="#sec-6">6 Developments to utilities</a></li>
|
|
||||||
<li><a href="#sec-7">7 Migration from ParaView 2.4 to ParaView 3.x</a></li>
|
|
||||||
<li><a href="#sec-8">8 Model development</a></li>
|
|
||||||
<li><a href="#sec-9">9 New functionObjects</a></li>
|
|
||||||
<li><a href="#sec-10">10 Improvements to boundary conditions</a></li>
|
|
||||||
<li><a href="#sec-11">11 Other</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
quires the installation of Qt 4.3.? for ParaView-3 to run.
|
|
||||||
|
|
||||||
3 C++ Compiler version
|
|
||||||
|
|
||||||
* Released compiled with GCC 4.3.1, the latest version.
|
|
||||||
* Built in support for the Intel C++ 10.? compiler (untested).
|
|
||||||
* The choice of the compiler is controlled by the setting of the
|
|
||||||
$WM_COMPILER and $WM_COMPILER_ARCH environment variables in the
|
|
||||||
OpenFOAM-1.5/etc/bashrc (or cshrc) file.
|
|
||||||
* The location of the installation of the compiler is controlled by the
|
|
||||||
$compilerInstall environment variable in the OpenFOAM-1.5/etc/settings.sh
|
|
||||||
(or settings.csh) file.
|
|
||||||
|
|
||||||
4 Developments to solvers (applications)
|
|
||||||
|
|
||||||
* New rhoCentralFoam solver for high-speed, viscous, compressible flows
|
|
||||||
using non-oscillatory, central-upwind schemes.
|
|
||||||
* New interDyMFoam solver for 2 incompressible, isothermal, immiscible
|
|
||||||
fluids using a VoF phase-fraction based interface capturing approach, with
|
|
||||||
optional mesh motion and mesh topology changes including adaptive mesh
|
|
||||||
(un)refinement. Useful for simulations such as tank filling, sloshing ---
|
|
||||||
using solid body motion e.g. SDA or SKA (6DoF) — and slamming (using the
|
|
||||||
mesh motion solver) and other large-scale applications that benefit from
|
|
||||||
the efficiency gain of adaptive mesh (un)refinement of the interface.
|
|
||||||
* New compressibleInterFoam solver for 2 compressible, isothermal,
|
|
||||||
immiscible fluids using a volume of fluid (VoF) phase-fraction approach
|
|
||||||
for interface-capturing. The momentum and other fluid properties are of
|
|
||||||
the "mixture" and a single momentum equation is solved. Turbulence is
|
|
||||||
modelled using a run-time selectable incompressible LES model.
|
|
||||||
* New interPhaseChangeFoam solver for 2 incompressible, isothermal,
|
|
||||||
immiscible fluids with phase-change, e.g. cavitation. Uses VoF interface
|
|
||||||
capturing, with momentum and other fluid properties described for the
|
|
||||||
``mixture'' and a single momentum equation is solved. The set of
|
|
||||||
phase-change models provided are designed to simulate cavitation but other
|
|
||||||
mechanisms of phase-change are supported within this solver framework.
|
|
||||||
* New rasCavitatingFoam solver for transient cavitation using a barotropic
|
|
||||||
compressibility model, with RAS turbulence.
|
|
||||||
* New lesCavitatingFoam solver for transient cavitation using a barotropic
|
|
||||||
compressibility model, with LES turbulence.
|
|
||||||
* New chtMultiRegionFoam solver that couples conjugate heat transfer in a
|
|
||||||
solid to a buoyancy-driven flow simulation.
|
|
||||||
* New PDRFoam solver for compressible premixed/partially-premixed turbulent
|
|
||||||
combustion that includes porosity/distributed resistance (PDR) modelling
|
|
||||||
to handle regions containing solid blockages which cannot be resolved by
|
|
||||||
the mesh. Requires the PDR fields.
|
|
||||||
* New lesBuoyantFoam solver for transient, buoyant, turbulent flow of
|
|
||||||
compressible fluids for ventilation and heat-transfer. Turbulence is
|
|
||||||
modelled using a run-time selectable compressible LES model.
|
|
||||||
* New rhoPimpleFoam solver for transient, turbulent flow of compressible
|
|
||||||
fluids for ventilation and heat-transfer. Uses the flexible PIMPLE
|
|
||||||
(PISO-SIMPLE) solution for time-resolved and pseudo-transient simulations.
|
|
||||||
* New buoyantSimpleRadiationFoam solver for steady-state, buoyant, turbulent
|
|
||||||
flow of compressible fluids with radiation, for ventilation and
|
|
||||||
heat-transfer.
|
|
||||||
* New rhoTurbTwinParcelFoam solver for transient for compressible, turbulent
|
|
||||||
flow with two thermo-clouds.
|
|
||||||
* New gnemdFOAM solver for general purpose molecular dynamics that simulates
|
|
||||||
atoms in arbitrary shaped domains and average atomic/molecular quantities
|
|
||||||
to the mesh to create field data.
|
|
||||||
* New mdEqulibrationFoam solver to equilibrates and/or preconditions
|
|
||||||
molecular dynamics systems.
|
|
||||||
* Demonstration SRFSimpleFoam solver based on simpleFoam that incorporates
|
|
||||||
the SRF extensions (see below) for rotating flows.
|
|
||||||
|
|
||||||
5 Automatic mesher
|
|
||||||
|
|
||||||
New snappyHexMesh utility that generates split-hex meshes automatically from
|
|
||||||
triangulated (STL) surface geometries. The mesh approximately conforms to the
|
|
||||||
surface by iteratively refining a starting mesh and morphing the resulting
|
|
||||||
split-hex mesh to the surface. An optional phase will shrink back the
|
|
||||||
resulting mesh and insert cell layers. It has a flexible specification of mesh
|
|
||||||
refinement level and robust surface handling with a pre-specified final mesh
|
|
||||||
quality. It runs in parallel with a load balancing step every iteration.
|
|
||||||
|
|
||||||
6 Developments to utilities
|
|
||||||
|
|
||||||
* New extrude2DMesh utility that extrudes 2D meshes into a 3D mesh. 2D
|
|
||||||
meshes are described by faces with 2 points, so can be used in combination
|
|
||||||
with 2D meshes converted with ccm26ToFoam.
|
|
||||||
* New couplePatches functionality integrated into createPatch, which
|
|
||||||
optionally synchronises ("couples") points and faces of coupled (cyclic,
|
|
||||||
processor) patches.
|
|
||||||
* New applyBoundaryLayer pre-processing utility to apply 1/7th power-law
|
|
||||||
boundary layers at walls, starting from uniform or potential flow
|
|
||||||
solutions.
|
|
||||||
* New execFlowFunctionObjects utility executes functionObjects as a
|
|
||||||
post-processing activity, e.g. probes, sampling, force calculation.
|
|
||||||
* New changeDictionary utility makes batch changes to OpenFOAM input files,
|
|
||||||
e.g. to change boundary conditions of field files.
|
|
||||||
* New foamCalc utility, a generic post-processing field calculator tool
|
|
||||||
* New molConfig pre-processing utility for molecular dynamics cases. Fills
|
|
||||||
zones of a mesh with single crystal lattices of specified structure,
|
|
||||||
density, orientation, alignment and temperature.
|
|
||||||
* Extended splitMeshRegions utility to split multi-zone meshes, e.g. defined
|
|
||||||
through cellZones, into separate meshes.
|
|
||||||
* Extended the foamToVTK, decomposePar, reconstructPar and mapFields
|
|
||||||
utilities to include support for multiple particle clouds in parallel
|
|
||||||
processing.
|
|
||||||
|
|
||||||
7 Migration from ParaView 2.4 to ParaView 3.x
|
|
||||||
|
|
||||||
* Rewritten OpenFOAM Reader Module for version 3, a major redesign of
|
|
||||||
ParaView.
|
|
||||||
* New features include viewing patch names, reading of Lagrangian data,
|
|
||||||
handling of cell, face and point sets, multiple views.
|
|
||||||
|
|
||||||
8 Model development
|
|
||||||
|
|
||||||
* Overhauled the lagrangian library to support multiple clouds.
|
|
||||||
* New lagrangianIntermediate library incorporating a hierarchy of parcel and
|
|
||||||
cloud types, accommodating kinematic, thermodynamic and reacting
|
|
||||||
applications, including coupling to the new radiation library. Sub-models
|
|
||||||
are added at the relevant level of physics, e.g.:
|
|
||||||
+ kinematic: injection, wall interaction, drag, dispersion;
|
|
||||||
+ thermo: heat transfer;
|
|
||||||
+ reacting: reacting composition, mass transfer, surface reactions.
|
|
||||||
* New single rotating frame of reference (SRF) library for rotating flow
|
|
||||||
applications, e.g. turbo-machinery.
|
|
||||||
* New radiation library including the P1 model and associated Marshak
|
|
||||||
boundary conditions for incident radiation.
|
|
||||||
* New displacementInterpolation motion solver for flexible mesh scaling.
|
|
||||||
* New molecularDynamics Lagrangian library to calculate intermolecular
|
|
||||||
forces between spherically symmetrical monatomic species in arbitrary
|
|
||||||
geometries.
|
|
||||||
|
|
||||||
9 New functionObjects
|
|
||||||
|
|
||||||
To aid common monitoring and post-processing activities.
|
|
||||||
|
|
||||||
* forces: calculate the force and moment on a patch or set of patches, e.g.
|
|
||||||
to calculate the lift, drag and moment of an object in the flow.
|
|
||||||
* forceCoeffs: calculate the normalised force and moment on a patch or set
|
|
||||||
of patches, e.g. to calculate the lift, drag and moment coefficients of an
|
|
||||||
object in the flow.
|
|
||||||
* fieldAverage: calculate field arithmetic mean and prime-squared averages
|
|
||||||
for a list of fields.
|
|
||||||
* foamCalcFunctions: calculate field components, div, mag, magGrad or
|
|
||||||
magSqr.
|
|
||||||
|
|
||||||
10 Improvements to boundary conditions
|
|
||||||
|
|
||||||
* Generalised jumpCyclic type: cyclic condition with an additional
|
|
||||||
prescribed jump in value.
|
|
||||||
* fan type: specialisation of jumpCyclic, applying a prescribed jump in
|
|
||||||
pressure to simulate a fan within a mesh.
|
|
||||||
* Generalised advective outflow boundary condition based on solving D/Dt
|
|
||||||
(psi, U) = 0 at the boundary.
|
|
||||||
* Additional turbulent flow inlet to specify mixing length and frequency.
|
|
||||||
* Generalisation of time varying set of boundary conditions.
|
|
||||||
|
|
||||||
11 Other
|
|
||||||
|
|
||||||
* New argument-free command execution, e.g typing "icoFoam" without root and
|
|
||||||
case directory arguments.
|
|
||||||
* Extended time command line options.
|
|
||||||
* Many enhancements to dictionary including macro substitution, optional
|
|
||||||
merging and default/overwrite behaviour, enhanced "#include" file handling
|
|
||||||
and the framework to support function evaluation.
|
|
||||||
* Cross-links between applications and Doxygen documentation with the "-doc"
|
|
||||||
argument.
|
|
||||||
* Non-blocking, non-buffered, parallel transfers with potential scaling
|
|
||||||
benefits for larger number of processors.
|
|
||||||
|
|
||||||
Date: 07 October 2008
|
|
||||||
|
|
||||||
HTML generated by org-mode 6.06b in emacs 23
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
( cd solvers && wmake all )
|
wmake all solvers
|
||||||
( cd utilities && wmake all )
|
wmake all utilities
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -117,7 +117,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
|||||||
{
|
{
|
||||||
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
||||||
|
|
||||||
return rho_*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
|
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
|||||||
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
|
||||||
|
|
||||||
return
|
return
|
||||||
rho_*mag(U_)*(U_ & CT_ & U_)
|
(0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
|
||||||
+ Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
|
+ Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude
|
-I$(LIB_SRC)/sampling/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -37,8 +37,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "makeGraph.H"
|
#include "makeGraph.H"
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
channelFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/channelFoam
|
||||||
@ -1,9 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/sampling/lnInclude
|
-I$(LIB_SRC)/sampling/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
oodles
|
channelFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Incompressible LES solver for flow in a channel.
|
Incompressible LES solver for flow in a channel.
|
||||||
@ -31,8 +31,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "incompressible/LESModel/LESModel.H"
|
#include "LESModel.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
@ -1,3 +0,0 @@
|
|||||||
channelOodles.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/channelOodles
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
|
||||||
-I$(LIB_SRC)/transportModels \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
|
||||||
-I../oodles
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lincompressibleLESModels \
|
|
||||||
-lincompressibleTransportModels \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lmeshTools
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
icoDyMFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/icoDyMFoam
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-ldynamicFvMesh \
|
|
||||||
-ldynamicMesh \
|
|
||||||
-lmeshTools \
|
|
||||||
-lfiniteVolume
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
fvVectorMatrix UEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(U)
|
|
||||||
+ fvm::div(phi, U)
|
|
||||||
- fvm::laplacian(nu, U)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (ocorr != nOuterCorr-1)
|
|
||||||
{
|
|
||||||
UEqn.relax();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (momentumPredictor)
|
|
||||||
{
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
scalar newTotalVolume = sum(mesh.V());
|
|
||||||
scalar totalVolRatio = newTotalVolume/totalVolume;
|
|
||||||
|
|
||||||
Info << "Total volume change: " << totalVolRatio - 1 << endl;
|
|
||||||
|
|
||||||
totalVolume = newTotalVolume;
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
Info<< "Reading transportProperties\n" << endl;
|
|
||||||
|
|
||||||
IOdictionary transportProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"transportProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar nu
|
|
||||||
(
|
|
||||||
transportProperties.lookup("nu")
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field p\n" << endl;
|
|
||||||
volScalarField p
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"p",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "createPhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field rAU if present\n" << endl;
|
|
||||||
volScalarField rAU
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rAU",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
runTime.deltaT(),
|
|
||||||
zeroGradientFvPatchScalarField::typeName
|
|
||||||
);
|
|
||||||
@ -1,6 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
oodles.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/oodles
|
|
||||||
@ -1,128 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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 2 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, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Application
|
|
||||||
oodles
|
|
||||||
|
|
||||||
Description
|
|
||||||
Incompressible LES solver.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
|
||||||
#include "incompressible/transportModel/transportModel.H"
|
|
||||||
#include "incompressible/LESModel/LESModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
#include "setRootCase.H"
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createMeshNoClear.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
for (runTime++; !runTime.end(); runTime++)
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "CourantNo.H"
|
|
||||||
|
|
||||||
sgsModel->correct();
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(U)
|
|
||||||
+ fvm::div(phi, U)
|
|
||||||
+ sgsModel->divDevBeff(U)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Optionally ensure diagonal-dominance of the momentum matrix
|
|
||||||
UEqn.relax();
|
|
||||||
|
|
||||||
if (momentumPredictor)
|
|
||||||
{
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- PISO loop
|
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
|
||||||
{
|
|
||||||
volScalarField rUA = 1.0/UEqn.A();
|
|
||||||
|
|
||||||
U = rUA*UEqn.H();
|
|
||||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
|
||||||
+ fvc::ddtPhiCorr(rUA, U, phi);
|
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rUA, p) == fvc::div(phi)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
|
|
||||||
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqn.solve(mesh.solver(p.name()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
phi -= pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
pimpleDyMFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/pimpleDyMFoam
|
||||||
@ -2,14 +2,16 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lincompressibleRASModels \
|
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
@ -37,9 +37,9 @@
|
|||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field rAU if present\n" << endl;
|
Info<< "Reading field rAU if present\n" << endl;
|
||||||
@ -23,15 +23,19 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
icoDyMFoam
|
turbDyMFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient solver for incompressible, laminar flow of Newtonian fluids
|
Transient solver for incompressible, flow of Newtonian fluids
|
||||||
with moving mesh.
|
on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm.
|
||||||
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "singlePhaseTransportModel.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -83,8 +87,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// --- PIMPLE loop
|
// --- PIMPLE loop
|
||||||
for (int ocorr=0; ocorr<nOuterCorr; ocorr++)
|
for (int ocorr=0; ocorr<nOuterCorr; ocorr++)
|
||||||
|
{
|
||||||
|
if (nOuterCorr != 1)
|
||||||
{
|
{
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
}
|
||||||
|
|
||||||
# include "UEqn.H"
|
# include "UEqn.H"
|
||||||
|
|
||||||
@ -112,7 +119,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
if
|
||||||
|
(
|
||||||
|
ocorr == nOuterCorr-1
|
||||||
|
&& corr == nCorr-1
|
||||||
|
&& nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||||
}
|
}
|
||||||
@ -143,6 +154,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
@ -1,10 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleRASModels \
|
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -36,7 +36,7 @@ setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
|||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -26,14 +26,16 @@ Application
|
|||||||
pimpleFoam
|
pimpleFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Large time-step transient solver for incompressible, turbulent flow using
|
Large time-step transient solver for incompressible, flow using the PIMPLE
|
||||||
the PIMPLE (merged PISO-SIMPLE) algorithm.
|
(merged PISO-SIMPLE) algorithm.
|
||||||
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,14 +60,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
|
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||||
|
{
|
||||||
if (nOuterCorr != 1)
|
if (nOuterCorr != 1)
|
||||||
{
|
{
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
|
||||||
{
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
|
|||||||
3
applications/solvers/incompressible/pisoFoam/Make/files
Normal file
3
applications/solvers/incompressible/pisoFoam/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
pisoFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/pisoFoam
|
||||||
@ -1,10 +1,12 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleRASModels \
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
@ -12,7 +12,6 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
@ -37,7 +36,7 @@
|
|||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
autoPtr<incompressible::LESModel> sgsModel
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::LESModel::New(U, phi, laminarTransport)
|
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||||
);
|
);
|
||||||
@ -26,13 +26,15 @@ Application
|
|||||||
turbFoam
|
turbFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient solver for incompressible, turbulent flow.
|
Transient solver for incompressible flow.
|
||||||
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -1,7 +1,9 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||||
-I$(LIB_SRC)/transportModels
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleRASModels \
|
-lincompressibleRASModels \
|
||||||
|
|||||||
@ -31,8 +31,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "RASModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
turbDyMFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/turbDyMFoam
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
wordList pcorrTypes(p.boundaryField().types());
|
|
||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
|
||||||
{
|
|
||||||
if(p.boundaryField()[i].fixesValue())
|
|
||||||
{
|
|
||||||
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField pcorr
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"pcorr",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("pcorr", p.dimensions(), 0.0),
|
|
||||||
pcorrTypes
|
|
||||||
);
|
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pcorrEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rAU, pcorr) == fvc::div(phi)
|
|
||||||
);
|
|
||||||
|
|
||||||
pcorrEqn.setReference(pRefCell, pRefValue);
|
|
||||||
pcorrEqn.solve();
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
phi -= pcorrEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
# include "readTimeControls.H"
|
|
||||||
# include "readPISOControls.H"
|
|
||||||
|
|
||||||
bool correctPhi = false;
|
|
||||||
if (piso.found("correctPhi"))
|
|
||||||
{
|
|
||||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool checkMeshCourantNo = false;
|
|
||||||
if (piso.found("checkMeshCourantNo"))
|
|
||||||
{
|
|
||||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
|
||||||
}
|
|
||||||
@ -1,163 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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 2 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, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Application
|
|
||||||
turbDyMFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Transient solver for incompressible, turbulent flow of Newtonian fluids
|
|
||||||
with moving mesh.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
|
||||||
#include "dynamicFvMesh.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
|
||||||
|
|
||||||
# include "createTime.H"
|
|
||||||
# include "createDynamicFvMesh.H"
|
|
||||||
# include "readPISOControls.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "readTimeControls.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
while (runTime.run())
|
|
||||||
{
|
|
||||||
# include "readControls.H"
|
|
||||||
# include "CourantNo.H"
|
|
||||||
|
|
||||||
p.storePrevIter();
|
|
||||||
|
|
||||||
// Make the fluxes absolute
|
|
||||||
fvc::makeAbsolute(phi, U);
|
|
||||||
|
|
||||||
# include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
bool meshChanged = mesh.update();
|
|
||||||
|
|
||||||
if (correctPhi && meshChanged)
|
|
||||||
{
|
|
||||||
# include "correctPhi.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
|
||||||
fvc::makeRelative(phi, U);
|
|
||||||
|
|
||||||
if (meshChanged && checkMeshCourantNo)
|
|
||||||
{
|
|
||||||
# include "meshCourantNo.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- PIMPLE loop
|
|
||||||
for (int ocorr=0; ocorr<nOuterCorr; ocorr++)
|
|
||||||
{
|
|
||||||
# include "UEqn.H"
|
|
||||||
|
|
||||||
// --- PISO loop
|
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
|
||||||
{
|
|
||||||
rAU = 1.0/UEqn.A();
|
|
||||||
|
|
||||||
U = rAU*UEqn.H();
|
|
||||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
|
||||||
//+ fvc::ddtPhiCorr(rAU, U, phi);
|
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
|
|
||||||
if
|
|
||||||
(
|
|
||||||
ocorr == nOuterCorr-1
|
|
||||||
&& corr == nCorr-1
|
|
||||||
&& nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqn.solve(mesh.solver(p.name()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
phi -= pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
|
||||||
if (ocorr != nOuterCorr-1)
|
|
||||||
{
|
|
||||||
p.relax();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
|
||||||
fvc::makeRelative(phi, U);
|
|
||||||
|
|
||||||
U -= rAU*fvc::grad(p);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
turbFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/turbFoam
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
Info<< "Reading field p\n" << endl;
|
|
||||||
volScalarField p
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"p",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "createPhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
|
||||||
);
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
cavitatingFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/cavitatingFoam
|
||||||
@ -3,12 +3,12 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
|
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lincompressibleRASModels \
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lbarotropicCompressibilityModel
|
-lbarotropicCompressibilityModel
|
||||||
|
|
||||||
@ -14,6 +14,8 @@
|
|||||||
- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
if (momentumPredictor)
|
if (momentumPredictor)
|
||||||
{
|
{
|
||||||
solve(UEqn == -fvc::grad(p));
|
solve(UEqn == -fvc::grad(p));
|
||||||
@ -23,17 +23,19 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
rasCavitatingFoam
|
cavitatingFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient cavitation code with RAS turbulence.
|
Transient cavitation code based on the barotropic equation of state.
|
||||||
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "barotropicCompressibilityModel.H"
|
#include "barotropicCompressibilityModel.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -78,8 +78,8 @@
|
|||||||
|
|
||||||
twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
||||||
|
|
||||||
// Create RAS turbulence model
|
// Create incompressible turbulence model
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::RASModel::New(U, phiv, twoPhaseProperties)
|
incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties)
|
||||||
);
|
);
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
compressibleInterDyMFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/compressibleInterDyMFoam
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam
|
||||||
|
|
||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-linterfaceProperties \
|
||||||
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-ldynamicMesh \
|
||||||
|
-lmeshTools \
|
||||||
|
-ldynamicFvMesh
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
surfaceScalarField muf =
|
surfaceScalarField muf =
|
||||||
twoPhaseProperties.muf()
|
twoPhaseProperties.muf()
|
||||||
+ fvc::interpolate(rho*turbulence->nuSgs());
|
+ fvc::interpolate(rho*turbulence->nut());
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
@ -11,6 +11,8 @@
|
|||||||
//- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T())))
|
//- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T())))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
if (momentumPredictor)
|
if (momentumPredictor)
|
||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
@ -10,7 +10,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField phic = mag(phi/mesh.magSf());
|
surfaceScalarField phic = mag(phi/mesh.magSf());
|
||||||
phic = min(interface.cGamma()*phic, max(phic));
|
phic = min(interface.cAlpha()*phic, max(phic));
|
||||||
|
|
||||||
volScalarField divU = fvc::div(phi);
|
volScalarField divU = fvc::div(phi);
|
||||||
|
|
||||||
@ -23,23 +23,25 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
rasInterFoam
|
compressibleLesInterFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for 2 incompressible, isothermal immiscible fluids using a VOF
|
Solver for 2 compressible, isothermal immiscible fluids using a VOF
|
||||||
(volume of fluid) phase-fraction based interface capturing approach.
|
(volume of fluid) phase-fraction based interface capturing approach.
|
||||||
The momentum and other fluid properties are of the "mixture" and a single
|
The momentum and other fluid properties are of the "mixture" and a single
|
||||||
momentum equation is solved. Turbulence is modelled using a run-time
|
momentum equation is solved.
|
||||||
selectable incompressible RAS model.
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
#include "MULES.H"
|
#include "MULES.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "interfaceProperties.H"
|
#include "interfaceProperties.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -47,32 +49,67 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createDynamicFvMesh.H"
|
||||||
#include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
#include "readPISOControls.H"
|
#include "readControls.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "correctPhi.H"
|
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readPISOControls.H"
|
#include "readControls.H"
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
|
// Make the fluxes absolute
|
||||||
|
fvc::makeAbsolute(phi, U);
|
||||||
|
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "gammaEqnSubCycle.H"
|
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||||
|
|
||||||
|
// Do any mesh changes
|
||||||
|
mesh.update();
|
||||||
|
|
||||||
|
if (mesh.changing())
|
||||||
|
{
|
||||||
|
Info<< "Execution time for mesh.update() = "
|
||||||
|
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||||
|
<< " s" << endl;
|
||||||
|
|
||||||
|
gh = g & mesh.C();
|
||||||
|
ghf = g & mesh.Cf();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mesh.changing() && correctPhi)
|
||||||
|
{
|
||||||
|
//***HGW#include "correctPhi.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
|
||||||
|
if (mesh.changing() && checkMeshCourantNo)
|
||||||
|
{
|
||||||
|
#include "meshCourantNo.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
// --- Outer-corrector loop
|
||||||
|
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||||
|
{
|
||||||
|
#include "alphaEqnsSubCycle.H"
|
||||||
|
|
||||||
|
solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
@ -81,18 +118,15 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
rho = alpha1*rho1 + alpha2*rho2;
|
||||||
|
|
||||||
p = pd + rho*gh;
|
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = "
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< runTime.elapsedCpuTime()
|
||||||
<< nl << endl;
|
<< " s\n\n" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
@ -145,8 +145,8 @@
|
|||||||
// Construct interface from alpha1 distribution
|
// Construct interface from alpha1 distribution
|
||||||
interfaceProperties interface(alpha1, U, twoPhaseProperties);
|
interfaceProperties interface(alpha1, U, twoPhaseProperties);
|
||||||
|
|
||||||
// Construct LES model
|
// Construct incompressible turbulence model
|
||||||
autoPtr<incompressible::LESModel> turbulence
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::LESModel::New(U, phi, twoPhaseProperties)
|
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||||
);
|
);
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
|
surfaceScalarField rUAf = fvc::interpolate(rUA);
|
||||||
|
|
||||||
|
tmp<fvScalarMatrix> pdEqnComp;
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
pdEqnComp =
|
||||||
|
(fvm::ddt(pd) + fvm::div(phi, pd) - fvm::Sp(fvc::div(phi), pd));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pdEqnComp =
|
||||||
|
(fvm::ddt(pd) + fvc::div(phi, pd) - fvc::Sp(fvc::div(phi), pd));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
U = rUA*UEqn.H();
|
||||||
|
|
||||||
|
surfaceScalarField phiU
|
||||||
|
(
|
||||||
|
"phiU",
|
||||||
|
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
phi = phiU +
|
||||||
|
(
|
||||||
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
|
- ghf*fvc::snGrad(rho)
|
||||||
|
)*rUAf*mesh.magSf();
|
||||||
|
|
||||||
|
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pdEqnIncomp
|
||||||
|
(
|
||||||
|
fvc::div(phi)
|
||||||
|
- fvm::laplacian(rUAf, pd)
|
||||||
|
);
|
||||||
|
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
(
|
||||||
|
max(alpha1, scalar(0))*(psi1/rho1)
|
||||||
|
+ max(alpha2, scalar(0))*(psi2/rho2)
|
||||||
|
)
|
||||||
|
*pdEqnComp()
|
||||||
|
+ pdEqnIncomp
|
||||||
|
);
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
dgdt =
|
||||||
|
(pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1))
|
||||||
|
*(pdEqnComp & pd);
|
||||||
|
phi += pdEqnIncomp.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
p = max
|
||||||
|
(
|
||||||
|
(pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)),
|
||||||
|
pMin
|
||||||
|
);
|
||||||
|
|
||||||
|
rho1 = rho10 + psi1*p;
|
||||||
|
rho2 = rho20 + psi2*p;
|
||||||
|
|
||||||
|
Info<< "max(U) " << max(mag(U)).value() << endl;
|
||||||
|
Info<< "min(pd) " << min(pd).value() << endl;
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phi, U);
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
#include "readPISOControls.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
|
label nAlphaCorr
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaCorr"))
|
||||||
|
);
|
||||||
|
|
||||||
|
label nAlphaSubCycles
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaSubCycles"))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (nAlphaSubCycles > 1 && nOuterCorr != 1)
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Sub-cycling alpha is only allowed for PISO, "
|
||||||
|
"i.e. when the number of outer-correctors = 1"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool correctPhi = true;
|
||||||
|
if (piso.found("correctPhi"))
|
||||||
|
{
|
||||||
|
correctPhi = Switch(piso.lookup("correctPhi"));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool checkMeshCourantNo = false;
|
||||||
|
if (piso.found("checkMeshCourantNo"))
|
||||||
|
{
|
||||||
|
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
compressibleInterFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/compressibleInterFoam
|
||||||
@ -4,12 +4,12 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
-lincompressibleLESModels \
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
@ -14,6 +14,8 @@
|
|||||||
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
if (momentumPredictor)
|
if (momentumPredictor)
|
||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
@ -23,7 +25,7 @@
|
|||||||
fvc::reconstruct
|
fvc::reconstruct
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
- fvc::snGrad(pd)
|
- fvc::snGrad(pd)
|
||||||
) * mesh.magSf()
|
) * mesh.magSf()
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
word alphaScheme("div(phi,alpha)");
|
||||||
|
word alpharScheme("div(phirb,alpha)");
|
||||||
|
|
||||||
|
surfaceScalarField phir = phic*interface.nHatf();
|
||||||
|
|
||||||
|
for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
|
||||||
|
{
|
||||||
|
volScalarField::DimensionedInternalField Sp
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Sp",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField::DimensionedInternalField Su
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Su",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
// Divergence term is handled explicitly to be
|
||||||
|
// consistent with the explicit transport solution
|
||||||
|
divU*min(alpha1, scalar(1))
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(dgdt, celli)
|
||||||
|
{
|
||||||
|
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
|
||||||
|
{
|
||||||
|
Sp[celli] -= dgdt[celli]*alpha1[celli];
|
||||||
|
Su[celli] += dgdt[celli]*alpha1[celli];
|
||||||
|
}
|
||||||
|
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
|
||||||
|
{
|
||||||
|
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
surfaceScalarField phiAlpha1 =
|
||||||
|
fvc::flux
|
||||||
|
(
|
||||||
|
phi,
|
||||||
|
alpha1,
|
||||||
|
alphaScheme
|
||||||
|
)
|
||||||
|
+ fvc::flux
|
||||||
|
(
|
||||||
|
-fvc::flux(-phir, alpha2, alpharScheme),
|
||||||
|
alpha1,
|
||||||
|
alpharScheme
|
||||||
|
);
|
||||||
|
|
||||||
|
MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0);
|
||||||
|
|
||||||
|
surfaceScalarField rho1f = fvc::interpolate(rho1);
|
||||||
|
surfaceScalarField rho2f = fvc::interpolate(rho2);
|
||||||
|
rhoPhi = phiAlpha1*(rho1f - rho2f) + phi*rho2f;
|
||||||
|
|
||||||
|
alpha2 = scalar(1) - alpha1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Liquid phase volume fraction = "
|
||||||
|
<< alpha1.weightedAverage(mesh.V()).value()
|
||||||
|
<< " Min(alpha1) = " << min(alpha1).value()
|
||||||
|
<< " Min(alpha2) = " << min(alpha2).value()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
label nAlphaCorr
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaCorr"))
|
||||||
|
);
|
||||||
|
|
||||||
|
label nAlphaSubCycles
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaSubCycles"))
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceScalarField phic = mag(phi/mesh.magSf());
|
||||||
|
phic = min(interface.cAlpha()*phic, max(phic));
|
||||||
|
|
||||||
|
volScalarField divU = fvc::div(phi);
|
||||||
|
|
||||||
|
if (nAlphaSubCycles > 1)
|
||||||
|
{
|
||||||
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||||
|
surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
||||||
|
!(++alphaSubCycle).end();
|
||||||
|
)
|
||||||
|
{
|
||||||
|
#include "alphaEqns.H"
|
||||||
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
||||||
|
}
|
||||||
|
|
||||||
|
rhoPhi = rhoPhiSum;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#include "alphaEqns.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oCorr == 0)
|
||||||
|
{
|
||||||
|
interface.correct();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,8 +29,9 @@ Description
|
|||||||
Solver for 2 compressible, isothermal immiscible fluids using a VOF
|
Solver for 2 compressible, isothermal immiscible fluids using a VOF
|
||||||
(volume of fluid) phase-fraction based interface capturing approach.
|
(volume of fluid) phase-fraction based interface capturing approach.
|
||||||
The momentum and other fluid properties are of the "mixture" and a single
|
The momentum and other fluid properties are of the "mixture" and a single
|
||||||
momentum equation is solved. Turbulence is modelled using a run-time
|
momentum equation is solved.
|
||||||
selectable incompressible LES model.
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ Description
|
|||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "interfaceProperties.H"
|
#include "interfaceProperties.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "incompressible/LESModel/LESModel.H"
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -69,8 +70,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
// --- Outer-corrector loop
|
// --- Outer-corrector loop
|
||||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||||
{
|
{
|
||||||
@ -89,6 +88,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
rho = alpha1*rho1 + alpha2*rho2;
|
rho = alpha1*rho1 + alpha2*rho2;
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = "
|
Info<< "ExecutionTime = "
|
||||||
@ -0,0 +1,152 @@
|
|||||||
|
Info<< "Reading field pd\n" << endl;
|
||||||
|
volScalarField pd
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"pd",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading field alpha1\n" << endl;
|
||||||
|
volScalarField alpha1
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"alpha1",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Calculating field alpha1\n" << endl;
|
||||||
|
volScalarField alpha2("alpha2", scalar(1) - alpha1);
|
||||||
|
|
||||||
|
Info<< "Reading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "createPhi.H"
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Calculating field g.h\n" << endl;
|
||||||
|
volScalarField gh("gh", g & mesh.C());
|
||||||
|
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
|
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||||
|
|
||||||
|
dimensionedScalar rho10
|
||||||
|
(
|
||||||
|
twoPhaseProperties.subDict
|
||||||
|
(
|
||||||
|
twoPhaseProperties.phase1Name()
|
||||||
|
).lookup("rho0")
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar rho20
|
||||||
|
(
|
||||||
|
twoPhaseProperties.subDict
|
||||||
|
(
|
||||||
|
twoPhaseProperties.phase2Name()
|
||||||
|
).lookup("rho0")
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar psi1
|
||||||
|
(
|
||||||
|
twoPhaseProperties.subDict
|
||||||
|
(
|
||||||
|
twoPhaseProperties.phase1Name()
|
||||||
|
).lookup("psi")
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar psi2
|
||||||
|
(
|
||||||
|
twoPhaseProperties.subDict
|
||||||
|
(
|
||||||
|
twoPhaseProperties.phase2Name()
|
||||||
|
).lookup("psi")
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar pMin(twoPhaseProperties.lookup("pMin"));
|
||||||
|
|
||||||
|
volScalarField p
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"p",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
max
|
||||||
|
(
|
||||||
|
(pd + gh*(alpha1*rho10 + alpha2*rho20))
|
||||||
|
/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)),
|
||||||
|
pMin
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField rho1 = rho10 + psi1*p;
|
||||||
|
volScalarField rho2 = rho20 + psi2*p;
|
||||||
|
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
alpha1*rho1 + alpha2*rho2
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Mass flux
|
||||||
|
// Initialisation does not matter because rhoPhi is reset after the
|
||||||
|
// alpha1 solution before it is used in the U equation.
|
||||||
|
surfaceScalarField rhoPhi
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho*phi",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
fvc::interpolate(rho)*phi
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField dgdt =
|
||||||
|
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001));
|
||||||
|
|
||||||
|
// Construct interface from alpha1 distribution
|
||||||
|
interfaceProperties interface(alpha1, U, twoPhaseProperties);
|
||||||
|
|
||||||
|
// Construct incompressible turbulence model
|
||||||
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||||
|
);
|
||||||
@ -1,3 +0,0 @@
|
|||||||
compressibleLesInterFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/compressibleLesInterFoam
|
|
||||||
@ -1,11 +1,9 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../rasInterFoam \
|
|
||||||
-I../interFoam \
|
-I../interFoam \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
@ -16,6 +14,7 @@ EXE_LIBS = \
|
|||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lincompressibleRASModels \
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
|||||||
@ -12,12 +12,12 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field gamma\n" << endl;
|
Info<< "Reading field alpha1\n" << endl;
|
||||||
volScalarField gamma
|
volScalarField alpha1
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"gamma",
|
"alpha1",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
|
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||||
|
|
||||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||||
@ -60,15 +60,15 @@
|
|||||||
mesh,
|
mesh,
|
||||||
IOobject::READ_IF_PRESENT
|
IOobject::READ_IF_PRESENT
|
||||||
),
|
),
|
||||||
gamma*rho1 + (scalar(1) - gamma)*rho2,
|
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
|
||||||
gamma.boundaryField().types()
|
alpha1.boundaryField().types()
|
||||||
);
|
);
|
||||||
rho.oldTime();
|
rho.oldTime();
|
||||||
|
|
||||||
|
|
||||||
// Mass flux
|
// Mass flux
|
||||||
// Initialisation does not matter because rhoPhi is reset after the
|
// Initialisation does not matter because rhoPhi is reset after the
|
||||||
// gamma solution before it is used in the U equation.
|
// alpha1 solution before it is used in the U equation.
|
||||||
surfaceScalarField rhoPhi
|
surfaceScalarField rhoPhi
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -83,13 +83,13 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Construct interface from gamma distribution
|
// Construct interface from alpha1 distribution
|
||||||
interfaceProperties interface(gamma, U, twoPhaseProperties);
|
interfaceProperties interface(alpha1, U, twoPhaseProperties);
|
||||||
|
|
||||||
// Construct incompressible RAS model
|
// Construct incompressible turbulence model
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
incompressible::RASModel::New(U, phi, twoPhaseProperties)
|
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||||
);
|
);
|
||||||
|
|
||||||
wordList pcorrTypes(pd.boundaryField().types());
|
wordList pcorrTypes(pd.boundaryField().types());
|
||||||
|
|||||||
@ -39,7 +39,7 @@ Description
|
|||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "interfaceProperties.H"
|
#include "interfaceProperties.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "incompressible/RASModel/RASModel.H"
|
#include "turbulenceModel.H"
|
||||||
#include "probes.H"
|
#include "probes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -58,8 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
@ -106,7 +105,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
twoPhaseProperties.correct();
|
twoPhaseProperties.correct();
|
||||||
|
|
||||||
#include "gammaEqnSubCycle.H"
|
#include "alphaEqnSubCycle.H"
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
phi = phiU +
|
phi = phiU +
|
||||||
(
|
(
|
||||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
)*rAUf*mesh.magSf();
|
)*rAUf*mesh.magSf();
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,12 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
surfaceScalarField gammaf = fvc::interpolate(gamma);
|
surfaceScalarField alpha1f = fvc::interpolate(alpha1);
|
||||||
surfaceScalarField UBlendingFactor
|
surfaceScalarField UBlendingFactor
|
||||||
(
|
(
|
||||||
"UBlendingFactor",
|
"UBlendingFactor",
|
||||||
sqrt(max(min(4*gammaf*(1.0 - gammaf), 1.0), 0.0))
|
sqrt(max(min(4*alpha1f*(1.0 - alpha1f), 1.0), 0.0))
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,14 +1,21 @@
|
|||||||
surfaceScalarField muf = twoPhaseProperties.muf();
|
surfaceScalarField muEff
|
||||||
|
(
|
||||||
|
"muEff",
|
||||||
|
twoPhaseProperties.muf()
|
||||||
|
+ fvc::interpolate(rho*turbulence->nut())
|
||||||
|
);
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::laplacian(muf, U)
|
- fvm::laplacian(muEff, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muf))
|
- (fvc::grad(U) & fvc::grad(muEff))
|
||||||
//- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
if (momentumPredictor)
|
if (momentumPredictor)
|
||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
@ -18,7 +25,7 @@
|
|||||||
fvc::reconstruct
|
fvc::reconstruct
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
- fvc::snGrad(pd)
|
- fvc::snGrad(pd)
|
||||||
) * mesh.magSf()
|
) * mesh.magSf()
|
||||||
|
|||||||
35
applications/solvers/multiphase/interFoam/alphaEqn.H
Normal file
35
applications/solvers/multiphase/interFoam/alphaEqn.H
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
word alphaScheme("div(phi,alpha)");
|
||||||
|
word alpharScheme("div(phirb,alpha)");
|
||||||
|
|
||||||
|
surfaceScalarField phic = mag(phi/mesh.magSf());
|
||||||
|
phic = min(interface.cAlpha()*phic, max(phic));
|
||||||
|
surfaceScalarField phir = phic*interface.nHatf();
|
||||||
|
|
||||||
|
for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
|
||||||
|
{
|
||||||
|
surfaceScalarField phiAlpha =
|
||||||
|
fvc::flux
|
||||||
|
(
|
||||||
|
phi,
|
||||||
|
alpha1,
|
||||||
|
alphaScheme
|
||||||
|
)
|
||||||
|
+ fvc::flux
|
||||||
|
(
|
||||||
|
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||||
|
alpha1,
|
||||||
|
alpharScheme
|
||||||
|
);
|
||||||
|
|
||||||
|
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||||
|
|
||||||
|
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Liquid phase volume fraction = "
|
||||||
|
<< alpha1.weightedAverage(mesh.V()).value()
|
||||||
|
<< " Min(alpha1) = " << min(alpha1).value()
|
||||||
|
<< " Max(alpha1) = " << max(alpha1).value()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
35
applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H
Normal file
35
applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
label nAlphaCorr
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaCorr"))
|
||||||
|
);
|
||||||
|
|
||||||
|
label nAlphaSubCycles
|
||||||
|
(
|
||||||
|
readLabel(piso.lookup("nAlphaSubCycles"))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (nAlphaSubCycles > 1)
|
||||||
|
{
|
||||||
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||||
|
surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
||||||
|
!(++alphaSubCycle).end();
|
||||||
|
)
|
||||||
|
{
|
||||||
|
# include "alphaEqn.H"
|
||||||
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
||||||
|
}
|
||||||
|
|
||||||
|
rhoPhi = rhoPhiSum;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# include "alphaEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
interface.correct();
|
||||||
|
|
||||||
|
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
|
||||||
@ -12,12 +12,12 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field gamma\n" << endl;
|
Info<< "Reading field alpha1\n" << endl;
|
||||||
volScalarField gamma
|
volScalarField alpha1
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"gamma",
|
"alpha1",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
|
twoPhaseMixture twoPhaseProperties(U, phi);
|
||||||
|
|
||||||
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
|
||||||
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
|
||||||
@ -60,15 +60,15 @@
|
|||||||
mesh,
|
mesh,
|
||||||
IOobject::READ_IF_PRESENT
|
IOobject::READ_IF_PRESENT
|
||||||
),
|
),
|
||||||
gamma*rho1 + (scalar(1) - gamma)*rho2,
|
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
|
||||||
gamma.boundaryField().types()
|
alpha1.boundaryField().types()
|
||||||
);
|
);
|
||||||
rho.oldTime();
|
rho.oldTime();
|
||||||
|
|
||||||
|
|
||||||
// Mass flux
|
// Mass flux
|
||||||
// Initialisation does not matter because rhoPhi is reset after the
|
// Initialisation does not matter because rhoPhi is reset after the
|
||||||
// gamma solution before it is used in the U equation.
|
// alpha1 solution before it is used in the U equation.
|
||||||
surfaceScalarField rhoPhi
|
surfaceScalarField rhoPhi
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -107,5 +107,12 @@
|
|||||||
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
|
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
|
||||||
|
|
||||||
|
|
||||||
// Construct interface from gamma distribution
|
// Construct interface from alpha1 distribution
|
||||||
interfaceProperties interface(gamma, U, twoPhaseProperties);
|
interfaceProperties interface(alpha1, U, twoPhaseProperties);
|
||||||
|
|
||||||
|
|
||||||
|
// Construct incompressible turbulence model
|
||||||
|
autoPtr<incompressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
|
||||||
|
);
|
||||||
|
|||||||
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
word gammaScheme("div(phi,gamma)");
|
|
||||||
word gammarScheme("div(phirb,gamma)");
|
|
||||||
|
|
||||||
surfaceScalarField phic = mag(phi/mesh.magSf());
|
|
||||||
phic = min(interface.cGamma()*phic, max(phic));
|
|
||||||
surfaceScalarField phir = phic*interface.nHatf();
|
|
||||||
|
|
||||||
for (int gCorr=0; gCorr<nGammaCorr; gCorr++)
|
|
||||||
{
|
|
||||||
surfaceScalarField phiGamma =
|
|
||||||
fvc::flux
|
|
||||||
(
|
|
||||||
phi,
|
|
||||||
gamma,
|
|
||||||
gammaScheme
|
|
||||||
)
|
|
||||||
+ fvc::flux
|
|
||||||
(
|
|
||||||
-fvc::flux(-phir, scalar(1) - gamma, gammarScheme),
|
|
||||||
gamma,
|
|
||||||
gammarScheme
|
|
||||||
);
|
|
||||||
|
|
||||||
MULES::explicitSolve(gamma, phi, phiGamma, 1, 0);
|
|
||||||
|
|
||||||
rhoPhi = phiGamma*(rho1 - rho2) + phi*rho2;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "Liquid phase volume fraction = "
|
|
||||||
<< gamma.weightedAverage(mesh.V()).value()
|
|
||||||
<< " Min(gamma) = " << min(gamma).value()
|
|
||||||
<< " Max(gamma) = " << max(gamma).value()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
label nGammaCorr
|
|
||||||
(
|
|
||||||
readLabel(piso.lookup("nGammaCorr"))
|
|
||||||
);
|
|
||||||
|
|
||||||
label nGammaSubCycles
|
|
||||||
(
|
|
||||||
readLabel(piso.lookup("nGammaSubCycles"))
|
|
||||||
);
|
|
||||||
|
|
||||||
if (nGammaSubCycles > 1)
|
|
||||||
{
|
|
||||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
||||||
surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
|
|
||||||
|
|
||||||
for
|
|
||||||
(
|
|
||||||
subCycle<volScalarField> gammaSubCycle(gamma, nGammaSubCycles);
|
|
||||||
!(++gammaSubCycle).end();
|
|
||||||
)
|
|
||||||
{
|
|
||||||
# include "gammaEqn.H"
|
|
||||||
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
|
||||||
}
|
|
||||||
|
|
||||||
rhoPhi = rhoPhiSum;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
# include "gammaEqn.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
interface.correct();
|
|
||||||
|
|
||||||
rho == gamma*rho1 + (scalar(1) - gamma)*rho2;
|
|
||||||
@ -31,6 +31,8 @@ Description
|
|||||||
The momentum and other fluid properties are of the "mixture" and a single
|
The momentum and other fluid properties are of the "mixture" and a single
|
||||||
momentum equation is solved.
|
momentum equation is solved.
|
||||||
|
|
||||||
|
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||||
|
|
||||||
For a two-fluid approach see twoPhaseEulerFoam.
|
For a two-fluid approach see twoPhaseEulerFoam.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -40,6 +42,7 @@ Description
|
|||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "interfaceProperties.H"
|
#include "interfaceProperties.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -57,7 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -74,7 +77,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
twoPhaseProperties.correct();
|
twoPhaseProperties.correct();
|
||||||
|
|
||||||
#include "gammaEqnSubCycle.H"
|
#include "alphaEqnSubCycle.H"
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
@ -88,6 +91,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
p = pd + rho*gh;
|
p = pd + rho*gh;
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
phi = phiU +
|
phi = phiU +
|
||||||
(
|
(
|
||||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
)*rUAf*mesh.magSf();
|
)*rUAf*mesh.magSf();
|
||||||
|
|
||||||
|
|||||||
@ -2,13 +2,13 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
|
||||||
-IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \
|
-IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
-lincompressibleRASModels \
|
||||||
-lincompressibleLESModels \
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
surfaceScalarField muf =
|
surfaceScalarField muf =
|
||||||
twoPhaseProperties->muf()
|
twoPhaseProperties->muf()
|
||||||
+ fvc::interpolate(rho*turbulence->nuSgs());
|
+ fvc::interpolate(rho*turbulence->nut());
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
@ -23,7 +23,7 @@
|
|||||||
fvc::reconstruct
|
fvc::reconstruct
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
|
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
- fvc::snGrad(pd)
|
- fvc::snGrad(pd)
|
||||||
) * mesh.magSf()
|
) * mesh.magSf()
|
||||||
|
|||||||
@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
word gammaScheme("div(phi,gamma)");
|
word alphaScheme("div(phi,alpha)");
|
||||||
word gammarScheme("div(phirb,gamma)");
|
word alpharScheme("div(phirb,alpha)");
|
||||||
|
|
||||||
surfaceScalarField phir("phir", phic*interface.nHatf());
|
surfaceScalarField phir("phir", phic*interface.nHatf());
|
||||||
|
|
||||||
for (int gCorr=0; gCorr<nGammaCorr; gCorr++)
|
for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
|
||||||
{
|
{
|
||||||
surfaceScalarField phiGamma =
|
surfaceScalarField phiAlpha =
|
||||||
fvc::flux
|
fvc::flux
|
||||||
(
|
(
|
||||||
phi,
|
phi,
|
||||||
gamma,
|
alpha1,
|
||||||
gammaScheme
|
alphaScheme
|
||||||
)
|
)
|
||||||
+ fvc::flux
|
+ fvc::flux
|
||||||
(
|
(
|
||||||
-fvc::flux(-phir, scalar(1) - gamma, gammarScheme),
|
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||||
gamma,
|
alpha1,
|
||||||
gammarScheme
|
alpharScheme
|
||||||
);
|
);
|
||||||
|
|
||||||
Pair<tmp<volScalarField> > vDotAlphal =
|
Pair<tmp<volScalarField> > vDotAlphal =
|
||||||
@ -46,22 +46,22 @@
|
|||||||
),
|
),
|
||||||
// Divergence term is handled explicitly to be
|
// Divergence term is handled explicitly to be
|
||||||
// consistent with the explicit transport solution
|
// consistent with the explicit transport solution
|
||||||
divU*gamma
|
divU*alpha1
|
||||||
+ vDotcAlphal
|
+ vDotcAlphal
|
||||||
);
|
);
|
||||||
|
|
||||||
//MULES::explicitSolve(gamma, phi, phiGamma, 1, 0);
|
//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||||
//MULES::explicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0);
|
//MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);
|
||||||
MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0);
|
MULES::implicitSolve(oneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);
|
||||||
|
|
||||||
rhoPhi +=
|
rhoPhi +=
|
||||||
(runTime.deltaT()/totalDeltaT)
|
(runTime.deltaT()/totalDeltaT)
|
||||||
*(phiGamma*(rho1 - rho2) + phi*rho2);
|
*(phiAlpha*(rho1 - rho2) + phi*rho2);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Liquid phase volume fraction = "
|
Info<< "Liquid phase volume fraction = "
|
||||||
<< gamma.weightedAverage(mesh.V()).value()
|
<< alpha1.weightedAverage(mesh.V()).value()
|
||||||
<< " Min(gamma) = " << min(gamma).value()
|
<< " Min(alpha1) = " << min(alpha1).value()
|
||||||
<< " Max(gamma) = " << max(gamma).value()
|
<< " Max(alpha1) = " << max(alpha1).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user