CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Need UDF for Mixture Model (https://www.cfd-online.com/Forums/fluent-udf/96188-need-udf-mixture-model.html)

 vaibhavraikhare January 16, 2012 02:53

Need UDF for Mixture Model

I am working on heat and mass transfer of mixture model.and need to know how the UDF file will be made???
can any 1 provide its sample of any tutorial file???

 shk12345 January 17, 2012 09:22

hi

For heat transfer i think that there is no need of any udf as such .
You just define the temperature at some wall it has to work.

You need a udf for masss transfer which you can find in ansys udf manual that is available on net.You just copy paste that and just change the mass transfer equation to the equation that is needed for your work.

Thanks
shk

 ComputerGuy January 17, 2012 10:29

I would not specify the temperature directly, as suggested by shk12345; this is asking for simulation instabilities. I would allow fluent to calculate it for you. See example 2 for how to define heat transfer between phases: http://my.fit.edu/itresources/manual...udf/node61.htm

See the example here for mass transfer:
http://my.fit.edu/itresources/manual...udf/node63.htm

ComputerGuy

Quote:
 Originally Posted by vaibhavraikhare (Post 339465) I am working on heat and mass transfer of mixture model.and need to know how the UDF file will be made??? can any 1 provide its sample of any tutorial file???

 shk12345 January 17, 2012 10:34

The first link that you shared is drag law used by multiphase models as eulerian model and mixture model . That is not for temperature specifications.

For mass transfer as i said to you you can copy that udf and change it with your mass transfer equation in the MT equation used in that udf.

regards
shk

 ComputerGuy January 17, 2012 10:36

OK -- if the mixture model is used (was thinking Eulerian), all phases have the same temperature. I stand corrected! Temperature must be specified; be careful.

FYI: If you choose to use the Eulerian model, the heat transfer law is on the page provided as follows:
Code:

```#include "udf.h" #define PR_NUMBER(cp,mu,k) ((cp)*(mu)/(k)) #define IP_HEAT_COEFF(vof,k,nu,d) ((vof)*6.*(k)*(Nu)/(d)/(d)) static real heat_ranz_marshall(cell_t c, Thread *ti, Thread *tj) {  real h;  real d = C_PHASE_DIAMETER(c,tj);  real k = C_K_L(c,ti);  real NV_VEC(v), vel, Re, Pr, Nu;  NV_DD(v,=,C_U(c,tj),C_V(c,tj),C_W(c,tj),-,C_U(c,ti),C_V(c,ti),C_W(c,ti));  vel = NV_MAG(v);  Re = RE_NUMBER(C_R(c,ti),vel,d,C_MU_L(c,ti));  Pr = PR_NUMBER (C_CP(c,ti),C_MU_L(c,ti),k);  Nu = 2. + 0.6*sqrt(Re)*pow(Pr,1./3.);  h = IP_HEAT_COEFF(C_VOF(c,tj),k,Nu,d); return h; } DEFINE_EXCHANGE_PROPERTY(heat_udf, c, t, i, j) {   Thread *ti = THREAD_SUB_THREAD(t,i);   Thread *tj = THREAD_SUB_THREAD(t,j);   real val;   val = heat_ranz_marshall(c,ti, tj);   return val; }```

 shk12345 January 17, 2012 10:50

Thanks for that udf
that is ranz marshal law in eulerian model in fluent.

""The default heat transfer option between the continuous phase and the particles is Ranz Marshall. The Ranz Marshall correlation is also applicable to Eulerian multiphase flow."" /quote/

it is not for temperature but for h eat transfer between the phase and you need not to put it as udf in fluent it is already build in fluent.

thanks and regards
shk

 cfd^2 March 2, 2013 22:28

Quote:
 Originally Posted by ComputerGuy (Post 339746) OK -- if the mixture model is used (was thinking Eulerian), all phases have the same temperature. I stand corrected! Temperature must be specified; be careful. FYI: If you choose to use the Eulerian model, the heat transfer law is on the page provided as follows: Code: ```#include "udf.h" #define PR_NUMBER(cp,mu,k) ((cp)*(mu)/(k)) #define IP_HEAT_COEFF(vof,k,nu,d) ((vof)*6.*(k)*(Nu)/(d)/(d)) static real heat_ranz_marshall(cell_t c, Thread *ti, Thread *tj) {  real h;  real d = C_PHASE_DIAMETER(c,tj);  real k = C_K_L(c,ti);  real NV_VEC(v), vel, Re, Pr, Nu;  NV_DD(v,=,C_U(c,tj),C_V(c,tj),C_W(c,tj),-,C_U(c,ti),C_V(c,ti),C_W(c,ti));  vel = NV_MAG(v);  Re = RE_NUMBER(C_R(c,ti),vel,d,C_MU_L(c,ti));  Pr = PR_NUMBER (C_CP(c,ti),C_MU_L(c,ti),k);  Nu = 2. + 0.6*sqrt(Re)*pow(Pr,1./3.);  h = IP_HEAT_COEFF(C_VOF(c,tj),k,Nu,d); return h; } DEFINE_EXCHANGE_PROPERTY(heat_udf, c, t, i, j) {   Thread *ti = THREAD_SUB_THREAD(t,i);   Thread *tj = THREAD_SUB_THREAD(t,j);   real val;   val = heat_ranz_marshall(c,ti, tj);   return val; }```
Sir ComputerGuy,

Is this piece of code the one that is implemented in FLUENT to calculate the heat transfer coefficient by Ranz-Marshall model? If yes, it is really interesting, since I'll be able to change a few things and redefine it as a User Defined parameter in the interaction panel for heat transfer in multiphase simulation...

Best Regards,
cfd^2

 Raining September 4, 2013 23:03

Quote:
 Originally Posted by ComputerGuy (Post 339746) OK -- if the mixture model is used (was thinking Eulerian), all phases have the same temperature. I stand corrected! Temperature must be specified; be careful. FYI: If you choose to use the Eulerian model, the heat transfer law is on the page provided as follows: Code: ```#include "udf.h" #define PR_NUMBER(cp,mu,k) ((cp)*(mu)/(k)) #define IP_HEAT_COEFF(vof,k,nu,d) ((vof)*6.*(k)*(Nu)/(d)/(d)) static real heat_ranz_marshall(cell_t c, Thread *ti, Thread *tj) {  real h;  real d = C_PHASE_DIAMETER(c,tj);  real k = C_K_L(c,ti);  real NV_VEC(v), vel, Re, Pr, Nu;  NV_DD(v,=,C_U(c,tj),C_V(c,tj),C_W(c,tj),-,C_U(c,ti),C_V(c,ti),C_W(c,ti));  vel = NV_MAG(v);  Re = RE_NUMBER(C_R(c,ti),vel,d,C_MU_L(c,ti));  Pr = PR_NUMBER (C_CP(c,ti),C_MU_L(c,ti),k);  Nu = 2. + 0.6*sqrt(Re)*pow(Pr,1./3.);  h = IP_HEAT_COEFF(C_VOF(c,tj),k,Nu,d); return h; } DEFINE_EXCHANGE_PROPERTY(heat_udf, c, t, i, j) {   Thread *ti = THREAD_SUB_THREAD(t,i);   Thread *tj = THREAD_SUB_THREAD(t,j);   real val;   val = heat_ranz_marshall(c,ti, tj);   return val; }```
Any result based on this UDF?

 All times are GMT -4. The time now is 07:38.