|
[Sponsors] |
udf-assign a set of data to the corresponding cell center and calculate gradient |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 31, 2021, 06:22 |
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 |
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. |
|
|
|
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 |