Contrib/swak4Foam/README 1.x

From OpenFOAMWiki
< Contrib‎ | swak4Foam
Revision as of 23:01, 3 January 2012 by Bgschaid (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a copy of the README that comes with the 1.x-Version (for OF 1.7 and 1.6-ext) of swak4Foam. It was produced by the experimental MediaWiki-export (not everything was converted correctly)

Contents

1 Description

 A collection of libraries and tools that let the user handle
 OpenFOAM-data based on expressions


2 About this document

2.1 Scope

  This file gives an overview of swak4Foam and a history of the
  features. It is not a canonical documentation.


2.2 Technical

  This file is written in the mighty org-mode (see
  http://orgmode.org/) a markup/outline-mode for (X)Emacs. Using this
  mode it can be easily (using 3 keystrokes ... it's Emacs) to PDF or
  HTML to make it more readable (and add a table of contents).
  Please don't try to "beautify" it with any other text editor as
  this will surly mess up the markup (and keeping the file
  org-compatible outside of the org-mode is a pain in the neck.


3 Contributors etc

3.1 Original Author

  Bernhard Gschaider (bgschaid@ice-sf.at)


3.2 Current Maintainer

  Bernhard Gschaider (bgschaid@ice-sf.at)


3.3 Contributors

  In alphabetical order of the surname
  1. Peter Keller sprinklerInlet-case
  2. Andreas Otto fixed the circulatingSplash-case
  3. Alexey Petrov pythonFlu-integration
  4. Bruno Santos Compilation with Intel compiler and Mingw
  5. Martin Becker The potentialPitzDaily-case (demonstrating a problem with groovyBC)

</

  If anyone is forgotten: let me know
  Contributors to simpleFunctionObjects are listed separately in
  the README of that library


3.4 Documentation

  See: http://openfoamwiki.net/index.php/contrib/swak4Foam


4 Installation/Compilation

4.1 Requirements

  • Version 1.7 or 1.6-ext of OpenFOAM (1.6 should work, too)
    • The finiteArea-stuff will only work with version 1.6-ext
  • the compiler generators bison and flex
    • swak4Foam is known to work with bison version 2.3 and higher. Lower versions may work. If it works with a lower version please report it


</


4.2 Building

wmake all
  at the base directory should build all the libraries and
  tools.
 The main library swak4FoamParsers can't be built in parallel (no
 values of WM_NCOMPPROCS bigger than 1)


4.2.1 Additional configuration

   Some features (currently only the Python-integration may need
   third party software. The paths to these packages can be configured
   in a file swakConfiguration (an example file
   swakConfiguration.example is provided). If that file is not
   present these unconfigured features will not be compiled.


4.3 Global installation

  If the libraries and utilities are considered stable and the should
  be available to everyone (without having to recompile them) the
  script copySwakFilesToSite.sh can be used to copy them to the
  global site-specific directories.
  The script removeSwakFilesFromSite.sh removes all these files
  from the global directories. The removeSwakFilesFromLocal.sh does
  the same for the user directories (this makes sure that no
  self-compiled version shadows the global version (which would
  lead to strange results)
  There is a Makefile attached. make install compiles swak4Foam
  and installs it into the global directories
  Note: Due to the order in which library direcories are searched
  for with -L a global installation might break the compilation


4.4 Packaging

4.4.1 Debian

   The command build dpkg builds a Debian/Ubuntu package for 
   the currently enabled OpenFOAM-package. Note:
  • it is assumed that the currently used OF-version was also installed by the package manager
  • the dev package is built but poorly maintained

</

   Changes in the packaging should be done in the branch
     debianPackaging of the Mercurial-repository
   Note: Due to the problem described with the global installation
   it might be necessary to deinstall a previously installed package
   to successfully build a new package


5 Contents

5.1 Libraries

  Collection of Libraries


5.1.1 =swak4FoamParsers=

   The basis of swak4Foam: the expression parsers with the logic to
   access the OpenFOAM data-structures.
   None of the other software pieces compile without it


5.1.2 =simpleFunctionObjects=

   A collection of function objects that was previously separately
   available at
   http://openfoamwiki.net/index.php/Contrib\_simpleFunctionObjects.
   Provides consistent output of values (on patches and fields) and
   more.


5.1.3 =groovyBC=

   Implements the infamous groovyBC. A boundary condition that
   allows arbitrary expressions in the field-file


5.1.4 =swakFunctionObjects=

   Function objects that have no additional requirements. Mainly used
   for manipulating and creating fields with expressions
  1. addGlobalVariable Adds a variable to a global swak-namespace. Mainly used for debugging and resolving issues where a variable is needed in a BC before it is defined.
  2. expressionField Create a new field from an expression
  3. clearExpressionField Erase a field created with expressionField
  4. manipulateField Modify a field in memory
  5. createSampledSet Create a sampled set that can be used by other swak-entities (mainly boundary conditions)
  6. createSampledSurface Create a sampled surface that can be used by other swak-entities (mainly boundary conditions)
  7. solveLaplacianPDE Solve the Poisson equation

</ \begin{equation} \frac{\partial \rho T}{\partial t} - \nabla \lambda \nabla T = S_{expl} + S_{impl} T \end{equation}

        for $T$ where $\rho$, $\lambda$ and $S$ can be specified
  1. solveTransportPDE Solve the transport equation

</ \begin{equation} \frac{\partial \rho T}{\partial t} + \div(\phi,T) - \nabla \lambda \nabla T = S_{expl} + S_{impl} T \end{equation}

        for $T$ where $\rho$, $\lambda$ and $S$ can be
        specified. Plus the name of the field $\phi$


5.1.5 =simpleSwakFunctionObjects=

   Function objects based on the simpleFunctionObjects-library
   (which is a prerequisite for compiling it).
   Evaluate expressions and output the results


5.1.6 =swakSourceFields=

   These classes allow to manipulate the solution. To use these the
   solver has to be modified.
  1. expressionSource Field that is calculated from an expression. To be used as source-term or coefficient in some solver
  2. forceEquation force an equation to fixed values in selected locations. Has to be used after constructing the equation and before solving

</


5.1.7 =swakTopoSources=

   topoSources for cellSet and faceSet. Can be used with the
   cellSet and faceSet-utilities 


5.1.8 =swakFiniteArea=

   Implements parsers for the finiteArea-stuff in 1.6-ext. Also
   implements groovyBC for areaField and expressionField and
   other function objects


5.1.9 =groovyStandardBCs=

   Collection of boundary conditions that give standard boundary
   conditions the possibility to use expression for the coefficients
   Contributions to this library are explicitly encouraged. Please
   use the Mercurial-branch groovyStandardBCs to groovyify
   standard boundary conditions.


5.1.10 =pythonIntegration=

   Embeds a Python-interpreter.
  1. pythonIntegrationFunctionObject Executes Python-code at the usual execution times of functionObjects. The interpreter keeps its state

</

   This library is only compiled if the paths to the Python-Headers
   are configured in the swakConfiguration-file (see above)


5.1.11 =fluFunctionObjectDriver=

   Driver for functionObjects that implemented entirely in Python
   using the pythonFlu-library


5.2 Utilities

5.2.1 =funkySetFields=

   Utility that allows creation and manipulation of files with
   expressions 


5.2.2 =funkySetAreaFields=

   Utility like funkySetFields for areaFields (only works with
   1.6-ext) 


5.2.3 =funkySetBoundaryField=

   Sets any field on a boundary to a non-uniform value based on an
   expression. 
   Acts without deeper understanding of the underlying boundary condition


5.2.4 =replayTransientBC=

   Utility to quickly test whether a groovyBC gives the expected
   results. Writes the specified fields with the applied boundary
   condition but doesn't do anything else.
   Can be used for other BCs as well


5.2.5 =funkyDoCalc=

   Evaluates expressions that are listed in a dictionary using data
   that is found on the disc and prints summarized data (min, max,
   average, sum) to the screen


5.3 Examples

  If not otherwise noted cases are prepared by a simple
  blockMesh-call.
  Note: All the cases here are strictly for demonstration purposes and
  resemble nothing from the 'real world'


5.3.1 groovyBC

   The old groovyBC-Demos


5.3.1.1 pulsedPitzDaily
  1. Solver pisoFoam
  2. Also demonstrates manipulateField, expressionField and clearField from the swakFunctionObjects. patchExpression from simpleSwakFunctionObjects. solveLaplacianPDE and solveTransportPDE for solving equations

</


5.3.1.2 wobbler
  1. Solver solidDisplacementFoam

</


5.3.1.3 circulatingSplash
  1. Solver interDyMFoam

</


5.3.1.4 movingConeDistorted
  1. Solver pimpleDyMFoam
  2. Also demonstrates swakExpression with surface. Due to a problem described below this currently doesn't work

</


5.3.1.5 average-t-junction
  1. Solver pimpleFoam

</


5.3.1.6 multiRegionHeaterFeedback
  1. Solver chtMultiRegionFoam
  2. Mesh preparation Execute the script prepare.sh in that directory
  3. Also demonstrated patchExpression and swakExpression from simpleSwakFunctionObjects.

</


5.3.1.7 fillingTheDam
  1. Solver interFoam
  2. Also demonstrates Usage of a sampledSet defined in the controlDict do determine the average filling height. Also stored variables for not switching back once the criterion is reached. Global variables defined by a function object

</


5.3.1.8 sprinklingInlet
  1. Solver interFoam
  2. Description Winner of the swak4Foam-competition at the 6th OpenFOAM-Workshop (2011). By Peter Keller

</


5.3.1.9 potentialPitzDaily
  1. Solver potentialFoam
  2. Description Demonstrates the use of groovyB with potentialFoam (also a problem connected with that). Provided by Martin Backer

</


5.3.2 FunkySetFields

   Example dictionary for funkySetFields


5.3.3 FunkySetBoundaryFields

   Example dictionary for funkySetBoundaryFields. Sets nonsense
   boundary conditions for the world famous damBreak-case


5.3.4 InterFoamWithSources

   Demonstrates usage of expressionSource
   Due to differences in the original interFoam-solver this doesn't
   work on certain OpenFOAM-versions (most specifically
   1.6-ext).
   The only modifications to the original solver are found at the end
   of createFields.H and in UEqn.H (the added source terms).


5.3.5 InterFoamWithFixed

   Demonstrates usage of forceEquation
   Due to differences in the original interFoam-solver this doesn't
   work on certain OpenFOAM-versions (most specifically
   1.6-ext).
   The only modifications to the original solver are found at the end
   of createFields.H and in UEqn.H (the fixing of the velocities).


5.3.5.1 =interFoamWithSources=
    Slightly modified version of interFoam. Adds a source term to
    the momentum equation. The source term is an expression that is
    defined at run-time


5.3.5.2 =mixingThing=
    Demonstration case for it.
  1. Preparation Run the script prepare.sh to prepare the case

</


5.3.6 FiniteArea

   Demonstration of the finiteArea-stuff that works with 1.6-ext


5.3.6.1 =swakSurfactantFoam=
    Variation of surfactantFoam that adds an expressionSource


5.3.6.2 =planeTransport=
    Demonstration case
  1. Preparation Use blockMesh and makeFaMesh
  2. Solver surfactantFoam (without source term) or swakSurfactantFoam
  3. Demonstrates FAM-specific swakExpressions and groovyBC (as well as the expressionSource)

</


5.3.7 other

   Cases that don't have a groovyBC


5.3.7.1 =angledDuctImplicit=
  1. Solver rhoPorousSimpleFoam
  2. Mesh preparation Execute the makeMesh.sh-script in that directory. If you want to run in parallel call the decomposeMesh.sh-script with the number of processors as an argument
  3. Demonstrates Usage of the swakTopoSources. Compares different approaches to evaluating with the swakExpression-functionObject. Also an example dictionary that demonstrates the use of funkyDoCalc

</


5.3.7.2 =capillaryRise=
  1. Solver interFoam
  2. Case preparation run the supplied script prepareCase.sh
  3. Demonstrates Usage of a sampled surface to track the interface in a VOF-simulation

</


5.3.8 PythonIntegration

   Demonstrate the integration of Python. Mostly using PyFoam but
   also with pythonFlu


5.3.8.1 =manipulatedPitzDaily=
  1. Solver simpleFoam
  2. Demonstrates Usage of PyFoam to manipulate the fvSolution-file during the run (possible application: unphysical initial conditions cause the run to fail during startup with "normal" relaxation values)

</


5.3.8.2 =findPointPitzDaily=
  1. Solver simpleFoam
  2. Demonstrates Usage of the pythonFlu-integration to find the point where the recirculation behind the step ends. Also tries to plot the result using the matplotlib-library

</


5.3.8.3 =bed2OfPisa=
  1. Solver twoPhaseEulerFoam
  2. Demonstrates Usage of PyFoam to read the direction of gravity and feeding it into a goovyBC via global variables
  3. Case preparation Just call funkySetFields -time 0

</


5.3.9 solvePDE

   Examples for the functionObjects that can solve Partial
   Differential equations


5.3.9.1 flangeWithPDE
  1. Solver laplacianFoam
  2. Demonstrates The usage of the functionObject that solves the laplacian (Poisson) equation and (hopefully) that it gets the same result as the native solver
  3. Case preparation Allrun-script is provided

</


5.3.9.2 pitzDailyWithPDE
  1. Solver scalarTransportFoam
  2. Demonstrates Solving additional transport equations

</


5.3.10 tests

   Simple test cases for specific features


5.3.10.1 =randomCavity=
    Testing of different seeds for the rand-function. Also tests
    the randFixed-function


5.4 =maintainanceScripts=

  Undocumented scripts used for maintaining swak4Foam. If you
  don't understand them, don't use them


6 Bug reporting and Development

6.1 Bug reports

  The preferred place for bug reports is
  http://sourceforge.net/apps/mantisbt/openfoam-extend/search.php?project\_id=10&sticky\_issues=on&sortby=last\_updated&dir=DESC&hide\_status\_id=90 
  
  A sourceforge-account is required for reporting


6.2 Development

  Contributions to to swak4Foam are most welcome. If you want to
  contribute clone the Mercurial archive of the sources
hg clone http://openfoam-extend.hg.sourceforge.net:8000/hgroot/openfoam-extend/swak4Foam
  Change to the branch that you want to improve (usually default)
  and create a new branch
hg branch <branchName>
  where <branchname> is an easily identifiable name that makes the
  purpose of the branch clear (for instance
  bugfixWrongRandomFunction or featureHyperbolicFunctions). Don't
  work on the default branch or any other branches that are not
  "yours". Such contributions will not be merged
  Once development on the branch is finished export the relevant
  changesets with 
hg export <nodeID>
  (nodeID being the ids of "your" changesets) and send them to the
  maintainer (or attach them to a bug report on Manits). The changes
  will be reviewed and merged into the default branch (do not
  attempt to do this yourself). Patches generated with hg export
  make sure that all changes are attributed to the original developer
  (you).
  An alternative would be the bundle command. Just do
hg bundle <bundlefile>
  and then send the bundlefile. This will include all commits
  that are not in the upstream repository and will allow similar
  inclusion in the upstream as export.
  Once you have proven by successfully submitting changesets via hg
  export you can ask for write access to the mercurial repository.


6.2.1 Suggest reading

   These topics may be "new" for the average OF-developer:
  1. Mercurial A short tutorial on this can be found at http://mercurial.selenic.com/guide/. If you already know git the http://mercurial.selenic.com/wiki/GitConcepts may be enough for you
  2. bison/flex This pair of compiler generator tools generate the parsers for the expressions. Google for a tutorial that looks promising to you.
For a short example that shows how a new function was added to two parsers have a look at this changeset that added the cpu()-function to the field and the the patch-parser (usually you'll have to write a new method for the driver too):

</

hg diff -c 8604e865cce6


6.2.2 Special branches

   Currently the main branches are:
  1. default The main branch. This is the brancht that the general public will receive. It compiles under 1.7 and 1.6-ext
  2. port_2.0.x The branch that compiles under OpenFOAM 2.0. This will eventually become the default-branch
  3. debianPackaging Branch for generating new Debian-packages of swak4Foam. If somebody wants to "inherit" this: contact the maintainer
  4. finiteArea In this branch the things for the finiteArea-discretization (only present in 1.6-ext) is developed. Usually gets merged back into the default-branch once a feature is completed

</


6.2.3 Distributed bug-tracking

   As an experimental feature distributed bug-tracking was introduced
   using the Artemis-extension for Mercurial (see
   http://hg.mrzv.org/Artemis/). An up-to-date version can be
   installed by 
hg clone http://hg.mrzv.org/Artemis/
   somewhere and installing the plugin by editing .hgrc.
   This is not the official bug-tracker for swak4Foam. It is used
   for keeping track of new features that are to be introduced to
   swak4Foam and may be discontinued if the experiment proves to be
   unsuccessful.


7 Copyright

 swak4Foam 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.


8 Known bugs

 The following list is not complete. If the Artemis extension (see
 above) is installed then
hg ilist
 gives a more up-to-date list


8.1 Moving meshes and =sampledSurfaces=

  It seems that with moving meshes sampledSurfaces don't get
  updated. This seems to be a problem with OpenFOAM itself (the
  regular surfaces-functionObject doesn't get updated. This is
  currently investigated


8.2 Missing support for interpolation and point-Fields

  Apart from patches and internal fields the support for
  interpolation from cells to faces (and vice versa) is incomplete as
  well as point fields (although they are supported in the grammar)


8.3 Caching of loaded fields not working

  This is especially evident for the funkyDoCalc-example


8.4 Possible enhancements of the code

  Not really bugs, but stuff that bugs me


8.4.1 Pointers in the driver code

   This is necessary because of bison. Investigate possibilities to
   replace these by tmp and autoPtr 


8.5 Possible memory loss

  valgrind reports some lost memory for stuff that is not directly
  allocated by swak4Foam (in OpenFOAM-sources)
  Will investigate. Relevant places are marked by comments in the
  code. Also the construction of sampledSet seems to loose memory


9 History

9.1 2010-09-13

  First Release


9.2 2010-12-18

  New release
  Most important changes


9.2.1 Parser for =sampledSurfaces=

   Now expressions for the field on a sampled surface can be
   evaluated. All sampledSurfaces offered by OpenFOAM now can be
   used 


9.2.2 Multiline =variables=

   The variables entry (most notably used in groovyBC and
   swakExpression) now can be a list of strings. This allows some
   kind of "formatting" (one expression per line) and should improve
   readability


9.2.3 Two maintainance-scripts were added

   These can copy the libraries and utilities to the global
   installation (for those who think that the swak4Foam-stuff is
   stable enough and want to 'bless' all users at their site with
   it). Note that any local installation still takes precedence
   (because $FOAM_USER_APPBIN is before $FOAM_APPBIN in the
   $PATH 


9.2.4 Parsers using 'external variables' are now run-time selectable

   This allows the inclusion of other parsers with the regular
   swak4Foam parsers and include them seamlessly with the
   variables-mechanism for 'externals' (in other words: you can add
   your own parser in a separate library without having to change
   anything about the overall swak4Foam, but it behaves as if it
   was part of it)


9.3 2011-01-30

9.3.1 Support for /Finite Area/-stuff

   Now there is support for the finiteArea-library found in
   1.6-dev. The support is found in a separate library
   swakFiniteArea. It has
  • a parser faField for areaFields
  • a parser faPatch for patches of areaFields
  • a variant of groovyBC for these patches
  • a computed source faExpressionSource
  • Function-object-variants for areaFields: clearExpression, expressionField and manipulateField. These work the same as their volField-counterparts

</


9.3.2 Bugfix for compiling in single precision

   See https://sourceforge.net/apps/mantisbt/openfoam-extend/view.php?id=49


9.3.3 New function =nearDist=

   See https://sourceforge.net/apps/mantisbt/openfoam-extend/view.php?id=44


9.4 2011-04-20

  New features and changes are (this list is not complete):


9.4.1 New utility =funkySetAreaField=

   Like funkySetFields for finiteArea. Also writes out a volume
   field for easier post-processing


9.4.2 Refactoring of =groovyBC= and groovified boundary conditions

   Makes it easier to use the groovyBC-machinery for other boundary
   conditions. Two standard boundary conditions were
   groovified. Others may follow


9.4.3 Easier deployment

   If no simpleFunctionObjects are present they can be downloaded
   by a script.
   Also scripts to handle global installations of swak4Foam


9.4.4 Force equations

   A class to force equations to certain values according to
   expressions


9.4.5 New utility =funkyDoCalc=

   Utility does calculations on saved results and outputs single
   numbers (min, max, sum, average) to the terminal. Can be used for
   reporting or validity checks


9.4.6 Debian packaging

   Crude packaging for Debian


9.4.7 Lookup-tables

   A single-argument function can be specified as a piecewise linear
   function. Basically works like timelines but the argument can be
   something else (not only the time)


9.4.8 Stored variables

   Variables that store their values between time-steps. Applications
   are statistics or switches


9.4.9 Sampled sets

   Sampled sets can now also be used as en entity on which
   calculation is possible.


9.5 2011-07-26

9.5.1 New features:

9.5.1.1 Rewrite of =rand= and =randNormal=
  • These two functions now can receive an integer seed that determines the pseudo-randooom sequence generated by these functions
  • Two functions randFixed and randNormalFixed were added. While the usual rand functions generate a different result at every time-steps for these functions the pseudo-random sequence is determined only by the seed (not by the timestep)

</


9.5.1.2 Binary =min= and =max=
    Take the bigger/smaller of two fields. Helps avoid ?:-operations


9.5.1.3 Allow writing of only volume-fields in =funkySetAreaFields=
    Application: If the results of the calculation are only needed in
    ParaView


9.5.1.4 Internal changes
  • Use autoPtr for sets
  • Update sets that change in memory or on disc

</


9.5.2 Bug-fixes

9.5.2.1 =funkySetAreaFields= did not check for the correct fields
    Fixed by Petr Vita


9.5.2.2 =surfaceProxy= uses the wrong geometric data
9.5.2.3 Avoid floating point exceptions with division of fields
    Calculated boundaries were $0$ and caused a division by zero


9.5.3 Packaging

9.5.3.1 Update Debian packaging
  • Packaging information for the currently used OF-version is generated (allows a separate swak-package for every OF-version
  • Submission to launchpad added

</


9.5.3.2 Deployment scripts
    Now install to FOAM_SITE_APPBIN/LIBBIN


9.6 2011-10-03

9.6.1 New features

9.6.1.1 =replayTransientBC= now supports multiple regions
    Uses the usual -region-option. Looks for a separate dictionary
    in the system-directory of that region


9.6.1.2 =replayTransientBC= allows execution of functionObjects
    This can be switched on using the allowFunctionObjects-option


9.6.1.3 =Python=-embedding
    Allows the execution of Python-Code in a functionObject
    This feature is still experimental and the organization of the
    libraries is subject to change


9.6.1.4 Global variables
    It is now possible to define variables that are 'global': They
    can be read in any entity. 
    Currently these variables can only be uniform.
    To access global variables the specification-dictionary has to
    have a wordList named globalScopes. The scopes are searched
    in that order for the names of global variables. Having scopes
    allows some kind of separation of the variables


9.6.1.5 Simplified boundary condition =groovyBCFixedValue=
    Added a boundary condition than allows to only fix the
    values. This should help to avoid problems with cases that don't
    like mixed (on which the regular groovyBC is based)


9.6.1.6 Function objects to solve PDEs
    Two function objects that solve Partial Differential Equations
    during a run have been added:
  • one that solves a laplacian (Poisson) equation
  • one that solves the transport equation for a scalar

</

    The relevant coefficients (including explicit and implicit source
    terms) can be specified using expressions


9.6.2 Administrative and packaging

9.6.2.1 Inject =swak4Foam= into a distro
    Added a script that takes the current sources, copies them into
    the appropriate places of a OpenFOAM-installation and slightly
    rewrites them to compile in this place. What happens then
    (committing them into the repository or just plain compilation)
    is up to the maintainer


9.6.2.2 Absorb =simpleFunctionObjects=
    As many parts of swak4Foam depend on it the
    simpleFunctionObjects have now been absorbed into
    swak4Foam. They can still be compiled on their own


9.6.3 Bugfixes

9.6.3.1 Variables not working for parallel computations
    If a variable is defined and the patch which it is defined on
    doesn't have any faces the variable is reported on that processor
    as not existing and the whole run fails


9.7 2012-01-04

9.7.1 Cases changed

9.7.1.1 =circulatingSplash=
    Fixed according to a suggestion by Andreas Otto. Now runs again
    (used to crash some time-steps into the beginning)


9.7.2 Infrastructure

9.7.2.1 Check for correct =bison=-version
    The Allwmake-script now checks for the correct bison-version
    (and the existence of bison) and fails if it doesn't seem to be
    the right one


9.7.2.2 Supply a header with preprocessor-symbols about the used OF-version
    To allow distinguishing different OF-versions as discussed in the
    bug report
    http://sourceforge.net/apps/mantisbt/openfoam-extend/view.php?id=114
    the Allwmake-script now generates a header file
    foamVersion4swak.H that defines the symbols
    FOAM_VERSION4SWAK_MAJOR, FOAM_VERSION4SWAK_MINOR and
    FOAM_VERSION4SWAK_PATCH 


9.7.3 Technical

9.7.3.1 Refactoring of the FieldDriver
  • now can also produce surfaceFields
  • full support of tensor, symmTensor and sphericalTensor

</


9.7.3.2 Refactoring of the FaFieldDriver
  • now can also produce edgeFields

</

    No support for tensors yet


9.7.3.3 Writing of =storedVariables=
    If necessary (for instance swakExpression-functionObject) the
    storedVariables are written to disc (into a subdirectory
    swak4Foam of the timestep) and are reread at the start. This
    allows consistent restarts (for instance if a flow was summed
    using the variable) if the expressions stay the same.


9.7.3.4 =simpleFunctionObjects= now write vectors and tensors without brackets
    Data files can now be written without brackets but each component on
    its own. The number of entries in the header is not adjusted


9.7.4 New features

9.7.4.1 General =phi= in =solveTransportPDE=
    Due to the refactoring of the FieldDriver now phi can be
    specified by a general expression (instead of 'only' a
    field-name) 


9.7.4.2 =funkySetFields= now also writes surfaceFields
    Can write surfaceVector and surfaceScalar-Fields. Condition
    has to be consistent


9.7.4.3 Function objects now =surfaceField=-aware
    expressionField and manipulateField now can create or modify
    surfaceFields 


9.7.4.4 =funkySetFields= and function objects support tensors
    funkySetFields and the function objects expressionField and
    manipulateField  now also work with the three tensor-types


9.7.4.5 Extension of the =expressionToFace= =topoSet=
    If the expression evaluates to a surfaceField then this is used
    as a flag whether or not the face is in the faceSet. If the
    expression evaluates to a volScalarField then the old semantic
    applies (faces are in the set if one cell is true and the other
    is false).
    
    This only works for internal faces


9.7.4.6 =addGlobalVariable= allows setting more than one value
    If there is an entry globalVariables then this dictionary is
    used to set the variables


9.7.4.7 Function object =calculateGlobalVariables=
    Calculates variables and then pushes them to a global namespace


9.7.4.8 Generate a dummy =phi= in =replayTransientBC=
    New option added that generates a phi field with value $0$ to
    keep boundary conditions like inletOutlet happy


9.7.4.9 Function object to dump expression results
    The functionObject dumpSwakExpression dumps the complete
    results of a swakExpression to file at each timestep. This
    produces huge files and is therefor not endorsed


9.7.4.10 Additional options for =funkySetFields=
    Add the options allowFunctionObjects and addDummyPhi to
    execute functionObjects and add a phi-field (for fields that
    require these)


9.7.4.11 =simpleFunctionObjects= write CSV-files
    Setting the option outputFileMode to csv writes
    CSV-files. The option-value foam is the default (old style). The
    option-value raw writes the values delimited by spaces (no
    brackets for vectors and tensors)


9.7.4.12 Submeshes automatically read if =searchOnDisc= specified
    If a submesh is not yet in memory and the option searchOnDisc
    is set, the mesh is automatically read into memory and kept there


9.7.4.13 Conditional =functionObjects=
    The simpleFunctionObjects-library now has a number of
    functionObjects that allow the conditional execution of a list of
    function objects.
    These are
  1. executeIfExecutableFits if the name of the executable fits a regular expression the function objects are executed
  2. executeIfObjectExists if a named object exists (or alternatively: doesn't exist) in the registry execute the function objects. Type checking also implemented
  3. executeIfEnvironmentVariable execute if an environment variable satisfies a certain condition (exists, doesn't exist, fits a regular expression)
  4. executeIfFunctionObjectPresent execute if a specific functionObject is present. This can help prevent failures if a functionObject is missing for technical reasons

</

    In addition the simpleSwakFunctionObjects-library has
  1. executeIfSwakObject Evaluates a logical swak-expression. The results are either accumulated using logical or (if one value is true the result will be true) or logical and (all values have to be true)

</

    The pythonIntegration-library has
  1. executeIfPython Evaluates a Python-code-snipplet that returns a value. If this value is "true" in Pythons standards then the functionObjects are executed

</


9.7.4.14 =functionObject= that reads gravitation
    simpleFunctionObjects has an additional function object that
    reads the direction of gravitation. The purpose is to assist
    boundary conditions like buoyantPressure that rely on it to
    work. Best used together with conditional function objects ("If
    g is missing ....")


9.7.4.15 PDE-functionObjects for =finiteArea=
    Solve transport and laplacian equation


9.7.4.16 =funkySetAreaField= now also writes edgeFields
    Similar to the surfaceFields in funkySetFields


9.7.5 Bug fixes

9.7.5.1 Compilation with Intel-Compiler possible
    The Utilities failed with the Intel-compiler. Compilation now
    falls back to good old g++


9.7.5.2 Access to tensor-components not working
    Because the tokens were not defined in the flex-files getting
    tensor components with tensor.xx did not work. Fixed


9.7.5.3 Constants for surfaceFields not working
    Because surfaceFields know no zeroGradient the template
    makeConstant did not work


9.7.5.4 =snGrad= does not work for patches if the file is on disc
    Change so that the field gets temporarily loaded to calculate the
    gradient on the patch. Same for internalField and
    neighbourField


9.7.5.5 =potentialFoam= does not correctly use a =groovyBC=
    The reason is that groovyBC usually doesn't get evaluated
    during construction. The reason is that it is hard to tell
    whether all required fields are already in memory. The current
    fix is a workaround: setting evaluateDuringConstruction to
    true forces the BC to be evaluated during construction


9.7.5.6 Extra evaluation of boundary conditions causes failure
    Extra evaluation of boundary condition that should fix the
    problem with calculated patches causes funkySetFields to fail
    with stock boundary conditions if not all fields are present in
    memory 


9.8 Next release