CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   mass flux at a particular cell ( for creating CRN) (http://www.cfd-online.com/Forums/fluent-udf/117508-mass-flux-particular-cell-creating-crn.html)

Ananthakrishnan May 9, 2013 13:13

mass flux at a particular cell ( for creating CRN)
 
Hi,
I have a small confusion.
I will be really thankful if someone can just give me a direction or a concept to begin.
The problem is as below. (please see my next post for a clearer explanation!!)
I have a set of coordinates of mesh cells. Now as i have separate set of coordinates (which forms a interface) , i need to extract the mass flow rate at this face which is made of many cells.
The only idea which i have right now, is to retreive the individual face areas,density and velocity at each cell. and then multiply to get the mass flow rate. I am confused whether this procedure will give me the actual mass flow or not because i dont know which face of the cell will be used by fluent when i use the macro?
If anyone knows of any macro which can give the mass flux at the required cell, please let me know or if you can suggest any other method that would be highly appreciative as well.
Sorry for the trouble and thanks a lot for your help...

dmoroian May 9, 2013 15:44

I don't fully understand your problem, but to get the mass flux through a facet, fluent provides a macro: F_FLUX(f,tf).

Ananthakrishnan May 9, 2013 17:41

Hi,
Thanks,
sorry for the lack of clarity..
In brief,i have the coordinates of certain cells in fluent,,they are continuously placed (not at random places). . i need to find out the mass flow rate through them.
These cells were found out through a udf written earlier. ( you can may be imagine these cells as the ones present at the boundary of a small volume anywhere inside the flow field. So basically i need to find the mass flow rate entering this small volume and leaving it)..
I hope this is more clearer!!
Thanks once again,

dmoroian May 10, 2013 04:34

My answer is still the same: use the macro F_FLUX(f,tf).
Loop over the cells that you have, then for each cell loop over the faces. The flux should be positive or negative depending if it enters the cell or leaves it.
In principle, if you add all the negative values and all the positive values you will get the global mass flow in and out.

Ananthakrishnan May 10, 2013 06:34

Hi,
Thanks a lot for the idea dmorian. I will begin from there.
I still have a small confusion. If you dont mind can you please help me understand that.

For example, let each cell have 4 faces. When i ask him to loop through all cell's faces, how does fluent know which face to consider. I am asking this question because, one face might be normal to the flow direction, another face parallel or inclined to the flow. Does fluent take the vectorial sum across each face of all the cells through which it is looped!! I seriously think i am missing something fundamental here.
Please be kind enough to explain this.

Thanks a lot again

dmoroian May 10, 2013 07:01

Please read fluent udf manual. The macro F_FLUX(f,tf) returns a scalar value representing the amount of mass flow passing through the specified face in normal direction.
Your question " When i ask him to loop through all cell's faces, how does fluent know which face to consider" is answering it self: all the faces of the cell are considered.


All times are GMT -4. The time now is 18:12.