Commit 7dd2f067 authored by henry's avatar henry
Browse files

Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

Conflicts:
	src/turbulenceModels/Allwmake

Conflicts:
	src/turbulenceModels/Allwmake

Conflicts:
	src/turbulenceModels/Allwmake

Conflicts:
	src/turbulenceModels/Allwmake
parents 04791650 74cb43af
......@@ -5,15 +5,15 @@ set -x
# wmake is required for subsequent targets
( cd wmake/src && make )
# build ThirdParty sources
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
( cd src && ./Allwmake )
( cd applications && ./Allwmake )
src/Allwmake
applications/Allwmake
if [ "$1" = doc ]
then
( cd doc && ./Allwmake )
doc/Allwmake
fi
# ----------------------------------------------------------------- end-of-file
OpenFOAM README for version 1.5
1 Copyright
OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See the file COPYING in this directory, for a description of the GNU General Public License terms under which you can
copy the files.
2 System requirements
OpenFOAM is developed and tested on Linux, but should work with other Unix style systems. To check your system setup,
execute the foamSystemCheck script in the bin/ directory of the OpenFOAM installation. If no problems are reported,
proceed to "3. Installation"; otherwise contact your system administrator.
If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the section "Running OpenFOAM in 32-bit mode".
2.1 Qt (from http://trolltech.com/products/qt)
The ParaView 3.3 visualisation package requires that Qt version 4.3.x MUST be installed on the system. Earlier or more
recent versions (4.2.x or 4.4.x) will NOT work. To check whether Qt4 is installed, and the version, type:
* qmake <div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Copyright</a></li>
<li><a href="#sec-2">2 System requirements</a>
<ul>
<li><a href="#sec-2.1">2.1 Qt (from http://trolltech.com/products/qt)</a></li>
</ul>
</li>
<li><a href="#sec-3">3 Installation</a>
<ul>
<li><a href="#sec-3.1">3.1 Installation in alternative locations</a></li>
</ul>
</li>
<li><a href="#sec-4">4 Building from Sources (Optional)</a></li>
<li><a href="#sec-5">5 Testing the installation</a></li>
<li><a href="#sec-6">6 Getting Started</a></li>
<li><a href="#sec-7">7 Compiling Paraview 3.3 and the PV3FoamReader module</a></li>
<li><a href="#sec-8">8 Documentation</a></li>
<li><a href="#sec-9">9 Help</a></li>
<li><a href="#sec-10">10 Reporting Bugs in OpenFOAM</a></li>
<li><a href="#sec-11">11 Running OpenFOAM in 32-bit mode on 64-bit machines</a></li>
</ul>
</div>
</div>
–version
The ParaView binary executables in the ThirdParty distribution will only work with PRECISELY the same version of Qt
with which it was compiled. The 64-bit version of ParaView was compiled with Qt-4.3.1 (with openSuSE-10.3) and the
32-bit version of ParaView was compiled with Qt-4.3.2 (with ubuntu-7.10). If the user finds that a ParaView binary
fails to run, then it is almost certainly due to a conflict in compiled and installed Qt versions and they will need to
consult the section below on "Compiling ParaView and the PV3FoamReader module."
The default versions of Qt used by some GNU/Linux releases are as follows.
* ubuntu-7.10: Version 4.3.2
* ubuntu-8.04: Version 4.3.4
* openSuSE-10.2: Version 4.2.1 - too old
* openSuSE-10.3: Version 4.3.1
* openSuSE-11.0: Version 4.4.0 - too new
Compilation and running of ParaView has been successful using the libraries downloaded in the "libqt4-dev" package on
ubuntu.
If you don't have an appropriate version of Qt installed you can download the sources from TrollTech e.g.: ftp://
ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2 and compile and install in /usr/local or some other
location that does to conflict with the pre-installed version.
3 Installation
Download and unpack the files in the $HOME/OpenFOAM directory as described in: http://www.OpenFOAM.org/download.html
The environment variable settings are contained in files in an etc/ directory in the OpenFOAM release. e.g. in
* $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
* where <VERSION> corresponds to the version 1.4, 1.5, …
* EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the etc/bashrc file by adding the following
line to the end of your $HOME/.bashrc file:
+ . $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/bashrc
Then update the environment variables by sourcing the $HOME/.bashrc file by typing in the terminal:
+ . $HOME/.bashrc
* OR, if running tcsh or csh, source the etc/cshrc file by adding the following line to the end of your $HOME/.cshrc
file:
+ source $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/cshrc
Then update the environment variables by sourcing the $HOME/.cshrc file by typing in the terminal:
+ source $HOME/.cshrc
3.1 Installation in alternative locations
OpenFOAM may also be installed in alternative locations. However, the installation directory should be network
available (e.g., NFS) if parallel calculations are planned.
The environment variable 'FOAM_INST_DIR' can be used to find and source the appropriate resource file. Here is a bash/
ksh/sh example:
* export FOAM_INST_DIR=/data/app/OpenFOAM
* foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
* [ -f $foamDotFile ] && . $foamDotFile
and a csh/tcsh example:
* setenv FOAM_INST_DIR /data/app/OpenFOAM
* foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
* if ( -f $foamDotFile ) source $foamDotFile
The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts of the OpenFOAM installation.
4 Building from Sources (Optional)
If you cannot find an appropriate binary pack for your platform, you can build the complete OpenFOAM from the
source-pack. You will first need to compile or obtain a recent version of gcc (we recomend gcc-4.3.?) for your
platform, which may be obtained from http://gcc.gnu.org/.
Install the compiler in $WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/ and
change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and $WM_PROJECT_DIR/etc/settings.csh appropriately and
finally update the environment variables as in section 3.
Now go to the top-level source directory $WM_PROJECT_DIR and execute the top-level build script './Allwmake'. In
principle this will build everything, but if problems occur with the build order it may be necessary to update the
environment variables and re-execute 'Allwmake'. If you experience difficulties with building the source-pack, or your
platform is not currently supported, please contact <enquiries@OpenCFD.co.uk> to negotiate a support contract and we
will do the port and maintain it for future releases.
5 Testing the installation
To check your installation setup, execute the 'foamInstallationTest' script (in the bin/ directory of the OpenFOAM
installation). If no problems are reported, proceed to getting started with OpenFOAM; otherwise, go back and check you
have installed the software correctly and/or contact your system administrator.
6 Getting Started
Create a project directory within the $HOME/OpenFOAM directory named <USER>-<VERSION> (e.g. 'chris-1.5' for user chris
and OpenFOAM version 1.5) and create a directory named 'run' within it, e.g. by typing:
* mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
Copy the 'tutorial' examples directory in the OpenFOAM distribution to the 'run' directory. If the OpenFOAM environment
variables are set correctly, then the following command will be correct:
* cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
Run the first example case of incompressible laminar flow in a cavity:
* cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/icoFoam/cavity
* blockMesh
* icoFoam
* paraFoam
7 Compiling Paraview 3.3 and the PV3FoamReader module
A version of Qt 4.3.x must be installed to compile ParaView. The compilation is a fairly simple process using the
supplied buildParaView3.3-cvs script that has worked is our tests with other packages supplied in the ThirdParty
directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following:
* cd $FOAM_INST_DIR/ThirdParty
* rm -rf ParaView3.3-cvs/platforms
* buildParaView3.3-cvs
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the usual manner as follows:
* cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
* ./Allwclean
* ./Allwmake
8 Documentation
http://www.OpenFOAM.org/doc
9 Help
http://www.OpenFOAM.org http://www.OpenFOAM.org/discussion.html
10 Reporting Bugs in OpenFOAM
http://www.OpenFOAM.org/bugs.html
11 Running OpenFOAM in 32-bit mode on 64-bit machines
Linux users with a 64-bit machine may install either the OpenFOAM 32-bit version (linux) or the OpenFOAM 64-bit version
(linux64), or both. The 64-bit is the default mode on a 64-bit machine. To use an installed 32-bit version, the user
must set the environment variable WM_ARCH_OPTION to 32 before sourcing the etc/bashrc (or etc/cshrc) file.
Date: 26 August 2008
HTML generated by org-mode 6.06b in emacs 23
......@@ -10,7 +10,7 @@
OpenFOAM-1.5 is is a significant upgrade to version 1.4 in ways which are
outlined below. This release passes all our standard tests and the tutorials
have been broadly checked. If there are any bugs, please report them using
the instructions set out in: http://www.openfoam.org/bugs.html.
the instructions set out in: http://www.OpenFOAM.org/bugs.html.
Most of the developments for this release are in: new applications, e.g. for
multiphase flow and cavitation, buoyancy-flow and heat transfer, high speed
......
OpenFOAM release notes for version 1.5
1 Overview
OpenFOAM-1.5 is is a significant upgrade to version 1.4 in ways which are
outlined below. This release passes all our standard tests and the tutorials
have been broadly checked. If there are any bugs, please report them using the
instructions set out in: http://www.openfoam.org/bugs.html.
Most of the developments for this release are in: new applications, e.g. for
multiphase flow and cavitation, buoyancy-flow and heat transfer, high speed
flows and even molecular dynamics; new utilities, e.g. for meshing and case
monitoring; and, new modelling, e.g. in Lagrangian particle tracking,
radiation and rotating frames of reference. With these new applications come
numerous new example cases.
2 GNU/Linux version
The 64bit binary packs of the OpenFOAM release were compiled on a machine
running SuSE GNU/Linux version 10.3 and the 32bit on a machine running Ubuntu
GNU/Linux version 7.1 and also tested on Ubuntu 8.04. We recommend that users
run OpenFOAM on one of these or a similar recent version of GNU/Linux. This
release has also been successfully compiled and tested on older GNU/Linux
releases but this re<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Overview</a></li>
<li><a href="#sec-2">2 GNU/Linux version</a></li>
<li><a href="#sec-3">3 C++ Compiler version</a></li>
<li><a href="#sec-4">4 Developments to solvers (applications)</a></li>
<li><a href="#sec-5">5 Automatic mesher</a></li>
<li><a href="#sec-6">6 Developments to utilities</a></li>
<li><a href="#sec-7">7 Migration from ParaView 2.4 to ParaView 3.x</a></li>
<li><a href="#sec-8">8 Model development</a></li>
<li><a href="#sec-9">9 New functionObjects</a></li>
<li><a href="#sec-10">10 Improvements to boundary conditions</a></li>
<li><a href="#sec-11">11 Other</a></li>
</ul>
</div>
</div>
quires the installation of Qt 4.3.? for ParaView-3 to run.
3 C++ Compiler version
* Released compiled with GCC 4.3.1, the latest version.
* Built in support for the Intel C++ 10.? compiler (untested).
* The choice of the compiler is controlled by the setting of the
$WM_COMPILER and $WM_COMPILER_ARCH environment variables in the
OpenFOAM-1.5/etc/bashrc (or cshrc) file.
* The location of the installation of the compiler is controlled by the
$compilerInstall environment variable in the OpenFOAM-1.5/etc/settings.sh
(or settings.csh) file.
4 Developments to solvers (applications)
* New rhoCentralFoam solver for high-speed, viscous, compressible flows
using non-oscillatory, central-upwind schemes.
* New interDyMFoam solver for 2 incompressible, isothermal, immiscible
fluids using a VoF phase-fraction based interface capturing approach, with
optional mesh motion and mesh topology changes including adaptive mesh
(un)refinement. Useful for simulations such as tank filling, sloshing ---
using solid body motion e.g. SDA or SKA (6DoF) — and slamming (using the
mesh motion solver) and other large-scale applications that benefit from
the efficiency gain of adaptive mesh (un)refinement of the interface.
* New compressibleInterFoam solver for 2 compressible, isothermal,
immiscible fluids using a volume of fluid (VoF) phase-fraction approach
for interface-capturing. The momentum and other fluid properties are of
the "mixture" and a single momentum equation is solved. Turbulence is
modelled using a run-time selectable incompressible LES model.
* New interPhaseChangeFoam solver for 2 incompressible, isothermal,
immiscible fluids with phase-change, e.g. cavitation. Uses VoF interface
capturing, with momentum and other fluid properties described for the
``mixture'' and a single momentum equation is solved. The set of
phase-change models provided are designed to simulate cavitation but other
mechanisms of phase-change are supported within this solver framework.
* New rasCavitatingFoam solver for transient cavitation using a barotropic
compressibility model, with RAS turbulence.
* New lesCavitatingFoam solver for transient cavitation using a barotropic
compressibility model, with LES turbulence.
* New chtMultiRegionFoam solver that couples conjugate heat transfer in a
solid to a buoyancy-driven flow simulation.
* New PDRFoam solver for compressible premixed/partially-premixed turbulent
combustion that includes porosity/distributed resistance (PDR) modelling
to handle regions containing solid blockages which cannot be resolved by
the mesh. Requires the PDR fields.
* New lesBuoyantFoam solver for transient, buoyant, turbulent flow of
compressible fluids for ventilation and heat-transfer. Turbulence is
modelled using a run-time selectable compressible LES model.
* New rhoPimpleFoam solver for transient, turbulent flow of compressible
fluids for ventilation and heat-transfer. Uses the flexible PIMPLE
(PISO-SIMPLE) solution for time-resolved and pseudo-transient simulations.
* New buoyantSimpleRadiationFoam solver for steady-state, buoyant, turbulent
flow of compressible fluids with radiation, for ventilation and
heat-transfer.
* New rhoTurbTwinParcelFoam solver for transient for compressible, turbulent
flow with two thermo-clouds.
* New gnemdFOAM solver for general purpose molecular dynamics that simulates
atoms in arbitrary shaped domains and average atomic/molecular quantities
to the mesh to create field data.
* New mdEqulibrationFoam solver to equilibrates and/or preconditions
molecular dynamics systems.
* Demonstration SRFSimpleFoam solver based on simpleFoam that incorporates
the SRF extensions (see below) for rotating flows.
5 Automatic mesher
New snappyHexMesh utility that generates split-hex meshes automatically from
triangulated (STL) surface geometries. The mesh approximately conforms to the
surface by iteratively refining a starting mesh and morphing the resulting
split-hex mesh to the surface. An optional phase will shrink back the
resulting mesh and insert cell layers. It has a flexible specification of mesh
refinement level and robust surface handling with a pre-specified final mesh
quality. It runs in parallel with a load balancing step every iteration.
6 Developments to utilities
* New extrude2DMesh utility that extrudes 2D meshes into a 3D mesh. 2D
meshes are described by faces with 2 points, so can be used in combination
with 2D meshes converted with ccm26ToFoam.
* New couplePatches functionality integrated into createPatch, which
optionally synchronises ("couples") points and faces of coupled (cyclic,
processor) patches.
* New applyBoundaryLayer pre-processing utility to apply 1/7th power-law
boundary layers at walls, starting from uniform or potential flow
solutions.
* New execFlowFunctionObjects utility executes functionObjects as a
post-processing activity, e.g. probes, sampling, force calculation.
* New changeDictionary utility makes batch changes to OpenFOAM input files,
e.g. to change boundary conditions of field files.
* New foamCalc utility, a generic post-processing field calculator tool
* New molConfig pre-processing utility for molecular dynamics cases. Fills
zones of a mesh with single crystal lattices of specified structure,
density, orientation, alignment and temperature.
* Extended splitMeshRegions utility to split multi-zone meshes, e.g. defined
through cellZones, into separate meshes.
* Extended the foamToVTK, decomposePar, reconstructPar and mapFields
utilities to include support for multiple particle clouds in parallel
processing.
7 Migration from ParaView 2.4 to ParaView 3.x
* Rewritten OpenFOAM Reader Module for version 3, a major redesign of
ParaView.
* New features include viewing patch names, reading of Lagrangian data,
handling of cell, face and point sets, multiple views.
8 Model development
* Overhauled the lagrangian library to support multiple clouds.
* New lagrangianIntermediate library incorporating a hierarchy of parcel and
cloud types, accommodating kinematic, thermodynamic and reacting
applications, including coupling to the new radiation library. Sub-models
are added at the relevant level of physics, e.g.:
+ kinematic: injection, wall interaction, drag, dispersion;
+ thermo: heat transfer;
+ reacting: reacting composition, mass transfer, surface reactions.
* New single rotating frame of reference (SRF) library for rotating flow
applications, e.g. turbo-machinery.
* New radiation library including the P1 model and associated Marshak
boundary conditions for incident radiation.
* New displacementInterpolation motion solver for flexible mesh scaling.
* New molecularDynamics Lagrangian library to calculate intermolecular
forces between spherically symmetrical monatomic species in arbitrary
geometries.
9 New functionObjects
To aid common monitoring and post-processing activities.
* forces: calculate the force and moment on a patch or set of patches, e.g.
to calculate the lift, drag and moment of an object in the flow.
* forceCoeffs: calculate the normalised force and moment on a patch or set
of patches, e.g. to calculate the lift, drag and moment coefficients of an
object in the flow.
* fieldAverage: calculate field arithmetic mean and prime-squared averages
for a list of fields.
* foamCalcFunctions: calculate field components, div, mag, magGrad or
magSqr.
10 Improvements to boundary conditions
* Generalised jumpCyclic type: cyclic condition with an additional
prescribed jump in value.
* fan type: specialisation of jumpCyclic, applying a prescribed jump in
pressure to simulate a fan within a mesh.
* Generalised advective outflow boundary condition based on solving D/Dt
(psi, U) = 0 at the boundary.
* Additional turbulent flow inlet to specify mixing length and frequency.
* Generalisation of time varying set of boundary conditions.
11 Other
* New argument-free command execution, e.g typing "icoFoam" without root and
case directory arguments.
* Extended time command line options.
* Many enhancements to dictionary including macro substitution, optional
merging and default/overwrite behaviour, enhanced "#include" file handling
and the framework to support function evaluation.
* Cross-links between applications and Doxygen documentation with the "-doc"
argument.
* Non-blocking, non-buffered, parallel transfers with potential scaling
benefits for larger number of processors.
Date: 07 October 2008
HTML generated by org-mode 6.06b in emacs 23
......@@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
( cd solvers && wmake all )
( cd utilities && wmake all )
wmake all solvers
wmake all utilities
# ----------------------------------------------------------------- end-of-file
......@@ -26,7 +26,8 @@ Description
\*---------------------------------------------------------------------------*/
#include "labelHashSet.H"
#include "HashSet.H"
#include "Map.H"
using namespace Foam;
......@@ -35,19 +36,80 @@ using namespace Foam;
int main(int argc, char *argv[])
{
HashSet<Foam::string> testSet(0);
wordHashSet setA(0);
HashTable<label, word> tableA;
testSet.insert("kjhk");
testSet.insert("kjhk2");
HashTable<empty> tableB;
Map<label> mapA;
Info<< testSet << endl;
setA.insert("kjhk");
setA.insert("kjhk2");
labelHashSet testLabelHashSet(1);
tableA.insert("value1", 1);
tableA.insert("value2", 2);
tableA.insert("value3", 3);
testLabelHashSet.insert(11);
testLabelHashSet.insert(42);
tableB.insert("value4", empty());
tableB.insert("value5", empty());
tableB.insert("value6", empty());
Info<< testLabelHashSet << endl;
mapA.set(1, 1);
mapA.set(2, 2);
mapA.set(3, 3);
mapA.set(4, 4);
Info<< setA << endl;
Info<< tableA << endl;
Info<< mapA << endl;
Info<< "create from HashSet: ";
Info<< wordHashSet(setA) << endl;
Info<< "create from HashTable<T>: ";
Info<< wordHashSet(tableA) << endl;
Info<< "create from HashTable<empty>: ";
Info<< wordHashSet(tableB) << endl;
Info<< "create from Map<label>: ";
Info<< labelHashSet(mapA) << endl;
Info<<"combined toc: "
<< (wordHashSet(setA) | wordHashSet(tableA) | wordHashSet(tableB))
<< nl;
labelHashSet setB(1);
setB.insert(11);
setB.insert(42);
Info<< "setB : " << setB << endl;
labelHashSet setC(1);
setC.insert(2008);
setC.insert(1984);
Info<< "setC : " << setC << endl;
labelHashSet setD(1);
setD.insert(11);
setD.insert(100);
setD.insert(2008);
Info<< "setD : " << setD << endl;
Info<< "setB == setC: " << (setB == setC) << endl;
Info<< "setC != setD: " << (setC != setD) << endl;
// test operations
setB += setC;
Info<< "setB += setC : " << setB << endl;
setB &= setD;
Info<< "setB &= setD : " << setB << endl;
Info<< "setB : " << setB << endl;
Info<< "setC : " << setC << endl;
Info<< "setD : " << setD << endl;
Info<< "setB ^ setC ^ setD : " << (setB ^ setC ^ setD) << endl;
return 0;
}
......
......@@ -26,7 +26,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "labelList.H"
#include "SortableList.H"
using namespace Foam;
......@@ -35,16 +35,40 @@ using namespace Foam;
int main(int argc, char *argv[])
{
labelList a(5);
a[0] = 7;
a[1] = 4;
a[2] = 1;
a[3] = 2;
a[4] = 9;
labelList orig(5);
orig[0] = 7;
orig[1] = 4;
orig[2] = 1;
orig[3] = 2;
orig[4] = 9;
labelList a(orig);
Info << "before: " << a << endl;
sort(a);
Info << "after: " << a << endl;
Info << "after: " << a << endl;
SortableList<label> b(orig);
Info << "sorted: " << b << endl;
Info << "indices: " << b.indices() << endl;
Info << "shrunk: " << b.shrink() << endl;
Info << "indices: " << b.indices() << endl;
// repeat by assignment
b = orig;
Info << "unsorted: " << b << endl;
b.sort();
Info << "sorted: " << b << endl;
Info << "indices: " << b.indices() << endl;
// transfer assignment
b.transfer(orig);
Info << "unsorted: " << b << endl;
b.sort();
Info << "sorted: " << b << endl;
Info << "indices: " << b.indices() << endl;
Info << "End\n" << endl;
......
......@@ -206,9 +206,9 @@ int main(int argc, char *argv[])
runTime.timeName(),
runTime
),
mesh.points(),
mesh.faces(),
mesh.cells()
xferCopy(mesh.points()), // could we safely re-use the data?
xferCopy(mesh.faces()),
xferCopy(mesh.cells())
);
// Add the boundary patches
......
......@@ -7,14 +7,12 @@ set -x
# build libccmio and create lnInclude directory
(
cd $WM_THIRD_PARTY_DIR && ./AllwmakeLibccmio
)
( cd $WM_THIRD_PARTY_DIR && ./AllwmakeLibccmio )
# if the library built okay, the headers should exist too
# if the library built properly, the headers should exist too
if [ -e $FOAM_LIBBIN/libccmio.so ]
then
wmake ccm26ToFoam
wmake ccm26ToFoam
fi