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

"ICEM grid data" import into OpenFOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 3, 2014, 07:29
Default "ICEM grid data" import into OpenFOAM
  #1
Member
 
Jack
Join Date: Aug 2012
Posts: 42
Rep Power: 4
JackW is on a distinguished road
Dear all,

I am trying to import a grid file into OF and currently am unable to do so! Any help would be appreciated - I am sure it is quite a simple act, I just do not know the method as I haven't got a clue about any commercial software having previously used manual methods.

The head of the file looks like this:

Code:
TITLE     = "ICEM grid data"
VARIABLES = "X"
"Y"
"Z"
ZONE T="G. Block 1"
 STRANDID=0, SOLUTIONTIME=0
 I=161, J=161, K=61, ZONETYPE=Ordered
 DATAPACKING=POINT
 DT=(SINGLE SINGLE SINGLE )
 0.000000000E+00 1.000000000E+00 0.000000000E+00
 2.999960259E-02 1.000170469E+00 0.000000000E+00
 6.015710533E-02 1.000319600E+00 0.000000000E+00
 9.046905488E-02 1.000235558E+00 0.000000000E+00
I have currently tried to hack it to:
Code:
 1
 161 161 61
 0.000000000E+00 1.000000000E+00 0.000000000E+00
 2.999960259E-02 1.000170469E+00 0.000000000E+00
 6.015710533E-02 1.000319600E+00 0.000000000E+00
 9.046905488E-02 1.000235558E+00 0.000000000E+00
and used plot3dToFoam but the resulting mesh is very messy and fails 4 checks (opening in paraview reveals a mesh that looks like a splodge). (Also I have got rid of the 1 and tried -singleBlock and -noBlank both on and off) I am guessing this is the case because the order of the points in a plot3dToFoam file is not the same the above!

If someone could tell me/point me to the ordering of the points for both filetypes I should be able to reorder the file.

What are the steps to either import it into OpenFOAM or change the file so that it can be easily imported?

Thank you for any help!

Jack
JackW is offline   Reply With Quote

Old   January 3, 2014, 08:13
Default
  #2
Member
 
Jack
Join Date: Aug 2012
Posts: 42
Rep Power: 4
JackW is on a distinguished road
Dear all,

It appears that the desired format for plot3DToFoam is:
all the x coords
all the y coords
all the z coords

so something like (untested):

Code:
 echo " 1\n161\n161\n61" "$(awk '{print " "$1}' rawPoints.dat)" "$(awk '{print " "$2}' rawPoints.dat)" "$(awk '{print " "$3}' rawPoints.dat)" > file.p3dfmt
where rawPoints.dat is a file containing xi yi zi on each line.

Then,
Code:
plot3dToFoam -noBlank file.p3dfmt
has given a successful convert. Now just need to create the patches (GAHH)!

Hope this helps someone! I have been stuck for ages!

Jack
JackW 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
[TurboGrid] Ansys Turbo Grid: Import Geometry Problems Polito ANSYS Meshing & Geometry 0 October 21, 2013 04:25
mesh convertion from starCD grid to OpenFOAM ahmed_khatibs OpenFOAM 2 December 27, 2011 02:07
converting ICEM grid to OpenFOAM fails MikeyMike OpenFOAM 2 August 25, 2011 06:22
Did anyone worked on GID mesh import in OpenFoam?? Tushar@cfd OpenFOAM 2 May 31, 2011 12:01
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


All times are GMT -4. The time now is 10:50.