|
[Sponsors] |
[Other] ...converting PLOT3D mesh files by NASA? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 5, 2011, 10:44 |
...converting PLOT3D mesh files by NASA?
|
#1 |
Member
Alessandro
Join Date: May 2009
Location: Genova
Posts: 47
Rep Power: 17 |
Hi FOAMers!
I have some problems with mesh file conversion!! I'm trying to import NASA grid for the flat plate test case in OpenFOAM... but I don't know how to!! I am puzzled by the file extension... .p3dmft ? It should be a PLOT3D file format, but I couldn't handle it in ParaView. I tried the plot3dToFoam but I got this error: Create time --> FOAM FATAL IO ERROR: Attempt to get back from bad stream file: flatplate_clust2_4levelsdown_35x25.p3dmft at line 1. From function void Istream::getBack(token&) in file db/IOstreams/IOstreams/Istream.C at line 38. FOAM exiting Can anybody help me? Thanks! |
|
January 18, 2014, 06:29 |
|
#2 |
Member
Ye Zhang
Join Date: Dec 2009
Location: Delft,Netherland
Posts: 92
Rep Power: 17 |
Hey Alessandro
Did you solve the problem? Best Ye |
|
January 27, 2015, 10:38 |
|
#3 |
New Member
Vincent HUBER
Join Date: Jan 2015
Location: Strasbourg - France
Posts: 2
Rep Power: 0 |
I'm highly interested in the issue ! Have you successfully converted the mesh ?
|
|
January 27, 2015, 15:14 |
|
#4 |
Senior Member
|
Hi,
I was not successful in converting meshes with OpenFOAM's plot3dToFoam (and any way there is not much sense in converting just geometry), so I have created Python script for conversion from Plot3D to Gmsh (https://github.com/mrklein/p3d2gmsh) then you can use gmshToFoam to convert mesh into OpenFOAM's format. In general you will need geometry file (*.p3dfmt) and Neutral Map File with description of boundary conditions. I have tested the script on verification cases from http://turbmodels.larc.nasa.gov, it seems to be converting the meshes and BCs correctly. |
|
January 27, 2015, 17:31 |
|
#5 |
New Member
Vincent HUBER
Join Date: Jan 2015
Location: Strasbourg - France
Posts: 2
Rep Power: 0 |
Wonderfull ! (Actually, I was planning to get Gmsh mesh files :-) )
Bonus questioon - do you know a way to get the 3D gmsh mesh in 2D (cut along a plane) ? OR - can your script (that I ran successfully) be applied to p2dfmt ... without the neutral map file ? |
|
January 28, 2015, 04:22 |
|
#6 |
Senior Member
|
No, I don't know the way to flatten mesh in Gmsh. In OpenFOAM there us flattenMesh utility, though its output is a point field, i.e. there will be no information about edges, boundaries, etc. Also there is Gmsh plugins like CutPlane, but again it will lose boundary information.
Initially I started with p2dfmt files but then realized there is no information on boundary conditions, so I've abandoned the idea. |
|
April 27, 2016, 15:33 |
error when run ./p3d2gmsh.py
|
#7 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
hi alexym, after seraching how to convet plot3dtoFoam finally I find this forum. But i get error message when running sript p3d2gmsh.py. How do fix this?
Can't open [-o. Skipping. Can't open naca0012]. Skipping. Can't open [-m. Skipping. Can't open n0012]. Skipping. |
|
April 29, 2016, 05:34 |
|
#8 |
Senior Member
|
Hi,
Your output suggests that you have decided to copy command line with brackets (i.e. [-o naca0012] instead of just -o naca0012), while command should be something like: Code:
./p3d2gmsh.py -o naca0012.msh -m naca0012.nmf naca0012.p3d |
|
April 29, 2016, 12:22 |
|
#9 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Thanks for reply alexym.
After run command ./p3d2gmsh.py -o naca0012.msh -m naca0012.nmf naca0012.p3d I am get error message : Traceback (most recent call last): File "./p3d2gmsh.py", line 585, in <module> main() File "./p3d2gmsh.py", line 577, in main nmf = NeutralMapFile(mapfile) File "./p3d2gmsh.py", line 90, in __init__ fp = open(filename, 'r') TypeError: coercing to Unicode: need string or buffer, list found even tried the files in the folder test, but I still get the same error message. How to fix this? Thank you |
|
April 29, 2016, 13:33 |
|
#10 |
Senior Member
|
Hi,
There was a bug (guess I have never really tested -o and -m flags). I have pushed fix to repository, so you need to re-download p3d2gmsh.py script. |
|
April 30, 2016, 16:15 |
|
#11 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Its work
So, I went on the next stage of the run command gmshToFoam but I get the following message #0 Foam::error:rintStack(Foam::Ostream&) in "/home/xxx/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/home/xxx/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 in "/home/xxx/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/gmshToFoam" #4 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #5 in "/home/xxx/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/gmshToFoam" Segmentation fault (core dumped) Thank you |
|
April 30, 2016, 18:01 |
|
#12 |
Senior Member
|
This time I can not guess what went wrong, since I have never used version 1.7.1 (well, except certain portions of foam-extent 3.1, which turned your to be OpenFOAM 1.7.x) and you did not show the way to reproduce your error.
|
|
May 1, 2016, 03:21 |
|
#13 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
The way that I use :
1.from (http://turbmodels.larc.nasa.gov/naca0012_grids.html) i get file to convert msh file 2. I used a python script from ( https://github.com/mrklein/p3d2gmsh ) to convert msh file 3. I moved the msh file to folder $ FOAM_RUN 4. then use the command gmshToFoam . And I got a message as I have mentioned whether there are less of these steps ? please correction Last edited by makayasa; May 1, 2016 at 05:36. |
|
May 1, 2016, 06:51 |
|
#14 |
Senior Member
|
I can not reproduce the error neither with OpenFOAM 2.4.x, nor with 3.0.x. So I guess, it is specific to 1.7.1 and I do not know how to fix it.
|
|
May 1, 2016, 07:04 |
|
#15 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Thank you so much for your help. Maybe I 'll try openfoam 2.4.0
|
|
July 22, 2016, 04:34 |
|
#16 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi,
Just for record. I have successfully converted the meshes from NASA page with plot3dToFoam converter by adding -noBlank parameter. For example: 2D mesh Code:
plot3dToFoam naca0012.p2dfmt -2D 1 -noBlank Code:
plot3dToFoam naca0012.p3dfmt -noBlank I solved it by adding a line with 1 in the beginning of the p3d file. For boundary conditions, I use autoPatch and createPatch utilities. Regards, Mikko |
|
December 13, 2016, 07:16 |
PLOT3D meshes to ansys fluent
|
#17 | |
Member
Join Date: Aug 2016
Posts: 43
Rep Power: 10 |
Quote:
Thanks for this script , I am trying to use the PLOT3D meshes in ansys and therefore I want to convert them, I execute the script but it takes sometime and still nothing, does it usually take long to convert ? Thanks |
||
December 31, 2019, 20:16 |
|
#18 |
New Member
TheOneBird
Join Date: Apr 2016
Posts: 8
Rep Power: 10 |
Thank you heaps for your script. It works great. Firstly, apologies for commenting on such an old thread however I thought this was the best place to post this.
I am having issues setting up one of the NASA cases. 9https://turbmodels.larc.nasa.gov/jetsubsonic_grids.html). The problem I am facing is that the internal faces, between the blocks, appear as boundary conditions in the FOAM file format. It appears that when I run the case, it does not recognise them as internal faces and the solution has discontinuities at each interface. I have set the face type in "boundaries" to "empty", however this has not helped. Is it possible for someone to share a case directory where they have successfully run one of the NACA cases please? Or could someone direct me in the correct direction for fixing this. Thanks! |
|
October 1, 2023, 03:35 |
Error while importing mesh from Plot3D
|
#19 |
New Member
Lakshmi siva kumar
Join Date: Aug 2023
Posts: 3
Rep Power: 3 |
Hi guy, i want in import the Plot3Dmesh file(raetaf.x.fmt) to openFoam.
I have tried all the commands i amaware of from the documentation and this Forum.I am facing this issue: FOAM FATAL IO ERROR: wrong token type - expected int32_t, found on line 2 the doubleScalar 27.00003 file: raetaf.x.fmt at line 2. From function Foam::Istream& Foam:perator>>(Foam::Istream&, int32_t&) in file primitives/ints/int32/int32IO.C at line 62. It would veryhelpful if anyone can give me way out of this. Thanks in advance. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Salome] Script for converting a mesh from Salome-Platform to OpenFOAM | nsf | OpenFOAM Meshing & Mesh Conversion | 86 | February 8, 2023 11:30 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion | faizan_habib7 | CFX | 4 | February 1, 2016 18:00 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |