|
[Sponsors] |
December 18, 2014, 06:39 |
How to convert .p2d to foam format?
|
#1 |
New Member
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11 |
Hello all,
I'm new in Openfoam. How to convert a .p2d file for a foam format? |
|
December 18, 2014, 15:59 |
|
#2 |
New Member
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11 |
I don't know how to make file conversion.
I'm trying to import NASA grid in OpenFOAM... but I don't know how to! The file format is .p2dfmt. How to convert for a foam format? |
|
December 19, 2014, 05:44 |
|
#3 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17 |
Hi,
Try this in a terminal: plot3dToFoam -help Best regards, Paulo |
|
December 19, 2014, 09:45 |
|
#4 |
New Member
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11 |
Thanks Paulo!
I have to use plot3dToFoam -2D <thickness> <filename.p2dfmt> But I have a problem. mateus@CAEmateus:~/Desktop/tutorials/incompressible/simpleFoam/motorBike$ plot3dToFoam -2D 10 case3.struct.1.p2dfmt /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.1-221db2718bbb Exec : plot3dToFoam -2D 10 case3.struct.1.p2dfmt Date : Dec 19 2014 Time : 12:38:00 Host : "CAEmateus" PID : 3322 Case : /home/mateus/Desktop/tutorials/incompressible/simpleFoam/motorBike nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Reading 2D case by extruding points by 10 in z direction. Create time Reading 4 blocks block 0 nx:793 ny:217 nz:2 block 1 nx:161 ny:121 nz:2 block 2 nx:65 ny:121 nz:2 block 3 nx:49 ny:217 nz:2 Reading block points block 0: Reading 172081 x coordinates... --> FOAM FATAL IO ERROR: wrong token type - expected Scalar, found on line 2466 the word '�d�X�=' file: case3.struct.1.p2dfmt at line 2466. From function operator>>(Istream&, Scalar&) in file lnInclude/Scalar.C at line 91. FOAM exiting Can you help me? |
|
December 19, 2014, 14:21 |
|
#5 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17 |
Hi Mateus,
The application plot3dToFoam work with files in the ASCII format, but it found something in line 2466 that cannot be interpreted as an ASCII character. I suggest that you try to open the file with an editor and try to figure out what happened in this line. Best Regards, Paulo |
|
December 23, 2014, 09:23 |
|
#6 |
New Member
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11 |
Thanks Paulo, I solved the problem.
But now I have another problem. Can you help me? Reading 2D case by extruding points by 1 in z direction. Create time Reading 4 blocks block 0 nx:793 ny:217 nz:2 block 1 nx:161 ny:121 nz:2 block 2 nx:65 ny:121 nz:2 block 3 nx:49 ny:217 nz:2 Reading block points block 0: Reading 172081 x coordinates... Reading 172081 y coordinates... Extruding 172081 points in z direction... Reading 172081 blanks... --> FOAM FATAL IO ERROR: Attempt to get back from bad stream file: case3.struct.1.p2dfmt at line 84030. From function void Istream::getBack(token&) in file db/IOstreams/IOstreams/Istream.C at line 56. FOAM exiting Best Regard. Mateus |
|
December 24, 2014, 06:07 |
|
#7 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17 |
Hi Mateus,
Try to see if there is anything strange in line 84030 of the input file. Best Regards, Paulo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Salome] Salome import "Cannot find file "points" in directory..." | mismichael | OpenFOAM Meshing & Mesh Conversion | 5 | June 22, 2019 02:56 |
InterDyMFoam+simpleFunctionObject | Elham | OpenFOAM Running, Solving & CFD | 5 | July 10, 2017 11:59 |
Incompatible dimensions for operation | ruben23 | OpenFOAM Running, Solving & CFD | 2 | June 12, 2015 04:14 |
Derivative of velocity and mean velocity | hiuluom | OpenFOAM Post-Processing | 1 | May 29, 2015 23:42 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |