|
[Sponsors] |
December 3, 2012, 16:27 |
UDF - define_init & restart problem
|
#1 |
New Member
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16 |
Dear friends,
There is one thing I cant figure out. I interpreted my UDF which was made as follows: Define_init function. Is to examine the geometry parameters, to simplify it, it returns the total volume (c_tot variable) of the cells. Define_source (whatever define macro), uses this value, such as x/c_tot. Everything works fine, until I end the calculation, write a .dat file and restart the calculation without initialization. Seems to be (and Im pretty sure), that Fluent does not store the c_tot value, in general any value, obtained from define_init once the calculation is over and then restarted. I really dont want to use a define_adjust (it will uselessly slow down my calculation), or define_on_demand (want to keep it to be performed automatically). Is there any way to store that value for the next usage? Thank you in advance. j. |
|
December 4, 2012, 11:19 |
|
#2 |
New Member
Ján
Join Date: Mar 2010
Location: Slovakia
Posts: 24
Rep Power: 16 |
Hi again,
so it seems to be that I moved on a bit. I found out that use of C_UDMI could be suitable for this kind of problem, anyway there is still an issue I cant pass through. To explain it more closely: Code:
DEFINE_INIT (init, domain) { real ... thread_loop_c(t, domain); { begin_c_loop(c, tc) if (sth) { C_UDMI(c, tc, 0)+=C_VOLUME(c, tc); } end_c_loop(c, tc) } } and then DEFINE_SOURCE(energy, c, thread, dS, eqn) { real ... var1=var2/C_UDMI(c, tc, 0) source=var3; dS[eqn]=var4; return source; } Maybe I just dont understand how C_UDMI is working. The second question is - Will be the C_UDMI value stored after I re-interpret my UDF, or restart the calculation from a .dat file? (Will be this value written into a .dat file?). For now, Im using on demand macro, but it is not so pretty as I would like to.. Thank you in advance. Regards Last edited by argeus; December 4, 2012 at 13:03. |
|
Tags |
.dat, define_init, restart, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
UDF Problem | ozgur | Fluent UDF and Scheme Programming | 18 | January 17, 2016 14:40 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
fluent udf problem for 3d case | srsahu | Fluent UDF and Scheme Programming | 0 | July 28, 2009 07:25 |
UDF variables F1, y / problem with UDF | Fabian | FLUENT | 6 | June 2, 2003 10:22 |