In Fluent is the DEFINE_SOURCE UDF applied to each cell in the cell zone?

Dear all,

I have question regarding the DEFINE_SOURCE UDF. I want to apply a mass source to my model. When hooking a source function to a cell zone, is the source term then calculated and applied for each individual cell in cell zone or is a mean value from all cells applied to selected cell zone?

From the manual (Customization Manual Part I Chapter 2.3.41.2. "The solver passes to the DEFINE_SOURCE term UDF all the necessary variables to define a custom source term, since source terms are solved on a cell basis") I suggest, that the source term is calculated an applied for each cell individual, am I right with this?

 

Thank you for your help!

Answers

  • RobRob UKForum Coordinator

    The source term will be applied to the whole cell zone, but the individual cell volume is accounted for in the calculation. Ie for mass a larger cell will get more mass added but the mass/m3 will be the same for all cells.

  • Hallo,


    Thank you for your answer. This means if I calculate a mass source for each cell (e.g. based on density variation, like degassing Boundary udf in the manual) this mass is not directly added or removed from the individual cell? Fluent is calculating an overall value for the whole cell zone, which is than applied to the cells and weighted by cell volume? Am I right?


    Regards

  • RobRob UKForum Coordinator

    If you're running a cell loop it'll add based on the cell, I thought you were adding a bulk value. Best way is to test using some dummy values.

  • No I don't use a bulk value. I want to simulate some kind of absorption of one phase, based on density variation. A little bid similar to the degassing udf in the manual. But I wanted to model absorbtion on cell basis. So if I use a cell loop in the DEFINE_SOURCE udf it is possible to simulate such a case? Or do you mean the DEFINE_SOURCE is looping on their own and adds or removes the mass for each cell Individual?


    Regards

Sign In or Register to comment.