|
[Sponsors] |
January 5, 2020, 01:46 |
How to add a new material property in udf?
|
#1 |
New Member
Join Date: Sep 2018
Posts: 8
Rep Power: 8 |
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? |
|
January 5, 2020, 22:54 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you may use User Defined Scalars to solve new equations
material property there is UDS diffusivity read ansys fluent customization manual
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 6, 2020, 00:20 |
|
#3 | |
New Member
Join Date: Sep 2018
Posts: 8
Rep Power: 8 |
Quote:
#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. |
||
Tags |
structural index, thixotropy, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 22:43 |
Continuity Equation for multicomponent simulation | lordluan | CFX | 15 | May 19, 2020 19:36 |
Add Young's Modulus and Poisson Ratio to a material into Fluent | florian.crepin | Fluent Multiphase | 0 | May 25, 2018 11:46 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |