CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Need UDF for Mixture Model

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2012, 02:53
Default Need UDF for Mixture Model
  #1
Member
 
Vaibhav Rai Khare
Join Date: Jul 2011
Location: Jaipur
Posts: 37
Rep Power: 14
vaibhavraikhare is on a distinguished road
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???
vaibhavraikhare is offline   Reply With Quote

Old   January 17, 2012, 09:22
Default hi
  #2
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 14
shk12345 is on a distinguished road
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
shk12345 is offline   Reply With Quote

Old   January 17, 2012, 10:29
Default
  #3
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
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 View Post
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???
ComputerGuy is offline   Reply With Quote

Old   January 17, 2012, 10:34
Default
  #4
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 14
shk12345 is on a distinguished road
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
shk12345 is offline   Reply With Quote

Old   January 17, 2012, 10:36
Default
  #5
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
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;
}
ComputerGuy is offline   Reply With Quote

Old   January 17, 2012, 10:50
Default
  #6
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 14
shk12345 is on a distinguished road
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/
http://www.kxcad.net/ansys/ANSYS_CFX...h07s05s03.html

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
shk12345 is offline   Reply With Quote

Old   March 2, 2013, 22:28
Default
  #7
Member
 
cfd^2
Join Date: Mar 2013
Posts: 31
Rep Power: 13
cfd^2 is on a distinguished road
Quote:
Originally Posted by ComputerGuy View Post
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
cfd^2 is offline   Reply With Quote

Old   September 5, 2013, 00:03
Default
  #8
New Member
 
C
Join Date: Sep 2013
Posts: 1
Rep Power: 0
Raining is on a distinguished road
Quote:
Originally Posted by ComputerGuy View Post
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?
Raining is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing UDF for Eulerian model golriz Fluent UDF and Scheme Programming 7 November 3, 2011 06:30
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 03:21
Modifying Pressure swirl atomizer model by UDF jeff_F FLUENT 0 May 22, 2010 10:22
UDF: how to know domain number in the model? mssound FLUENT 0 May 17, 2010 16:00
The problem of UDF in Non premixed combustion model zhangyuan Main CFD Forum 0 May 25, 2009 10:41


All times are GMT -4. The time now is 13:10.