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

[Commercial meshers] plot3dToFoam beginner

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kovamaniac

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2013, 18:05
Default plot3dToFoam beginner
  #1
New Member
 
Hank
Join Date: Jul 2013
Posts: 2
Rep Power: 0
stophank is on a distinguished road
Hello all,

I am new to OpenFOAM and am trying to convert a mesh in plot3d format to OpenFOAM format. I am trying to use the built in grid converter: plot3dToFoam. Here is the output:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6-ext-1fac933c6108
Exec : plot3dToFoam ../../../../iso-q-4in.p3d
Date : Jul 16 2013
Time : 14:58:40
Host : pfe21
PID : 34244
Case : /../OpenFOAM/OpenFOAM-1.6-ext/../constant
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



--> FOAM FATAL IO ERROR:
cannot open file

file: /../OpenFOAM/OpenFOAM-1.6-ext/../constant/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting

Thanks in advance!

Hank
stophank is offline   Reply With Quote

Old   July 16, 2013, 18:13
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Hank and welcome to the forum!

The problem is very simple: when converting a mesh to OpenFOAM format, you first need a base case folder to be already prepared, which is why the application is complaining about the missing "system/controlDict" files. You can use the "cavity" case from the first tutorial to use as a basis.

If you do not know which case I'm talking about, I suggest that you look at the OpenFOAM User Guide: http://www.openfoam.org/docs/user/

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 16, 2013, 18:25
Default
  #3
New Member
 
Hank
Join Date: Jul 2013
Posts: 2
Rep Power: 0
stophank is on a distinguished road
Thanks Bruno for your fast reply!

I have a "system/controlDict" file.

Maybe I should elaborate more on my question:

I am running a tutorial where everything is provided and runs well. All I want to do is change the mesh with a grid generated by plot3d. So do I have to remove/update some files before I try to import the new mesh?

Hank
stophank is offline   Reply With Quote

Old   July 21, 2013, 08:21
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Hank,

You were a bit lucky the other day, because I saw your thread a bit before I logged out. And only now did I manage to look into this again.

I vaguely remember having looked into not too long ago. The idea is that:
  1. You use a tutorial case as basis.
  2. Then you should run plot3dToFoam instead of blockMesh.
  3. Then you can use autoPatch for generating patches automatically, although there are some limitations to this utility, since it can only figure out "what's a patch" based on sharp edges it can see, based on the given feature angle.
  4. Then you have to edit the boundary files at "0" manually and adjust where necessary. You might also want to rename patches in the file "constant/polyMesh/boundary".
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 6, 2013, 01:05
Default
  #5
New Member
 
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 12
Abracurcix is on a distinguished road
Hello Hank,
Did Bruno's suggestion work for you? I'd be curious if autoPatch did the trick for you?

Hello Bruno,
Sometime back, I had asked a similar question, and of course, your suggestion regarding running plot3dToFoam followed by autoPatch was helpful. Unfortunately, when I viewed the resulting file, the boundary conditions were not quite correct. So, I had to do plot3dToFoam followed by foamMeshToFluent, read in the resulting Fluent file into a grid generator, set the boundary conditions, export the modified file as a Fluent file, and, finally convert the Fluent file to Foam. It was quite a roundabout. I hope Hank had better luck with his meshes.

Cheers,
Albert
Abracurcix is offline   Reply With Quote

Old   August 17, 2013, 08:14
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Albert,

Isn't Fluent able to import plot3d meshes?

I forgot back then a few other ways as well:
Quote:
Originally Posted by wyldckat View Post
@Elise: You can with createPatch. You can find several examples by running:
Code:
find $WM_PROJECT_DIR -name createPatchDict
And there is also surfaceToPatch:
Code:
surfaceToPatch -help
And you can trick it into telling you which formats it accepts:
Code:
surfaceToPatch constant/RASProperties
should tell you:
Code:
--> FOAM FATAL ERROR: 
unknown file extension . Supported extensions are '.ftr', '.stl', '.stlb', '.gts', '.obj', '.ac', '.off', '.nas', '.tri' and '.vtk'
You can even use the following command to export the surface mesh into the base STL file that you can then edit:
Code:
foamToSurface initialPatches.stl
It provides for each STL solid the name of the respective patch/wall.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 29, 2014, 11:50
Unhappy Total begineer issue
  #7
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 17
kovamaniac is on a distinguished road
Hi.

I am trying to do run the flat plate case based on the grids from NASA, which come with plot3d format. Specifically, I want to work with the 2D grids downloaded from HERE.

I run the 2D case with all the options I want:
Code:
plot3dToFoam -2D 0 -singleBlock -noBlank -noFunctionObjects flatplate_clust2_4levelsdown_35x25.p2dfmt
The error is the following:
Code:
Reading 2D case by extruding points by 0 in z direction.
Create time
Reading 1 blocks
block 0 nx:1 ny:35 nz:25
Reading block points
block 0:
Reading 875 x coordinates...
Reading 875 y coordinates...
Reading 875 z coordinates...
 
--> FOAM FATAL IO ERROR: 
Attempt to get back from bad stream
file: flatplate_clust2_4levelsdown_35x25.p2dfmt at line 588.
From function void Istream::getBack(token&)
in file db/IOstreams/IOstreams/Istream.C at line 56.
FOAM exiting
For some reason I cannot understand, changing 0 to 1, the code runs creating points in z.
Code:
plot3dToFoam -2D 1 -singleBlock -noBlank -noFunctionObjects flatplate_clust2_4levelsdown_35x25.p2dfmt
The result is the following:
Code:
Reading 2D case by extruding points by 1 in z direction.
Create time
Reading 1 blocks
block 0 nx:1 ny:35 nz:2
Reading block points
block 0:
Reading 35 x coordinates...
Reading 35 y coordinates...
Extruding 35 points in z direction...
--> FOAM Warning : 
From function hexBlock::hexBlock::setHandedness()
in file hexBlock.C at line 89
Cannot determine orientation of block. Continuing as if right handed.
Merged points within 1e-15 distance. Merged from 70 down to 70 points.
Creating cells
Creating boundary patches
Writing polyMesh
End
Then, I run:
Code:
autoPatch 80
The result is:
Code:
Create time
Create polyMesh for time = 0
--> FOAM Warning : 
From function polyMesh(const IOobject&)
in file meshes/polyMesh/polyMesh.C at line 312
no cells in mesh
Mesh read in = 0.01 s
 
Feature:80
minCos :6.12323e-17
End
Inside the case file a new folder 0.005 is created, having exactly what the constant/polyMesh includes, in addtion with some other files named *zones.

In the end, paraFoam does not even recognises it and I have instead of 2D a 3D mesh which is useless.

Can you help me, please???
kovamaniac is offline   Reply With Quote

Old   August 16, 2014, 06:54
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Anastasios,

Sorry, I only now finally managed to have a look at your question.
But since almost 3 months have gone by already, can you let me/us know if you've managed to solve this issue?
And if you did, can you share how you solved it?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 20, 2014, 03:11
Default
  #9
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 17
Rep Power: 17
kovamaniac is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Anastasios,

Sorry, I only now finally managed to have a look at your question.
But since almost 3 months have gone by already, can you let me/us know if you've managed to solve this issue?
And if you did, can you share how you solved it?

Best regards,
Bruno
Hi.

I finally used the grids with CGNS format which I imported into ANSA and exported it in OpenFOAM format.
wyldckat likes this.
kovamaniac is offline   Reply With Quote

Reply

Tags
mesh conversion, openfoam 1.6-ext, plot3dtofoam


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
[Other] plot3DToFoam: converting backstep grids from NASA's website samiam1000 OpenFOAM Meshing & Mesh Conversion 2 January 2, 2015 16:51
OpenFOAM beginner lehoanganh07 OpenFOAM 1 September 18, 2013 07:19
[Other] question concerning the OpenFOAM utility: plot3dToFoam Chatur Ramalingum OpenFOAM Meshing & Mesh Conversion 7 June 20, 2013 16:52
Beginner marymasod FLUENT 1 June 3, 2010 16:51
Error while running plot3dToFoam ploceus OpenFOAM Pre-Processing 1 December 14, 2005 04:55


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