How to calculate cell area??
Hi Everyone,
I am writing UDF for Energy source term in axissymmetric case which is varying for every cell in the zone thread.I need to multiply area of that cell to corresponding cell energy source term. please tell me how can I find Area for each cell in axis symmetric case ? 
Hi. I am just wondering did you figure out how to get each cell surface area? I also need to calculate each cell surface area to apply an energy source term.
TIA 
look for macro
Code:
F_AREA(A,f,t); 
Thanks for the reply.
I have tried F_AREA(A,f,t) to calculate each cell surface area inside DEFINE_SOURCE macro and got an error. It seems like DEFINE_SOURCE macro is for cell whereas F_AREA(A,f,t) is for face. Should I need to use any face loop inside DEFINE_SOURCE macro to get each cell surface area? My intended source term is like = Surface_area_of_cell * T_cell / Cell_volume 
I have no idea, what exactly you need.
this code make a loop over faces of each boundary and calculates source according to your condition for the first row of cells adjusted to that boundaries Code:
#include "udf.h" 
It makes no sense to use the cell surface area in your source, because it is mesh dependent. Your source would depend on the mesh, a finer mesh gives a higher source.

Thanks for raising an important question that I didn't consider before. My source term is spatial cell temperature dependent via 'Source = h * A * T' equation. Is there any way I can avoid cell surface area in the source term since temperature would be different in each cell?

Which psysical equation for source are you trying to model? The psysical equation should only have physical things, like temperature, material properties, physical lengths... Not mesh sizes, they are not physical.
(i don't understand your worry about different temperatures, there is nothing problematic about that.) 
I am trying to model only the Energy equation. So, I should use the total surface area of the domain (that is a known geometrical parameter) instead of the cell surface area (which is a meshdependent quantity)?

That is not what I mean.
You have a source. Describe that source with a physical equation. Until you do that, I have no idea if and how the source relates to an area. There are millions of ways to define a source, I have no idea which source is present in your problem. Source has units W/m3, so give me something that has units W/m3. 
All times are GMT 4. The time now is 04:37. 