CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

Convert 2D to 3D for OpenFOAM?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By dgarlisch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2013, 13:24
Default Convert 2D to 3D for OpenFOAM?
  #1
New Member
 
Join Date: Nov 2013
Posts: 2
Rep Power: 0
crossm2 is on a distinguished road
Hi,

I was wondering if anyone has experience turning a 2D model into a 3D one for OpenFOAM? I have a 2D grid - complete with domains, connectors, and database that I've successfully run on another solver. Do I have to copy the whole thing to a new plane and then add connectors between all the points? Or do I just need the connectors?

Thanks
crossm2 is offline   Reply With Quote

Old   November 21, 2013, 16:05
Default
  #2
Senior Member
 
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22
cnsidero is on a distinguished road
Quote:
Originally Posted by crossm2 View Post
Hi,

I was wondering if anyone has experience turning a 2D model into a 3D one for OpenFOAM? I have a 2D grid - complete with domains, connectors, and database that I've successfully run on another solver. Do I have to copy the whole thing to a new plane and then add connectors between all the points? Or do I just need the connectors?

Thanks
You'll need to create a 3D mesh (i.e. block) but in this case it's straightforward.

- make sure your domain(s) are in the xy plane
- make sure your CAE type is OpenFOAM
- select the domain(s) and create a translational extrusion of one cell in the +'ve z direction
- apply appropriate CAE BCs on sides of extrusion
- apply the "empty" BC type to original domain(s) and their matching counterpart on other side of the extrusion
- now select the block(s) and File, Export, CAE ... to your polyMesh directory

Note for step 3, the depth of the extrusion shouldn't matter as the simulation is 2D. I usually choose a depth large enough so that selecting the domains on the side of the extrusion isn't tedious. That however may create high enough aspect ratio cells to cause OpenFOAM's checkMesh to complain. That won't cause any issues because the simulation is 2D and the cells are long in the z direction OpenFOAM.
cnsidero is offline   Reply With Quote

Old   November 21, 2013, 16:27
Default
  #3
New Member
 
Join Date: Nov 2013
Posts: 2
Rep Power: 0
crossm2 is on a distinguished road
This is exactly what I was looking for. Thanks so much!

Edit: the above steps worked perfectly

Last edited by crossm2; November 26, 2013 at 22:18.
crossm2 is offline   Reply With Quote

Old   November 22, 2013, 11:33
Default
  #4
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
FYI...

A user attending a Pointwise training class had a similar problem when using GASP. It also wants a one-cell thick grid for 2D cases.

To help him out, I wrote a glyph script that performs the 2D to 3D "thickening." Also, as a big bonus, it automatically transfers any 2D BCs from the connectors to the extruded domains. I have not tested the script using the OpenFOAM solver, but it works wonderfully with GASP!

I will be posting it to the Pointwise script exchange soon (maybe today). Keep an eye on the script exchange for the upload. I will try to remember to make a post here when it is available.
cnsidero likes this.
dgarlisch is offline   Reply With Quote

Old   November 25, 2013, 18:43
Default
  #5
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
Quote:
Originally Posted by dgarlisch View Post
FYI...

A user attending a Pointwise training class had a similar problem when using GASP. It also wants a one-cell thick grid for 2D cases.

To help him out, I wrote a glyph script that performs the 2D to 3D "thickening." Also, as a big bonus, it automatically transfers any 2D BCs from the connectors to the extruded domains. I have not tested the script using the OpenFOAM solver, but it works wonderfully with GASP!

I will be posting it to the Pointwise script exchange soon (maybe today). Keep an eye on the script exchange for the upload. I will try to remember to make a post here when it is available.
UPDATE: I tested the aforementioned script with the OpenFOAM CAE exporter.

Unfortunately, the OpenFOAM CAE exporter does not support 2D mode. The script has limited benefit unless you can start with a 2D grid that has BCs applied to the connectors.

So, Chris' instructions are your best option right now.
dgarlisch is offline   Reply With Quote

Old   July 7, 2017, 22:46
Default
  #6
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi,

I would like to add that the new ver of Pointwise (18r2) allows 2d OpenFOAM export. So there is no need to use the extrude to 3d anymore.

However, I found that it is crucial to use the command "renumberMesh" before running OpenFOAM because somehow the final output data has some numbering error. I kept getting divergent results ... that is until I use "renumberMesh".

Hope that helps.
quarkz is offline   Reply With Quote

Old   July 10, 2017, 12:16
Default
  #7
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
Yes, quarkz you are correct. Pointwise now directly supports OpenFOAM 2D export.

Also, notice that the SizeBCExport and Thickness options options are available (CAE, Set Solver Attributes...) that control the exporting of 2D OpenFOAM grids. See section 11.6.4 OpenFOAM in the user manual for details (Help, User Manual...).

Pointwise does not try to optimize the exported grid data for OpenFOAM. As a result, it is a recommended "best-practice" to process OpenFOAM grids exported from Pointwise through renumberMesh.
dgarlisch is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
convert to structed mesh ok___ko Mesh Generation & Pre-Processing 0 April 22, 2013 06:23
convert a structured multiblock grid to an one unstructured: modification of cells Mirage ANSYS 0 July 18, 2012 10:14
ImageMagick will not convert jpg to mpg musahossein Main CFD Forum 1 December 2, 2011 11:44
convert virtual volume to a real one djalil FLUENT 0 January 22, 2009 16:07


All times are GMT -4. The time now is 08:22.