|
[Sponsors] |
August 10, 2018, 10:22 |
Extract nodal values
|
#1 |
Member
Join Date: Feb 2018
Posts: 91
Rep Power: 8 |
Hello,
Just a quick question. Is it possible to get field values from the nodes of a cell in openfoam or does one just get values from the cell face or boundary patch? Thanks. |
|
August 19, 2018, 09:02 |
|
#2 |
Member
Amod Kumar
Join Date: Jan 2010
Location: Delhi, India
Posts: 39
Rep Power: 16 |
Hi,
Not sure what you meant! I came across a piece of code which might do this job: forAll( mesh.C(), i ) fout << mesh.C()[i][0] << " " << x[i] << "\n" |
|
August 20, 2018, 05:48 |
|
#3 |
Member
Join Date: Feb 2018
Posts: 91
Rep Power: 8 |
Hi,
Can you give me a link to the code, I suspect that there are more information that I need. Regards |
|
June 10, 2020, 09:19 |
|
#4 |
New Member
Cenk
Join Date: Apr 2016
Posts: 4
Rep Power: 10 |
Hi,
did you find a solution to get the field values from the nodes? Regards, Cenk |
|
June 10, 2020, 12:06 |
|
#5 |
Member
Amod Kumar
Join Date: Jan 2010
Location: Delhi, India
Posts: 39
Rep Power: 16 |
I was not able to do it in OpenFOAM. However, I am partially successful doing it in ParaView. This post might help - https://www.paraview.org/Wiki/Data_Selection
|
|
July 9, 2020, 06:02 |
|
#6 |
New Member
Francisco
Join Date: Sep 2018
Location: Portugal
Posts: 27
Rep Power: 7 |
I think I had this problem a while ago. You mean getting the values from the control volume's center? You can write the cell center coordinates to files at a given timestep "t":
Code:
postProcess -func writeCellCentres -time t The cell coordinates are written in those files in the same order as the field files, so you just need to write a matlab or c script to search for the ones you want. There might be an easier way to do this, but this method has worked out for me, so far. Edit: if you mean the nodes of a cell's face, I don't think OF stores those, but you can probably interpolate them or use ParaView as amod_kumar suggested. Last edited by ships26; July 9, 2020 at 07:36. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
k-w SST freestream values for w | hazari.aaquib | Main CFD Forum | 4 | March 18, 2016 04:29 |
SIMPLE algorithm does not converge when using old pressure (correction) values | andreasp | Main CFD Forum | 3 | February 9, 2016 21:18 |
how to extract velocity values from cells | fromain | STAR-CCM+ | 2 | May 27, 2015 14:12 |
How to get nodal values with a routine in preprocessor | l.te | CFX | 1 | October 17, 2012 05:56 |
strange node values @ solid/fluid interface - help | JB | FLUENT | 2 | November 1, 2008 12:04 |