CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Extract nodal values

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2018, 10:22
Default Extract nodal values
  #1
Member
 
Join Date: Feb 2018
Posts: 87
Rep Power: 4
charles4allme is on a distinguished road
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.
charles4allme is offline   Reply With Quote

Old   August 19, 2018, 09:02
Default
  #2
Member
 
Amod Kumar
Join Date: Jan 2010
Location: Delhi, India
Posts: 39
Rep Power: 12
amod_kumar is on a distinguished road
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"
amod_kumar is offline   Reply With Quote

Old   August 20, 2018, 05:48
Default
  #3
Member
 
Join Date: Feb 2018
Posts: 87
Rep Power: 4
charles4allme is on a distinguished road
Hi,

Can you give me a link to the code, I suspect that there are more information that I need.

Regards
charles4allme is offline   Reply With Quote

Old   June 10, 2020, 09:19
Default
  #4
New Member
 
Cenk
Join Date: Apr 2016
Posts: 4
Rep Power: 6
Cenk20 is on a distinguished road
Hi,
did you find a solution to get the field values from the nodes?


Regards,
Cenk
Cenk20 is offline   Reply With Quote

Old   June 10, 2020, 12:06
Default
  #5
Member
 
Amod Kumar
Join Date: Jan 2010
Location: Delhi, India
Posts: 39
Rep Power: 12
amod_kumar is on a distinguished road
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
amod_kumar is offline   Reply With Quote

Old   July 9, 2020, 06:02
Default
  #6
New Member
 
Francisco
Join Date: Sep 2018
Location: Portugal
Posts: 14
Rep Power: 3
ships26 is on a distinguished road
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
Just substitute t by the timestep you want to write them to. Files C,Cx,Cy and Cz will be generated with the coordinates of the cell centers in that timestep's folder.

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.
ships26 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


All times are GMT -4. The time now is 19:42.