|
[Sponsors] |
July 1, 2010, 15:27 |
reading "global" variables in a UDF macro?
|
#1 |
New Member
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
I'm not sure if what I want to do is possible. I'm using the DEFINE_SOURCE macro, and I'd like to read source terms from a pre-existing data file. I understand I could use DEFINE_RW_FILE to read the entire file into an array, and search the array for the term I need. However, this would be reading in the file to a large array every time the UDF gets called (i.e. for every cell in the mesh) and feels like an inefficient programing method. What I'd rather do is have fluent read in the data file to an array once, and then have the DEFINE_SOURCE macro search that array for the proper value each time it's called.
Is there any way to do this? |
|
July 1, 2010, 22:22 |
|
#2 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Problem converting fluent mesh | vinz | OpenFOAM Meshing & Mesh Conversion | 28 | October 12, 2015 07:37 |
UDF to record FLUENT solver variables... | mariachi | FLUENT | 1 | February 3, 2010 23:18 |
problem when converting mesh (made by ICEM) using fluentMeshToFoam | Forrest_Lei | OpenFOAM | 11 | October 16, 2009 07:28 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
DEFINE_DPM_OUTPUT macro UDF HELP | Puneet | FLUENT | 3 | November 28, 2003 11:55 |