FREEFOAM(1)

NAME
freefoam - The Cross-Platform CFD Toolkit

SYNOPSIS

freefoam [-b <baseDir>] [-P] [-V | -version] [-h | -help] [--] <application> [<args>]

DESCRIPTION

FreeFOAM is a cross-platform toolkit for computational fluid dynamics (CFD). It consists of a large collection of C++ libraries, allowing the user to write new solvers for partial differential equations using a notation very close to the mathematical one. FreeFOAM comes with a comprehensive set of solvers for a wide range of problems and accompanying pre-/and post-processing utilities.

FreeFOAM is based on the fantastic Open-Source OpenFOAM software. The goal of the FreeFOAM project is to remove the system-dependencies from OpenFOAM and make it generally more useable and easier to install.

The freefoam(1) command is used to invoke the actual FreeFOAM applications. It was mainly created to avoid putting a large number of binaries on the system PATH, cluttering the namespace unnecessarily. It also allows for the user to easily add her own applications to the search path, without having to extend the PATH variable or being root.

freefoam(1) uses the following mechanism to find the application <name>:

    • It searches in the directory <libexecDir> for an executable with the name freefoam-<name>. <libexecDir> defaults to /usr/local/libexec/FreeFOAM-0.1.0. This can be overridden using the -b option.

    • If the FREEFOAM_PATH variable is set, it is prepended to the above described search path. It is a colon-separated list of directories.

    • The -P option can be used to append the system PATH to the search path.

OPTIONS

-b <baseDir>
    Specify a different directory to search for applications (default is /usr/local/libexec/FreeFOAM-0.1.0)

-P
    Also search the system PATH variable first

--
    Separates options for this program from the application and its arguments (useful if the application name should start with a -)

-V | -version
    Display the version of FreeFOAM and exit

-h | -help
    Display an option summary

<application>
    The short name of the application to run (i.e. for the freefoam-ico application the short name would be ico)

<args>
    Arguments and options to be passed to the application

environment variables: FREEFOAM_PATH specify an alternative path where to search for applications

FREEFOAM STANDARD APPLICATIONS

The following sections give a short description for all the available standard solvers and utilities. More information is available from the individual manual pages.

SOLVERS

  DNS

freefoam-dns(1)
    Direct numerical simulation solver for boxes of isotropic turbulence.

  Basic Solvers

freefoam-laplacian(1)
    Solves a simple Laplace equation, e.g. for thermal diffusion in a solid.

freefoam-scalarTransport(1)
    Solves a transport equation for a passive scalar.

freefoam-potential-app(1)
    Simple potential flow solver which can be used to generate starting fields for full Navier-Stokes codes.

  Combustion Solvers

freefoam-PDR(1)
    Solver for compressible premixed/partially-premixed combustion with turbulence modelling.

freefoam-PDRAutoRefine(1)
    Solver for compressible premixed/partially-premixed combustion with turbulence modelling.

freefoam-Xi(1)
    Solver for compressible premixed/partially-premixed combustion with turbulence modelling.

freefoam-coldEngine(1)
    Solver for cold-flow in internal combustion engines.

freefoam-dieselEngine(1)
    Solver for diesel engine spray and combustion.

freefoam-diesel(1)
    Solver for diesel spray and combustion.

freefoam-engine-app(1)
    Solver for internal combustion engines.

freefoam-reacting(1)
    Solver for combustion with chemical reactions.

freefoam-rhoReacting(1)
    Solver for combustion with chemical reactions using density based thermodynamics package.

freefoam-fire(1)
    Transient Solver for Fires and turbulent diffusion flames.

  Compressible Flow Solvers

freefoam-rhoCentralDyM(1)
    Density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor.

freefoam-rhoCentral(1)
    Density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor.

freefoam-rhoPimple(1)
    Transient solver for laminar or turbulent flow of compressible fluids for HVAC and similar applications.

freefoam-rhoPorousMRFPimple(1)
    Transient solver for laminar or turbulent flow of compressible fluids with support for porous media and MRF for HVAC and similar applications.

freefoam-rhoPorousSimple(1)
    Steady-state solver for turbulent flow of compressible fluids with RANS turbulence modelling, and implicit or explicit porosity treatment.

freefoam-rhoSimple(1)
    Steady-state SIMPLE solver for laminar or turbulent RANS flow of compressible fluids.

freefoam-rhoPiso(1)
    Transient PISO solver for compressible, laminar or turbulent flow.

freefoam-sonic(1)
    Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas.

freefoam-sonicLiquid(1)
    Transient solver for trans-sonic/supersonic, laminar flow of a compressible liquid.

freefoam-sonicDyM(1)
    Transient solver for trans-sonic/supersonic, laminar or turbulent flow of a compressible gas with mesh motion.

  Electromagnetic Solvers

freefoam-electrostatic(1)
    Solver for electrostatics.

freefoam-mhd(1)
    Solver for magnetohydrodynamics (MHD): incompressible, laminar flow of a conducting fluid under the influence of a magnetic field.

  Financial Solvers

freefoam-financial(1)
    Solves the Black-Scholes equation to price commodities.

  Heat Transfer Solvers

freefoam-buoyantBoussinesqPimple(1)
    Transient solver for buoyant, turbulent flow of incompressible fluids.

freefoam-buoyantBoussinesqSimple(1)
    Steady-state solver for buoyant, turbulent flow of incompressible fluids.

freefoam-buoyantPimple(1)
    Transient solver for buoyant, turbulent flow of compressible fluids for ventilation and heat-transfer.

freefoam-buoyantSimple(1)
    Steady-state solver for buoyant, turbulent flow of compressible fluids.

freefoam-buoyantSimpleRadiation(1)
    Steady-state solver for buoyant, turbulent flow of compressible fluids, including radiation, for ventilation and heat-transfer.

freefoam-chtMultiRegion(1)
    Combination of heatConductionFoam and buoyantFoam for conjugate heat transfer between a solid region and fluid region.

freefoam-chtMultiRegionSimple(1)
    Steady-state version of chtMultiRegionFoam.

  Incompressible Flow Solvers

freefoam-boundary(1)
    Steady-state solver for 1D turbulent flow, typically to generate boundary layer conditions at an inlet, for use in a simulation.

freefoam-channel(1)
    Incompressible LES solver for flow in a channel.

freefoam-ico(1)
    Transient solver for incompressible, laminar flow of Newtonian fluids.

freefoam-nonNewtonianIco(1)
    Transient solver for incompressible, laminar flow of non-Newtonian fluids.

freefoam-simple(1)
    Steady-state solver for incompressible, turbulent flow.

freefoam-pimpleDyM(1)
    Transient solver for incompressible, flow of Newtonian fluids on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm.

freefoam-pimple(1)
    Large time-step transient solver for incompressible, flow using the PIMPLE (merged PISO-SIMPLE) algorithm.

freefoam-piso(1)
    Transient solver for incompressible flow.

freefoam-shallowWater(1)
    Transient solver for inviscid shallow-water equations with rotation.

freefoam-porousSimple(1)
    Steady-state solver for incompressible, turbulent flow with implicit or explicit porosity treatment.

  Discrete Methods Solvers

freefoam-md(1)
    Molecular dynamics solver for fluid dynamics.

freefoam-mdEquilibration(1)
    Equilibrates and/or preconditions molecular dynamics systems.

freefoam-dsmc-app(1)
    Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi- species flows.

  Lagrangian Solvers

freefoam-coalChemistry(1)
    Transient solver for compressible, turbulent flow with coal and limestone parcel injections, and combustion.

freefoam-porousExplicitSourceReactingParcel(1)
    Transient PISO solver for compressible, laminar or turbulent flow with reacting multiphase Lagrangian parcels for porous media, including explicit sources for mass, momentum and energy.

freefoam-reactingParcel(1)
    Transient PISO solver for compressible, laminar or turbulent flow with reacting Lagrangian parcels.

freefoam-uncoupledKinematicParcel(1)
    Transient solver for the passive transport of a single kinematic particle cloud.

  Multiphase Solvers

freefoam-bubble(1)
    Solver for a system of 2 incompressible fluid phases with one phase dispersed, e.g. gas bubbles in a liquid.

freefoam-compressibleInter(1)
    Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach.

freefoam-compressibleInterDyM(1)
    Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing.

freefoam-inter(1)
    Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach.

freefoam-interDyM(1)
    Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing.

freefoam-MRFInter(1)
    Solver for 2 incompressible, isothermal immiscible fluids.

freefoam-porousInter(1)
    Solver for 2 incompressible, isothermal immiscible fluids.

freefoam-interPhaseChange(1)
    Solver for 2 incompressible, isothermal immiscible fluids with phase-change (e.g. cavitation).

freefoam-cavitating(1)
    Transient cavitation code based on the homogeneous equilibrium model from which the compressibility of the liquid/vapour "mixture" is obtained.

freefoam-MRFMultiphaseInter(1)
    Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase.

freefoam-multiphaseInter(1)
    Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each phase.

freefoam-settling(1)
    Solver for 2 incompressible fluids for simulating the settling of the dispersed phase.

freefoam-twoLiquidMixing(1)
    Solver for mixing 2 incompressible fluids.

freefoam-twoPhaseEuler(1)
    Solver for a system of 2 incompressible fluid phases with one phase dispersed, e.g. gas bubbles in a liquid.

freefoam-interMixing(1)
    Solver for 3 incompressible fluids, two of which are miscible, using a VOF method to capture the interface.

  Stress-Analysis

freefoam-solidDisplacement(1)
    Transient segregated finite-volume solver of linear-elastic, small-strain deformation of a solid body, with optional thermal diffusion and thermal stresses.

freefoam-solidEquilibriumDisplacement(1)
    Steady-state segregated finite-volume solver of linear-elastic, small-strain deformation of a solid body, with optional thermal diffusion and thermal stresses.

UTILITIES

  Advanced Mesh Manipulation

freefoam-autoRefineMesh(1)
    Utility to refine cells near to a surface.

freefoam-collapseEdges(1)
    Collapse short edges and combines edges that are in line.

freefoam-combinePatchFaces(1)
    Checks for multiple patch faces on same cell and combines them.

freefoam-modifyMesh(1)
    Manipulates mesh elements.

freefoam-refineHexMesh(1)
    Refines a hex mesh by 2x2x2 cell splitting.

freefoam-refineWallLayer(1)
    Utility to refine cells next to patches.

freefoam-refinementLevel(1)
    Tries to figure out what the refinement level is on refined cartesian meshes. Run BEFORE snapping.

freefoam-removeFaces(1)
    Utility to remove faces (combines cells on both sides).

freefoam-selectCells(1)
    Select cells in relation to surface.

freefoam-splitCells(1)
    Utility to split cells with flat faces.

  Mesh Conversion

freefoam-ansysToFoam(1)
    Converts an ANSYS input mesh file, exported from I-DEAS, to FOAM format.

freefoam-cfx4ToFoam(1)
    Converts a CFX 4 mesh to FOAM format.

freefoam-fluent3DMeshToFoam(1)
    Converts a Fluent mesh to OpenFOAM format.

freefoam-fluentMeshToFoam(1)
    Converts a Fluent mesh to FOAM format including multiple region and region boundary handling.

freefoam-foamMeshToFluent(1)
    Writes out the FOAM mesh in Fluent mesh format.

freefoam-foamToStarMesh(1)
    Reads an OpenFOAM mesh and writes a pro-STAR (v4) bnd/cel/vrt format.

freefoam-gambitToFoam(1)
    Converts a GAMBIT mesh to FOAM format.

freefoam-gmshToFoam(1)
    Reads .msh file as written by Gmsh.

freefoam-ideasUnvToFoam(1)
    I-Deas unv format mesh conversion.

freefoam-kivaToFoam(1)
    Converts a KIVA3v grid to FOAM format.

freefoam-mshToFoam(1)
    Converts .msh file generated by the Adventure system.

freefoam-netgenNeutralToFoam(1)
    Converts neutral file format as written by Netgen v4.4.

freefoam-plot3dToFoam(1)
    Plot3d mesh (ascii/formatted format) converter.

freefoam-polyDualMesh(1)
    Calculate the dual of a polyMesh. Adheres to all the feature and patch edges.

freefoam-sammToFoam(1)
    Converts a STAR-CD SAMM mesh to FOAM format.

freefoam-star4ToFoam(1)
    Converts a Star-CD (v4) pro-STAR mesh into OpenFOAM format.

freefoam-starToFoam(1)
    Converts a STAR-CD PROSTAR mesh into FOAM format.

freefoam-tetgenToFoam(1)
    Converts .ele and .node and .face files, written by tetgen.

freefoam-writeMeshObj(1)
    For mesh debugging: writes mesh as three separate OBJ files which can be viewed with e.g. javaview.

  Mesh Generation

freefoam-extrudeMesh(1)
    Extrude mesh from existing patch or from patch read from file.

freefoam-blockMesh(1)
    A multi-block mesh generator.

freefoam-snappyHexMesh(1)
    Automatic split hex mesher. Refines and snaps to surface.

freefoam-extrude2DMesh(1)
    Takes 2D mesh (all faces 2 points only, no front and back faces) and creates a 3D mesh by extruding with specified thickness.

  Mesh Manipulation

freefoam-attachMesh(1)
    Attach topologically detached mesh using prescribed mesh modifiers.

freefoam-autoPatch(1)
    Divides external faces into patches based on (user supplied) feature angle.

freefoam-cellSet(1)
    Selects a cell set through a dictionary.

freefoam-checkMesh(1)
    Checks validity of a mesh.

freefoam-createBaffles(1)
    Makes internal faces into boundary faces.

freefoam-createPatch(1)
    Utility to create patches out of selected boundary faces.

freefoam-deformedGeom(1)
    Deforms a polyMesh using a displacement field U and a scaling factor supplied as an argument.

freefoam-faceSet(1)
    Selects a face set through a dictionary.

freefoam-flattenMesh(1)
    Flattens the front and back planes of a 2D cartesian mesh.

freefoam-insideCells(1)
    Picks up cells with cell centre inside of surface.

freefoam-mergeMeshes(1)
    Merge two meshes.

freefoam-mergeOrSplitBaffles(1)
    Detects faces that share points (baffles). Either merge them or duplicate the points.

freefoam-mirrorMesh(1)
    Mirrors a mesh around a given plane.

freefoam-moveDynamicMesh(1)
    Mesh motion and topological mesh changes utility.

freefoam-moveEngineMesh(1)
    Solver for moving meshes for engine calculations.

freefoam-moveMesh(1)
    Solver for moving meshes.

freefoam-objToVTK(1)
    Read obj line (not surface!) file and convert into vtk.

freefoam-pointSet(1)
    Selects a point set through a dictionary.

freefoam-refineMesh(1)
    Utility to refine cells in multiple directions.

freefoam-renumberMesh(1)
    Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories.

freefoam-rotateMesh(1)
    Rotates the mesh and fields from the direcion n1 to the direction n2.

freefoam-setSet(1)
    Manipulate a cell/face/point/ set or zone interactively.

freefoam-setsToZones(1)
    Add pointZones/faceZones/cellZones to the mesh from similar named pointSets/faceSets/cellSets.

freefoam-splitMesh(1)
    Splits mesh by making internal faces external.

freefoam-splitMeshRegions(1)
    Splits mesh into multiple regions.

freefoam-stitchMesh(1)
    Stitches a mesh.

freefoam-subsetMesh(1)
    Selects a section of mesh based on a cellSet.

freefoam-transformPoints(1)
    Transforms the mesh points in the polyMesh directory according to the translate, rotate and scale options.

freefoam-zipUpMesh(1)
    Reads in a mesh with hanging vertices and zips up the cells to guarantee that all polyhedral cells of valid shape are closed.

  Error Estimation

freefoam-momentScalarError(1)
    Estimates the error in the solution for a scalar transport equation in the standard form.

freefoam-icoErrorEstimate(1)
    Estimates error for the incompressible laminar CFD application icoFoam.

freefoam-estimateScalarError(1)
    Estimates the error in the solution for a scalar transport equation in the standard form.

freefoam-icoMomentError(1)
    Estimates error for the incompressible laminar CFD application icoFoam.

  Miscellaneous Utilities

freefoam-expandDictionary(1)
    Read the dictionary provided as an argument, expand the macros etc. and write the resulting dictionary to standard output.

freefoam-debugSwitches(1)
    Write out all library debug switches.

freefoam-formatConvert(1)
    Converts all IOobjects associated with a case into the format specified in the controlDict.

freefoam-infoExec(1)
    Interrogates a case and prints information to screen.

freefoam-patchSummary(1)
    Writes fields and boundary condition info for each patch at each requested time instance.

  Parallel Processing

freefoam-redistributeMeshPar(1)
    Redistributes existing decomposed mesh and fields according to the current settings in the decomposeParDict file.

freefoam-reconstructParMesh(1)
    Reconstructs a mesh using geometric information only.

freefoam-decomposePar(1)
    Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM.

freefoam-reconstructPar(1)
    Reconstructs a mesh and fields of a case that is decomposed for parallel execution of OpenFOAM.

  Post-Processing

freefoam-calc(1)
    Generic wrapper for calculating a quantity at each time.

freefoam-dsmcFieldsCalc(1)
    Calculate intensive fields (U and T) from averaged extensive fields from a DSMC calculation.

freefoam-particleTracks(1)
    Generates a VTK file of particle tracks for cases that were computed using a tracked-parcel-type cloud.

Data Conversion

    freefoam-foamDataToFluent(1)
        Translates FOAM data to Fluent format.

    freefoam-foamToEnsight(1)
        Translates FOAM data to EnSight format.

    freefoam-foamToEnsightParts(1)
        Translates OpenFOAM data to Ensight format. An Ensight part is created for each cellZone and patch.

    freefoam-foamToFieldview9(1)
        Write out the OpenFOAM mesh in Version 3.0 Fieldview-UNS format (binary).

    freefoam-foamToGMV(1)
        Translates foam output to GMV readable files.

    freefoam-foamToVTK(1)
        Legacy VTK file format writer.

    freefoam-smapToFoam(1)
        Translates a STAR-CD SMAP data file into FOAM field format.

Miscellaneous

    freefoam-engineCompRatio(1)
        Calculate the geometric compression ratio. Note that if you have valves and/or extra volumes it will not work, since it calculates the volume at BDC and TCD.

    freefoam-execFlowFunctionObjects(1)
        Execute the set of functionObjects specified in the selected dictionary (which defaults to system/controlDict) for the selected set of times.

    freefoam-pdfPlot(1)
        Generates an .obj file to plot a probability distribution function.

    freefoam-postChannel(1)
        Post-processes data from channel flow calculations.

    freefoam-ptot(1)
        For each time: calculate the total pressure.

    freefoam-wdot(1)
        Calculates and writes wdot for each time.

    freefoam-writeCellCentres(1)
        Write the three components of the cell centres as volScalarFields so they can be used in postprocessing in thresholding.

Data Sampling, Averaging and Integration

    freefoam-patchIntegrate(1)
        Calculates the integral of the specified field over the specified patch.

    freefoam-patchAverage(1)
        Calculates the average of the specified field over the specified patch.

    freefoam-sample(1)
        Sample field data with a choice of interpolation schemes, sampling options and write formats.

    freefoam-probeLocations(1)
        Probe locations.

    freefoam-pPrime2(1)
        Calculates and writes the scalar field of pPrime2 (sqr(p - pMean)) at each time.

Stress Analysis

    freefoam-stressComponents(1)
        Calculates and writes the scalar fields of the six components of the stress tensor sigma for each time.

Turbulence Quantities

    freefoam-createTurbulenceFields(1)
        Creates a full set of turbulence fields.

    freefoam-R(1)
        Calculates and writes the Reynolds stress R for the current time step.

Flow Field Quantities

    freefoam-Co(1)
        Calculates and writes the Co number as a surfaceScalarField obtained from field phi.

    freefoam-Lambda2(1)
        Calculates and writes the second largest eigenvalue of the sum of the square of the symmetrical and anti-symmetrical parts of the velocity gradient tensor.

    freefoam-Mach(1)
        Calculates and optionally writes the local Mach number from the velocity field U at each time.

    freefoam-Pe(1)
        Calculates and writes the Pe number as a surfaceScalarField obtained from field phi.

    freefoam-Q(1)
        Calculates and writes the second invariant of the velocity gradient tensor.

    freefoam-enstrophy(1)
        Calculates and writes the enstrophy of the velocity field U.

    freefoam-flowType(1)
        Calculates and writes the flowType of velocity field U.

    freefoam-streamFunction(1)
        Calculates and writes the stream function of velocity field U at each time.

    freefoam-uprime(1)
        Calculates and writes the scalar field of uprime (sqrt(2/3 k)).

    freefoam-vorticity(1)
        Calculates and writes the vorticity of velocity field U.

Wall Quantities

    freefoam-wallGradU(1)
        Calculates and writes the gradient of U at the wall.

    freefoam-wallHeatFlux(1)
        Calculates and writes the heat flux for all patches as the boundary field of a volScalarField and also prints the integrated flux for all wall patches.

    freefoam-wallShearStress(1)
        Calculates and writes the wall shear stress, for the specified times.

    freefoam-yPlusLES(1)
        Calculates and reports yPlus for all wall patches, for the specified times.

    freefoam-yPlusRAS(1)
        Calculates and reports yPlus for all wall patches, for the specified times when using RAS turbulence models.

  Pre-Processing

freefoam-applyBoundaryLayer(1)
    Apply a simplified boundary-layer model to the velocity and turbulence fields based on the 1/7th power-law.

freefoam-applyWallFunctionBoundaryConditions(1)
    Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework.

freefoam-boxTurb(1)
    Makes a box of turbulence which conforms to a given energy spectrum and is divergence free.

freefoam-changeDictionary(1)
    Utility to change dictionary entries.

freefoam-dsmcInitialise(1)
    Initialise a case for dsmcFoam by reading the initialisation dictionary system/dsmcInitialise.

freefoam-engineSwirl(1)
    Generates a swirling flow for engine calulations.

freefoam-upgradeFvSolution(1)
    Simple tool to upgrade the syntax of system/fvSolution::solvers.

freefoam-mapFields(1)
    Maps volume fields from one mesh to another.

freefoam-mdInitialise(1)
    Initialises fields for a molecular dynamics (MD) simulation.

freefoam-setFields(1)
    Selects a cell set through a dictionary.

  Surface File Manipulation

freefoam-surfaceAdd(1)
    Add two surfaces. Does geometric merge on points. Does not check for overlapping/intersecting triangles.

freefoam-surfaceAutoPatch(1)
    Patches surface according to feature angle. Like autoPatch.

freefoam-surfaceCheck(1)
    Performs various checks on surface.

freefoam-surfaceClean(1)
    Collapses small edges, removing triangles and converts sliver triangles into split edges by projecting point onto base of triangle.

freefoam-surfaceCoarsen(1)
    Surface coarsening using bunnylod.

freefoam-surfaceConvert(1)
    Converts from one surface mesh format to another.

freefoam-surfaceFeatureConvert(1)
    Extracts and writes surface features to file.

freefoam-surfaceFeatureExtract(1)
    Extracts and writes surface features to file.

freefoam-surfaceFind(1)
    Finds nearest triangle and vertex.

freefoam-surfaceMeshConvert(1)
    Convert between surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem.

freefoam-surfaceMeshConvertTesting(1)
    Converts from one surface mesh format to another, but primarily used for testing functionality.

freefoam-surfaceMeshExport(1)
    Export from surfMesh to various third-party surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem.

freefoam-surfaceMeshImport(1)
    Import from various third-party surface formats into surfMesh with optional scaling or transformations (rotate/translate) on a coordinateSystem.

freefoam-surfaceMeshTriangulate(1)
    Extracts triSurface from a polyMesh.

freefoam-surfaceOrient(1)
    Set normal consistent with respect to a user provided outside point.

freefoam-surfacePointMerge(1)
    Merges points on surface if they are within absolute distance.

freefoam-surfaceRedistributePar(1)
    (Re)distribution of triSurface. Either takes an undecomposed surface or an already decomposed surface and redistribute it so each processor has all triangles that overlap its mesh.

freefoam-surfaceRefineRedGreen(1)
    Refine by splitting all three edges of triangle (red refinement). Neighbouring triangles (which are not marked for refinement get split in half (green) refinement.

freefoam-surfaceSmooth(1)
    Example of simple laplacian smoother.

freefoam-surfaceSplitByPatch(1)
    Writes regions of triSurface to separate files.

freefoam-surfaceSplitNonManifolds(1)
    Takes multiply connected surface and tries to split surface at multiply connected edges by duplicating points.

freefoam-surfaceSubset(1)
    A surface analysis tool which sub-sets the triSurface to choose only a part of interest.

freefoam-surfaceToPatch(1)
    Reads surface and applies surface regioning to a mesh.

freefoam-surfaceTransformPoints(1)
    Transform (scale/rotate) a surface.

  Thermophysical Utilities

freefoam-adiabaticFlameT(1)
    Calculates the adiabatic flame temperature for a given fuel over a range of unburnt temperatures and equivalence ratios.

freefoam-chemkinToFoam(1)
    Converts CHEMKINIII thermodynamics and reaction data files into FOAM format.

freefoam-equilibriumCO(1)
    Calculates the equilibrium level of carbon monoxide.

freefoam-equilibriumFlameT(1)
    Calculates the equilibrium flame temperature.

freefoam-mixtureAdiabaticFlameT(1)
    Calculates the adiabatic flame temperature for a given mixture at a given temperature.

freefoam-IFCLookUpTableGen(1)
    Calculate the the infinitely-fast chemistry relationships in function of ft. for a given fuel.

  FreeFOAM Helper Scripts

Below you find an overview of the small helper scripts provided by FreeFOAM.

freefoam-clearPolyMesh(1)
    Remove the contents of the constant/polyMesh directory.

freefoam-copySettings(1)
    Copy settings from one case directory to another, without copying the mesh or results.

freefoam-graphExecTime(1)
    Computes the time used per iteration.

freefoam-graphResKE(1)
    Extract the residuals of k and epsilon at each time step.

freefoam-graphResUVWP(1)
    Extract the residuals of U, V, W and p at each time step.

freefoam-job(1)
    Runs a FreeFOAM job in the background.

freefoam-log(1)
    Extracts xy files from Foam logs.

freefoam-para(1)
    Start ParaView3 to visualize a case.

freefoam-solverSweeps(1)
    Extract solver statistics from a log file.

CONFIGURATION MECHANISM

FreeFOAM offers a number of global configuration options. These include

    • location of the API documentation and the method to display it

    • debug, info and optimisation switches

    • physical constants

    • plugin search paths

    • parallel communications method

    • starting of a parallel job

  Global Configuration Files

Unfortunately the OpenFOAM library (on which FreeFOAM builds) and some applications require the following files to be present for start-up:

    • cellModels

    • controlDict

    • thermoData/BurcatCpData

    • thermoData/therm.dat

It finds them in the following places (in the specified order, picking the first hit):

    1. Under the directory specified in the $FREEFOAM_CONFIG_DIR environment variable

    2. In $HOME/.FreeFOAM/0.1

    3. In $HOME/.FreeFOAM

    4. In the installation directory of the configuration files, /usr/local/etc/FreeFOAM/0.1.0

where the versions in above directory names depend on the version of the FreeFOAM application to be run.

  Locating the API documentation

All FreeFOAM applications accept the options -doc and -srcDoc. The former locates and displays the API documentation of the application, the latter the source code. This, however, requires that FreeFOAM is able to locate the API documentation and knows which program to use for display.

By default FreeFOAM uses the API documentation provided on http://freefoam.sf.net/doc/API because most users will not want to install the sizeable documentation package. The method FreeFOAM uses to locate the documentation files is via index files which are conventional FreeFOAM dictionaries. Each of them contains an entry docDir specifying the documentation root location (such as http://freefoam.sf.net/doc/API) and a dictionary called docFiles mapping the application name to the names of the corresponding HTML documentation and source page.

These documentation indices are found by querying the list Documentation::doxyDocIndices in the global controlDict file. If multiple documentation indices are specified, the first index that provides documentation for the given application is picked.

  Displaying the API documentation

FreeFOAM can automatically open a browser window displaying the HTML documentation for you. The entry Documentation::docBrowser in the global controlDict can be used to change which program is used for this. In this string the token %f gets replaced by the filename to open.

  Debug, Info and Optimisation Switches

The lists DebugSwitches, InfoSwitches and OptimisationSwitches in the global controlDict file determine some global run-time behaviour of FreeFOAM. The entries in DebugSwitches can be set to 1 for more verbose output in the specified class.

The InfoSwitches::writePrecision setting determines the write precision in the output to the terminal (i.e. not the output written to files). Whether a job-info file should be created can be specified by enabling InfoSwitches::writeJobeInfo.

For files that are modifieable during run-time (e.g. to change the interval at which the output is created), FreeFOAM compares the modification times of these files in order to determine whether they have to be re-read. The setting OptimisationSwitches::fileModificationSkew determines the minimum modification-time difference in seconds for a file to be considered changed.

The setting OptimisationSwitches::commsType determines whether inter-process communications are either blocking, scheduled or nonBlocking.

OptimisationSwitches::floatTransfer causes to convert double values to float before transferring them through the communications library. This saves some bandwidth at the loss of accuracy.

The sum operation across processors can be executed either in a linear or a tree fashion. Especially for a large number of processors, tree-summation is significantly faster. The threshold at which to switch from linear to tree-summation is determined by OptimisationSwitches::nProcsSimpleSum.

  Physical Constants

DimensionedConstants::R
    Universal gas constant

DimensionedConstants::Pstd
    Standard pressure

DimensionedConstants::Tstd
    Standard temperature

DimensionedConstants::sigmaSB
    Stefan-Boltzmann constant

  Plugin Search Path

FreeFOAM very often relies on dynamically loading libraries (a.k.a plugins). If the library name is given as an absolute path, FreeFOAM tries to load it directly. To locate libraries specified just by their name or with a relative path, FreeFOAM first tries to find the library in one of the directories specified in the list LibrarySearchPaths in the global controlDict and, if the library was not found, falls back to the mechanism provided by your operating system (i.e. for Linux systems this would be the LD_LIBRARY_PATH and the default search path).

  Selecting the Parallel Communications Library

Both, FreeFOAM and OpenFOAM abstract the parallel operations into the Pstream library, making it rather simple to firstly switch between parallel implementations and secondly port the software to a new communications library. However, FreeFOAM uses a much more flexible mechanism of determining which Pstream implementation library to use than OpenFOAM. The latter does this by adjusting the LD_LIBRARY_PATH environment variable. As FreeFOAM wants to be a well behaved Linux citizen, this is not an option. Instead, FreeFOAM dynamically loads the desired Pstream library at startup (i.e. as a plug-in). The following list details how FreeFOAM determines what library to load (if at all):

    1. If the environment variable FREEFOAM_PSTREAM_LIBRARY is set, FreeFOAM will try to load the library specified by it.

    2. If the sub-dictionary PstreamImplementation exists in the global controlDict file (see above), it reads the value of the entry PstreamImplementation::configName therein. This entry can be overridden by setting the FREEFOAM_PSTREAM_CONFIG environment variable. It then expects that a sub-dictionary of PstreamImplementation with the name specified in FREEFOAM_PSTREAM_CONFIG or PstreamImplementation::configName exists. If that sub-dictionary contains the entry PstreamImplementation::library, it will try to load a library specified by the value of that entry.

Please note that this library is also considered to be a plugin, and thus is located in the same way as described above.

After FreeFOAM (possibly) loaded the library, it will try to instantiate concrete implementations of the abstract base classes PstreamImpl, IPstreamImpl and OPstreamImpl. Which classes are to be instantiated is determined as follows:

    1. FreeFOAM queries the environment variables FREEFOAM_PSTREAM_CLASS, FREEFOAM_IPSTREAM_CLASS and FREEFOAM_OPSTREAM_CLASS for the class names to be instantiated.

    2. For any of the variables not set, it requires the sub-dictionary PstreamImplementation to be present in the global controlDict, reads the value of FREEFOAM_PSTREAM_CONFIG or the entry PstreamImplementation::configName and similarly to the library loading, loads the sub-dictionary specified by that value. It then expects to find the entries PstreamImplementation::Pstream, PstreamImplementation::IPstream and PstreamImplementation::OPstream which specify the names of the classes to load.

This means that one can create a global controlDict file containing (among other things) something like the following:

    PstreamImplementation
    {
        //configName dummy;
        configName mpi;
        dummy
        {
            library libdummyPstream.so;
            Pstream dummyPstreamImpl;
            OPstream dummyOPstreamImpl;
            IPstream dummyIPstreamImpl;
        }
        mpi
        {
            library libmpiPstream.so;
            Pstream mpiPstreamImpl;
            OPstream mpiOPstreamImpl;
            IPstream mpiIPstreamImpl;
        }
    }

This way the administrator can provide a global controlDict in the FreeFOAM installation. Every user can then override that controlDict by supplying her own file in her home directory as detailed above. In order to select a particular Pstream implementation for a specific communications library, the user can then either adjust the PstreamImplementation::configName entry in the global controlDict file, set the FREEFOAM_PSTREAM_CONFIG variable or, for full control, set the variables FREEFOAM_PSTREAM_LIBRARY, FREEFOAM_PSTREAM_CLASS, FREEFOAM_IPSTREAM_CLASS and FREEFOAM_OPSTREAM_CLASS.

  Starting of a Parallel Job

Some of the tutorial scripts need to run FreeFOAM applications in parallel. However, how to do so differs strongly from system to system and between parallel communication libraries. This is why the command line to start an application in parallel is configureable in the parRunTemplate setting. ${NPROCS}, ${PAROPTS}, ${APPLICATION} and ${ARGS} are placeholders for the number of processors to use, options for the parallel communications system, the application to run and its arguments, respectively. Note that the -parallel option is NOT included in ${ARGS}.

ENVIRONMENT VARIABLES

FREEFOAM_CONFIG_DIR
    Directory containing the global configuration files

FREEFOAM_PATH
    Additional, colon separated paths in which to first search for FreeFOAM executables

FREEFOAM_PSTREAM_CONFIG
    Name of the Pstream configuration in the global controlDict file to use

FREEFOAM_PSTREAM_LIBRARY
    The Pstream library to load

FREEFOAM_PSTREAM_CLASS
    Name of the concrete PstreamImpl class to instantiate

FREEFOAM_IPSTREAM_CLASS
    Name of the concrete IPstreamImpl class to instantiate

FREEFOAM_OPSTREAM_CLASS
    Name of the concrete OPstreamImpl class to instantiate

SEE ALSO

The user guide is available from http://freefoam.sourceforge.net/doc/UserGuide and the Doxygen-generated API documentation can be accessed at http://freefoam.sourceforge.net/doc/API.

AUTHOR

Michael Wild <themiwi@users.sourceforge.net>

FREEFOAM

Part of the freefoam(1) suite

COPYRIGHT

    • Copyright © 1991-2010 OpenCFD Ltd.

    • Copyright © 2008-2012 Michael Wild.