|
[Sponsors] |
May 6, 2011, 16:28 |
matching variable data with grid point data
|
#1 |
Member
Join Date: Sep 2010
Posts: 36
Rep Power: 16 |
Hi,
I want to extract data point values and grid/mesh point information/location from OF, specifically fireFoam, but the solver should not matter here. Moreover, I do not only want to extract them, I also want to match that information, meaning I want to be sure which value belongs to which mesh point. So far, I have been able to extract that data (see below), but I am not 100% sure, if the label for the value corresponds to the label of the mesh point. So the QUESTION here is: can anyone verify that the label associated with a data point is the same label that is associated with a mesh point that corresponds to that very same data point? Thanks! Andreas P.S.: Extracting and outputting the data into a external file has been accomplished by: Code:
#include "OFstream.H" OFstream testout ("densitydata"); Code:
forAll(rho,rholbl) { scalar rhoi = rho[rholbl]; Vector<double> rhopos = mesh.points()[rholbl]; testout << "rho:" << rhoi << ":" << rholbl << ":" << rhopos << endl; rho[rholbl] = rhoi; } which will result in the following output: rhoi: data point value rholbl: rho-label associated with that datapoint rhopos: grid point location (coordinates) associated with that label "rho":rhoi:rholbl:rhopos Code:
rho:1.17195:0:(-0.5 0 -0.01) rho:1.17195:1:(-0.493333 0 -0.01) rho:1.17195:2:(-0.486667 0 -0.01) rho:1.17195:3:(-0.48 0 -0.01) rho:1.17195:4:(-0.473333 0 -0.01) rho:1.17195:5:(-0.466667 0 -0.01) rho:1.17195:6:(-0.46 0 -0.01) rho:1.17195:7:(-0.453333 0 -0.01) rho:1.17195:8:(-0.446667 0 -0.01) rho:1.17195:9:(-0.44 0 -0.01) rho:1.17195:10:(-0.433333 0 -0.01) rho:1.17195:11:(-0.426667 0 -0.01) etc. etc. ... Last edited by anfho; May 6, 2011 at 17:21. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plot data for a fixed point | aut_iut | OpenFOAM | 0 | December 23, 2010 06:16 |
grid data | white heart | Main CFD Forum | 4 | May 4, 2010 10:05 |
Time history of a variable at a point for calculating correlations? | eoin | OpenFOAM | 1 | August 25, 2009 17:07 |
Grid Independent Solution | Chuck Leakeas | Main CFD Forum | 2 | May 26, 2000 12:18 |
Grid refinement with wall functions | Mark Render | Main CFD Forum | 8 | May 2, 2000 08:09 |