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 run multiple cycle pulsetile flow simulation in Ansys fluent using UDF code?

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 26, 2020, 23:28
Default 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: 2
Md Al Amin Sheikh is on a distinguished road
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.
Md Al Amin Sheikh is offline   Reply With Quote

Old   January 27, 2020, 07:10
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,169
Rep Power: 18
AlexanderZ will become famous soon enough
it depends on your UDF code, most likely you need modify it
Md Al Amin Sheikh likes this.
__________________
best regards


******************************
press LIKE if this message helped you

How to ask questions:
https://www.cfd-online.com/Forums/si...ml#post6120255
AlexanderZ is offline   Reply With Quote

Old   January 27, 2020, 15:13
Default Cycling way blood flow simulation in ansys fluent using UDF coding.
  #3
New Member
 
Asia
Join Date: Jan 2020
Posts: 3
Rep Power: 2
Md Al Amin Sheikh is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
it depends on your UDF code, most likely you need modify it
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.
Md Al Amin Sheikh is offline   Reply With Quote

Old   January 28, 2020, 00:27
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,169
Rep Power: 18
AlexanderZ will become famous soon enough
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 helped you

How to ask questions:
https://www.cfd-online.com/Forums/si...ml#post6120255
AlexanderZ is offline   Reply With Quote

Old   January 28, 2020, 12:55
Default
  #5
New Member
 
Asia
Join Date: Jan 2020
Posts: 3
Rep Power: 2
Md Al Amin Sheikh is on a distinguished road
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.
Md Al Amin Sheikh is offline   Reply With Quote

Reply

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
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


All times are GMT -4. The time now is 10:14.