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

Obtain grad(U) during run-time processing

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By JinshiC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2023, 10:07
Default Obtain grad(U) during run-time processing
  #1
New Member
 
Jinshi Chen
Join Date: Jan 2020
Location: Cambridge, MA
Posts: 10
Rep Power: 6
JinshiC is on a distinguished road
Hi Foamers,

I am trying to obtain the gradient of all velocity components with run-time sampling at given lines. Yet I am not able to directly code sth. like grad(U) in the "field". It seems that it can only take the fields which is directly output by the model (such as U,k,R, etc). I am wondering is there an easy way to modify the controlDict file in order to obtain grad(U) at given lines? Thanks a lot!

Best,
Peter
JinshiC is offline   Reply With Quote

Old   May 11, 2023, 10:14
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hi Peter,

You can use the grad function object to compute grad(U): https://develop.openfoam.com/Develop...ld/grad/grad.H

Hope this helps,
Yann
JinshiC likes this.
Yann is offline   Reply With Quote

Old   May 11, 2023, 10:26
Default
  #3
New Member
 
Jinshi Chen
Join Date: Jan 2020
Location: Cambridge, MA
Posts: 10
Rep Power: 6
JinshiC is on a distinguished road
Hi Yann,

Thanks so much! This works perfectly.

Best,
Peter
Yann likes this.
JinshiC 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
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 21:00
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40


All times are GMT -4. The time now is 04:39.