Difference between revisions of "Main OFUtilities"
From OpenFOAMWiki
m (Reverted edit of Dsywlv, changed back to last version by Bgschaid) |
([Co] official description totally false) |
||
(14 intermediate revisions by 7 users not shown) | |||
Line 14: | Line 14: | ||
=== Conversion === | === Conversion === | ||
+ | * [[ansysToFoam]] Converts an ANSYS input mesh file, exported from I-DEAS, to OpenFOAM format (formerly called ideasToFoam). | ||
− | * [[ | + | * [[ccm26ToFoam]] Converts a STAR-CCM mesh to OpenFOAM format. |
− | * [[fluentMeshToFoam]] Converts a Fluent mesh to OpenFOAM format. | + | * [[cfx4ToFoam]] Converts a CFX 4 mesh to OpenFOAM format. |
+ | |||
+ | * [[fluent3DMeshToFoam]] Converts a Fluent mesh (in ASCII format) to OpenFOAM format. | ||
+ | |||
+ | * [[fluentMeshToFoam]] Converts a Fluent mesh (in ASCII format) to OpenFOAM format including multiple region and region boundary. | ||
* [[foamMeshToFluent]] Writes out the OpenFOAM mesh in Fluent mesh format. | * [[foamMeshToFluent]] Writes out the OpenFOAM mesh in Fluent mesh format. | ||
+ | |||
+ | * [[foamToStarMesh]] Reads an OpenFOAM mesh and writes it in PROSTAR (v4) format. | ||
+ | |||
+ | * [[foamToSurface]] Reads an OpenFOAM mesh and writes the boundaries in surface format. | ||
* [[gambitToFoam]] Converts a GAMBIT mesh to OpenFOAM format. | * [[gambitToFoam]] Converts a GAMBIT mesh to OpenFOAM format. | ||
Line 25: | Line 34: | ||
* [[gmshToFoam]] Reads .msh file as written by Gmsh. Does not use physical type of mesh quantities yet. | * [[gmshToFoam]] Reads .msh file as written by Gmsh. Does not use physical type of mesh quantities yet. | ||
− | * [[ | + | * [[ideasUnvToFoam]] Converts a I-DEAS or Salome mesh to OpenFOAM format |
* [[kivaToFoam]] Converts a KIVA3v grid to OpenFOAM format. | * [[kivaToFoam]] Converts a KIVA3v grid to OpenFOAM format. | ||
Line 32: | Line 41: | ||
* [[netgenNeutralToFoam]] Converts a Netgen mesh to OpenFOAM format. | * [[netgenNeutralToFoam]] Converts a Netgen mesh to OpenFOAM format. | ||
+ | |||
+ | * [[plot3dToFoam]] Plot3d mesh (ascii/formatted format) converter. | ||
* [[sammToFoam]] Converts a STAR-CD SAMM mesh to OpenFOAM format. | * [[sammToFoam]] Converts a STAR-CD SAMM mesh to OpenFOAM format. | ||
− | * [[ | + | * [[star3ToFoam]] Converts a STAR-CD (v3) PROSTAR mesh into OpenFOAM format. |
+ | |||
+ | * [[star4ToFoam]] Converts a STAR-CD (v4) PROSTAR mesh into OpenFOAM format. | ||
* [[tetgenToFoam]] Reads .ele and .node and .face files as written by tetgen. | * [[tetgenToFoam]] Reads .ele and .node and .face files as written by tetgen. | ||
Line 43: | Line 56: | ||
=== Generation === | === Generation === | ||
− | * [[blockMesh]] | + | * [[blockMesh]] A multi-block mesh generator. |
+ | |||
+ | * [[extrudeMesh]] Extrude mesh from existing patch (by default outwards facing normals; optional flips faces) or from patch read from file. | ||
+ | |||
+ | * [[extrude2DMesh]] Takes 2D mesh (all faces 2 points only, no front and back faces) and creates a 3D mesh by extruding with specified thickness. | ||
+ | |||
+ | * [[extrudeToRegionMesh]] Extrude faceZones into separate mesh (as a different region), e.g. for creating liquid film regions. | ||
* [[makePolyMesh]] Constructs a polyMesh from a shapeMesh. | * [[makePolyMesh]] Constructs a polyMesh from a shapeMesh. | ||
+ | |||
+ | * [[snappyHexMesh]] Adjusts (refine, snap and add layers) an existing mesh to specified boundary surfaces and refinement regions. | ||
=== Manipulation === | === Manipulation === | ||
Line 56: | Line 77: | ||
* [[checkMesh]] Checks validity of a mesh. | * [[checkMesh]] Checks validity of a mesh. | ||
+ | |||
+ | * [[createBaffles]] Makes internal faces into boundary faces. Does not duplicate points, unlike [[mergeOrSplitBaffles]]. | ||
* [[couplePatches]] Utility to reorder cyclic and processor patches. Is now all built-in into morphing so reuse that code. | * [[couplePatches]] Utility to reorder cyclic and processor patches. Is now all built-in into morphing so reuse that code. | ||
− | * [[createPatch]] Utility to create patches out of selected boundary faces. Faces come either from existing patches or from a faceSet. | + | * [[createPatch]] Utility to create patches out of selected boundary faces. Faces come either from existing patches or from a ''faceSet''. |
* [[deformedGeom]] Deforms a polyMesh using a displacement field U and a scaling factor supplied as an argument. | * [[deformedGeom]] Deforms a polyMesh using a displacement field U and a scaling factor supplied as an argument. | ||
Line 69: | Line 92: | ||
* [[flattenMesh]] Flatten the front and back planes of a 2D cartesian mesh. | * [[flattenMesh]] Flatten the front and back planes of a 2D cartesian mesh. | ||
− | * [[insideCells]] | + | * [[insideCells]] Picks up cells with cell centre ’inside’ of surface. Requires surface to be closed and singly connected. |
* [[mergeMeshes]] Merge two meshes. | * [[mergeMeshes]] Merge two meshes. | ||
+ | |||
+ | * [[mergeOrSplitBaffles]] Detects faces that share points (baffles). Either merge them or duplicate the points. | ||
* [[mirrorMesh]] Mirrors a mesh around a given plane. | * [[mirrorMesh]] Mirrors a mesh around a given plane. | ||
+ | |||
+ | * [[moveDynamicMesh]] Mesh motion and topological mesh changes utility. | ||
* [[moveEngineMesh]] Solver for moving meshes for engine calculations. | * [[moveEngineMesh]] Solver for moving meshes for engine calculations. | ||
Line 80: | Line 107: | ||
* [[objToVTK]] Read obj line (not surface!) file and convert into vtk. | * [[objToVTK]] Read obj line (not surface!) file and convert into vtk. | ||
+ | |||
+ | * [[polyDualMesh]] Calculate the dual of a polyMesh. Adheres to all the feature and patch edges. | ||
* [[pointSet]] Selects a point set through a dictionary. | * [[pointSet]] Selects a point set through a dictionary. | ||
− | * [[refineMesh]] Utility to refine cells in multiple directions | + | * [[refineMesh]] Utility to refine cells in multiple directions. |
* [[refineShapeMesh]] Refines a region of a shapeMesh according to parameters specified in a refineShapeMeshDict dictionary. | * [[refineShapeMesh]] Refines a region of a shapeMesh according to parameters specified in a refineShapeMeshDict dictionary. | ||
* [[renumberMesh]] Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories. | * [[renumberMesh]] Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories. | ||
+ | |||
+ | * [[rotateMesh]] Rotates the mesh and fields from the direction ''n1'' to the direction ''n2''. | ||
* [[scalePoints]] Scales the mesh points in the polyMesh directory by a factor supplied as an argument. | * [[scalePoints]] Scales the mesh points in the polyMesh directory by a factor supplied as an argument. | ||
− | * [[ | + | * [[setSet]] Manipulate a cell/face/point/ set or zone interactively. |
− | * [[ | + | * [[setsToZones]] Add ''pointZones/faceZones/cellZones'' to the mesh from similar named ''pointSets/faceSets/cellSets'' |
− | * [[ | + | * [[singleCellMesh]] Removes all but one cells of the mesh. Used to generate mesh and fields that can be used for boundary-only data. Might easily result in illegal mesh though so only look at boundaries in paraview. |
− | * [[subsetMesh]] Selects a section of mesh based on a cellSet. | + | * [[splitMesh]] Splits mesh by making internal faces external. Uses ''attachDetach''. |
+ | |||
+ | * [[splitMeshRegions]] Splits mesh into multiple regions. | ||
+ | |||
+ | * [[stitchMesh]] "Stitches" a mesh. | ||
+ | |||
+ | * [[subsetMesh]] Selects a section of mesh based on a ''cellSet''. | ||
* [[tetDecomposition]] Takes a mesh and decomposes it into tetrahedra using a face-cell centre decomposition. | * [[tetDecomposition]] Takes a mesh and decomposes it into tetrahedra using a face-cell centre decomposition. | ||
+ | |||
+ | * [[topoSet]] Operates on ''cellSets/faceSets/pointSets'' through a dictionary. | ||
+ | |||
+ | * [[transformPoints]] Transforms the mesh points in the polyMesh directory according to the translate, rotate and scale options. | ||
* [[zipUpMesh]] Reads in a mesh with hanging vertices and zips up the cells to guarantee that all polyhedral cells of valid shape are closed. | * [[zipUpMesh]] Reads in a mesh with hanging vertices and zips up the cells to guarantee that all polyhedral cells of valid shape are closed. | ||
+ | |||
+ | ===Other tools=== | ||
+ | |||
+ | * [[autoRefineMesh]] Utility to refine cells near to a surface. | ||
+ | |||
+ | * [[collapseEdges]] Collapse short edges and combines edges that are in line. | ||
+ | |||
+ | * [[combinePatchFaces]] Checks for multiple patch faces on same cell and combines them. These result from e.g. refined neighbouring cells getting removed, leaving 4 exposed faces with same owner. | ||
+ | |||
+ | * [[modifyMesh]] Manipulates mesh elements. | ||
+ | |||
+ | * [[PDRMesh]] Mesh and field preparation utility for PDR type simulations. | ||
+ | |||
+ | * [[refineHexMesh]] Refines a hex mesh by 2x2x2 cell splitting. | ||
+ | |||
+ | * [[refinementLevel]] Tries to figure out what the refinement level is on refined cartesian meshes. Run before snapping. | ||
+ | |||
+ | * [[refineWallLayer]] Utility to refine cells next to patches. | ||
+ | |||
+ | * [[removeFaces]] Utility to remove faces (combines cells on both sides). | ||
+ | |||
+ | * [[selectCells]] Select cells in relation to surface. | ||
+ | |||
+ | * [[splitCells]] Utility to split cells with flat faces | ||
+ | |||
+ | == Surface mesh == | ||
+ | |||
+ | * [[surfaceAdd]] Add two surfaces. Does geometric merge on points. Does not check for overlapping/intersecting triangles | ||
+ | |||
+ | * [[surfaceAutoPatch]] Patches surface according to feature angle. Like autoPatch | ||
+ | |||
+ | * [[surfaceCheck]] | ||
+ | |||
+ | * [[surfaceClean]] removes baffles, collapses small edges by removing triangles and converts sliver triangles into split edges by projecting point onto base of triangle | ||
+ | |||
+ | * [[surfaceCoarsen]] Surface coarsening using "bunnylod" | ||
+ | |||
+ | * [[surfaceConvert]] Converts from one surface mesh format to another | ||
+ | |||
+ | * [[surfaceFeatureConvert]] Convert between edgeMesh formats | ||
+ | |||
+ | * [[surfaceFeatureExtract]] Extracts and writes surface features to file | ||
+ | |||
+ | * [[surfaceFind]] Finds nearest face and vertex | ||
+ | |||
+ | * [[surfaceInertia]] Calculates the inertia tensor and principal axes and moments of a command line specified triSurface. Inertia can either be of the solid body or of a thin shell | ||
+ | |||
+ | * [[surfaceMeshConvert]] Convert between surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem | ||
+ | |||
+ | * [[surfaceMeshConvertTesting]] Converts from one surface mesh format to another, but primarily used for testing functionality | ||
+ | |||
+ | * [[surfaceMeshExport]] Export from surfMesh to various third-party surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem | ||
+ | |||
+ | * [[surfaceMeshImport]] Import from various third-party surface formats into surfMesh with optional scaling or transformations (rotate/translate) on a coordinateSystem | ||
+ | |||
+ | * [[surfaceMeshInfo]] Miscellaneous information about surface meshes | ||
+ | |||
+ | * [[surfaceMeshTriangulate]] Extracts triSurface from a polyMesh. Triangulates all boundary faces. Region numbers on triangles are the patch numbers of the polyMesh. Optionally only triangulates named patches | ||
+ | |||
+ | * [[surfaceOrient]] Set normal consistent with respect to a user provided ’outside’ point. If -inside the point is considered inside | ||
+ | |||
+ | * [[surfacePointMerge]] Merges points on surface if they are within absolute distance. Since absolute distance use with care! | ||
+ | |||
+ | * [[surfaceRedistributePar]] (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 | ||
+ | |||
+ | * [[surfaceRefineRedGreen]] Refine by splitting all three edges of triangle (’red’ refinement). Neighbouring triangles (which are not marked for refinement get split in half (’green’) refinement. (R. Verfuerth, ”A review of a posteriori error estimation and adaptive mesh refinement techniques”, Wiley-Teubner, 1996) | ||
+ | |||
+ | * [[surfaceSmooth]] Example of a simple laplacian smoother | ||
+ | |||
+ | * [[surfaceSplitByPatch]] Writes regions of triSurface to separate files | ||
+ | |||
+ | * [[surfaceSplitNonManifolds]] Takes multiply connected surface and tries to split surface at multiply connected edges by duplicating points. Introduces concept of - borderEdge. Edge with 4 faces connected to it. - borderPoint. Point connected to exactly 2 borderEdges. - borderLine. Connected list of borderEdges | ||
+ | |||
+ | * [[surfaceSubset]] A surface analysis tool which sub-sets the triSurface to choose only a part of interest. Based on subsetMesh | ||
+ | |||
+ | * [[surfaceToPatch]] Reads surface and applies surface regioning to a mesh. Uses boundaryMesh to do the hard work | ||
+ | |||
+ | * [[surfaceTransformPoints]] Transform (scale/rotate) a surface. Like transformPoints but for surfaces | ||
== Miscellaneous == | == Miscellaneous == | ||
+ | |||
+ | * [[expandDictionary]] Read the dictionary provided as an argument, expand the macros etc. and write the resulting dictionary to standard output | ||
* [[foamConvert21To22]] Converts the following case dictionaries from 2.1 to 2.2 syntax: - fvSchemes - fvSolution (created from fvTolerances) - (controlDict) - for parallel processed cases, processor numbering updated from 1,2,... to 0,1, | * [[foamConvert21To22]] Converts the following case dictionaries from 2.1 to 2.2 syntax: - fvSchemes - fvSolution (created from fvTolerances) - (controlDict) - for parallel processed cases, processor numbering updated from 1,2,... to 0,1, | ||
* [[foamDebugSwitches]] Write out all library debug switches. | * [[foamDebugSwitches]] Write out all library debug switches. | ||
+ | |||
+ | * [[foamFormatConvert]] Converts all <tt>IOobjects</tt> associated with a case into the format specified in the ''controlDict'' | ||
* [[foamInfoExec]] Interrogates a case and prints information to screen. | * [[foamInfoExec]] Interrogates a case and prints information to screen. | ||
+ | |||
+ | * [[patchSummary]] Writes fields and boundary condition info for each patch at each requested time instance | ||
== Parallel processing == | == Parallel processing == | ||
− | *[[decomposePar]] Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM. | + | * [[decomposePar]] Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM. |
+ | |||
+ | * [[reconstructPar]] Reconstructs a mesh and fields of a case that is decomposed for parallel execution of OpenFOAM. | ||
+ | |||
+ | * [[reconstructParMesh]] Reconstructs a mesh using geometric information only | ||
− | *[[ | + | * [[redistributeMeshPar]] Redistributes existing decomposed mesh and fields according to the current settings in the decomposeParDict file |
== Post-processing == | == Post-processing == | ||
Line 121: | Line 250: | ||
=== Data converters === | === Data converters === | ||
− | * [[foamDataToFluent]] Translates OpenFOAM data to Fluent format. | + | * [[foamDataToFluent]] Translates OpenFOAM data to ''Fluent'' format. |
* [[foamToDX]] Translates OpenFOAM data to OpenDX format. | * [[foamToDX]] Translates OpenFOAM data to OpenDX format. | ||
− | * [[foamToEnsight]] Translates OpenFOAM data to EnSight format. | + | * [[foamToEnsight]] Translates OpenFOAM data to ''EnSight'' format. |
+ | |||
+ | * [[foamToEnsightParts]] Translates OpenFOAM data to ''Ensight'' format. An Ensight part is created for each ''cellZone'' and patch | ||
* [[foamToFieldview]] Write out the OpenFOAM mesh in Fieldview-UNS format (binary). See Fieldview Release 8 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist. | * [[foamToFieldview]] Write out the OpenFOAM mesh in Fieldview-UNS format (binary). See Fieldview Release 8 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist. | ||
* [[foamToFieldview9]] Write out the OpenFOAM mesh in Version 3.0 Fieldview-UNS format (binary). See Fieldview Release 9 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist. | * [[foamToFieldview9]] Write out the OpenFOAM mesh in Version 3.0 Fieldview-UNS format (binary). See Fieldview Release 9 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist. | ||
+ | |||
+ | * [[foamToGMV]] Translates OpenFOAM data to GMV readable files. | ||
+ | |||
+ | * [[foamToTecplot360]] Tecplot binary file format writer | ||
* [[foamToVTK]] Legacy VTK file format writer. - handles volScalar, volVector, pointScalar, pointVector fields. - mesh topo changes. - both ascii and binary. - single time step writing. - write subset only. - automatic decomposition of cells; polygons on boundary undecomposed since handled by vtk | * [[foamToVTK]] Legacy VTK file format writer. - handles volScalar, volVector, pointScalar, pointVector fields. - mesh topo changes. - both ascii and binary. - single time step writing. - write subset only. - automatic decomposition of cells; polygons on boundary undecomposed since handled by vtk | ||
− | * [[smapToFoam]] Translates a STAR-CD SMAP data file into OpenFOAM field format. | + | * [[smapToFoam]] Translates a ''STAR-CD SMAP'' data file into OpenFOAM field format. |
=== Graphics === | === Graphics === | ||
Line 143: | Line 278: | ||
* [[ensight76FoamExec]] Module for EnSight 7.6 to read OpenFOAM data directly without translation. | * [[ensight76FoamExec]] Module for EnSight 7.6 to read OpenFOAM data directly without translation. | ||
− | + | * [[ensightFoamReader]] ''EnSight'' library module to read OpenFOAM data directly without translation | |
− | * [[ | + | * [[fieldview9Reader]] Reader module for ''Fieldview'' 9 to read OpenFOAM mesh and data |
+ | |||
+ | === Lagrangian simulation === | ||
+ | |||
+ | * [[particleTracks]] Generates a VTK file of particle tracks for cases that were computed using a tracked-parcel-type cloud | ||
+ | |||
+ | * [[steadyParticleTracks]] Generates a VTK file of particle tracks for cases that were computed using a steady-state cloud. NOTE: case must be re-constructed (if running in parallel) before use | ||
+ | |||
+ | === Patch data === | ||
+ | |||
+ | * [[patchAverage]] Calculates the average of the specified field over the specified patch | ||
+ | |||
+ | * [[patchIntegrate]] Calculates the integral of the specified field over the specified patch | ||
+ | |||
+ | === Scalar fields === | ||
+ | |||
+ | * [[pPrime2]] Calculates and writes the scalar field of pPrime2 (<math>(p - \bar{p})^2</math>) at each time | ||
+ | |||
+ | === Sampling === | ||
+ | |||
+ | * [[probeLocations]] Probe locations | ||
+ | |||
+ | * [[sample]] Sample field data with a choice of interpolation schemes, sampling options and write formats. | ||
+ | |||
+ | * [[sampleSurface]] Surface sampling. Runs in parallel (but does not merge points). | ||
+ | |||
+ | === Stress fields === | ||
* [[Rcomponents]] Calculates and writes the scalar fields of the six components of the Reynolds stress R for each time in a database. | * [[Rcomponents]] Calculates and writes the scalar fields of the six components of the Reynolds stress R for each time in a database. | ||
* [[stressComponents]] Calculates and writes the scalar fields of the six components of the stress tensor sigma for each time in a database. | * [[stressComponents]] Calculates and writes the scalar fields of the six components of the stress tensor sigma for each time in a database. | ||
+ | |||
+ | === Turbulence === | ||
+ | |||
+ | * [[createTurbulenceFields]] Creates a full set of turbulence fields | ||
+ | |||
+ | * [[R]] Calculates and writes the Reynolds stress <tt>R</tt> for the current time step. | ||
=== Velocity field === | === Velocity field === | ||
− | * [[Co]] | + | * [[Co]] Calculates and writes the Co number as a volScalarField obtained from field phi. |
* [[divU]] Calculates and writes the divergence of velocity field U at each time in a database. | * [[divU]] Calculates and writes the divergence of velocity field U at each time in a database. | ||
* [[enstrophy]] Calculates and writes the enstrophy of velocity field U at each time in a database. | * [[enstrophy]] Calculates and writes the enstrophy of velocity field U at each time in a database. | ||
+ | |||
+ | * [[flowType]] Calculates and writes the flowType of velocity field U | ||
* [[Lambda2]] 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, at each time in a database. | * [[Lambda2]] 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, at each time in a database. | ||
Line 167: | Line 336: | ||
* [[magU]] Calculates and writes the scalar magnitude of the gradient of the velocity field U at each time in a database. | * [[magU]] Calculates and writes the scalar magnitude of the gradient of the velocity field U at each time in a database. | ||
− | * [[Pe]] Calculates and writes the Pe number as a surfaceScalarField obtained from field phi at each time in a database. | + | * [[Pe]] Calculates and writes the Pe number as a <tt>surfaceScalarField</tt> obtained from field <tt>phi</tt> at each time in a database. |
* [[Q]] Calculates and writes the second invariant of the velocity gradient tensor for each time in a database. | * [[Q]] Calculates and writes the second invariant of the velocity gradient tensor for each time in a database. | ||
Line 185: | Line 354: | ||
* [[wallGradU]] Calculates and writes the gradient of U at the wall, wallGradU, for the current time step. | * [[wallGradU]] Calculates and writes the gradient of U at the wall, wallGradU, for the current time step. | ||
− | * [[ | + | * [[wallHeatFlux]] Calculates and writes the heat flux for all patches as the boundary field of a <tt>volScalarField</tt> and also prints the integrated flux for all wall patches |
− | * [[yPlusLES]] Calculates the yPlus | + | * [[wallShearStress]] Calculates and writes the wall shear stress for the specified times |
+ | |||
+ | * [[yPlusLES]] Calculates the <tt>yPlus</tt> for all wall patches, for the specified times | ||
+ | |||
+ | * [[yPlusRAS]] Calculates and reports <tt>yPlus</tt> for all wall patches, for the specified times when using RAS turbulence models | ||
=== Miscellaneous === | === Miscellaneous === | ||
+ | |||
+ | * [[dsmcFieldsCalc]] Calculate intensive fields (<tt>U</tt> and <tt>T</tt>) from averaged extensive fields from a DSMC calculation | ||
* [[engineCompRatio]] 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. | * [[engineCompRatio]] 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. | ||
+ | |||
+ | * [[execFlowFunctionObjects]] Execute the set of functionObjects specified in the selected dictionary (which defaults to <tt>system/controlDict</tt>) for the selected set of times. Alternative dictionaries should be placed in the <tt>system/</tt> folder | ||
+ | |||
+ | * [[foamCalc]] Generic utility for simple field calculations at specified times | ||
+ | |||
+ | * [[foamListTimes]] List times using timeSelector | ||
* [[liftDrag]] Calculates the lift and drag for each time in a database. | * [[liftDrag]] Calculates the lift and drag for each time in a database. | ||
+ | |||
+ | * [[pdfPlot]] Generates a graph of a probability distribution function | ||
* [[postChannel]] Post-processes data from channel flow calculations. | * [[postChannel]] Post-processes data from channel flow calculations. | ||
− | * [[ptot]] For each time | + | * [[ptot]] For each time: calculate the total pressure. |
− | * [[ | + | * [[wdot]] Calculates and writes wdot for each time. |
− | * [[ | + | * [[writeCellCentres]] Write the three components of the cell centres as <tt>volScalarFields</tt> so they can be used in postprocessing in thresholding |
− | + | ||
− | + | ||
== Pre-processing == | == Pre-processing == | ||
− | * [[ | + | * [[applyBoundaryLayer]] Apply a simplified boundary-layer model to the velocity and turbulence fields based on the 1/7th power-law. |
− | * [[ | + | * [[applyWallFunctionBoundaryConditions]] Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework. |
− | * [[FoamX]] Case management tool. | + | * [[boxTurb]] Makes a box of turbulence which conforms to a given energy spectrum and is divergence free. |
+ | |||
+ | * [[changeDictionary]] Utility to change dictionary entries, e.g. can be used to change the patch type in the field and polyMesh/boundary files. | ||
+ | |||
+ | * [[dsmcInitialise]] Initialise a case for [[dsmcFoam]] by reading the initialisation dictionary <tt>system/dsmcInitialise</tt> | ||
+ | |||
+ | * [[engineSwirl]] Generates a swirling flow for engine calculations. | ||
+ | |||
+ | * [[faceAgglomerate]] | ||
+ | |||
+ | * [[foamUpgradeCyclics]] Tool to upgrade mesh and fields for split cyclics. | ||
+ | |||
+ | * [[foamUpgradeFvSolution]] Simple tool to upgrade the syntax of <tt>system/fvSolution::solvers</tt> | ||
+ | |||
+ | * [[FoamX]] Case management tool. Only available until OpenFOAM version 1.4 | ||
* [[mapFields]] Maps volume fields from one mesh to another, reading and interpolating all fields present in the time directory of both cases. Parallel and non-parallel cases are handled without the need to reconstruct them first. | * [[mapFields]] Maps volume fields from one mesh to another, reading and interpolating all fields present in the time directory of both cases. Parallel and non-parallel cases are handled without the need to reconstruct them first. | ||
+ | |||
+ | * [[mdInitialise]] Initialises fields for a molecular dynamics (MD) simulation. | ||
+ | |||
+ | * [[setFields]] Set values on a selected set of cells/patchfaces through a dictionary. | ||
+ | |||
+ | * [[viewFactorGen]] | ||
+ | |||
+ | * [[wallFunctionTable]] Generates a table suitable for use by tabulated wall functions. | ||
== Thermophysical == | == Thermophysical == | ||
* [[adiabaticFlameT]] Calculates the adiabatic flame temperature for a given fuel over a range of unburnt temperatures and equivalence ratios. | * [[adiabaticFlameT]] Calculates the adiabatic flame temperature for a given fuel over a range of unburnt temperatures and equivalence ratios. | ||
+ | |||
+ | * [[chemkinToFoam]] Converts ''CHEMKIN'' 3 thermodynamics and reaction data files into ''OpenFOAM'' format | ||
* [[equilibriumCO]] Calculates the equilibrium level of carbon monoxide. | * [[equilibriumCO]] Calculates the equilibrium level of carbon monoxide. | ||
Line 223: | Line 428: | ||
* [[equilibriumFlameT]] Calculates the equilibrium flame temperature for a given fuel and pressure for a range of unburnt gas temperatures and equivalence ratios; the effects of dissociation on <math>O_2</math>, <math>H_2O</math> and <math>CO_2</math> are included. | * [[equilibriumFlameT]] Calculates the equilibrium flame temperature for a given fuel and pressure for a range of unburnt gas temperatures and equivalence ratios; the effects of dissociation on <math>O_2</math>, <math>H_2O</math> and <math>CO_2</math> are included. | ||
− | *[[mixtureAdiabaticFlameT]] Calculates the adiabatic flame temperature for a given mixture at a given temperature. | + | * [[mixtureAdiabaticFlameT]] Calculates the adiabatic flame temperature for a given mixture at a given temperature. |
+ | |||
+ | * [[Sl]] Calculates and prints the laminar flame speed of a given fuel at a given pressure (bar), temperature (K) and equivalence ratio. | ||
− | + | [[Category:Utilities]] |
Latest revision as of 18:18, 25 October 2012
These are the utilities distributed with OpenFOAM
Contents
1 Error estimation
- estimateScalarError Estimates the error in the solution for a scalar transport equation in the standard form.
- icoErrorEstimate Estimates error for the incompressible laminar CFD application icoFoam.
- icoMomentError Estimates error for the incompressible laminar CFD application icoFoam.
- momentScalarError Estimates the error in the solution for a scalar transport equation in the standard form.
2 Mesh
2.1 Conversion
- ansysToFoam Converts an ANSYS input mesh file, exported from I-DEAS, to OpenFOAM format (formerly called ideasToFoam).
- ccm26ToFoam Converts a STAR-CCM mesh to OpenFOAM format.
- cfx4ToFoam Converts a CFX 4 mesh to OpenFOAM format.
- fluent3DMeshToFoam Converts a Fluent mesh (in ASCII format) to OpenFOAM format.
- fluentMeshToFoam Converts a Fluent mesh (in ASCII format) to OpenFOAM format including multiple region and region boundary.
- foamMeshToFluent Writes out the OpenFOAM mesh in Fluent mesh format.
- foamToStarMesh Reads an OpenFOAM mesh and writes it in PROSTAR (v4) format.
- foamToSurface Reads an OpenFOAM mesh and writes the boundaries in surface format.
- gambitToFoam Converts a GAMBIT mesh to OpenFOAM format.
- gmshToFoam Reads .msh file as written by Gmsh. Does not use physical type of mesh quantities yet.
- ideasUnvToFoam Converts a I-DEAS or Salome mesh to OpenFOAM format
- kivaToFoam Converts a KIVA3v grid to OpenFOAM format.
- mshToFoam Reads .msh format generated by the Adventure system.
- netgenNeutralToFoam Converts a Netgen mesh to OpenFOAM format.
- plot3dToFoam Plot3d mesh (ascii/formatted format) converter.
- sammToFoam Converts a STAR-CD SAMM mesh to OpenFOAM format.
- star3ToFoam Converts a STAR-CD (v3) PROSTAR mesh into OpenFOAM format.
- star4ToFoam Converts a STAR-CD (v4) PROSTAR mesh into OpenFOAM format.
- tetgenToFoam Reads .ele and .node and .face files as written by tetgen.
- writeMeshObj For mesh debugging: writes mesh as three separate OBJ files which can be viewed with e.g. javaview.
2.2 Generation
- blockMesh A multi-block mesh generator.
- extrudeMesh Extrude mesh from existing patch (by default outwards facing normals; optional flips faces) or from patch read from file.
- extrude2DMesh Takes 2D mesh (all faces 2 points only, no front and back faces) and creates a 3D mesh by extruding with specified thickness.
- extrudeToRegionMesh Extrude faceZones into separate mesh (as a different region), e.g. for creating liquid film regions.
- makePolyMesh Constructs a polyMesh from a shapeMesh.
- snappyHexMesh Adjusts (refine, snap and add layers) an existing mesh to specified boundary surfaces and refinement regions.
2.3 Manipulation
- attachMesh Attach topologically detached mesh using prescribed mesh modifiers.
- autoPatch Divides external faces into patches based on (user supplied) feature angle.
- cellSet Selects a cell set through a dictionary.
- checkMesh Checks validity of a mesh.
- createBaffles Makes internal faces into boundary faces. Does not duplicate points, unlike mergeOrSplitBaffles.
- couplePatches Utility to reorder cyclic and processor patches. Is now all built-in into morphing so reuse that code.
- createPatch Utility to create patches out of selected boundary faces. Faces come either from existing patches or from a faceSet.
- deformedGeom Deforms a polyMesh using a displacement field U and a scaling factor supplied as an argument.
- faceSet Selects a face set through a dictionary.
- fieldToCellSet Select cells based on field. Give min and max to select.
- flattenMesh Flatten the front and back planes of a 2D cartesian mesh.
- insideCells Picks up cells with cell centre ’inside’ of surface. Requires surface to be closed and singly connected.
- mergeMeshes Merge two meshes.
- mergeOrSplitBaffles Detects faces that share points (baffles). Either merge them or duplicate the points.
- mirrorMesh Mirrors a mesh around a given plane.
- moveDynamicMesh Mesh motion and topological mesh changes utility.
- moveEngineMesh Solver for moving meshes for engine calculations.
- moveMesh Solver for moving meshes.
- objToVTK Read obj line (not surface!) file and convert into vtk.
- polyDualMesh Calculate the dual of a polyMesh. Adheres to all the feature and patch edges.
- pointSet Selects a point set through a dictionary.
- refineMesh Utility to refine cells in multiple directions.
- refineShapeMesh Refines a region of a shapeMesh according to parameters specified in a refineShapeMeshDict dictionary.
- renumberMesh Renumbers the cell list in order to reduce the bandwidth, reading and renumbering all fields from all the time directories.
- rotateMesh Rotates the mesh and fields from the direction n1 to the direction n2.
- scalePoints Scales the mesh points in the polyMesh directory by a factor supplied as an argument.
- setSet Manipulate a cell/face/point/ set or zone interactively.
- setsToZones Add pointZones/faceZones/cellZones to the mesh from similar named pointSets/faceSets/cellSets
- singleCellMesh Removes all but one cells of the mesh. Used to generate mesh and fields that can be used for boundary-only data. Might easily result in illegal mesh though so only look at boundaries in paraview.
- splitMesh Splits mesh by making internal faces external. Uses attachDetach.
- splitMeshRegions Splits mesh into multiple regions.
- stitchMesh "Stitches" a mesh.
- subsetMesh Selects a section of mesh based on a cellSet.
- tetDecomposition Takes a mesh and decomposes it into tetrahedra using a face-cell centre decomposition.
- topoSet Operates on cellSets/faceSets/pointSets through a dictionary.
- transformPoints Transforms the mesh points in the polyMesh directory according to the translate, rotate and scale options.
- zipUpMesh Reads in a mesh with hanging vertices and zips up the cells to guarantee that all polyhedral cells of valid shape are closed.
2.4 Other tools
- autoRefineMesh Utility to refine cells near to a surface.
- collapseEdges Collapse short edges and combines edges that are in line.
- combinePatchFaces Checks for multiple patch faces on same cell and combines them. These result from e.g. refined neighbouring cells getting removed, leaving 4 exposed faces with same owner.
- modifyMesh Manipulates mesh elements.
- PDRMesh Mesh and field preparation utility for PDR type simulations.
- refineHexMesh Refines a hex mesh by 2x2x2 cell splitting.
- refinementLevel Tries to figure out what the refinement level is on refined cartesian meshes. Run before snapping.
- refineWallLayer Utility to refine cells next to patches.
- removeFaces Utility to remove faces (combines cells on both sides).
- selectCells Select cells in relation to surface.
- splitCells Utility to split cells with flat faces
3 Surface mesh
- surfaceAdd Add two surfaces. Does geometric merge on points. Does not check for overlapping/intersecting triangles
- surfaceAutoPatch Patches surface according to feature angle. Like autoPatch
- surfaceClean removes baffles, collapses small edges by removing triangles and converts sliver triangles into split edges by projecting point onto base of triangle
- surfaceCoarsen Surface coarsening using "bunnylod"
- surfaceConvert Converts from one surface mesh format to another
- surfaceFeatureConvert Convert between edgeMesh formats
- surfaceFeatureExtract Extracts and writes surface features to file
- surfaceFind Finds nearest face and vertex
- surfaceInertia Calculates the inertia tensor and principal axes and moments of a command line specified triSurface. Inertia can either be of the solid body or of a thin shell
- surfaceMeshConvert Convert between surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem
- surfaceMeshConvertTesting Converts from one surface mesh format to another, but primarily used for testing functionality
- surfaceMeshExport Export from surfMesh to various third-party surface formats with optional scaling or transformations (rotate/translate) on a coordinateSystem
- surfaceMeshImport Import from various third-party surface formats into surfMesh with optional scaling or transformations (rotate/translate) on a coordinateSystem
- surfaceMeshInfo Miscellaneous information about surface meshes
- surfaceMeshTriangulate Extracts triSurface from a polyMesh. Triangulates all boundary faces. Region numbers on triangles are the patch numbers of the polyMesh. Optionally only triangulates named patches
- surfaceOrient Set normal consistent with respect to a user provided ’outside’ point. If -inside the point is considered inside
- surfacePointMerge Merges points on surface if they are within absolute distance. Since absolute distance use with care!
- surfaceRedistributePar (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
- surfaceRefineRedGreen Refine by splitting all three edges of triangle (’red’ refinement). Neighbouring triangles (which are not marked for refinement get split in half (’green’) refinement. (R. Verfuerth, ”A review of a posteriori error estimation and adaptive mesh refinement techniques”, Wiley-Teubner, 1996)
- surfaceSmooth Example of a simple laplacian smoother
- surfaceSplitByPatch Writes regions of triSurface to separate files
- surfaceSplitNonManifolds Takes multiply connected surface and tries to split surface at multiply connected edges by duplicating points. Introduces concept of - borderEdge. Edge with 4 faces connected to it. - borderPoint. Point connected to exactly 2 borderEdges. - borderLine. Connected list of borderEdges
- surfaceSubset A surface analysis tool which sub-sets the triSurface to choose only a part of interest. Based on subsetMesh
- surfaceToPatch Reads surface and applies surface regioning to a mesh. Uses boundaryMesh to do the hard work
- surfaceTransformPoints Transform (scale/rotate) a surface. Like transformPoints but for surfaces
4 Miscellaneous
- expandDictionary Read the dictionary provided as an argument, expand the macros etc. and write the resulting dictionary to standard output
- foamConvert21To22 Converts the following case dictionaries from 2.1 to 2.2 syntax: - fvSchemes - fvSolution (created from fvTolerances) - (controlDict) - for parallel processed cases, processor numbering updated from 1,2,... to 0,1,
- foamDebugSwitches Write out all library debug switches.
- foamFormatConvert Converts all IOobjects associated with a case into the format specified in the controlDict
- foamInfoExec Interrogates a case and prints information to screen.
- patchSummary Writes fields and boundary condition info for each patch at each requested time instance
5 Parallel processing
- decomposePar Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM.
- reconstructPar Reconstructs a mesh and fields of a case that is decomposed for parallel execution of OpenFOAM.
- reconstructParMesh Reconstructs a mesh using geometric information only
- redistributeMeshPar Redistributes existing decomposed mesh and fields according to the current settings in the decomposeParDict file
6 Post-processing
6.1 Data converters
- foamDataToFluent Translates OpenFOAM data to Fluent format.
- foamToDX Translates OpenFOAM data to OpenDX format.
- foamToEnsight Translates OpenFOAM data to EnSight format.
- foamToEnsightParts Translates OpenFOAM data to Ensight format. An Ensight part is created for each cellZone and patch
- foamToFieldview Write out the OpenFOAM mesh in Fieldview-UNS format (binary). See Fieldview Release 8 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist.
- foamToFieldview9 Write out the OpenFOAM mesh in Version 3.0 Fieldview-UNS format (binary). See Fieldview Release 9 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist.
- foamToGMV Translates OpenFOAM data to GMV readable files.
- foamToTecplot360 Tecplot binary file format writer
- foamToVTK Legacy VTK file format writer. - handles volScalar, volVector, pointScalar, pointVector fields. - mesh topo changes. - both ascii and binary. - single time step writing. - write subset only. - automatic decomposition of cells; polygons on boundary undecomposed since handled by vtk
- smapToFoam Translates a STAR-CD SMAP data file into OpenFOAM field format.
6.2 Graphics
- dxFoamExec Post-processing graphics using openDX.
- ensight74FoamExec Module for EnSight 7.6 to read OpenFOAM data directly without translation.
- ensight76FoamExec Module for EnSight 7.6 to read OpenFOAM data directly without translation.
- ensightFoamReader EnSight library module to read OpenFOAM data directly without translation
- fieldview9Reader Reader module for Fieldview 9 to read OpenFOAM mesh and data
6.3 Lagrangian simulation
- particleTracks Generates a VTK file of particle tracks for cases that were computed using a tracked-parcel-type cloud
- steadyParticleTracks Generates a VTK file of particle tracks for cases that were computed using a steady-state cloud. NOTE: case must be re-constructed (if running in parallel) before use
6.4 Patch data
- patchAverage Calculates the average of the specified field over the specified patch
- patchIntegrate Calculates the integral of the specified field over the specified patch
6.5 Scalar fields
- pPrime2 Calculates and writes the scalar field of pPrime2 () at each time
6.6 Sampling
- probeLocations Probe locations
- sample Sample field data with a choice of interpolation schemes, sampling options and write formats.
- sampleSurface Surface sampling. Runs in parallel (but does not merge points).
6.7 Stress fields
- Rcomponents Calculates and writes the scalar fields of the six components of the Reynolds stress R for each time in a database.
- stressComponents Calculates and writes the scalar fields of the six components of the stress tensor sigma for each time in a database.
6.8 Turbulence
- createTurbulenceFields Creates a full set of turbulence fields
- R Calculates and writes the Reynolds stress R for the current time step.
6.9 Velocity field
- Co Calculates and writes the Co number as a volScalarField obtained from field phi.
- divU Calculates and writes the divergence of velocity field U at each time in a database.
- enstrophy Calculates and writes the enstrophy of velocity field U at each time in a database.
- flowType Calculates and writes the flowType of velocity field U
- Lambda2 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, at each time in a database.
- Mach Calculates and writes the local Mach number from the velocity field U at each time in a database.
- magGradU Calculates and writes the scalar magnitude of velocity field U at each time in a database.
- magU Calculates and writes the scalar magnitude of the gradient of the velocity field U at each time in a database.
- Pe Calculates and writes the Pe number as a surfaceScalarField obtained from field phi at each time in a database.
- Q Calculates and writes the second invariant of the velocity gradient tensor for each time in a database.
- streamFunction Calculates and writes the stream function of velocity field U at each time in a database.
- Ucomponents Writes the three scalar fields, Ux, Uy and Uz, for each component of the velocity field U at each time in a database.
- uprime Calculates and writes the scalar field of uprime () at each time in a database.
- vorticity Calculates and writes the vorticity of velocity field U at each time in a database.
6.10 Walls
- checkYPlus Calculates and reports yPlus for all wall patches, for each time in a database.
- wallGradU Calculates and writes the gradient of U at the wall, wallGradU, for the current time step.
- wallHeatFlux 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
- wallShearStress Calculates and writes the wall shear stress for the specified times
- yPlusLES Calculates the yPlus for all wall patches, for the specified times
- yPlusRAS Calculates and reports yPlus for all wall patches, for the specified times when using RAS turbulence models
6.11 Miscellaneous
- dsmcFieldsCalc Calculate intensive fields (U and T) from averaged extensive fields from a DSMC calculation
- engineCompRatio 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.
- execFlowFunctionObjects Execute the set of functionObjects specified in the selected dictionary (which defaults to system/controlDict) for the selected set of times. Alternative dictionaries should be placed in the system/ folder
- foamCalc Generic utility for simple field calculations at specified times
- foamListTimes List times using timeSelector
- liftDrag Calculates the lift and drag for each time in a database.
- pdfPlot Generates a graph of a probability distribution function
- postChannel Post-processes data from channel flow calculations.
- ptot For each time: calculate the total pressure.
- wdot Calculates and writes wdot for each time.
- writeCellCentres Write the three components of the cell centres as volScalarFields so they can be used in postprocessing in thresholding
7 Pre-processing
- applyBoundaryLayer Apply a simplified boundary-layer model to the velocity and turbulence fields based on the 1/7th power-law.
- applyWallFunctionBoundaryConditions Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework.
- boxTurb Makes a box of turbulence which conforms to a given energy spectrum and is divergence free.
- changeDictionary Utility to change dictionary entries, e.g. can be used to change the patch type in the field and polyMesh/boundary files.
- dsmcInitialise Initialise a case for dsmcFoam by reading the initialisation dictionary system/dsmcInitialise
- engineSwirl Generates a swirling flow for engine calculations.
- foamUpgradeCyclics Tool to upgrade mesh and fields for split cyclics.
- foamUpgradeFvSolution Simple tool to upgrade the syntax of system/fvSolution::solvers
- FoamX Case management tool. Only available until OpenFOAM version 1.4
- mapFields Maps volume fields from one mesh to another, reading and interpolating all fields present in the time directory of both cases. Parallel and non-parallel cases are handled without the need to reconstruct them first.
- mdInitialise Initialises fields for a molecular dynamics (MD) simulation.
- setFields Set values on a selected set of cells/patchfaces through a dictionary.
- wallFunctionTable Generates a table suitable for use by tabulated wall functions.
8 Thermophysical
- adiabaticFlameT Calculates the adiabatic flame temperature for a given fuel over a range of unburnt temperatures and equivalence ratios.
- chemkinToFoam Converts CHEMKIN 3 thermodynamics and reaction data files into OpenFOAM format
- equilibriumCO Calculates the equilibrium level of carbon monoxide.
- equilibriumFlameT Calculates the equilibrium flame temperature for a given fuel and pressure for a range of unburnt gas temperatures and equivalence ratios; the effects of dissociation on , and are included.
- mixtureAdiabaticFlameT Calculates the adiabatic flame temperature for a given mixture at a given temperature.
- Sl Calculates and prints the laminar flame speed of a given fuel at a given pressure (bar), temperature (K) and equivalence ratio.