UDF for Boundary Condition
Hello,
I want to write UDF for boundary condition (electric potential of wall by using MHD) , the electric potential is sinusoidal , I think , I must use DEFINE_ADJUST and DEFINE_PROFILE but I'm new in UDF and I don't know how to write and couple two DEFINE together, Could someone help me? Best Regards, |
1 Attachment(s)
Quote:
|
DEFINE_PROFILE is a way for you
DEFINE_PROFILE and DEFINE_ADJUST are just functions same as in any language -> you may use global variables to communicate between functinos for some expamles of DEFINE_PROFILE macro you may take a look into Ansys Fluent Customization manual |
Quote:
I write this code : #include "udf.h" #define PI 3.141592654 DEFINE_PROFILE(current_density,thread,position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f,thread) { F_PROFILE(f,thread,position)=13*sin((2*PI/0.04)*t); end_f_loop(f,thread) } } i want to use it for User Defined Scalar Boundary Value For MHD module, but when i choose it for a wall, fluent consider the wall as insulated , Do you know how can i fix it ? |
All times are GMT -4. The time now is 20:56. |