diff --git a/.gitignore b/.gitignore index 4a7188cdfb..296f8d0367 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,15 @@ # editor and misc backup files - anywhere *~ .*~ -*.orig *.bak +*.bak[0-9][0-9] +*.orig +*.orig[0-9][0-9] \#*\# +# file-browser settings - anywhere +.directory + # CVS recovered versions - anywhere .#* @@ -17,7 +22,7 @@ *.so *.jar -# ignore derived files +# derived files lex.yy.c # Corefiles @@ -26,33 +31,42 @@ core # dependency files - anywhere *.dep -# lnInclude folders - anywhere +# lnInclude (symlink) folders - anywhere lnInclude -# linux build folder(s) - anywhere -linux*Gcc* +# build folders - anywhere +linux*Gcc*/ +linux*Icc*/ +linuxming*/ +SiCortex*Gcc*/ +solaris*Gcc*/ +SunOS*Gcc*/ -# reinstate wmake/rules that look like build folders -!wmake/rules/linux* - -# but do continue to ignore the derived wmake files -wmake/rules/*/dirToString -wmake/rules/*/wmkdep +# reinstate wmake/rules that might look like build folders +!wmake/rules/*/ # doxygen generated documentation doc/[Dd]oxygen/html doc/[Dd]oxygen/latex doc/[Dd]oxygen/man +# Other HTML files e.g. ReleaseNotes-?.?.html +*.html + # source packages - anywhere *.tar.bz2 *.tar.gz +*.tar *.tgz +*.gtgz + +# ignore the persistent .build tag in the main directory +/.build # ignore .timeStamp in the main directory /.timeStamp -# ignore .ebrowse in the main directory -/.ebrowse +# ignore .tags in the main directory +/.tags # end-of-file diff --git a/Allwmake b/Allwmake index d0110357f8..2e570c89a5 100755 --- a/Allwmake +++ b/Allwmake @@ -1,19 +1,27 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -set -x + +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi # wmake is required for subsequent targets ( cd wmake/src && make ) -( cd $WM_THIRD_PARTY_DIR && ./Allwmake ) +# build ThirdParty sources +$WM_THIRD_PARTY_DIR/Allwmake -( cd src && ./Allwmake ) - -( cd applications && ./Allwmake ) +# build OpenFOAM libraries and applications +src/Allwmake +applications/Allwmake if [ "$1" = doc ] then - ( cd doc && ./Allwmake ) + doc/Allwmake fi # ----------------------------------------------------------------- end-of-file diff --git a/README b/README index 093280c6fb..390dd8edb5 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ # -*- mode: org; -*- # -#+TITLE: *OpenFOAM README for version 1.5* +#+TITLE: OpenFOAM README for version 1.6 #+AUTHOR: OpenCFD Ltd. -#+DATE: 26 August 2008 +#+DATE: July 2009 #+LINK: http://www.opencfd.co.uk #+OPTIONS: author:nil ^:{} @@ -14,27 +14,24 @@ General Public License terms under which you can copy the files. * 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. + OpenFOAM is developed and tested on Linux, but should work with other POSIX + 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". *** 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: + The ParaView 3.6.1 visualisation package requires Qt to be installed on the + system. ParaView's producers state that ParaView is only officially + supported on Qt version 4.3.x. However, we have found in limited tests that + ParaView works satisfactorily with newer versions of Qt than 4.3.x. To + check whether Qt4 is installed, and the version, type: + qmake --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 + Both 32-bit and 64-bit version of ParaView were compiled with Qt-4.4.3 (with + openSUSE-11.1). 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." @@ -42,9 +39,11 @@ 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 + + ubuntu-9.04: Version 4.5.0 + + openSUSE-10.2: Version 4.2.1 - too old + + openSUSE-10.3: Version 4.3.1 + + openSUSE-11.0: Version 4.4.0 + + openSUSE-11.1: Version 4.4.3 Compilation and running of ParaView has been successful using the libraries downloaded in the "libqt4-dev" package on ubuntu. @@ -52,7 +51,7 @@ 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 + and compile and install in /usr/local or some other location that does not conflict with the pre-installed version. * Installation @@ -62,14 +61,13 @@ The environment variable settings are contained in files in an etc/ directory in the OpenFOAM release. e.g. in - + $HOME/OpenFOAM/OpenFOAM-/etc/ - + where corresponds to the version 1.4, 1.5, ... + + $HOME/OpenFOAM/OpenFOAM-1.6/etc/ 1) 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-/etc/bashrc + + . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc Then update the environment variables by sourcing the $HOME/.bashrc file by typing in the terminal: @@ -79,7 +77,7 @@ 2) 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-/etc/cshrc + + source $HOME/OpenFOAM/OpenFOAM-1.6/etc/cshrc Then update the environment variables by sourcing the $HOME/.cshrc file by typing in the terminal: @@ -95,13 +93,13 @@ appropriate resource file. Here is a bash/ksh/sh example: + export FOAM_INST_DIR=/data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/bashrc + + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc + [ -f $foamDotFile ] && . $foamDotFile and a csh/tcsh example: + setenv FOAM_INST_DIR /data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/bashrc + + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc + if ( -f $foamDotFile ) source $foamDotFile The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts @@ -114,7 +112,7 @@ which may be obtained from http://gcc.gnu.org/. Install the compiler in - $WM_PROJECT_INST_DIR/ThirdParty/gcc-/platforms/$WM_ARCH$WM_COMPILER_ARCH/ + $WM_THIRD_PARTY_DIR/gcc-/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. @@ -122,10 +120,12 @@ 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 to negotiate a support - contract and we will do the port and maintain it for future releases. + environment variables and re-execute './Allwmake'. + + If you experience difficulties with building the source-pack, or your platform + is not currently supported, please contact to + negotiate a support contract and we will do the port and maintain it for + future releases. * Testing the installation To check your installation setup, execute the 'foamInstallationTest' script @@ -136,33 +136,37 @@ * Getting Started Create a project directory within the $HOME/OpenFOAM directory named - - (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5) + -1.6 (e.g. 'chris-1.6' for user chris and OpenFOAM version 1.6) and create a directory named 'run' within it, e.g. by typing: - + mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run + + mkdir -p $FOAM_RUN/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 + + cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN Run the first example case of incompressible laminar flow in a cavity: - + cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/icoFoam/cavity + + cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity + blockMesh + icoFoam + paraFoam -* 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 + Refer to the OpenFOAM User Guide at http://www.OpenFOAM.org/doc/user.html for + more information. + +* Compiling Paraview 3.6.1 and the PV3FoamReader module + If there are problems encountered with ParaView, then it may be necessary to + compile ParaView from sources. The compilation + is a fairly simple process using the makeParaView script + (found in ThirdParty directory), which has worked in our tests with other + packages supplied in the ThirdParty directory, namely cmake-2.6.4 and + gcc-4.3.3. Execute the following: + + cd $WM_THIRD_PARTY_DIR + + rm -rf paraview-3.6.1/platforms + + ./makeParaView The PV3FoamReader module is an OpenFOAM utility that can be compiled in the usual manner as follows: @@ -170,6 +174,21 @@ + ./Allwclean + ./Allwmake +*** Compiling Paraview with a local version of Qt + If the user still encounters problems with ParaView, it may relate to the + version of Qt, in which case, it is recommended that the user first + downloads a supported version of Qt /e.g./ 4.3.5 as described in the section + on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR. + Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR: + + makeQt + + The user should then compile ParaView using the local version of Qt by + executing makeParaView with the -qmake option, giving the full path of the + newly built qmake as an argument: + + makeParaView -qmake + + The user must then recompile the PV3FoamReader module as normal (see above). + * Documentation http://www.OpenFOAM.org/doc diff --git a/README.html b/README.html deleted file mode 100644 index cd1497fcad..0000000000 --- a/README.html +++ /dev/null @@ -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 -–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-/etc/ - * where 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-/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-/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-/etc/bashrc - * [ -f $foamDotFile ] && . $foamDotFile - -and a csh/tcsh example: - - * setenv FOAM_INST_DIR /data/app/OpenFOAM - * foamDotFile=$FOAM_INST_DIR/OpenFOAM-/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-/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 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 - (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 - diff --git a/ReleaseNotes-1.5 b/ReleaseNotes-1.5 deleted file mode 100644 index faa5dad6b2..0000000000 --- a/ReleaseNotes-1.5 +++ /dev/null @@ -1,176 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: *OpenFOAM release notes for version 1.5* -#+AUTHOR: OpenCFD Ltd. -#+DATE: 26 August 2008 -#+LINK: http://www.opencfd.co.uk -#+OPTIONS: author:nil ^:{} - -* 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. - -* 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 requires the installation of Qt 4.3.? for ParaView-3 to run. - -* 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 - $WM_COMPILER_INST environment variable in the OpenFOAM-1.5/etc/settings.sh - (or settings.csh) file. - -* 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. - -* 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. - -* 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. - -* 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. - -* 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. - -* 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. - -* 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. - -* 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. diff --git a/ReleaseNotes-1.5.html b/ReleaseNotes-1.5.html deleted file mode 100644 index a1805d5e9d..0000000000 --- a/ReleaseNotes-1.5.html +++ /dev/null @@ -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 -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 - $WM_COMPILER_INST 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: 26 August 2008 - -HTML generated by org-mode 6.06b in emacs 23 - diff --git a/ReleaseNotes-1.6 b/ReleaseNotes-1.6 new file mode 100644 index 0000000000..545021a6b3 --- /dev/null +++ b/ReleaseNotes-1.6 @@ -0,0 +1,374 @@ +# -*- mode: org; -*- +# +#+TITLE: OpenFOAM release notes for version 1.6 +#+AUTHOR: OpenCFD Ltd. +#+DATE: July 2009 +#+LINK: http://www.opencfd.co.uk +#+OPTIONS: author:nil ^:{} + +* Overview + OpenFOAM-1.6 is a significant upgrade to version 1.5 in ways that 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 here: + http://www.OpenFOAM.org/bugs.html. + +* GNU/Linux version + The 32bit and 64bit binary packs of the OpenFOAM release were compiled on + a machine running openSUSE GNU/Linux version 11.1 and also tested on + Ubuntu 9. We recommend that users run OpenFOAM on one of these, or on a + similarly recent version of GNU/Linux. This release has also been + successfully compiled and tested on older GNU/Linux releases, but this + requires the installation of Qt 4.3.? (the sources for which are supplied + with OpenFOAM-1.6, see README) for ParaView-3 to run. + +* C++ Compiler version + + Release compiled with GCC 4.3.3. + + 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.6/etc/bashrc/ (or /cshrc/) file. + + The location of the compiler installation is controlled by the + ~$compilerInstall~ environment variable in the + /OpenFOAM-1.6/etc/settings.sh/ (or /settings.csh/) file. + +* Library developments + +*** Core library + +***** Dictionary improvements/changes + + Dictionaries can use words (unquoted) or regular expressions (quoted) + for their keywords. When searching, an exact match has priority over a + regular expression match. Multiple regular expressions are matched in + reverse order. + + The *new* =#includeIfPresent= directive is similar to the =#include= + directive, but does not generate an error if the file does not exist. + + The default =#inputMode= is now '=merge=', which corresponds to the most + general usage. The =#inputMode warn= corresponds to the previous default + behaviour. + + The *new* =#inputMode protect= can be used to conditionally merge + default values into existing dictionaries. + + *New* =digest()= method to calculate and return the SHA1 message digest. + +***** Regular Expressions + The addition of regular expressions marks a major improvement in + usability. + + *New* =regExp= class provides support for accessing POSIX extended + regular expresssions from within OpenFOAM. + + *New* =wordRe= class can contain a =word= or a =regExp= . + + *New* =stringListOps= to search string lists based on regular + expressions, =wordRe= or =wordReList=. + + =Istream= and =Ostream= now retain backslashes when reading/writing + strings. + +***** Convenience changes + + =IOobject= has a *new* constructor for creating an =IOobject= from a + single-path specification (eg, see =blockMesh -dict= option). + + =argList= has *new* convenience methods for accessing options more + directly: =option()=, =optionFound()=, =optionLookup()=, =optionRead()=, + =optionReadIfPresent()=. + + The *new* =readList(Istream&)= can read a bracket-delimited list or + handle a single value as a list of size 1. This can be a useful + convenience when processing command-line options. + + Export *new* environment variable =FOAM_CASENAME= that contains the + name part of the =FOAM_CASE= environment variable. + +*** Turbulence modelling + + Major development of turbulence model libraries to give extra flexibility + at the solver level. For solvers that can support either RAS/LES + computations, the selection is made in the + /constant/turbulenceProperties/, by setting the =simulationType= keyword + to: + - =laminar=, + - =RASModel=, + - =LESModel=. + + Depending on the selection, the model is the instantiated from /constant// + - /RASProperties/, + - /LESProperties/. + +***** RAS wall functions + Wall functions are now run-time selectable per patch for RAS. + + Velocity: + - Apply to turbulent viscosities =nut= or =mut=, + - Apply to =k=, =Q=, =R=, + - Apply to =epsilon=, =omega=. + + Temperature: + - Apply to turbulent thermal diffusivity, =alphat= (compressible only). + + To apply wall functions: + - To recapture the functionality of previous OpenFOAM versions (v1.5 and + earlier) assign: + - for velocity: + - =nut=: =nutWallFunction=, + - =mut=: =muWallFunction=, + - =epsilon=: =epsilonWallFunction=, + - =omega=: =omegaWallFunction=, + - =k=, =q=, =R=: =kqRWallFunction=. + - for temperature: + - =alphat=: =alphatWallFunction=. + - New =alphaSgsJayatillekeWallFunction= thermal wall function for + compressible LES. + +***** *New* LES turbulence models + + Spalart-Allmaras DDES. + + Spalart-Allmaras IDDES. + +***** Upgrading: + + *New* utility - =applyWallFunctionBoundaryConditions=. + + Solvers will automatically update existing cases. + - New fields created based on the presence of the =nut/mut= field. + - Boundary conditions include scoping, i.e compressibility:: for + compressible solvers. + - Modified fields will be backed-up to /.old/. + + NOTE: + - Fields are only updated for those fields associated with the current + turbulence model selection, i.e. if fields exist for use with other + models, they will not be updated. + - The new specification is not backwards compatible. + +*** Thermo-physical Models + + Old compressibility-based thermo package renamed + =basicThermo= \rightarrow =basicPsiThermo=. + + *New* =basicRhoThermo= thermo package. + - Additional density field stored. + - General form - can be used for other types of media, e.g. liquids. + - Additional polynomial-based thermodynamics: + - Equation of state: =icoPolynomial=, + - Transport: =polynomialTransport=, + - Thermo: =hPolynomialThermo=. + + Removed earlier hard-coding of gas thermophysics for chemistry modelling: + - =reactingMixture= now templated on thermo package, + - =chemistryModel= now templated on thermo package, + - =chemistrySolver= now templated on thermo package. + + *New* =fvDOM= radition model + - finite volume, discrete ordinates method. + + *New* (reinstated) =eThermo= thermodynamics package + - internal energy-based thermodynamics. + +*** Lagrangian + +***** Intermediate + + Overhaul of the underlying framework. + + Reacting now split into reacting and reacting multiphase. + + New structure for variable composition. + + Many new sub-models, including: + - Injection + - =PatchInjection= - injection local to patch face cells, + - =FieldActivatedInjection= - injection based on satisfying external + criterion, + - LookupTableInjection - explicity define injection locations and all + parcel properties. + - Post-processing + - patch post-processing - collect data for parcels impacting user, + defined patches. + - Patch interaction + - generalised behaviour for parcel interaction with patch. + - Phase change + - liquid evaporation. + +***** Coal combustion + + *New* library - extension of reacting-multiphase functionality. + - Surface reaction/combustion models. + +*** Discrete methods + + *New* library offering DSMC simulation functionality - see =dsmcFoam= + below. + + Significant development of the libraries offering molecular dynamics + simulation functionality - see =mdFoam= and =mdEquilibrationFoam= below. + +*** Numerics + + *new* polynomial-fit higher-order interpolation schemes: + - =biLinearFit= + - =linearFit= + - =quadraticLinearFit= + - =quadraticFit= + - =linearPureUpwindFit= + - =quadraticLinearPureUpwindFit= + - =quadraticLinearUpwindFit= + - =quadraticUpwindFit= + - =cubicUpwindFit= + + *new* polynomial-fit higher-order Sn-Grad: =quadraticFitSnGrad=. + +*** *New* surfMesh library + Provides a more efficient storage mechanism than possible with =triSurface= + without restrictions on the shape of the face (templated parameter). + + =MeshedSurface= class - with zero or more contiguous =surfZones= . + + =UnsortedMeshedSurface= class - unordered surface zones (as per + =triSurface=). + + =surfMesh= class - for reading/writing in native OpenFOAM format. + +* Solvers +*** Solver restructuring + The upgrade to the turbulence models means that the simulation type, i.e. + laminar, RAS or LES can be selected at run time. This has allowed a reduction + in the number of solvers, simplifying the overall code structure + + Solvers which support laminar, RAS and LES: + - =turbFoam=, =oodles= \rightarrow =pisoFoam=. + - =turbDyMFoam= \rightarrow =pimpleDyMFoam=. + - =rhoTurbFoam=, =coodles= \rightarrow =rhoPisoFoam=. + - =xoodles= \rightarrow absorbed into =XiFoam=. + - =buoyantFoam=, =lesBuoyantFoam= \rightarrow =buoyantPisoFoam=. + - =interFoam=, =rasInterFoam=, =lesInterFoam= \rightarrow =interFoam=. + - =lesCavitatingFoam=, =rasCavitatingFoam= \rightarrow =cavitatingFoam=. + + Solvers which support LES only: + - =channelOodles= \rightarrow =channelFoam= (LES). + + =pd= replaced by static pressure =p=. All solvers in which buoyancy affects + might be strong have been converted from using =pd= to =p= with improved + numerics to give equally good accuracy and stability. This change is + prompted by the need to remove the confusion surrounding the meaning and + purpose of =pd=. + + =g= (acceleration due to gravity) is now a *new* + =uniformDimensionedVectorField= which has the behaviour of a field, is + registered to an =objectRegistry=, but stores only a single value. Thus + =g= and other =UniformDimensionedFields= can be created and looked-up + elsewhere in the code, /e.g./ in =fvPatchFields=. + +*** Solver control improvements + Now uses consistent dictionary entries for the solver controls. + + This Allows dictionary substitutions and regular expressions in + /system/fvSolution/. + + The old solver control syntax is still supported (warning emitted), but + the *new* =foamUpgradeFvSolution= utility can be used to convert + /system/fvSolution/ to the new format. + +*** *New* Solvers + + =buoyantBoussinesqSimpleFoam= Steady state heat transfer solver using a + Boussinesq approximation for buoyancy, with laminar, RAS or LES turbulence + modelling. + + =buoyantBoussinesqPisoFoam= Transient heat transfer solver using a + Boussinesq approximation for buoyancy, with laminar, RAS or LES turbulence + modelling. + + =coalChemistryFoam= Transient, reacting lagrangian solver, employing a coal + cloud and a thermo cloud, with chemistry, and laminar, RAS or LES turbulence + modelling. + + =porousExplicitSourceReactingParcelFoam= Transient, reacting lagrangian + solver, employing a single phase reacting cloud, with porous media, explicit + mass sources, and laminar, RAS or LES turbulence modelling. + + =rhoReactingFoam= Density-based thermodynamics variant of the reactingFoam + solver, i.e. now applicable to liquid systems. + + =dsmcFoam= DSMC (Direct Simulation Monte-Carlo) solver for rarefied gas + dynamics simulations, able to simulate mixtures of an arbitrary number of + gas species. The variable hard sphere collision model with Larsen-Borgnakke + internal energy redistribution (see "Molecular Gas Dynamics and the Direct + Simulation of Gas Flows" G.A. Bird, 1994) is available; other run-time + selectable collision models can be easily added. + +*** Updated solvers + + =mdFoam= Molecular Dynamics (MD) solver able to simulate a mixture of an + arbitrary number of mono-atomic and small, rigid polyatomic (i.e. H2O, N2) + molecular species, with 6 degree of freedom motion, in complex geometries. A + molecule of any species can be built by specifying its sites of mass and + charge. All molecules interact with short-range dispersion forces and + pairwise electrostatic interactions using methods described in: Fennell and + Gezelter, J. Chem. Phys. 124, 234104 (2006). + + =mdEquilibrationFoam= Similar to mdFoam, but employs velocity scaling to + adjust the simulation temperature to a target value. Useful to equilibrate a + case before simulation. + + =chtMultiRegionFoam= New boundary condition allows independent decomposition + of coupled regions without any constraint on the decomposition. + +* Boundary conditions + + Improved set of direct mapped boundary conditions. + + =buoyantPressureFvPatchScalarField=, the *new* buoyancy pressure boundary + condition now supports =p= and =pd= for backward compatibility. + + =uniformDensityHydrostaticPressure= is an additional pressure boundary + condition to aid the transition from =pd= to =p= as it behaves similarly to + specifying a uniform =pd= at an outlet for example. + + =activeBaffleVelocity= dynamically combines cyclic and wall patches so that + the flow through the patch can be controlled /e.g./ by pressure drop. + + =rotatingWallVelocity= specifies a rotating velocity, given the rotational + speed, origin and axis. + +* Utilities + +*** Improvements + + =blockMesh= has a *new* =-dict= option for specifying an alternative + dictionary for the block mesh description. The '=convertToMeters=' entry + is now optional, and the alternative '=scale=' entry can be used for + less typing. + + =foamToEnsight= has a *new* =-noPatches= option to suppress generation + of patches. + + =foamToEnsightParts= has *new* =-noMesh= and =-index= options that can + be useful when post-processing results incrementally. + + =snappyHexMesh= has lower memory footprint. New distributed triangulated + surface type for meshing surfaces with extremely large triangle count. + Now supports multi-region meshing of arbitrarily complex regions. + +*** *New* utilities + + =particleTracks= - generate particle tracks for lagrangian calculations. + + =dsmcInitialise= - preprocessing utility to create initial configurations + of DSMC particles in a geometry. + + =surfaceRedistributePar= - preprocessing utility to create distributed + triangulated surface. + +*** *New* foamCalc functions + + =interpolate= performs fvc::interpolate(). + + =randomise= randomises a by a given perturbation. + + =addSubtract= provides simple add/subtract field functionality. + +*** Usage + + =timeSelector= can now combine =-time ranges= and =-latestTime= options. + For example, -time '0.01:0.09' -latestTime vs. -time '0.01:'. + More reliable behaviour for cases missing /constant// or /0// directories. + When the =-noZero= option is enabled, =-latestTime= will not select the + =0/= directory unless the =-zeroTime= option is given. + This helps avoid ill effects caused by accidentally using the + /0// directory in certain utilities (eg, =reconstructPar=). + + =-region= option added to more utilities. + +*** Improvements to Paraview reader module + + =PV3FoamReader= added mesh region handling. The region name is parsed + from the filename. Eg, /case{region}.OpenFOAM/. + + =paraFoam= with a *new* =-region= option for specifying an alternative + region. A *new* =-touch= option to generate the /.OpenFOAM/ file only. + Only creates (and removes) /.OpenFOAM/ files if they didn't already + exist, which is useful in connection with the =-touch= option. + +* Post-processing + + Sampling on iso-surfaces, interpolated or non-interpolated. + + Sampling on surface defined by distance to surface (=distanceSurface=). + + Cutting planes for arbitrary meshes. + + Output to any surface geometry format supported by the =surfMesh= library. + +*** Function objects + +***** Improvements for function objects and time-looping + + The =functionObjectList= retains the order of the =functionObject= + order, which allows a chaining of operations. It is thus internally more + efficient when /system/controlDict/ uses =functions {..}= instead of + =functions (..)=, but both forms are supported. + + The =functionObject= now has an additional =end()= method that is called + when =Time::loop()= or =Time::run()= determine that the time-loop exits. + Accordingly, one of these two idioms should be used in solver code: + 1. =while (runTime.loop() { ... }=, + 2. =while (runTime.run()) { runTime++; ... }=. + + *New* =functionObjectList= now tracks the SHA1 message digest of the + sub-directories. This avoids reloading a =functionObject= when + something unrelated in /system/controlDict/ changed. + +***** *New* function objects: + + =systemCall= - executes a list of system instructions. + + =fieldMinMax= - computes the min/max of a . + + =staticPressure= - converts kinematic pressure to static pressure. + + =dsmcFields= - calculates intensive fields (velocity and temperature) + from averaged extensive fields (i.e. momentum and energy). + +***** Usage + + Improved output control: =timeStep= or =outputTime=. + +* Tutorial restructuring + to reflect solver application structure. + +* Third-party Software + + =gcc= upgraded to version 4.3.3. + + =OpenMPI= upgraded to version 1.3.3. + + =ParaView= upgraded to version 3.6.1. + + =Scotch= *new* decomposition method: \\ + Scotch (http://gforge.inria.fr/projects/scotch/) is a general multi-level + decomposition method originating from the ScAlApplix project (Inria). It is + a framework for general recursive partitioning methods and a such comparable + to Metis but with a permissive licence. + + The corresponding decomposition method (in =decomposeParDict=) is + =scotch=. An optional =strategy= string can be supplied to change the + decomposition methods; initial testing shows the default strategy producing + decompositions comparable in quality to Metis. diff --git a/applications/Allwmake b/applications/Allwmake index 0c58257068..ddb5b116fc 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -1,8 +1,17 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR/applications" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR/applications" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + set -x -( cd solvers && wmake all ) -( cd utilities && wmake all ) +wmake all solvers +wmake all utilities # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index f0f8c53a93..891befab21 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,25 +41,24 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMeshNoClear.H" + #include "readTransportProperties.H" + #include "createFields.H" + #include "readTurbulenceProperties.H" + #include "initContinuityErrs.H" -# include "createTime.H" -# include "createMeshNoClear.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "readTurbulenceProperties.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Starting time loop" << endl; - for (runTime++; !runTime.end(); runTime++) + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" force.internalField() = ReImSum ( @@ -69,12 +68,12 @@ int main(int argc, char *argv[]) ) ); -# include "globalProperties.H" + #include "globalProperties.H" fvVectorMatrix UEqn ( - fvm::ddt(U) - + fvm::div(phi, U) + fvm::ddt(U) + + fvm::div(phi, U) - fvm::laplacian(nu, U) == force @@ -90,7 +89,7 @@ int main(int argc, char *argv[]) volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) + phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); fvScalarMatrix pEqn @@ -102,7 +101,7 @@ int main(int argc, char *argv[]) phi -= pEqn.flux(); -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); @@ -122,7 +121,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files b/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files deleted file mode 100644 index a63fc64fa7..0000000000 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -kinematicParcelFoam.C - -EXE = $(FOAM_APPBIN)/kinematicParcelFoam diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options b/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options deleted file mode 100644 index 517724be31..0000000000 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options +++ /dev/null @@ -1,21 +0,0 @@ -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 - -EXE_LIBS = \ - -llagrangian \ - -llagrangianIntermediate \ - -lfiniteVolume \ - -lmeshTools \ - -lthermophysicalFunctions \ - -lbasicThermophysicalModels \ - /* -lcombustionThermophysicalModels */ \ - -lspecie \ - -lradiation \ - -lcompressibleRASModels diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H b/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H deleted file mode 100644 index 6b87262133..0000000000 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H +++ /dev/null @@ -1,68 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr thermo - ( - basicThermo::New(mesh) - ); - - 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 turbulence - ( - compressible::RASModel::New - ( - rho, - U, - phi, - thermo() - ) - ); - - pointMesh pMesh(mesh); - volPointInterpolation vpi(mesh, pMesh); - - word kinematicCloudName("kinematicCloud"); - - if (args.options().found("cloudName")) - { - kinematicCloudName = args.options()["cloudName"]; - } - - Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; - basicKinematicCloud kinematicCloud - ( - kinematicCloudName, - vpi, - rho, - U, - thermo().mu(), - g - ); diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C b/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C deleted file mode 100644 index 57b3dc5d13..0000000000 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C +++ /dev/null @@ -1,79 +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 - kinematicParcelFoam - -Description - Transient solver for a single kinematicCloud. Uses precalculated velocity - field to evolve a cloud. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicThermo.H" -#include "compressible/RASModel/RASModel.H" -#include "basicKinematicCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - argList::validOptions.insert("cloudName", "cloud name"); - - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readEnvironmentalProperties.H" - #include "createFields.H" - #include "compressibleCourantNo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - Info<< "Evolving " << kinematicCloud.name() << endl; - kinematicCloud.evolve(); - kinematicCloud.info(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/basic/laplacianFoam/laplacianFoam.C b/applications/solvers/basic/laplacianFoam/laplacianFoam.C index cd3c3c3839..7f1a7a00a5 100644 --- a/applications/solvers/basic/laplacianFoam/laplacianFoam.C +++ b/applications/solvers/basic/laplacianFoam/laplacianFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) Info<< "\nCalculating temperature distribution\n" << endl; - for (runTime++; !runTime.end(); runTime++) + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 68cc358327..49188fcf00 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) U.write(); phi.write(); - if (args.options().found("writep")) + if (args.optionFound("writep")) { p.write(); } @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C index f98d500fee..df0ccb8209 100644 --- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C +++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) # include "CourantNo.H" - for (runTime++; !runTime.end(); runTime++) + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index 9f019439a7..4e5b8fb9a0 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -8,8 +8,9 @@ EXE_INC = \ -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/compressible/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/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 \ @@ -22,7 +23,7 @@ EXE_LIBS = \ -lmeshTools \ -lcompressibleRASModels \ -lbasicThermophysicalModels \ - -lcombustionThermophysicalModels \ + -lreactionThermophysicalModels \ -lspecie \ -llaminarFlameSpeedModels \ -lfiniteVolume \ diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index c7bb1c8701..6bad9d485c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,8 +26,8 @@ Application PDRFoam Description - Compressible premixed/partially-premixed combustion solver with turbulence - modelling. + Solver for compressible premixed/partially-premixed combustion with + turbulence modelling. Combusting RANS code using the b-Xi two-equation model. Xi may be obtained by either the solution of the Xi transport @@ -36,7 +36,7 @@ Description to be appropriate by comparison with the results from the spectral model. - Strain effects are encorporated directly into the Xi equation + Strain effects are incorporated 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 @@ -70,53 +70,52 @@ Description int main(int argc, char *argv[]) { -# include "setRootCase.H" + #include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readCombustionProperties.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" + #include "createTime.H" + #include "createMesh.H" + #include "readCombustionProperties.H" + #include "readGravitationalAcceleration.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" -scalar StCoNum = 0.0; + scalar StCoNum = 0.0; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "\n\nTime = " << runTime.timeName() << endl; -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "bEqn.H" -# include "ftEqn.H" -# include "huEqn.H" -# include "hEqn.H" + #include "bEqn.H" + #include "ftEqn.H" + #include "huEqn.H" + #include "hEqn.H" if (!ign.ignited()) { hu == h; } -# include "pEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -130,7 +129,7 @@ scalar StCoNum = 0.0; Info<< "\n end\n"; - return(0); + return 0; } diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index f4db015fe7..9b0344165a 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ Application PDRFoam Description - Compressible premixed/partially-premixed combustion solver with turbulence + Compressible premixed/partially-premixed combustion solver with turbulence modelling. Combusting RANS code using the b-Xi two-equation model. @@ -72,31 +72,31 @@ Description int main(int argc, char *argv[]) { -# include "setRootCase.H" + #include "setRootCase.H" -# include "createTime.H" -# include "createDynamicFvMesh.H" -# include "readCombustionProperties.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "setInitialDeltaT.H" + #include "createTime.H" + #include "createDynamicFvMesh.H" + #include "readCombustionProperties.H" + #include "readGravitationalAcceleration.H" + #include "createFields.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "setInitialDeltaT.H" -scalar StCoNum = 0.0; + scalar StCoNum = 0.0; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "CourantNo.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "CourantNo.H" -# include "setDeltaT.H" + #include "setDeltaT.H" runTime++; @@ -119,9 +119,10 @@ scalar StCoNum = 0.0; fvc::makeAbsolute(phi, rho, U); // Test : disable refinement for some cells - PackedList<1>& protectedCell = + PackedBoolList& protectedCell = refCast(mesh).protectedCell(); - if (protectedCell.size() == 0) + + if (protectedCell.empty()) { protectedCell.setSize(mesh.nCells()); protectedCell = 0; @@ -135,7 +136,7 @@ scalar StCoNum = 0.0; } } - //volScalarField pIndicator("pIndicator", + //volScalarField pIndicator("pIndicator", // p*(fvc::laplacian(p)) // / ( // magSqr(fvc::grad(p)) @@ -156,7 +157,7 @@ scalar StCoNum = 0.0; // if (mesh.moving() || meshChanged) // { -//# include "correctPhi.H" +// #include "correctPhi.H" // } // Make the fluxes relative to the mesh motion @@ -164,23 +165,23 @@ scalar StCoNum = 0.0; } -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "bEqn.H" -# include "ftEqn.H" -# include "huEqn.H" -# include "hEqn.H" + #include "bEqn.H" + #include "ftEqn.H" + #include "huEqn.H" + #include "hEqn.H" if (!ign.ignited()) { hu == h; } -# include "pEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -194,7 +195,7 @@ scalar StCoNum = 0.0; Info<< "\n end\n"; - return(0); + return 0; } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index 40cc24e5d6..20fb3e22a0 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index c89d8dc6c9..21cd1d8368 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,12 +23,42 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - basicSubGrid + Foam::XiEqModels::basicSubGrid Description Basic sub-grid obstacle flame-wrinking enhancement factor model. Details supplied by J Puttock 2/7/06. + Sub-grid flame area generation + + \f$ n = N - \hat{\dwea{\vec{U}}}.n_{s}.\hat{\dwea{\vec{U}}} \f$ + \f$ n_{r} = \sqrt{n} \f$ + + where: + + \f$ \hat{\dwea{\vec{U}}} = \dwea{\vec{U}} / \vert \dwea{\vec{U}} + \vert \f$ + + \f$ b = \hat{\dwea{\vec{U}}}.B.\hat{\dwea{\vec{U}}} / n_{r} \f$ + + where: + + \f$ B \f$ is the file "B". + + \f$ N \f$ is the file "N". + + \f$ n_{s} \f$ is the file "ns". + + The flame area enhancement factor \f$ \Xi_{sub} \f$ is expected to + approach: + + \f[ + \Xi_{{sub}_{eq}} = + 1 + max(2.2 \sqrt{b}, min(0.34 \frac{\vert \dwea{\vec{U}} + \vert}{{\vec{U}}^{'}}, 1.6)) \times min(\frac{n}{4}, 1) + \f] + + SourceFiles basicSubGrid.C diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index 2f4f719cd0..4bfa4cc2df 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 01a6d7cb11..dd4cb011cf 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,12 +23,30 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - basicSubGrid + Foam::XiGModel::basicSubGrid + Description + Basic sub-grid obstacle flame-wrinking generation rate coefficient model. Details supplied by J Puttock 2/7/06. + \f$ G_{sub} \f$ denotes the generation coefficient and it is given by + + \f[ + G_{sub} = k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{obs}} + \frac{/Xi_{{sub}_{eq}}-1}{/Xi_{sub}} + \f] + + and the removal: + + \f[ - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} + \frac{\Xi_{sub}-1}{\Xi_{sub}} \f] + + Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$ + due to the turbulence. + + SourceFiles basicSubGrid.C diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index 1cbd1c6f5d..8d2c824997 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index 3448d1166c..8fdf1f8c70 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,11 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - PDRDragModel + Foam::PDRDragModel Description - Base-class for sub-grid obstacle drag models. + Base-class for sub-grid obstacle drag models. The available drag model is at + \link basic.H \endlink. SourceFiles PDRDragModel.C diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C index d65a6ee5ab..29a92e19f8 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 222aa0ea92..1fabe1360d 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ Foam::tmp Foam::PDRDragModels::basic::Dcu() const { const volScalarField& betav = U_.db().lookupObject("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_; } @@ -125,8 +125,8 @@ Foam::tmp Foam::PDRDragModels::basic::Gk() const { const volScalarField& betav = U_.db().lookupObject("betav"); - return - rho_*mag(U_)*(U_ & CT_ & U_) + return + (0.5*rho_)*mag(U_)*(U_ & CT_ & U_) + Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_); } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H index ceb75ff827..727cdd9f4c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,12 +23,56 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - basic + Foam::PDRDragModels::basic Description Basic sub-grid obstacle drag model. Details supplied by J Puttock 2/7/06. + Sub-grid drag term + + The resistance term (force per unit of volume) is given by: + + \f[ + R = -\frac{1}{2} \rho \vert \dwea{\vec{U}} \vert \dwea{\vec{U}}.D + \f] + + where: + + \f$ D \f$ is the tensor field "CR" in \f$ m^{-1} \f$ + + This is term is treated implicitly in UEqn.H + + Sub-grid turbulence generation + + The turbulence source term \f$ G_{R} \f$ occurring in the + \f$ \kappa-\epsilon \f$ equations for the generation of turbulence due + to interaction with unresolved obstacles : + + \f$ G_{R} = C_{s}\beta_{\nu} + \mu_{eff} A_{w}^{2}(\dwea{\vec{U}}-\dwea{\vec{U}_{s}})^2 + \frac{1}{2} + \rho \vert \dwea{\vec{U}} \vert \dwea{\vec{U}}.T.\dwea{\vec{U}} \f$ + + where: + + \f$ C_{s} \f$ = 1 + + \f$ \beta_{\nu} \f$ is the volume porosity (file "betav"). + + \f$ \mu_{eff} \f$ is the effective viscosity. + + \f$ A_{w}^{2}\f$ is the obstacle surface area per unit of volume + (file "Aw"). + + \f$ \dwea{\vec{U}_{s}} \f$ is the slip velocity and is considered + \f$ \frac{1}{2}. \dwea{\vec{U}} \f$. + + \f$ T \f$ is a tensor in the file CT. + + The term \f$ G_{R} \f$ is treated explicitly in the \f$ \kappa-\epsilon + \f$ Eqs in the \link PDRkEpsilon.C \endlink file. + + SourceFiles basic.C @@ -40,7 +84,6 @@ SourceFiles #include "PDRDragModel.H" #include "XiEqModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 463acf2448..aa9fd58b70 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,10 +25,11 @@ License \*---------------------------------------------------------------------------*/ #include "PDRkEpsilon.H" -#include "wallFvPatch.H" #include "PDRDragModel.H" #include "addToRunTimeSelectionTable.H" +#include "backwardsCompatibilityWallFunctions.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -50,7 +51,7 @@ PDRkEpsilon::PDRkEpsilon const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ) : RASModel(typeName, rho, U, phi, thermophysicalModel), @@ -82,29 +83,29 @@ PDRkEpsilon::PDRkEpsilon 1.92 ) ), - alphak_ + sigmak_ ( dimensioned::lookupOrAddToDict ( - "alphak", + "sigmak", coeffDict_, 1.0 ) ), - alphaEps_ + sigmaEps_ ( dimensioned::lookupOrAddToDict ( - "alphaEps", + "sigmaEps", coeffDict_, - 0.76923 + 1.3 ) ), - alphah_ + Prt_ ( dimensioned::lookupOrAddToDict ( - "alphah", + "Prt", coeffDict_, 1.0 ) @@ -147,9 +148,26 @@ PDRkEpsilon::PDRkEpsilon IOobject::NO_WRITE ), Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_) + ), + + alphat_ + ( + IOobject + ( + "alphat", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + autoCreateAlphat("alphat", mesh_) ) { -# include "wallViscosityI.H" + mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_); + mut_.correctBoundaryConditions(); + + alphat_ = mut_/Prt_; + alphat_.correctBoundaryConditions(); printCoeffs(); } @@ -214,9 +232,9 @@ bool PDRkEpsilon::read() Cmu_.readIfPresent(coeffDict_); C1_.readIfPresent(coeffDict_); C2_.readIfPresent(coeffDict_); - alphak_.readIfPresent(coeffDict_); - alphaEps_.readIfPresent(coeffDict_); - alphah_.readIfPresent(coeffDict_); + sigmak_.readIfPresent(coeffDict()); + sigmaEps_.readIfPresent(coeffDict()); + Prt_.readIfPresent(coeffDict()); return true; } @@ -233,7 +251,12 @@ void PDRkEpsilon::correct() { // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_); -# include "wallViscosityI.H" + mut_.correctBoundaryConditions(); + + // Re-calculate thermal diffusivity + alphat_ = mut_/Prt_; + alphat_.correctBoundaryConditions(); + return; } @@ -250,6 +273,9 @@ void PDRkEpsilon::correct() volScalarField G = 2*mut_*(tgradU() && dev(symm(tgradU()))); tgradU.clear(); + // Update espsilon and G at the wall + epsilon_.boundaryField().updateCoeffs(); + // Add the blockage generation term so that it is included consistently // in both the k and epsilon equations const volScalarField& betav = U_.db().lookupObject("betav"); @@ -259,8 +285,6 @@ void PDRkEpsilon::correct() volScalarField GR = drag.Gk(); -# include "wallFunctionsI.H" - // Dissipation equation tmp epsEqn ( @@ -273,10 +297,10 @@ void PDRkEpsilon::correct() - fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_) ); -# include "wallDissipationI.H" - epsEqn().relax(); + epsEqn().boundaryManipulate(epsilon_.boundaryField()); + solve(epsEqn); bound(epsilon_, epsilon0_); @@ -298,12 +322,13 @@ void PDRkEpsilon::correct() solve(kEqn); bound(k_, k0_); - // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/epsilon_; + mut_.correctBoundaryConditions(); -# include "wallViscosityI.H" - + // Re-calculate thermal diffusivity + alphat_ = mut_/Prt_; + alphat_.correctBoundaryConditions(); } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 2e911ad6a6..5e919efcc4 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,34 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - PDRkEpsilon + Foam::compressible::RASModels::PDRkEpsilon Description - Standard k-epsilon turbulence model. + Standard k-epsilon turbulence model with additional source terms + corresponding to PDR basic drag model (\link basic.H \endlink) + + The default model coefficients correspond to the following: + @verbatim + kEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; // only for compressible + sigmak 1.0; // only for compressible + sigmaEps 1.3; + Prt 1.0; // only for compressible + } + @endverbatim + + The turbulence source term \f$ G_{R} \f$ appears in the + \f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to + interaction with unresolved obstacles. + + In the \f$ \epsilon \f$ equation \f$ C_{1} G_{R} \f$ is added as a source + term. + + In the \f$ \kappa \f$ equation \f$ G_{R} \f$ is added as a source term. SourceFiles PDRkEpsilon.C @@ -58,16 +82,21 @@ class PDRkEpsilon { // Private data + // Model coefficients + dimensionedScalar Cmu_; dimensionedScalar C1_; dimensionedScalar C2_; - dimensionedScalar alphak_; - dimensionedScalar alphaEps_; - dimensionedScalar alphah_; + dimensionedScalar sigmak_; + dimensionedScalar sigmaEps_; + dimensionedScalar Prt_; + + // Fields volScalarField k_; volScalarField epsilon_; volScalarField mut_; + volScalarField alphat_; public: @@ -75,22 +104,22 @@ public: //- Runtime type information TypeName("PDRkEpsilon"); + // Constructors - //- from components + //- Construct from components PDRkEpsilon ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel ); - // Destructor - - ~PDRkEpsilon() - {} + //- Destructor + virtual ~PDRkEpsilon() + {} // Member Functions @@ -105,7 +134,7 @@ public: { return tmp ( - new volScalarField("DkEff", alphak_*mut_ + mu()) + new volScalarField("DkEff", mut_/sigmak_ + mu()) ); } @@ -114,7 +143,7 @@ public: { return tmp ( - new volScalarField("DepsilonEff", alphaEps_*mut_ + mu()) + new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) ); } @@ -123,7 +152,7 @@ public: { return tmp ( - new volScalarField("alphaEff", alphah_*mut_ + alpha()) + new volScalarField("alphaEff", alphat_ + alpha()) ); } diff --git a/applications/solvers/combustion/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H index 3433aa83cb..18d6e86a94 100644 --- a/applications/solvers/combustion/PDRFoam/StCourantNo.H +++ b/applications/solvers/combustion/PDRFoam/StCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,23 +31,25 @@ Description \*---------------------------------------------------------------------------*/ { -scalar meanStCoNum = 0.0; + scalar meanStCoNum = 0.0; -if (mesh.nInternalFaces()) -{ - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phiSt/fvc::interpolate(rho)); + if (mesh.nInternalFaces()) + { + surfaceScalarField SfUfbyDelta = + mesh.surfaceInterpolation::deltaCoeffs() + *mag(phiSt/fvc::interpolate(rho)); - StCoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + StCoNum = + max(SfUfbyDelta/mesh.magSf()).value() + *runTime.deltaT().value(); - meanStCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); -} + meanStCoNum = + (sum(SfUfbyDelta)/sum(mesh.magSf())).value() + *runTime.deltaT().value(); + } -Info<< "St courant Number mean: " << meanStCoNum - << " max: " << StCoNum << endl; + Info<< "St courant Number mean: " << meanStCoNum + << " max: " << StCoNum << endl; } // ************************************************************************* // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 2de8c84c52..4dd960a345 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index d8bc58b170..e24de4c6a7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Gulder + Foam::XiEqModels::Gulder Description Simple Gulder model for XiEq based on Gulders correlation diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C index fc539eaa4b..1b0fe611cb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index b9a45ffb63..b7285f92c0 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,14 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - SCOPEBlend + Foam::XiEqModels::SCOPEBlend Description - + Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation + with a linear correction function to give a plausible profile for XiEq. + See @link SCOPELaminarFlameSpeed.H @endlink for details on the SCOPE + laminar flame speed model. + SourceFiles SCOPEBlend.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 7eb04a94bc..3f73eec406 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index b2b2b35edf..91d3a0f519 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,11 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - SCOPEXiEq + Foam::XiEqModel::SCOPEXiEq Description Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation with a linear correction function to give a plausible profile for XiEq. + See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE laminar + flame speed model. SourceFiles SCOPEXiEq.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 7cbc4ae1c3..8640ec9777 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 2c35877f5e..f7f9c798e5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,16 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - XiEqModel + Foam::XiEqModel Description Base-class for all XiEq models used by the b-XiEq combustion model. + The available models are : + \link basicXiSubXiEq.H \endlink + \link Gulder.H \endlink + \link instabilityXiEq.H \endlink + \link SCOPEBlendXiEq.H \endlink + \link SCOPEXiEq.H \endlink SourceFiles XiEqModel.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C index 550bcaaa0b..43515c6bae 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index b4ff688e13..a853bb3ce5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index 455635dc08..ddc38bef30 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - instability + Foam::XiEqModels::instability Description - + This is the equilibrium level of the flame wrinkling generated by + instability. It is a constant (default 2.5). It is used in + @link XiModel.H @endlink. + SourceFiles instability.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index 5eb15d3aa4..68e786a333 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index 8884c00deb..2ca885d567 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,11 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - KTS + Foam::XiGModels::KTS Description - Simple Kolmogorov time-scale model for the flame-wrinling generation rate. + Simple Kolmogorov time-scale (KTS) model for the flame-wrinling generation + rate. SourceFiles KTS.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C index 1ba6881b8f..c467185418 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 908dc3a623..4e6ee553bb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - XiGModel + Foam::XiGModel Description Base-class for all Xi generation models used by the b-Xi combustion model. + See Technical Report SH/RE/01R for details on the PDR modelling. For details + on the use of XiGModel see \link XiModel.H \endlink. The model available is + \link instabilityG.H \endlink SourceFiles XiGModel.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C index d3abce6586..780bc8418d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C index 420ef95197..f0608eae9c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index 596e86229b..ab01b3a8e0 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - instabilityG + Foam::XiGModels::instabilityG Description - Flame-surface instabilityG flame-wrinking generation rate coefficient model. + Flame-surface instabilityG flame-wrinking generation rate coefficient model + used in \link XiModel.H \endlink. + + See Technical Report SH/RE/01R for details on the PDR modelling. SourceFiles instabilityG.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C index 896e1fd5ca..5297ede9c9 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index 13fa58a53e..f44d1d5308 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,65 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - XiModel + Foam::XiModel Description Base-class for all Xi models used by the b-Xi combustion model. + See Technical Report SH/RE/01R for details on the PDR modelling. + + Xi is given through an algebraic expression (\link algebraic.H \endlink), + by solving a transport equation (\link transport.H \endlink) or a + fixed value (\link fixed.H \endlink). + + See report TR/HGW/10 for details on the Weller two equations model. + + In the algebraic and transport methods \f$\Xi_{eq}\f$ is calculated in + similar way. In the algebraic approach, \f$\Xi_{eq}\f$ is the value used in + the \f$ b \f$ transport equation. + + \f$\Xi_{eq}\f$ is calculated as follows: + + \f$\Xi_{eq} = 1 + (1 + 2\Xi_{coeff}(0.5 - \dwea{b}))(\Xi^* - 1)\f$ + + where: + + \f$ \dwea{b} \f$ is the regress variable. + + \f$ \Xi_{coeff} \f$ is a model constant. + + \f$ \Xi^* \f$ is the total equilibrium wrinkling combining the effects + of the flame inestability and turbulence interaction and is given by + + \f[ + \Xi^* = \frac {R}{R - G_\eta - G_{in}} + \f] + + where: + + \f$ G_\eta \f$ is the generation rate of wrinkling due to turbulence + interaction. + + \f$ G_{in} = \kappa \rho_{u}/\rho_{b} \f$ is the generation + rate due to the flame inestability. + + By adding the removal rates of the two effects: + + \f[ + R = G_\eta \frac{\Xi_{\eta_{eq}}}{\Xi_{\eta_{eq}} - 1} + + G_{in} \frac{\Xi_{{in}_{eq}}}{\Xi_{{in}_{eq}} - 1} + \f] + + where: + + \f$ R \f$ is the total removal. + + \f$ G_\eta \f$ is a model constant. + + \f$ \Xi_{\eta_{eq}} \f$ is the flame wrinkling due to turbulence. + + \f$ \Xi_{{in}_{eq}} \f$ is the equilibrium level of the flame wrinkling + generated by inestability. It is a constant (default 2.5). + SourceFiles XiModel.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C index baf2b93fb6..fd1e25de9b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index ef615cec31..59fc746507 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index 9da38cf00d..fdb2fc20b9 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,11 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - algebraic + Foam::XiModels::algebraic Description Simple algebraic model for Xi based on Gulders correlation with a linear correction function to give a plausible profile for Xi. + See report TR/HGW/10 for details on the Weller two equations model. + See \link XiModel.H \endlink for more details on flame wrinkling modelling. SourceFiles algebraic.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C index d14a8a42b5..58bd7f3072 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 64c44fdff4..968ed87d04 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,11 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - fixed + Foam::XiModels::fixed Description - Fixed value model for Xi. + Fixed value model for Xi. See \link XiModel.H \endlink for more details + on flame wrinkling modelling. SourceFiles fixed.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index 283fbe0211..6b3f309429 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index db2a7255aa..71db2b7e57 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,11 +23,13 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - transport + Foam::XiModels::transport Description Simple transport model for Xi based on Gulders correlation with a linear correction function to give a plausible profile for Xi. + See report TR/HGW/10 for details on the Weller two equations model. + See \link XiModel.H \endlink for more details on flame wrinkling modelling. SourceFiles transport.C diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index 3fd99b65ea..cb44931540 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -1,7 +1,7 @@ tmp > mvConvection ( fv::convectionScheme::New - ( + ( mesh, fields, phi, @@ -25,7 +25,7 @@ if (ign.ignited()) // Unburnt gas density // ~~~~~~~~~~~~~~~~~~~ - volScalarField rhou = thermo->rhou(); + volScalarField rhou = thermo.rhou(); // Calculate flame normal etc. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index ba07a6dd46..74a18ab6f5 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -1,10 +1,11 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr thermo + autoPtr pThermo ( hhuCombustionThermo::New(mesh) ); - combustionMixture& composition = thermo->composition(); + hhuCombustionThermo& thermo = pThermo(); + basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho ( @@ -16,13 +17,13 @@ IOobject::NO_READ, IOobject::AUTO_WRITE ), - thermo->rho() + thermo.rho() ); - volScalarField& p = thermo->p(); - const volScalarField& psi = thermo->psi(); - volScalarField& h = thermo->h(); - volScalarField& hu = thermo->hu(); + 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; @@ -54,7 +55,7 @@ rho, U, phi, - thermo() + thermo ) ); diff --git a/applications/solvers/combustion/PDRFoam/hEqn.H b/applications/solvers/combustion/PDRFoam/hEqn.H index 8077929487..7f5292d01a 100644 --- a/applications/solvers/combustion/PDRFoam/hEqn.H +++ b/applications/solvers/combustion/PDRFoam/hEqn.H @@ -8,5 +8,5 @@ betav*DpDt ); - thermo->correct(); + thermo.correct(); } diff --git a/applications/solvers/combustion/PDRFoam/huEqn.H b/applications/solvers/combustion/PDRFoam/huEqn.H index 462f271f4b..3467bc6b75 100644 --- a/applications/solvers/combustion/PDRFoam/huEqn.H +++ b/applications/solvers/combustion/PDRFoam/huEqn.H @@ -13,6 +13,6 @@ if (ign.ignited()) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) == - betav*DpDt*rho/thermo->rhou() + betav*DpDt*rho/thermo.rhou() ); } diff --git a/applications/solvers/combustion/PDRFoam/kEpsilon.H b/applications/solvers/combustion/PDRFoam/kEpsilon.H deleted file mode 100644 index 7264443d6d..0000000000 --- a/applications/solvers/combustion/PDRFoam/kEpsilon.H +++ /dev/null @@ -1,54 +0,0 @@ -if(turbulence) -{ - volScalarField divU = fvc::div(Uf & mesh.Sf()); - - tmp 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(); diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index bac69ffa67..9f42a4cc97 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -395,7 +395,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const ( "Ma", mesh.time().timeName(), - mesh.db(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index e837fefa8b..1931dbbb35 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,11 +23,38 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - SCOPE + Foam::laminarFlameSpeedModels::SCOPE Description Laminar flame speed obtained from the SCOPE correlation. + Seven parameters are specified in terms of polynomial functions of + stoichiometry. Two polynomials are fitted, covering different parts of the + flammable range. If the mixture is outside the fitted range, linear + interpolation is used between the extreme of the polynomio and the upper or + lower flammable limit with the Markstein number constant. + + Variations of pressure and temperature from the reference values are taken + into account through \f$ pexp \f$ and \f$ texp \f$ + + The laminar burning velocity fitting polynomial is: + + \f$ Su = a_{0}(1+a_{1}x+K+..a_{i}x^{i}..+a_{6}x^{6}) (p/p_{ref})^{pexp} + (T/T_{ref})^{texp} \f$ + + where: + + \f$ a_{i} \f$ are the polinomial coefficients. + + \f$ pexp \f$ and \f$ texp \f$ are the pressure and temperature factors + respectively. + + \f$ x \f$ is the equivalence ratio. + + \f$ T_{ref} \f$ and \f$ p_{ref} \f$ are the temperature and pressure + references for the laminar burning velocity. + + SourceFiles SCOPELaminarFlameSpeed.C @@ -125,7 +152,7 @@ class SCOPE // corrected for temperature and pressure dependence inline scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const; - //- Laminar flame speed evaluated from the given uniform + //- Laminar flame speed evaluated from the given uniform // equivalence ratio corrected for temperature and pressure dependence tmp Su0pTphi ( @@ -134,7 +161,7 @@ class SCOPE scalar phi ) const; - //- Laminar flame speed evaluated from the given equivalence ratio + //- Laminar flame speed evaluated from the given equivalence ratio // distribution corrected for temperature and pressure dependence tmp Su0pTphi ( @@ -144,7 +171,7 @@ class SCOPE ) const; //- Return the Markstein number - // evaluated from the given equivalence ratio + // evaluated from the given equivalence ratio tmp Ma(const volScalarField& phi) const; //- Construct as copy (not implemented) @@ -169,8 +196,7 @@ public: // Destructor - - ~SCOPE(); + ~SCOPE(); // Member functions diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index 312de8301a..524c8eac74 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -1,4 +1,4 @@ -rho = thermo->rho(); +rho = thermo.rho(); volScalarField rUA = 1.0/UEqn.A(); U = invA & UEqn.H(); @@ -8,7 +8,7 @@ if (transonic) surfaceScalarField phid ( "phid", - fvc::interpolate(thermo->psi()) + fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) @@ -34,7 +34,7 @@ if (transonic) } else { - phi = + phi = fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) diff --git a/applications/solvers/combustion/PDRFoam/rhoEqn.H b/applications/solvers/combustion/PDRFoam/rhoEqn.H index 9c435b5ced..fdbed84230 100644 --- a/applications/solvers/combustion/PDRFoam/rhoEqn.H +++ b/applications/solvers/combustion/PDRFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/setDeltaT.H b/applications/solvers/combustion/PDRFoam/setDeltaT.H index 1e768a3dcb..7092e9779a 100644 --- a/applications/solvers/combustion/PDRFoam/setDeltaT.H +++ b/applications/solvers/combustion/PDRFoam/setDeltaT.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index 69ded9ae57..c328b2c1b3 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -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)/thermophysicalModels/reactionThermo/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 \ + -lreactionThermophysicalModels \ -lspecie \ - -llaminarFlameSpeedModels + -llaminarFlameSpeedModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/combustion/XiFoam/UEqn.H b/applications/solvers/combustion/XiFoam/UEqn.H index 2a7753e14e..9697c6e1ed 100644 --- a/applications/solvers/combustion/XiFoam/UEqn.H +++ b/applications/solvers/combustion/XiFoam/UEqn.H @@ -7,6 +7,8 @@ rho*g ); + UEqn.relax(); + if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 8ee0f4d14f..15442ddb4f 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,8 +26,8 @@ Application XiFoam Description - Compressible premixed/partially-premixed combustion solver with turbulence - modelling. + Solver for compressible premixed/partially-premixed combustion with + turbulence modelling. Combusting RANS code using the b-Xi two-equation model. Xi may be obtained by either the solution of the Xi transport @@ -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" @@ -61,55 +61,58 @@ Description int main(int argc, char *argv[]) { -# include "setRootCase.H" + #include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readCombustionProperties.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" + #include "createTime.H" + #include "createMesh.H" + #include "readCombustionProperties.H" + #include "readGravitationalAcceleration.H" + #include "createFields.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" + #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++) + // --- Pressure-velocity PIMPLE corrector loop + for (int oCorr=0; oCorrcorrect(); } - turbulence->correct(); - - rho = thermo->rho(); + rho = thermo.rho(); runTime.write(); @@ -120,7 +123,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index 739d6987e8..d06ec2e5f0 100644 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ b/applications/solvers/combustion/XiFoam/bEqn.H @@ -6,7 +6,7 @@ if (ign.ignited()) // Unburnt gas density // ~~~~~~~~~~~~~~~~~~~ - volScalarField rhou = thermo->rhou(); + volScalarField rhou = thermo.rhou(); // Calculate flame normal etc. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -52,7 +52,7 @@ if (ign.ignited()) + mvConvection->fvmDiv(phi, b) + fvm::div(phiSt, b, "div(phiSt,b)") - fvm::Sp(fvc::div(phiSt), b) - - fvm::laplacian(turbulence->muEff(), b) + - fvm::laplacian(turbulence->alphaEff(), b) ); @@ -76,7 +76,7 @@ if (ign.ignited()) volScalarField epsilon = pow(uPrimeCoef, 3)*turbulence->epsilon(); - volScalarField tauEta = sqrt(thermo->muu()/(rhou*epsilon)); + volScalarField tauEta = sqrt(thermo.muu()/(rhou*epsilon)); volScalarField Reta = up/ ( @@ -90,7 +90,7 @@ if (ign.ignited()) // ~~~~~~~~~~~~~~~~~ surfaceScalarField phiXi = phiSt - - fvc::interpolate(fvc::laplacian(turbulence->muEff(), b)/mgb)*nf + - fvc::interpolate(fvc::laplacian(turbulence->alphaEff(), b)/mgb)*nf + fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf; @@ -180,7 +180,7 @@ if (ign.ignited()) // with a linear correction function to give a plausible profile for Xi // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - volScalarField XiEqStar = + volScalarField XiEqStar = scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta; volScalarField XiEq = diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 737680fefa..ef16bd615c 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -1,10 +1,11 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr thermo + autoPtr pThermo ( hhuCombustionThermo::New(mesh) ); - combustionMixture& composition = thermo->composition(); + hhuCombustionThermo& thermo = pThermo(); + basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho ( @@ -16,18 +17,18 @@ IOobject::NO_READ, IOobject::AUTO_WRITE ), - thermo->rho() + thermo.rho() ); - volScalarField& p = thermo->p(); - const volScalarField& psi = thermo->psi(); - volScalarField& h = thermo->h(); - volScalarField& hu = thermo->hu(); + 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(); + const volScalarField& T = thermo.T(); Info<< "\nReading field U\n" << endl; @@ -48,19 +49,19 @@ Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, phi, - thermo() + thermo ) ); Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = + volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H index 519cbd7cbe..46d7aeae82 100644 --- a/applications/solvers/combustion/XiFoam/ftEqn.H +++ b/applications/solvers/combustion/XiFoam/ftEqn.H @@ -1,7 +1,7 @@ tmp > mvConvection ( fv::convectionScheme::New - ( + ( mesh, fields, phi, @@ -17,6 +17,6 @@ if (composition.contains("ft")) ( fvm::ddt(rho, ft) + mvConvection->fvmDiv(phi, ft) - - fvm::laplacian(turbulence->muEff(), ft) + - fvm::laplacian(turbulence->alphaEff(), ft) ); } diff --git a/applications/solvers/combustion/XiFoam/hEqn.H b/applications/solvers/combustion/XiFoam/hEqn.H index 2a5204aa8d..513ae60441 100644 --- a/applications/solvers/combustion/XiFoam/hEqn.H +++ b/applications/solvers/combustion/XiFoam/hEqn.H @@ -1,5 +1,5 @@ { - solve + fvScalarMatrix hEqn ( fvm::ddt(rho, h) + mvConvection->fvmDiv(phi, h) @@ -8,5 +8,8 @@ DpDt ); - thermo->correct(); + hEqn.relax(); + hEqn.solve(); + + thermo.correct(); } diff --git a/applications/solvers/combustion/XiFoam/huEqn.H b/applications/solvers/combustion/XiFoam/huEqn.H index 2f001b0032..0b4068344b 100644 --- a/applications/solvers/combustion/XiFoam/huEqn.H +++ b/applications/solvers/combustion/XiFoam/huEqn.H @@ -13,6 +13,6 @@ if (ign.ignited()) //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) == - DpDt*rho/thermo->rhou() + DpDt*rho/thermo.rhou() ); } diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index 05db89627d..9443f909a3 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -1,4 +1,4 @@ -rho = thermo->rho(); +rho = thermo.rho(); volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); @@ -8,7 +8,7 @@ if (transonic) surfaceScalarField phid ( "phid", - fvc::interpolate(thermo->psi()) + fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) @@ -34,9 +34,9 @@ if (transonic) } else { - phi = - fvc::interpolate(rho)* - ( + phi = + fvc::interpolate(rho) + *( (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) ); diff --git a/applications/solvers/combustion/Xoodles/Make/files b/applications/solvers/combustion/Xoodles/Make/files deleted file mode 100644 index 3db9275c31..0000000000 --- a/applications/solvers/combustion/Xoodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Xoodles.C - -EXE = $(FOAM_APPBIN)/Xoodles diff --git a/applications/solvers/combustion/Xoodles/Make/options b/applications/solvers/combustion/Xoodles/Make/options deleted file mode 100644 index 92932f16d0..0000000000 --- a/applications/solvers/combustion/Xoodles/Make/options +++ /dev/null @@ -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 diff --git a/applications/solvers/combustion/Xoodles/Xoodles.C b/applications/solvers/combustion/Xoodles/Xoodles.C deleted file mode 100644 index 48ceb34218..0000000000 --- a/applications/solvers/combustion/Xoodles/Xoodles.C +++ /dev/null @@ -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); -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/Xoodles/createFields.H b/applications/solvers/combustion/Xoodles/createFields.H deleted file mode 100644 index 8a12db6f1b..0000000000 --- a/applications/solvers/combustion/Xoodles/createFields.H +++ /dev/null @@ -1,124 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr 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 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 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::fieldTable fields; - - if (composition.contains("ft")) - { - fields.add(composition.Y("ft")); - } - - fields.add(b); - fields.add(h); - fields.add(hu); diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index fef39c4afd..53aa22b25a 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -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)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lengine \ - -lfiniteVolume \ -lcompressibleRASModels \ + -lcompressibleLESModels \ -lbasicThermophysicalModels \ - -lspecie + -lspecie \ + -lfiniteVolume diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index b262b7b79c..67def3fb59 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,35 +33,35 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "basicThermo.H" -#include "RASModel.H" +#include "basicPsiThermo.H" +#include "turbulenceModel.H" #include "OFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { -# include "setRootCase.H" + #include "setRootCase.H" -# include "createEngineTime.H" -# include "createEngineMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "readEngineTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" -# include "startSummary.H" + #include "createEngineTime.H" + #include "createEngineMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readEngineTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + #include "startSummary.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readPISOControls.H" -# include "readEngineTimeControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readEngineTimeControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" runTime++; @@ -70,22 +70,22 @@ int main(int argc, char *argv[]) mesh.move(); -# include "rhoEqn.H" + #include "rhoEqn.H" -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "hEqn.H" -# include "pEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); runTime.write(); -# include "logSummary.H" + #include "logSummary.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index ed7c012d53..6bc3139ce6 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -1,9 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr thermo + autoPtr pThermo ( - basicThermo::New(mesh) + basicPsiThermo::New(mesh) ); + basicPsiThermo& thermo = pThermo(); volScalarField rho ( @@ -15,13 +16,13 @@ IOobject::NO_READ, IOobject::AUTO_WRITE ), - thermo->rho() + thermo.rho() ); - volScalarField& p = thermo->p(); - const volScalarField& psi = thermo->psi(); - volScalarField& h = thermo->h(); - const volScalarField& T = thermo->T(); + volScalarField& p = thermo.p(); + const volScalarField& psi = thermo.psi(); + volScalarField& h = thermo.h(); + const volScalarField& T = thermo.T(); Info<< "\nReading field U\n" << endl; @@ -38,18 +39,18 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, phi, - thermo() + thermo ) ); diff --git a/applications/solvers/combustion/coldEngineFoam/hEqn.H b/applications/solvers/combustion/coldEngineFoam/hEqn.H index f72ef0c89c..ae60d3316e 100644 --- a/applications/solvers/combustion/coldEngineFoam/hEqn.H +++ b/applications/solvers/combustion/coldEngineFoam/hEqn.H @@ -8,5 +8,5 @@ DpDt ); - thermo->correct(); + thermo.correct(); } diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index a5cbe01e35..60558513fe 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -1,25 +1,26 @@ 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 \ -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ - -I$(LIB_SRC)/../applications/solvers/combustion/XiFoam \ + -I$(LIB_SRC)/../applications/solvers/reactionThermo/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 \ - -lcombustionThermophysicalModels \ + -lcompressibleLESModels \ + -lreactionThermophysicalModels \ -lfiniteVolume \ -llagrangian \ -ldieselSpray \ diff --git a/applications/solvers/combustion/dieselEngineFoam/YEqn.H b/applications/solvers/combustion/dieselEngineFoam/YEqn.H index 2f74884bbd..9d46c0d611 100644 --- a/applications/solvers/combustion/dieselEngineFoam/YEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/YEqn.H @@ -14,7 +14,7 @@ tmp > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for(label i=0; i > mvConvection inertIndex = i; } } - + Y[inertIndex] = scalar(1) - Yt; Y[inertIndex].max(0.0); - } diff --git a/applications/solvers/combustion/dieselEngineFoam/createFields.H b/applications/solvers/combustion/dieselEngineFoam/createFields.H index c07aa63cdb..9d9229cc3c 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createFields.H +++ b/applications/solvers/combustion/dieselEngineFoam/createFields.H @@ -1,13 +1,17 @@ Info<< nl << "Reading thermophysicalProperties" << endl; -autoPtr thermo -( - hCombustionThermo::New(mesh) -); -combustionMixture& composition = thermo->composition(); +autoPtr pChemistry +( + psiChemistryModel::New(mesh) +); +psiChemistryModel& chemistry = pChemistry(); + +hCombustionThermo& thermo = chemistry.thermo(); + +basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); -word inertSpecie(thermo->lookup("inertSpecie")); +word inertSpecie(thermo.lookup("inertSpecie")); volScalarField rho ( @@ -17,7 +21,7 @@ volScalarField rho runTime.timeName(), mesh ), - thermo->rho() + thermo.rho() ); Info<< "Reading field U\n" << endl; @@ -35,10 +39,10 @@ volVectorField U ); -volScalarField& p = thermo->p(); -const volScalarField& psi = thermo->psi(); -const volScalarField& T = thermo->T(); -volScalarField& h = thermo->h(); +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); +const volScalarField& T = thermo.T(); +volScalarField& h = thermo.h(); #include "compressibleCreatePhi.H" @@ -58,46 +62,26 @@ volScalarField kappa ); Info << "Creating turbulence model.\n" << nl; -autoPtr turbulence +autoPtr turbulence ( - compressible::RASModel::New + compressible::turbulenceModel::New ( rho, U, phi, - thermo() + thermo ) ); Info<< "Creating field DpDt\n" << endl; -volScalarField DpDt = +volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); -Info << "Constructing chemical mechanism" << endl; -chemistryModel chemistry -( - thermo(), - rho -); multivariateSurfaceInterpolationScheme::fieldTable fields; -for(label i=0; i gasProperties(Y.size()); +PtrList gasProperties(Y.size()); forAll(gasProperties, i) { gasProperties.set ( i, - new specieProperties + new gasThermoPhysics ( - dynamic_cast(thermo()).speciesData()[i] + dynamic_cast&> + (thermo).speciesData()[i] ) ); } spray dieselSpray ( - vpi, U, rho, p, @@ -26,7 +23,7 @@ spray dieselSpray composition, gasProperties, thermo, - environmentalProperties + g ); scalar gasMass0 = fvc::domainIntegrate(rho).value(); @@ -36,7 +33,5 @@ if (dieselSpray.twoD()) gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge(); } -reduce(gasMass0, sumOp()); - gasMass0 -= dieselSpray.injectedMass(runTime.value()) - dieselSpray.liquidMass(); diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index b6cfb46d92..e3f9c0b118 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ Application dieselFoam Description - Diesel engine spray and combustion code. + Solver for diesel engine spray and combustion. \*---------------------------------------------------------------------------*/ @@ -34,48 +34,53 @@ 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 "psiChemistryModel.H" #include "chemistrySolver.H" #include "multivariateScheme.H" #include "Switch.H" #include "OFstream.H" +#include "volPointInterpolation.H" +#include "thermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { -# include "setRootCase.H" -# include "createEngineTime.H" -# include "createEngineMesh.H" -# include "createFields.H" -# include "readEnvironmentalProperties.H" -# include "readCombustionProperties.H" -# include "createSpray.H" -# include "initContinuityErrs.H" -# include "readEngineTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" -# include "startSummary.H" + #include "setRootCase.H" + #include "createEngineTime.H" + #include "createEngineMesh.H" + #include "createFields.H" + #include "readGravitationalAcceleration.H" + #include "readCombustionProperties.H" + #include "createSpray.H" + #include "initContinuityErrs.H" + #include "readEngineTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + #include "startSummary.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info << "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readPISOControls.H" -# include "readEngineTimeControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readEngineTimeControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl; mesh.move(); - vpi.updateMesh(); + const_cast + ( + volPointInterpolation::New(mesh) + ).updateMesh(); dieselSpray.evolve(); @@ -97,29 +102,32 @@ int main(int argc, char *argv[]) kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); } -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) { -# include "YEqn.H" -# include "hEqn.H" + #include "YEqn.H" + #include "hEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "pEqn.H" + #include "pEqn.H" } } turbulence->correct(); -# include "logSummary.H" -# include "spraySummary.H" + #include "logSummary.H" + #include "spraySummary.H" - rho = thermo->rho(); + rho = thermo.rho(); - runTime.write(); + if (runTime.write()) + { + chemistry.dQ()().write(); + } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" @@ -128,7 +136,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return(0); + return 0; } diff --git a/applications/solvers/combustion/dieselEngineFoam/hEqn.H b/applications/solvers/combustion/dieselEngineFoam/hEqn.H index 347fef1a9c..0406f7fbd4 100644 --- a/applications/solvers/combustion/dieselEngineFoam/hEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/hEqn.H @@ -9,32 +9,5 @@ + dieselSpray.heatTransferSource() ); - thermo->correct(); - - forAll(dQ, i) - { - dQ[i] = 0.0; - } - - scalarField cp(dQ.size(), 0.0); - - forAll(Y, i) - { - volScalarField RRi = chemistry.RR(i); - - forAll(h, celli) - { - scalar Ti = T[celli]; - cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti); - scalar hi = chemistry.specieThermo()[i].h(Ti); - scalar RR = RRi[celli]; - dQ[celli] -= hi*RR; - } - - } - - forAll(dQ, celli) - { - dQ[celli] /= cp[celli]; - } + thermo.correct(); } diff --git a/applications/solvers/combustion/dieselEngineFoam/pEqn.H b/applications/solvers/combustion/dieselEngineFoam/pEqn.H index 0324a47ce0..b68ae73296 100644 --- a/applications/solvers/combustion/dieselEngineFoam/pEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/pEqn.H @@ -1,4 +1,4 @@ -rho = thermo->rho(); +rho = thermo.rho(); volScalarField A = UEqn.A(); U = UEqn.H()/A; @@ -8,7 +8,7 @@ if (transonic) surfaceScalarField phid ( "phid", - fvc::interpolate(thermo->psi()) + fvc::interpolate(psi) *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) ); diff --git a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H index de3bac7194..dd396486d3 100644 --- a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ volScalarField Sevap dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0) ); -for(label i=0; i()); + label Nparcels = dieselSpray.size(); + reduce(Nparcels, sumOp