CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 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: 369
Rep Power: 12
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
Member
 
David Garlisch
Join Date: Jan 2013
Location: Pointwise HQ
Posts: 83
Rep Power: 4
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
Member
 
David Garlisch
Join Date: Jan 2013
Location: Pointwise HQ
Posts: 83
Rep Power: 4
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

Reply

Thread Tools
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 On
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 05:23
convert a structured multiblock grid to an one unstructured: modification of cells Mirage ANSYS 0 July 18, 2012 09:14
ImageMagick will not convert jpg to mpg musahossein Main CFD Forum 1 December 2, 2011 11:44
How to convert DRM protected music and movies to MP4/AVI/MOV/MP3/WMV/AAC... urutyerid6 ANSYS 0 April 22, 2010 04:52
convert virtual volume to a real one djalil FLUENT 0 January 22, 2009 16:07


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