|
[Sponsors] |
How to run multiple cycle pulsetile flow simulation in Ansys fluent using UDF code? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 26, 2020, 23:28 |
How to run multiple cycle pulsetile flow simulation in Ansys fluent using UDF code?
|
#1 |
New Member
Asia
Join Date: Jan 2020
Posts: 3
Rep Power: 6 |
Hi,
I am doing Blood flow simulation in Ansys fluent. For pulsatile flow simulation, using by UDF C file which is supported by ansys fluent. I tried to simulate multiple cycle of pulsatile flow however, getting some error after completing 1 cycle. Where my UDF coding a cardiac cycle has a duration of o to 1 second, I want to run the simulation at least 3 second. Can anyone please suggest me how to I can get multiple cycle of pulsatile flow simulation results in ansys fluent time settings or I need to modify the UDF coding. Thank you. Last edited by Md Al Amin Sheikh; January 27, 2020 at 06:18. |
|
January 27, 2020, 07:10 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
it depends on your UDF code, most likely you need modify it
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 27, 2020, 15:13 |
Cycling way blood flow simulation in ansys fluent using UDF coding.
|
#3 |
New Member
Asia
Join Date: Jan 2020
Posts: 3
Rep Power: 6 |
Thank you very much for your valuable comment.
I tried also using UDF coding. I want to run the simulation in cycling way. For one cycle time started 0 sec to 1 sec. after complete one cycle time will start again 0 sec to 1 sec so the time will count 2 sec. I solved the pulsatile flow blood flow using 9 order polynomial function. Here I attached the UDF code. #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; double t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =((832.4*pow(t,9))- (3335*pow(t,8))+(5199*pow(t,7))- (3755*pow(t,6))+(928.9*pow(t,5))+(326*pow(t,4))- (231.3*pow(t,3))+(31.72*pow(t,2))+(2.475*pow(t,1)) +0.3125); } end_f_loop(f, thread) } For example: I used this code and run the simulation using adaptive time step settings. Total time = 2 sec Number of total time steps = 400 Initial time step size = 0.005 sec convergence achieved = 10^-4 Iteration for each time steps = 100 I got error after completing 1 sec and the velocity value is very high after 1.1 sec. here I attached velocity error for when during simulation time. https://drive.google.com/open?id=1WR..._IOLSEmy_6G89d kindly please let me know, how to i can write the UDF code to solve this issue. ...Thank you... Last edited by Md Al Amin Sheikh; January 28, 2020 at 02:00. |
|
January 28, 2020, 00:27 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
compile code
Code:
#include "udf.h" #include "math.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real time; int mod; time = CURRENT_TIME; mod = (int)time; time = time - mod; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =((832.4*pow(time,9))- (3335*pow(time,8))+(5199*pow(time,7))- (3755*pow(time,6))+(928.9*pow(time,5))+(326*pow(time,4))- (231.3*pow(time,3))+(31.72*pow(time,2))+(2.475*pow(time,1)) +0.3125); } end_f_loop(f, thread) }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 28, 2020, 12:55 |
|
#5 |
New Member
Asia
Join Date: Jan 2020
Posts: 3
Rep Power: 6 |
Thanks a lot to modify the code. Now, the simulation is running with multiple cycle.
...Thank you... Last edited by Md Al Amin Sheikh; January 28, 2020 at 14:49. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Get Maxwell ansoft results in ansys workbench and find the flow velocity in Fluent, i | rrahman | FLUENT | 0 | April 16, 2016 22:11 |
Ansys Fluent UDF - for Data Center Air flow management | kedarjan | Fluent UDF and Scheme Programming | 13 | November 13, 2013 05:20 |
Comparison between Solidworks Flow Simulation and Ansys Fluent | Bruce828 | Main CFD Forum | 5 | February 23, 2013 11:13 |
Different flow patterns in CFX and Fluent | avi@lpsc | FLUENT | 4 | April 8, 2012 07:12 |
Fluent Remote Simulation Facility Service (RSF) di | Rami | FLUENT | 2 | June 4, 2008 06:38 |