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

[Other] How to convert .p2d to foam format?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2014, 06:39
Default How to convert .p2d to foam format?
  #1
New Member
 
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11
adoledin is on a distinguished road
Hello all,
I'm new in Openfoam.
How to convert a .p2d file for a foam format?
adoledin is offline   Reply With Quote

Old   December 18, 2014, 15:59
Default
  #2
New Member
 
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11
adoledin is on a distinguished road
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?
adoledin is offline   Reply With Quote

Old   December 19, 2014, 05:44
Default
  #3
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi,
Try this in a terminal:
plot3dToFoam -help

Best regards,
Paulo
vatavuk is offline   Reply With Quote

Old   December 19, 2014, 09:45
Default
  #4
New Member
 
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11
adoledin is on a distinguished road
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?
adoledin is offline   Reply With Quote

Old   December 19, 2014, 14:21
Default
  #5
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
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
vatavuk is offline   Reply With Quote

Old   December 23, 2014, 09:23
Default
  #6
New Member
 
Mateus Peixoto
Join Date: Dec 2014
Posts: 11
Rep Power: 11
adoledin is on a distinguished road
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
adoledin is offline   Reply With Quote

Old   December 24, 2014, 06:07
Default
  #7
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Mateus,
Try to see if there is anything strange in line 84030 of the input file.
Best Regards,
Paulo
vatavuk 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
[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


All times are GMT -4. The time now is 02:26.