|
[Sponsors] |
January 20, 2017, 06:27 |
Velocity blood flow - repeating UDF
|
#1 |
New Member
Robert O'Grady
Join Date: Jan 2017
Posts: 2
Rep Power: 0 |
I am quite new to fluent ANSYS.
I am running a simulation for transient blood flow in an aorta. A UDF is required at the inlet to describe the velocity profile over time. My UDF code contains various functions right up to about 0.9 seconds however when i monitor the velocity at the inlet, the code never gets past 0.5 seconds and starts to repeat itself. I am just wondering if it is my code (below) or my simulation that the UDF is repeationg like this. Please Help, Thanks. code: #include "udf.h" DEFINE_PROFILE(inlet_velocity,th,i) { face_t f; begin_f_loop(f,th) double t=(CURRENT_TIME*2-floor(CURRENT_TIME*2))/2; { if(t<=0.0586) {F_PROFILE(f,th,i)=0.0064;} else if((t>0.0586)&&(t<=0.234)) {F_PROFILE(f,th,i)=(((2239*t*t*t)-(814.3*t*t)+(73.01*t)-1.4099)/100);} else if((t>0.234)&&(t<=0.3049)) {F_PROFILE(f,th,i)=(((5327.9*t*t)-(2433.3*t)+277.94)/100);} else if((t>0.3049)&&(t<=0.5202)) {F_PROFILE(f,th,i)=(((-5947.8*t*t*t)+(7368.3*t*t)-(3146.8*t)+474.48)/100);} else if((t>0.5202)&&(t<=0.6836)) {F_PROFILE(f,th,i)=(((-48372*t*t*t*t)+(120715*t*t*t)-(112868*t*t)+(46881*t)-7301.2)/100);} else if((t>0.6836)&&(t<=0.8705)) {F_PROFILE(f,th,i)=(((3252.7*t*t*t)-(7381*t*t)+(5543.3*t)-1377.3)/100);} else if((t>0.8705)&&(t<0.8892)) {F_PROFILE(f,th,i)=(((-368.44*t*t)+(644.33*t)-281.05)/100);} else if((t>0.8892)&&(t<=1)) {F_PROFILE(f,th,i)=0.005714;} } end_f_loop(f,th); } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow | mohibanwar | Fluent UDF and Scheme Programming | 10 | May 18, 2015 11:34 |
Fluent UDF for Micro Flow Face Slip Velocity | daniel_george_carter | Fluent UDF and Scheme Programming | 0 | May 12, 2013 06:39 |
UDF, air flow through a cell----get velocity in | lig | FLUENT | 0 | September 6, 2010 14:02 |
UDF velocity and temperature | Raj | FLUENT | 3 | February 1, 2009 19:29 |
Variables Definition in CFX Solver 5.6 | R P | CFX | 2 | October 26, 2004 03:13 |