MeshManipulation class contains several OpenFOAM utilities to perform various mesh manipulation operations. More...
These utilities reads Foam mesh and outputs Foam mesh. Some of them are surface mesh manipulation utilities. Manipulation utilities include
Foam mesh reading and writing capabilities are built inside each manipulation utility.
Definition at line 68 of file MeshManipulationFoam.H.
Public Member Functions | |
MeshManipulationFoam () | |
Standard MeshManipulationFoam Constructor. More... | |
MeshManipulationFoam (MeshManipulationFoamParams *params) | |
Custom MeshManipulationFoam Constructor. More... | |
~MeshManipulationFoam () | |
Standard MeshManipulationFoam Destructor. More... | |
void | surfLambdaMuSmooth () |
surfLambdaMuSmooth performs laplacian smoothing over surface and writes it into output surface file. More... | |
std::pair< std::vector< int >, std::vector< std::string > > | splitMshRegions () |
splitMshRegions walks through mesh using cell-face-cell walk and identifies different cellZones as different regions. More... | |
void | mergeMesh (int dirStat, int nDomains) |
mergeMesh method merges two fvMesh datasets into one fvMesh including the patches and domain information More... | |
void | createPtch (int dirStat) |
createPtch utility creates user-defined patches in Foam mesh. More... | |
void | foamToSurf () |
foamToSurf utility reads Foam mesh, extracts its surface and writes into an STL file. More... | |
int | surfSpltByTopology () |
surfSpltByTopology utility takes a surface file as an input and automatically divides disconnected regions into separate patches. More... | |
void | addCohesiveElements (double tol, const std::string &outName) |
addCohesiveElements method supports addition of zero-sized connectivity elements at conformal shared interface between two meshes. More... | |
void | addArtificialThicknessElements (double &tol, const std::string &outName, double &thickness) |
This method adds connectivity elements with finite thickness at shared interface between two conformal meshes. More... | |
void | periodicMeshMapper (std::string &patch1, std::string &patch2) |
periodicMeshMapper method generates map of nodes on periodic mesh interfaces at boundaries for FEM analysis. More... | |
Private Member Functions | |
void | createPatchDict (const int &dirStat, const bool &write) |
createPatchDict utility creates a dictionary needed for createPatch method. More... | |
Private Attributes | |
MeshManipulationFoamParams * | _mshMnipPrms |
MeshManipulationFoam object. More... | |
std::unique_ptr< Foam::dictionary > | cpDict_ |
|
inline |
Definition at line 74 of file MeshManipulationFoam.H.
|
inline |
params | MeshManipulationFoamParams Object |
Definition at line 80 of file MeshManipulationFoam.H.
MeshManipulationFoam::~MeshManipulationFoam | ( | ) |
Definition at line 75 of file MeshManipulationFoam.C.
void MeshManipulationFoam::addArtificialThicknessElements | ( | double & | tol, |
const std::string & | outName, | ||
double & | thickness | ||
) |
tol | Tolerance for conformal duplicate nodes between two meshes. |
outName | Output mesh name with extension (i.e "output.vtu") |
thickness | Desired thickness for new cohesive elements. |
Definition at line 707 of file MeshManipulationFoam.C.
References NEM::MSH::foamGeoMesh::getFoamMesh(), NEM::MSH::New(), and NEM::MSH::Read().
void MeshManipulationFoam::addCohesiveElements | ( | double | tol, |
const std::string & | outName | ||
) |
This method can take two .vtk/.vtu files or Foam meshes as input and outputs a single .vtk/.vtu file with original meshes plus cohesive elements.
tol | Tolerance for conformal duplicate nodes between two meshes. |
outName | Output mesh name with extension (i.e "output.vtu") |
Definition at line 414 of file MeshManipulationFoam.C.
References NEM::MSH::foamGeoMesh::getFoamMesh(), NEM::MSH::New(), and NEM::MSH::Read().
|
private |
dirStat | domain number to skip (output from splitMshRegions) |
write | Write boolean |
Definition at line 187 of file MeshManipulationFoam.C.
References _mshMnipPrms, cpDict_, MeshManipulationFoamParams::createPatchParams, and MeshManipulationFoamParams::CreatePatch::pathSurrounding.
Referenced by createPtch().
void MeshManipulationFoam::createPtch | ( | int | dirStat | ) |
User input is usually createPatchDict.
dirStat | domain number to skip (output from splitMshRegions) |
Definition at line 149 of file MeshManipulationFoam.C.
References _mshMnipPrms, cpDict_, createPatchDict(), and MeshManipulationFoamParams::createPatchParams.
void MeshManipulationFoam::foamToSurf | ( | ) |
Definition at line 160 of file MeshManipulationFoam.C.
References _mshMnipPrms, and MeshManipulationFoamParams::foamToSurfParams.
void MeshManipulationFoam::mergeMesh | ( | int | dirStat, |
int | nDomains | ||
) |
dirStat | domain number to skip (output from splitMshRegions) |
nDomains | Number of meshes to merge |
Definition at line 120 of file MeshManipulationFoam.C.
References _mshMnipPrms, and MeshManipulationFoamParams::mergeMeshesParams.
void MeshManipulationFoam::periodicMeshMapper | ( | std::string & | patch1, |
std::string & | patch2 | ||
) |
patch1 | First boundary for mapping. |
patch2 | Second boundary for mapping. |
Definition at line 1076 of file MeshManipulationFoam.C.
References NEM::MSH::New(), points, and NEM::MSH::Read().
std::pair< std::vector< int >, std::vector< std::string > > MeshManipulationFoam::splitMshRegions | ( | ) |
Writes these regions in separate Foam meshes.
Definition at line 109 of file MeshManipulationFoam.C.
References _mshMnipPrms, and MeshManipulationFoamParams::splitMeshRegParams.
void MeshManipulationFoam::surfLambdaMuSmooth | ( | ) |
This utility supports .ofs, .obj, .inp, .stl, .tri, .off, .stlb, .nas, .bdf, .gts, .vtk, .ac extensions for input and output surface files.
Definition at line 86 of file MeshManipulationFoam.C.
References _mshMnipPrms, and MeshManipulationFoamParams::surfLMSmoothParams.
int MeshManipulationFoam::surfSpltByTopology | ( | ) |
writes a surface file with separated patches as well as multiple surface files for separate patches.
Definition at line 172 of file MeshManipulationFoam.C.
References _mshMnipPrms, and MeshManipulationFoamParams::surfSplitParams.
|
private |
Definition at line 171 of file MeshManipulationFoam.H.
Referenced by createPatchDict(), createPtch(), foamToSurf(), mergeMesh(), splitMshRegions(), surfLambdaMuSmooth(), and surfSpltByTopology().
|
private |
Definition at line 172 of file MeshManipulationFoam.H.
Referenced by createPatchDict(), and createPtch().