CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   AVL FIRE (https://www.cfd-online.com/Forums/avl-fire/)
-   -   Describe AVL FIRE formula (https://www.cfd-online.com/Forums/avl-fire/193350-describe-avl-fire-formula.html)

Fluent learner September 22, 2017 12:58

Describe AVL FIRE formula
 
Hi
If anyone can describe a little bit about the following code, i would be thankful:

double dens;
double temp;
$$init
Bind("ElementData:Flow:Temperature:K", temp);
Bind("ElementData:Flow:Density:kg/m^3", dens);
print "computing average temperature...";
$$formula
double weight = |n|;
if(weight <= 0.0) weight = vol;
divisor += weight * dens;
return weight * dens * temp;


Thanks a lot

cfdvenkatesh January 20, 2018 10:35

working of FIRE formula
 
The understand the working of FIRE formula, it shouldn't be viewed as separate script. Instead you have consider them as set if functions and some other program is going to them in specific order.

The first part (above $$init) will be called once to define the variables, the variables defined here are persistent ( meaning the values set for these variables in time = t) will be available for other time steps (but not in other formula).

The second part (between $$init and $$formula) would be called twice (when it is called first time you can check variable named "init" would be set to 0 i think).

The third part ( below $$formula) is called for each cell or face and program calling this part just added the values returned by this function and divides by value is divisor and send to 2D results or for printing.

Hope this help !!


All times are GMT -4. The time now is 00:24.