CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Using 'define init' macro to perform a calculation at the start of a simulation (https://www.cfd-online.com/Forums/fluent/76306-using-define-init-macro-perform-calculation-start-simulation.html)

jonnythewlis May 21, 2010 07:23

Using 'define init' macro to perform a calculation at the start of a simulation
 
Hi,

I was wondering if anyone knows if you can use the define init macro to perform an unrelated calculation to the flow variables that will be used in a later function. I've tried this but it seems to crash. There must be some way of doing this though.

For example,

DEFINE_INIT(name1, d)
{
a=b+c;
}

DEFINE_PROFILE(name2, thread, index)
{
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, index) = a;
}
}

Thanks!


All times are GMT -4. The time now is 02:30.