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

How to add a new material property in udf?

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 5, 2020, 00:46
Default How to add a new material property in udf?
  #1
New Member
 
Join Date: Sep 2018
Posts: 8
Rep Power: 4
dagang is on a distinguished road
Hi friends,
I am trying to writing a udf for time-dependent slurries, for which a structural index were proposed. However, this index doesn't exist in fluent. How can i define and use it?
dagang is offline   Reply With Quote

Old   January 5, 2020, 21:54
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,600
Rep Power: 23
AlexanderZ will become famous soon enough
you may use User Defined Scalars to solve new equations
material property there is UDS diffusivity
read ansys fluent customization manual
dagang likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 5, 2020, 23:20
Default
  #3
New Member
 
Join Date: Sep 2018
Posts: 8
Rep Power: 4
dagang is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
you may use User Defined Scalars to solve new equations
material property there is UDS diffusivity
read ansys fluent customization manual

#include "udf.h"
#include "mem.h"
DEFINE_PROFILE(inlet_uds,t,p)
{
float uds;
face_t f;
begin_f_loop(f,t)
{
uds=1e-20;
F_PROFILE(f,t,p)=uds;
}
end_f_loop(f,loop)
}
DEFINE_PROFILE(outlet_uds,t,p)
{
face_t f;
float K=0.239;
float rate=(C_STRAIN_RATE_MAG(f,t));
begin_f_loop(f,t)
{
F_PROFILE(f,t,p)=exp(-K*rate);
}
end_f_loop(f,loop)
}

DEFINE_PROFILE(Adjust_uds,t,p)
{
cell_t c;
thread_loop_c(c,t)
{
begin_c_loop(c,t)
{
real rate;
real Namoda;
real K=0.239;
real Nnnn;
real Constant_a;
real Deta_Namoda;
real RealTime=CURRENT_TIME;
real TimeStep=CURRENT_TIMESTEP;
rate=(C_STRAIN_RATE_MAG(c,t));
Nnnn=0.7032*exp(-7.249*rate);
Constant_a=0.04199/pow(0.6,Nnnn);
Deta_Namoda=Constant_a*pow(rate,Nnnn)*exp(-K*rate)-Constant_a*pow(rate,Nnnn)*C_UDSI(c,t,0);
C_UDSI(c,t,0)=C_UDSI(c,t,0)-Deta_Namoda*TimeStep;
C_PROFILE(c,t,p)=C_UDSI(c,t,0);
}
end_c_loop(c,loop)
}
}

DEFINE_PROPERTY(Thixotropy_viscosity, c, t)
{
real visco;
real rate;
real BinghamVisco=0.172;
real Constant_C=28.52;
rate=(C_STRAIN_RATE_MAG(c,t));
if (rate>0.00001)
visco=(40+BinghamVisco*rate-Constant_C*C_UDSI(c,t,0))/rate;
else
visco=(40+BinghamVisco*0.00001-Constant_C*C_UDSI(c,t,0))/0.00001;
return visco;
}


Hi AlexanderZ,
Here is a udf code i wrote to represent the thixotropy of fluids. A structural parameter was proposed to characterize the degree of structure under shear. I use UDS to represent the structural parameter. However, this code doesnt work. Can you help me modify it? Or do you know any available code for thixotropic fluids. Many researcheres published papers about thixotropy and structural parameter, unfortunately i cant find even one code of thixotropic fluids. Thanks.
dagang is offline   Reply With Quote

Reply

Tags
structural index, thixotropy, udf

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
Continuity Equation for multicomponent simulation lordluan CFX 15 May 19, 2020 18:36
Add Young's Modulus and Poisson Ratio to a material into Fluent florian.crepin Fluent Multiphase 0 May 25, 2018 10:46
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Setting the height of the stream in the free channel kevinmccartin CFX 10 July 9, 2015 21:36
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56


All times are GMT -4. The time now is 06:53.