How can I update a mass source value (from an udf) each N iteration
Hello,
I would like to update a mass source value each 100 iterations. I have an udf that call a fortran program that calculates the mass source value. So, to define the number of iterations, do I need a second udf? Or can I use DEFINE_ADJUST inside the DEFINE_SOURCE? Thanks in advance! |
DEFINE_SOURCE macro is all you need, it is executed on each iteration/ timestep
|
Hello Alexander,
Thanks for your reply. But if I want to update the mass source value each 100 iteration, for example, is that possible? best regards |
yes,
DEFINE_SOURCE macro is updating source on each iteration however, you may compute source value using other macro DEFINE_ADJUST macro in case you are calculating before iteration DEFINE_EXECUTE_AT_END macro in case you are calculating after iteration for more information read ansys fluent customization manual |
Ok, but how can I access the source term (in cell zone condition) if I only define the macro "DEFINE_ADJUST"?
best regards |
All times are GMT -4. The time now is 01:22. |