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

[Commercial meshers] "ICEM grid data" import into OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2014, 06:29
Default "ICEM grid data" import into OpenFOAM
  #1
Member
 
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 13
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, 07:13
Default
  #2
Member
 
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 13
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


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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
how to import Fluent data to openfoam houwy OpenFOAM Pre-Processing 2 November 4, 2014 04:17
Can't get data from OpenFoam to external solver using externalCoupled perry OpenFOAM Running, Solving & CFD 4 May 26, 2014 08:09
[ICEM] Gambit to Openfoam, Gambit to ICEM to Openfoam Rickard.Solsjo ANSYS Meshing & Geometry 7 November 30, 2011 10:20


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