CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] Generating a single cell mesh using a patch of a 3d mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2016, 10:47
Default Generating a single cell mesh using a patch of a 3d mesh
  #1
Member
 
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14
kebsiali is on a distinguished road
Hello dear foamers

I'm trying to generate a single cell mesh(one cell in the 3rd dimension) using a patch of a 3d mesh.

The idea is that i need to run a pre-curser simulation on the 2d mesh by applying a periodic boundary mesh, and then use the result to generate my inlet fields given as nonuniform list of values.

my mesh is generated using HEXPRESS, exported in openfoam format
so i have all the files (points, cells, owner, neighbor, boundary)

Is there a utility that extracts one the patches and generate a 2d mesh (with one cell in 3rd dimension) out of it.

Otherwise what do you think i should do?
my idea is to:
1. sample the patch
2. make a fortran function that reads the coordinates
3. write out a list of couples of points having same 2 coords and uncoupled in the 3rd (to make the two sides of my one cell)
4. the problem will now be to write out all other crazy lists (cells, owner, neighbor,boundary)

any ideas are wellcom
kebsiali is offline   Reply With Quote

Old   May 26, 2016, 21:18
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

Would extrudeMesh work for you? https://github.com/OpenFOAM/OpenFOAM...xtrudeMeshDict

You can set the nLayers to 1 and choose the direction you want to extrude in and get your mesh, I would think. No?

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   May 30, 2016, 05:38
Default
  #3
Member
 
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14
kebsiali is on a distinguished road
Hi,

Thanks for your quick reply. It took me a bit of time to try. but i dont see how extrudeMesh would remove a full 3dmesh and generate a seperate mesh by extruding a patch.

Is there a tool that eliminates a part of the geometry such that i can keep a small part close to my patch.
Is there a way to force extrudeMesh to remove 3d mesh and keep only the extrusion from a 2d patch.

thanks,
Ali
kebsiali is offline   Reply With Quote

Old   May 30, 2016, 06:36
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

You don't need to remove the full 3d mesh. Instead you can create a dummy case, and specify in the extrudeMeshDict that it has to source from the full 3d mesh case.

For eliminating parts of the mesh, you might want to look at subsetMesh or splitMesh/splitMeshRegions depending on your requirement.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get chtMultiRegionSimpleFoam to working. shiromaniac OpenFOAM Running, Solving & CFD 11 October 18, 2021 08:40
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 07:12.