|
[Sponsors] |
volScalarField: how to get the coordinates of the cells |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2011, 03:59 |
volScalarField: how to get the coordinates of the cells
|
#1 |
New Member
mrv4real
Join Date: Sep 2011
Posts: 11
Rep Power: 15 |
Hi,
i ran the damBreak tutorial with interFoam and everything works fine. Now i am working on the postprocessing and would like to visualize the alpha1 file in the timestep directories. I didn't find it in other post, could someone help me, how to get the coordinates of the cells, for which in alpha1 the scalar value is given? Thanks a lot, mrv4real |
|
September 10, 2011, 16:37 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
could you tell me what do u want exactly?
alpha1 is in each time directory to visualize it you can just select alpha1 in paraFoam! if you want to see the coordinate of each cell! you can use integrateVariable in paraView filter |
|
September 10, 2011, 16:43 |
|
#3 |
New Member
mrv4real
Join Date: Sep 2011
Posts: 11
Rep Power: 15 |
Hi,
using paraFoam is what i did till now, but i have to visualize the results in an existing native OpenGL application. So i have to get the alpha value and the coordinates to write my glVertex ... Thanks! mrv4real |
|
September 11, 2011, 15:20 |
|
#4 |
Member
Tony
Join Date: Jun 2010
Posts: 54
Rep Power: 16 |
Hi,
You can write out information from the solver. The coordinates are accessed from a volVectorField such as "U" in this case: U.mesh().C()[cellI] *cellI is an index A specific coordinate such as the x axis is accessed by: U.mesh().C()[cellI].x() gl, Tony |
|
September 11, 2011, 15:27 |
|
#5 |
New Member
mrv4real
Join Date: Sep 2011
Posts: 11
Rep Power: 15 |
Hi,
but is there also away, to get the coordinates of a cell from the files in constant/polyMesh and so on? As I understand it, the alpha1 file has the values of the alfa-value for every cell in a timestep. In the polyMesh are the faces, points and so on but how do I find the definition of the cells, for which the alfa value is given in alhpa1? Thanks a lot, mrv4real |
|
January 17, 2012, 07:21 |
|
#6 |
Senior Member
|
Hi,
what about these options foamMeshToFluent , foamToFieldview, foamToEnsight, Not to forget foamToVTK but keep in mind that paraview is scriptable (there is some material from the OF 6th workshop "http://www.openfoamworkshop.org/2012/OFW7_Former.html currently a dead link http://www.openfoamworkshop.org/6th_...am/Program.htmto that 6th workshop") and that you can convert from VTK to many formats =>(VRML http://www.vtk.org/doc/release/5.8/html/a02298.html, STL http://www.vtk.org/doc/release/5.8/html/a01973.html, OBJ http://www.vtk.org/doc/release/5.8/html/a01303.html to name a few) |
|
Tags |
interfoam, openfoam, postprocessing, volscalarfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 06:50 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
physical boundary error!! | kris | Siemens | 2 | August 3, 2005 01:32 |