CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   can anyone please tell me what is the macro of liquid phase viscosity (https://www.cfd-online.com/Forums/fluent-udf/102722-can-anyone-please-tell-me-what-macro-liquid-phase-viscosity.html)

thiyam June 1, 2012 03:53

can anyone please tell me what is the macro of liquid phase viscosity
 
I am modelling gas-liquid phase problem in fluent and trying to use UDF for drag co-efficient, in this case i want to particularly define viscosity for liquid phase so does anyone know macro for this, please help

Galileo June 1, 2012 10:20

Quote:

Originally Posted by thiyam (Post 364232)
I am modelling gas-liquid phase problem in fluent and trying to use UDF for drag co-efficient, in this case i want to particularly define viscosity for liquid phase so does anyone know macro for this, please help


Hi,
To define the viscosity of the liquid phase you can do something like:

/*If the cell and cell thread are not passed in the
subrountine, you need to get the cell thread
eg for DPM Drag
DEFINE_DPM_DRAG(UDFdrag,Re,p)
where the Tracked Particle p is passed you may
do it like this
cell = P_CELL(p);
cell_thread =
THREAD_SUB_THREAD(P_CELL_THREAD(p),
PHASE_DOMAIN_INDEX (Get_Domain(ID_OF_LIQUID_PHASE)));

You can get ID_OF_LIQUID_PHASE from the phases GUI, may be 3

What is important is to get cell and cell_thread, pointing to the phase you desire
*/
viscosity_lam=C_MU_L(cell,cell_thread) //Laminar Viscosity
viscosity_turb=C_MU_T(cell,cell_thread) //Turbulent Viscosity
viscosity_eff=C_MU_EFF(cell,cell_thread) //Effective Viscosity


All times are GMT -4. The time now is 04:55.