FEATool Multiphysics
v1.17.0
Finite Element Analysis Toolbox
|
FOAM2GRID Convert and import an OpenFOAM mesh.
GRID2FOAM Convert and export grid data to OpenFOAM format.
[ GRID ] = GRID2FOAM( PATH, N_SDIM ) Imports an OpenFOAM mesh from PATH (typically casedir/constant/polyMesh) and converts it to and converts it to FEATool grid data.
boundary (only ysed for 2D meshes) cellZones (for multiple subdomains, labeled ignored) faces (list of vectors) neighbour (unused) owner (scalar list) vertices (vector list)
(Note that meshes with mixed element types are not supported, and boundary ordering and labels are ignored). N_SDIM optionally specifies which mesh dimension to import (3 or 2 for 2D grids with one mesh layer in the z-dimension).
[ POLYMESH ] = GRID2FOAM( GRID, PATH, FID_LOG ) Converts and exports FEATool grid data to the OpenFOAM ASCII mesh format.
Input data is a valid FEA or GRID struct, and a PATH to where the OpenFOAM mesh files should be written (defaults to the current
boundary (dictionary of boundary types, labeled boundary 1-n) cellZones (for multiple subdomains, labeled zone1-n) faces (list of vectors) neighbour (scalar list) owner (scalar list) vertices (vector list)
FID_LOG optionally specifies a message log file handle (negative for gui output or empty for no output).
Optionally returns grid dictionary definitions as a struct POLYMESH.