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 |
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. |