CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

udf-assign a set of data to the corresponding cell center and calculate gradient

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 31, 2021, 06:22
Default udf-assign a set of data to the corresponding cell center and calculate gradient
  #1
New Member
 
Lanting li
Join Date: Nov 2019
Posts: 10
Rep Power: 6
by1704116 is on a distinguished road
Hello, my dears.
Here is my problem in detail.I have a set of values,and each of it corresponds to its specific cell. I want to assign each of them to the corresponding cell center, and calculate the gradient of these value to form a mass source in the right hand side of the continuity equation.
In one paper,it says that one could save data in a txt file,and use DEFINE_ON_DEMOND to read it, assign values to the cell center ,store into an array,and use a second order reconstruction technique to calculate the gradient.
However, the Fluent udf manual just mentions the inherent variables,such as C_U(c,t),C_R(c,t), to use Gradient or Reconstruction Gradient macro.
I could store data into an array, but I don't know how to assign it to specific cell, and how could I use udf marco to calculate gradient?
Could someone give me some suggestions on my problem?
Thanks a lot for reading my post.
by1704116 is offline   Reply With Quote

 


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
How to implement a TVD scheme? Jaydi_21 Main CFD Forum 10 May 17, 2019 16:11
How to get cell data like center, volume/mass, velocity julianschl OpenFOAM Post-Processing 3 June 13, 2014 03:10
Prediction of gradient at the cell center for cell-centered finite volume method openfoammaofnepo Main CFD Forum 4 March 23, 2014 15:07
gradient calculation of cell centered finite volume method zhengjg Main CFD Forum 10 November 11, 2012 23:13
calculate cell volume, center...? Paul Main CFD Forum 5 June 21, 2003 12:55


All times are GMT -4. The time now is 09:12.