|
[Sponsors] |
July 31, 2022, 05:53 |
UDF for Boundary Condition
|
#1 |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 4 |
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, |
|
July 31, 2022, 12:40 |
|
#2 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 4 |
Quote:
|
||
July 31, 2022, 20:34 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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
__________________
best regards ****************************** press LIKE if this message was helpful |
|
August 1, 2022, 02:02 |
|
#4 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 4 |
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 ? |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Non-uniform heat flux UDF boundary condition around a cylinder | climshwuling | FLUENT | 0 | May 24, 2022 10:20 |
UDF boundary condition (heat flux), in corrugated area (adjustment factor needed)) | JMM_UC3M | Fluent UDF and Scheme Programming | 0 | June 10, 2021 00:57 |
UDF as a boundary condition | msd | FLUENT | 2 | April 7, 2021 07:19 |
How to setup the wall boundary condition of maxwell_slip_velocity_x_full UDF? | ailee0303 | Fluent UDF and Scheme Programming | 4 | January 13, 2021 08:14 |
write a UDF to give a velocity boundary condition at an interior face | Tharanga | Fluent UDF and Scheme Programming | 19 | August 5, 2018 04:29 |