|
[Sponsors] |
November 24, 2014, 10:32 |
and user-defined template mesh
|
#1 |
Senior Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 124
Rep Power: 18 |
Dear all,
I would like to use a self-defined template mesh (e.g. a o-grid topology) with cfMesh. As I understand, cfMesh generates the template itself. Is there a way to change this behaviour and use the mesh in constant/polyMesh instead (like snappyHexMesh does)? Regards, Hannes |
|
December 18, 2014, 04:02 |
cfMesh and user-defined template mesh
|
#2 |
Senior Member
|
Dear Hannes,
Sorry for the late reply, I was busy working on the new release of cfMesh, so your post somehow slipped my radar. Your requirement can be implemented in cfMesh by doing the following: 1. Read the mesh from disk, instead of generating initial meshes. The mesh class has a read function, which you can use to read the mesh from disk after constructing it. 2. Implementing the functionality to remove cells that you do not want in the final mesh. 3. The remaining parts of the workflow can be the same as for cartesianMesh or tetMesh. You may need modifications there if you want to use high aspect-ratio cells. Would you be interested in contributing to cfMesh with this meshing workflow? Regards, Franjo |
|
December 20, 2014, 11:20 |
|
#3 |
Senior Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 124
Rep Power: 18 |
Dear Franjo,
yes, I am interested in contributing. I already found the read function some time ago and tried to make use of it. Therefore I modified the "createCartesianMesh" function as follows: Code:
void cartesianMeshGenerator::createCartesianMesh() { bool read=false; if( meshDict_.found("readTemplate") ) { if( readBool(meshDict_.lookup("readTemplate")) ) read=true; } if (read) { mesh_.read(); } else { //- create polyMesh from octree boxes cartesianMeshExtractor cme(*octreePtr_, meshDict_, mesh_); if( meshDict_.found("decomposePolyhedraIntoTetsAndPyrs") ) { if( readBool(meshDict_.lookup("decomposePolyhedraIntoTetsAndPyrs")) ) cme.decomposeSplitHexes(); } cme.createMesh(); # ifdef DEBUG mesh_.write(); //::exit(EXIT_SUCCESS); # endif } } Do you have a hint, what is the best way to proceed? Regards, Hannes |
|
March 22, 2015, 17:24 |
|
#4 |
Senior Member
|
Dear Hannes,
What other the requirements you would like to have? So far we have the following: 1. Refinement of template cells. - what kind cells shall be handled by the procedure (hex, tets, polyhedral, etc..) The code for mesh refinement is not available in cfMesh, and it needs to be implemented or reused from some other library. 2. Removal of cells. - there are a couple of possible ways in dealing with this problem. You can use findCellsIntersectingSurface to find the template cells intersected by the surface mesh, and remove the cells that are not required in the final mesh. By default, I would suggest to remove both the intersected and the outside cells to keep the same default behavior as cartesianMesh. 3. Boundary layers. - My impression that they are readily available for this task. meshMetaDict is not important in this case. It is a dictionary storing some basic information about the mesh, and which surface mesh was used to generate the mesh. I am personally reluctant to implement these modifications in cartesianMesh, and would suggest to do this in a new workflow optimized for this purpose. I suggest the name templateMesh. Regards, Franjo |
|
December 15, 2016, 05:42 |
|
#5 |
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17 |
I am also interested in this functionality.
Is possible to use workflowControls to use a own template case over which I want to introduce a stl and then, delete the cells inside the stl, project and so on? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fetal overflow in user defined cavitation model | unclewallcn | CFX | 15 | January 20, 2016 23:17 |
Transient User Defined Function in CFX | Niru | CFX | 0 | November 12, 2013 18:07 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |
user defined function&dynamic mesh | dynamicmesh | Fluent UDF and Scheme Programming | 0 | April 8, 2012 14:07 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |