Prepared by Ivan Batistić
solids4foam
utilities located in applications/utilities
;solids4foam
utilities provide functionalities not available in the standard OpenFOAM
utilities (OpenFOAM-wiki).abaqusMeshToFoam
Utility purpose Mesh converter: converts Abaqus mesh (in *.inp
format) into the FOAM mesh format.
Currently, this utility only supports 3-D hexahedral cells/elements. Details regarding the FOAM mesh format can be found, for example, here.
Note that each distribution of OpenFOAM
comes with a set of mesh converters (but not for Abaqus), see the available one here.
Arguments
<mesh.inp>
name of the Abaqus mesh file.Options/parameters
None
Example of usage
$ abaqusMeshToFoam mesh.inp
addTinyPatch
Utility purpose For a chosen patch, find the closest face to the specified location and separate it into a new patch.
The utility can be used, for example, to create patches for specifying point loads.
Arguments
<currentPatchName>
chosen patch name;<newTinyPatchName>
name of the one-face patch to be created;"(x y z)"
location vector.Options/parameters
None
Example of usage
$ addTinyPatch Top TopNew "(30 30 0)"
When using addTinyPatch
the original mesh is overwritten!
foamMeshToAbaqus
Utility purpose Mesh converter: converts FOAM mesh into Abaqus mesh (*.inp
format). Currently, this utility only supports 3-D hexahedral cells/elements.
Arguments
None
Options/parameters
None
Example of usage
$ foamMeshToAbaqus
Converted mesh is written to theabaqusMesh.inp
file.
Creates a node set and and element set and a surface for each boundary patch.
Also creates a element set for each material in the materials file (if it is exists).
perturbMeshPoints
Utility purpose
Add a random perturbation to each interior mesh point. Boundary points are not perturbed, except for in-plane motion on empty
and wedge
patches.
The utility can be used to create a distorted mesh to test the behavior (accuracy, order of accuracy, stability, etc.) of a discretisation procedure.
Arguments
None
Options/parameters
None
Dictionary
Inputs are defined in dictionary named perturbMeshPointsDict
and located in system
directory:
seed 1;
scaleFactor (5e-3 5e-3 5e-3);
Gaussian no;
seed
is a scalar value used for the random number generator;scaleFactor
is a scaling vector which scales the point perturbation in each direction separately;Gaussian
enforces Gaussian distribution when perturbing points, otherwise uniform distribution is expected. Only used in combination with OpenFOAM.com.Example of usage
$ perturbMeshPoints
The figure below shows mesh before and after using perturbMeshPoints
utility.
Perturbed mesh (polyMesh
) is stored in the 0
directory and needs to be moved to constant
before running the simulation!
For 2-D simulations, there is no need to perturb points in the empty
direction. For an empty direction, zero scaling should be used, e.g.:scaleFactor (5e-3 5e-3 0);
splitPatch
Utility purpose Splits a patch into two patches by putting faces in the given bounding box in a new patch.
Arguments None
Options/parameters
-overwrite
overwrite the original mesh when storing mesh after patch splitting.
patchToSplitName Top;
newPatchName TopNew;
boundBoxes
(
(0 0 0.01) (1 1 1)
);
patchToSplitName
is a name of the patch to be split;newPatchName
is the name of the splitted patch part;boundBoxes
is list of bounding boxes; each defined with two vectors: (xmin ymin zmin)
and (xmax ymax zmax)
. Boundary patch faces inside this bounding box will be put in a new patch. Example of usage
$ splitPatch
The mesh with the new patch is stored in a new time-step directory (1
for example) and should be moved to the constant
before running the simulation. Alternatively, the -overwrite
option can be used to overwrite the original mesh.