mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
8
Allwmake
8
Allwmake
@ -5,15 +5,15 @@ set -x
|
||||
# wmake is required for subsequent targets
|
||||
( cd wmake/src && make )
|
||||
|
||||
# build ThirdParty sources
|
||||
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
||||
|
||||
( cd src && ./Allwmake )
|
||||
|
||||
( cd applications && ./Allwmake )
|
||||
src/Allwmake
|
||||
applications/Allwmake
|
||||
|
||||
if [ "$1" = doc ]
|
||||
then
|
||||
( cd doc && ./Allwmake )
|
||||
doc/Allwmake
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------- 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
|
||||
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.
|
||||
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
|
||||
|
||||
@ -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
|
||||
set -x
|
||||
|
||||
( cd solvers && wmake all )
|
||||
( cd utilities && wmake all )
|
||||
wmake all solvers
|
||||
wmake all utilities
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
/* -lcombustionThermophysicalModels */ \
|
||||
-lspecie \
|
||||
-lradiation \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -32,12 +32,12 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -26,14 +26,14 @@ Application
|
||||
kinematicParcelFoam
|
||||
|
||||
Description
|
||||
Transient solver for a single kinematicCloud. Uses precalculated velocity
|
||||
Transient solver for a single kinematicCloud. Uses pre-calculated velocity
|
||||
field to evolve a cloud.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicKinematicCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
||||
#include "createFields.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
|
||||
@ -9,7 +9,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
|
||||
@ -117,7 +117,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
{
|
||||
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");
|
||||
|
||||
return
|
||||
rho_*mag(U_)*(U_ & CT_ & U_)
|
||||
(0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
|
||||
+ Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
basicThermo& thermophysicalModel
|
||||
const basicThermo& thermophysicalModel
|
||||
)
|
||||
:
|
||||
RASModel(typeName, rho, U, phi, thermophysicalModel),
|
||||
|
||||
@ -77,20 +77,19 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- from components
|
||||
//- Construct from components
|
||||
PDRkEpsilon
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
basicThermo& thermophysicalModel
|
||||
const basicThermo& thermophysicalModel
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~PDRkEpsilon()
|
||||
{}
|
||||
virtual ~PDRkEpsilon()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
if(turbulence)
|
||||
{
|
||||
volScalarField divU = fvc::div(Uf & mesh.Sf());
|
||||
|
||||
tmp<volTensorField> tgradU = fvc::grad(Uf);
|
||||
volScalarField G = 2*mut*(tgradU() && dev(symm(tgradU())));
|
||||
tgradU.clear();
|
||||
|
||||
// Add the blockage generation term so that it is included consistently
|
||||
// in both the k and epsilon equations
|
||||
volScalarField GR = rho*mag(U)*(U & CT & U);
|
||||
|
||||
# include "wallFunctions.H"
|
||||
|
||||
// Dissipation equation
|
||||
fvScalarMatrix epsEqn
|
||||
(
|
||||
betav*fvm::ddt(rho, epsilon)
|
||||
+ fvm::div(phi, epsilon)
|
||||
- fvm::laplacian(fvc::interpolate(alphaEps*muEff), epsilon)
|
||||
==
|
||||
C1*(betav*G + GR)*epsilon/k
|
||||
- fvm::SuSp((2.0/3.0*C1)*betav*rho*divU, epsilon)
|
||||
- fvm::Sp(C2*betav*rho*epsilon/k, epsilon)
|
||||
);
|
||||
|
||||
# include "wallDissipation.H"
|
||||
|
||||
epsEqn.solve();
|
||||
bound(epsilon, dimensionedScalar("0", epsilon.dimensions(), 1.0e-15));
|
||||
|
||||
|
||||
// Turbulent kinetic energy equation
|
||||
solve
|
||||
(
|
||||
betav*fvm::ddt(rho, k)
|
||||
+ fvm::div(phi, k)
|
||||
- fvm::laplacian(fvc::interpolate(alphak*muEff), k)
|
||||
==
|
||||
betav*G + GR
|
||||
- fvm::SuSp(2.0/3.0*betav*rho*divU, k)
|
||||
- fvm::Sp(betav*rho*epsilon/k, k)
|
||||
);
|
||||
|
||||
bound(k, dimensionedScalar("0", k.dimensions(), 0.0));
|
||||
|
||||
//- Re-calculate turbulence viscosity
|
||||
mut = Cmu*rho*sqr(k)/epsilon;
|
||||
|
||||
# include "wallViscosity.H"
|
||||
|
||||
}
|
||||
|
||||
muEff = mut + thermo->mu();
|
||||
@ -1,19 +1,20 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels
|
||||
-llaminarFlameSpeedModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -52,7 +52,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hhuCombustionThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
|
||||
@ -48,9 +48,9 @@
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
Xoodles.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/Xoodles
|
||||
@ -1,23 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I../XiFoam
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleLESModels \
|
||||
-llaminarFlameSpeedModels
|
||||
@ -1,122 +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
|
||||
Xoodles
|
||||
|
||||
Description
|
||||
Compressible premixed/partially-premixed combustion solver with large-eddy
|
||||
simulation (LES) turbulence modelling.
|
||||
|
||||
Combusting LES code using the b-Xi two-equation model.
|
||||
Xi may be obtained by either the solution of the Xi transport
|
||||
equation or from an algebraic exression. Both approaches are
|
||||
based on Gulder's flame speed correlation which has been shown
|
||||
to be appropriate for LES by comparison with the results from the
|
||||
spectral model.
|
||||
|
||||
Strain effects are encorporated directly into the Xi equation
|
||||
but not in the algebraic approximation. Further work need to be
|
||||
done on this issue, particularly regarding the enhanced removal rate
|
||||
caused by flame compression. Analysis using results of the spectral
|
||||
model will be required.
|
||||
|
||||
For cases involving very lean Propane flames or other flames which are
|
||||
very strain-sensitive, a transport equation for the laminar flame
|
||||
speed is present. This equation is derived using heuristic arguments
|
||||
involving the strain time scale and the strain-rate at extinction.
|
||||
the transport velocity is the same as that for the Xi equation.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hhuCombustionThermo.H"
|
||||
#include "compressible/LESModel/LESModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "IFstream.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
#define divDevRhoReff divDevRhoBeff
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMeshNoClear.H"
|
||||
#include "readEnvironmentalProperties.H"
|
||||
#include "createFields.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "readCombustionProperties.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
{
|
||||
#include "ftEqn.H"
|
||||
#include "bEqn.H"
|
||||
#include "huEqn.H"
|
||||
#include "hEqn.H"
|
||||
|
||||
if (!ign.ignited())
|
||||
{
|
||||
hu == h;
|
||||
}
|
||||
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
rho = thermo->rho();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,124 +0,0 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<hhuCombustionThermo> thermo
|
||||
(
|
||||
hhuCombustionThermo::New(mesh)
|
||||
);
|
||||
combustionMixture& composition = thermo->composition();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo->rho()
|
||||
);
|
||||
|
||||
volScalarField& p = thermo->p();
|
||||
const volScalarField& psi = thermo->psi();
|
||||
volScalarField& h = thermo->h();
|
||||
volScalarField& hu = thermo->hu();
|
||||
|
||||
volScalarField& b = composition.Y("b");
|
||||
Info<< "min(b) = " << min(b).value() << endl;
|
||||
|
||||
const volScalarField& T = thermo->T();
|
||||
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::LESModel> turbulence
|
||||
(
|
||||
compressible::LESModel::New(rho, U, phi, thermo())
|
||||
);
|
||||
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
Info<< "Creating field Xi\n" << endl;
|
||||
volScalarField Xi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Xi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Creating the unstrained laminar flame speed\n" << endl;
|
||||
autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
|
||||
(
|
||||
laminarFlameSpeed::New(thermo)
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading strained laminar flame speed field Su\n" << endl;
|
||||
volScalarField Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Su",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
dimensionedScalar SuMin = 0.01*Su.average();
|
||||
dimensionedScalar SuMax = 4*Su.average();
|
||||
|
||||
Info<< "Calculating turbulent flame speed field St\n" << endl;
|
||||
volScalarField St
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"St",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
Xi*Su
|
||||
);
|
||||
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
if (composition.contains("ft"))
|
||||
{
|
||||
fields.add(composition.Y("ft"));
|
||||
}
|
||||
|
||||
fields.add(b);
|
||||
fields.add(h);
|
||||
fields.add(hu);
|
||||
@ -2,15 +2,16 @@ EXE_INC = \
|
||||
-I../engineFoam \
|
||||
-I../XiFoam \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
-lfiniteVolume \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie
|
||||
-lspecie \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "basicThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -42,9 +42,9 @@
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I../engineFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
|
||||
@ -14,11 +13,13 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lfiniteVolume \
|
||||
-llagrangian \
|
||||
|
||||
@ -58,9 +58,9 @@ volScalarField kappa
|
||||
);
|
||||
|
||||
Info << "Creating turbulence model.\n" << nl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "spray.H"
|
||||
#include "chemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I../dieselEngineFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
|
||||
@ -17,8 +17,8 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lfiniteVolume \
|
||||
-llagrangian \
|
||||
-ldieselSpray \
|
||||
-lliquids \
|
||||
@ -29,4 +29,5 @@ EXE_LIBS = \
|
||||
-llaminarFlameSpeedModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lpdf
|
||||
-lpdf \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "spray.H"
|
||||
#include "chemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
EXE_INC = \
|
||||
-I../XiFoam \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I../XiFoam
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lengine \
|
||||
-lfiniteVolume \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels
|
||||
-llaminarFlameSpeedModels \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -53,7 +53,7 @@ Description
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "hhuCombustionThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
EXE_INC = \
|
||||
-I../XiFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lfiniteVolume \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE
|
||||
-lODE \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -58,9 +58,9 @@ volScalarField kappa
|
||||
);
|
||||
|
||||
Info << "Creating turbulence model.\n" << nl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "chemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "multivariateScheme.H"
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
coodles.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/coodles
|
||||
@ -1,50 +0,0 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<basicThermo> thermo
|
||||
(
|
||||
basicThermo::New(mesh)
|
||||
);
|
||||
|
||||
volScalarField& p = thermo->p();
|
||||
volScalarField& h = thermo->h();
|
||||
const volScalarField& psi = thermo->psi();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo->rho()
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::LESModel> turbulence
|
||||
(
|
||||
compressible::LESModel::New(rho, U, phi, thermo())
|
||||
);
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
@ -1,12 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -44,9 +44,9 @@
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -26,8 +26,8 @@ Application
|
||||
rhoPimpleFoam
|
||||
|
||||
Description
|
||||
Transient solver for turbulent flow of compressible fluids for
|
||||
ventilation and heat-transfer.
|
||||
Transient solver for laminar or turbulent flow of compressible fluids
|
||||
for HVAC and similar applications.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations.
|
||||
@ -36,8 +36,8 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "bound.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
3
applications/solvers/compressible/rhoPisoFoam/Make/files
Normal file
3
applications/solvers/compressible/rhoPisoFoam/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
rhoPisoFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPisoFoam
|
||||
@ -1,13 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels
|
||||
@ -40,9 +40,9 @@
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
@ -23,18 +23,16 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
coodles
|
||||
rhoPisoFoam
|
||||
|
||||
Description
|
||||
Compressible LES solver.
|
||||
Transient PISO solver for compressible, laminar or turbulent flow.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/LESModel/LESModel.H"
|
||||
|
||||
#define divDevRhoReff divDevRhoBeff
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -45,16 +43,27 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
while (runTime.run())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "UEqn.H"
|
||||
@ -1,13 +1,14 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "porousZones.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -26,27 +26,26 @@ Application
|
||||
rhoSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for turbulent flow of compressible fluids
|
||||
Steady-state SIMPLE solver for laminar or turbulent flow of
|
||||
compressible fluids.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "RASModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
@ -54,17 +53,17 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
# include "initConvergenceCheck.H"
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
# include "UEqn.H"
|
||||
# include "hEqn.H"
|
||||
# include "pEqn.H"
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
@ -75,7 +74,7 @@ int main(int argc, char *argv[])
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
# include "convergenceCheck.H"
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
rhoTurbFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoTurbFoam
|
||||
@ -1,12 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
@ -1,11 +0,0 @@
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (momentumPredictor)
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, h)
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
DpDt
|
||||
);
|
||||
|
||||
thermo->correct();
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
rho = thermo->rho();
|
||||
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(thermo->psi())
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
phi =
|
||||
fvc::interpolate(rho)*
|
||||
(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U -= rUA*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
@ -1,96 +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
|
||||
rhoTurbFoam
|
||||
|
||||
Description
|
||||
Transient solver for compressible, turbulent flow.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "rhoEqn.H"
|
||||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
{
|
||||
# include "hEqn.H"
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = thermo->rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
sonicDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/sonicDyMFoam
|
||||
@ -1,12 +1,16 @@
|
||||
EXE_INC = \
|
||||
-I../sonicFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lcompressibleRASModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie
|
||||
-lspecie \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-ldynamicMesh \
|
||||
-lmeshTools
|
||||
@ -38,9 +38,9 @@
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
@ -23,31 +23,30 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
sonicFoamAutoMotion
|
||||
sonicDyMFoam
|
||||
|
||||
Description
|
||||
Transient solver for trans-sonic/supersonic, laminar flow of a
|
||||
compressible gas with mesh motion..
|
||||
Transient solver for trans-sonic/supersonic, laminar or turbulent flow
|
||||
of a compressible gas with mesh motion..
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "motionSolver.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readThermodynamicProperties.H"
|
||||
# include "readTransportProperties.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
@ -57,34 +56,24 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
mesh.movePoints(motionPtr->newPoints());
|
||||
|
||||
# include "rhoEqn.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
- fvm::laplacian(mu, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, e)
|
||||
+ fvm::div(phi, e)
|
||||
- fvm::laplacian(mu, e)
|
||||
==
|
||||
- p*fvc::div(phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U))
|
||||
+ mu*magSqr(symm(fvc::grad(U)))
|
||||
);
|
||||
#include "hEqn.H"
|
||||
|
||||
T = e/Cv;
|
||||
psi = 1.0/(R*T);
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
@ -115,12 +104,24 @@ int main(int argc, char *argv[])
|
||||
phi = pEqn.flux();
|
||||
}
|
||||
|
||||
# include "compressibleContinuityErrs.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U -= fvc::grad(p)/UEqn.A();
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
DpDt = fvc::DDt
|
||||
(
|
||||
surfaceScalarField
|
||||
(
|
||||
"phiU",
|
||||
phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U)
|
||||
),
|
||||
p
|
||||
);
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = psi*p;
|
||||
|
||||
runTime.write();
|
||||
@ -1,4 +1,12 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = -lfiniteVolume
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -1,49 +1,25 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<basicThermo> thermo
|
||||
(
|
||||
basicThermo::New(mesh)
|
||||
);
|
||||
|
||||
volScalarField& p = thermo->p();
|
||||
volScalarField& h = thermo->h();
|
||||
const volScalarField& psi = thermo->psi();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
mesh
|
||||
),
|
||||
mesh
|
||||
thermo->rho()
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field T\n" << endl;
|
||||
volScalarField T
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Calculating field e from T\n" << endl;
|
||||
volScalarField e
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"e",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Cv*T,
|
||||
T.boundaryField().types()
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
@ -58,29 +34,21 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
volScalarField psi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
1.0/(R*T)
|
||||
);
|
||||
psi.oldTime();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
psi*p
|
||||
);
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo()
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
@ -26,27 +26,26 @@ Application
|
||||
sonicFoam
|
||||
|
||||
Description
|
||||
Transient solver for trans-sonic/supersonic, laminar flow of a
|
||||
compressible gas.
|
||||
Transient solver for trans-sonic/supersonic, laminar or turbulent flow
|
||||
of a compressible gas.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readThermodynamicProperties.H"
|
||||
# include "readTransportProperties.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
@ -54,35 +53,25 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
# include "rhoEqn.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
- fvm::laplacian(mu, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(rho, e)
|
||||
+ fvm::div(phi, e)
|
||||
- fvm::laplacian(mu, e)
|
||||
==
|
||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||
+ mu*magSqr(symm(fvc::grad(U)))
|
||||
);
|
||||
|
||||
T = e/Cv;
|
||||
psi = 1.0/(R*T);
|
||||
#include "hEqn.H"
|
||||
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
@ -91,11 +80,11 @@ int main(int argc, char *argv[])
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
fvc::interpolate(thermo->psi())
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
@ -109,15 +98,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
phi = pEqn.flux();
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi = pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
# include "compressibleContinuityErrs.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U -= rUA*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = psi*p;
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
sonicFoamAutoMotion.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/sonicFoamAutoMotion
|
||||
@ -1,103 +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 T\n" << endl;
|
||||
volScalarField T
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Calculating field e from T\n" << endl;
|
||||
volScalarField e
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"e",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
Cv*T,
|
||||
T.boundaryField().types()
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
volScalarField psi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
1.0/(R*T)
|
||||
);
|
||||
psi.oldTime();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
psi*p
|
||||
);
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating field phid\n" << endl;
|
||||
surfaceScalarField phid
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phid",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
phi/fvc::interpolate(p),
|
||||
phi.boundaryField().types()
|
||||
);
|
||||
@ -1,3 +0,0 @@
|
||||
sonicTurbFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/sonicTurbFoam
|
||||
@ -1,135 +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
|
||||
sonicFoam
|
||||
|
||||
Description
|
||||
Transient solver for trans-sonic/supersonic, turbulent flow of a
|
||||
compressible gas.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.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 "compressibleCourantNo.H"
|
||||
|
||||
# include "rhoEqn.H"
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
# include "hEqn.H"
|
||||
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(thermo->psi())
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi = pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
# include "compressibleContinuityErrs.H"
|
||||
|
||||
U -= rUA*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = psi*p;
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,12 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I../XiFoam
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I../XiFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -41,9 +41,9 @@
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiation \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "radiationModel.H"
|
||||
|
||||
|
||||
@ -7,10 +7,11 @@ EXE_INC = \
|
||||
-IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/RASModel/RASModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "regionProperties.H"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
PtrList<volScalarField> Kf(fluidRegions.size());
|
||||
PtrList<volVectorField> Uf(fluidRegions.size());
|
||||
PtrList<surfaceScalarField> phif(fluidRegions.size());
|
||||
PtrList<compressible::RASModel> turb(fluidRegions.size());
|
||||
PtrList<compressible::turbulenceModel> turb(fluidRegions.size());
|
||||
PtrList<volScalarField> DpDtf(fluidRegions.size());
|
||||
PtrList<volScalarField> ghf(fluidRegions.size());
|
||||
PtrList<volScalarField> pdf(fluidRegions.size());
|
||||
@ -127,9 +127,9 @@
|
||||
turb.set
|
||||
(
|
||||
i,
|
||||
autoPtr<compressible::RASModel>
|
||||
autoPtr<compressible::turbulenceModel>
|
||||
(
|
||||
compressible::RASModel::New
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rhof[i],
|
||||
Uf[i],
|
||||
|
||||
@ -32,7 +32,7 @@ void solveEnthalpyEquation
|
||||
const volScalarField& rho,
|
||||
const volScalarField& DpDt,
|
||||
const surfaceScalarField& phi,
|
||||
const compressible::RASModel& turb,
|
||||
const compressible::turbulenceModel& turb,
|
||||
basicThermo& thermo
|
||||
)
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ tmp<fvVectorMatrix> solveMomentumEquation
|
||||
const surfaceScalarField& phi,
|
||||
const volScalarField& pd,
|
||||
const volScalarField& gh,
|
||||
const compressible::RASModel& turb
|
||||
const compressible::turbulenceModel& turb
|
||||
)
|
||||
{
|
||||
// Solve the Momentum equation
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
lesBuoyantFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/lesBuoyantFoam
|
||||
@ -1,13 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I../buoyantFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleLESModels
|
||||
@ -1,75 +0,0 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<basicThermo> thermo
|
||||
(
|
||||
basicThermo::New(mesh)
|
||||
);
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
thermo->rho()
|
||||
);
|
||||
|
||||
volScalarField& p = thermo->p();
|
||||
volScalarField& h = thermo->h();
|
||||
const volScalarField& psi = thermo->psi();
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::LESModel> turbulence
|
||||
(
|
||||
compressible::LESModel::New(rho, U, phi, thermo())
|
||||
);
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt = fvc::ddt(p);
|
||||
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
|
||||
dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef"));
|
||||
|
||||
Info<< "Creating field pd\n" << endl;
|
||||
volScalarField pd
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pd",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
p = pd + rho*gh + pRef;
|
||||
thermo->correct();
|
||||
|
||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||
@ -1,96 +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
|
||||
lesBuoyantFoam
|
||||
|
||||
Description
|
||||
Transient Solver for buoyant, turbulent flow of compressible fluids for
|
||||
ventilation and heat-transfer. Turbulence is modelled using a run-time
|
||||
selectable compressible LES model.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "compressible/LESModel/LESModel.H"
|
||||
|
||||
#define divDevRhoReff divDevRhoBeff
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readEnvironmentalProperties.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createFields.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "rhoEqn.H"
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
# include "UEqn.H"
|
||||
# include "hEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,9 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -37,8 +37,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/RASModel/RASModel.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "makeGraph.H"
|
||||
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
channelFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/channelFoam
|
||||
@ -1,9 +1,10 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
oodles
|
||||
channelFoam
|
||||
|
||||
Description
|
||||
Incompressible LES solver for flow in a channel.
|
||||
@ -31,8 +31,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/LESModel/LESModel.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
#include "IFstream.H"
|
||||
#include "OFstream.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));
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user