CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

lumped parameter udf-include pressure profile

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 5, 2012, 11:59
Default lumped parameter udf-include pressure profile
  #1
Senior Member
 
Join Date: Feb 2011
Posts: 128
Rep Power: 6
Lilly is on a distinguished road
Dear all,

I want to use a lumped paramter outflow boundary condition for my coronary artery geometry and need to additionaly implement the pressure of the left ventricle there. I am working at writing a udf for this problem and thought of including a profile of this form (one of the normal profiles you can read with "File->Read->profiles"):
((pressure transient 10 1)
(time ....)
(pressure ....))
Is it possible to include it in a normal udf and how can I do this?
Thanks a million for any help and idea!
Lilly
Lilly is offline   Reply With Quote

Old   October 8, 2012, 06:59
Default lumped parameter udf-udf function in certain range
  #2
Senior Member
 
Join Date: Feb 2011
Posts: 128
Rep Power: 6
Lilly is on a distinguished road
I just wanted to add something:
Maybe I could also implement another udf inside the lumped parameter udf describing the pressure profile instead of using a "point profile".
But my problem is: my profile should be periodic, that means it should start at 0s and it's duration should 1s and afterwards it should just start again from the beginning (This should go like this for about 50 times). Since it is a fit function, only the values of the function in a certain range (0-1s) are interesting for me. Is there a way to define this?
Thanks a million for any help and ideas!
Lilly
Lilly is offline   Reply With Quote

Old   May 19, 2015, 05:21
Default
  #3
New Member
 
Krishnaprasad
Join Date: Mar 2015
Posts: 2
Rep Power: 0
Krishna prasad is on a distinguished road
Quote:
Originally Posted by Lilly View Post
I just wanted to add something:
Maybe I could also implement another udf inside the lumped parameter udf describing the pressure profile instead of using a "point profile".
But my problem is: my profile should be periodic, that means it should start at 0s and it's duration should 1s and afterwards it should just start again from the beginning (This should go like this for about 50 times). Since it is a fit function, only the values of the function in a certain range (0-1s) are interesting for me. Is there a way to define this?
Thanks a million for any help and ideas!
Lilly
sir as part of my btech project on "numerical simulation of blood flow analysis" on left coronary descending artery using fluent as analysis software I have to write blood velocity udf. I wrote it as following but when I run it on fluent it was observed that "parse error" Anyone please help us to solve this problem

#include "udf.h"//file that contains definitions for define functions and fluent operations
#define PI 3.141592654

DEFINE_PROFILE(inlet_velocity,th,i)
{
face_t f;
begin_f_loop(f,th)
double t = (CURRENT_TIME*2-floor(CURRENT_TIME*2))/2; //t is the local time within each period

{
if(t <= 0.015)
F_PROFILE(f,th,i) = (.0003-.03t)/.02;
else if((t >.015)&&(t<=.02))
F_PROFILE(f,th,i) = (t-19.999)/333.33;
else if((t >.02)&&(t<=.285))
F_PROFILE(f,th,i) = .085*sin((10.375*t)-.2075);
else if((t >.285)&&(t<=.325))
F_PROFILE(f,th,i) = (-28.33*t*t)+(20.3563*t)-3.4679;
else if((t >.325)&&(t<=.47))
F_PROFILE(f,th,i) = (-2.7037*t*t)+(2.1696*t)-.2646;
else if((t >.47)&&(t<=1))
F_PROFILE(f,th,i) = (.0206*t*t)-(.2995*t)+.2939;
}
end_f_loop(f,th);
}
Krishna prasad is offline   Reply With Quote

Old   May 19, 2015, 11:22
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 677
Rep Power: 9
pakk is on a distinguished road
It would help if you are more exact on the error that you get.
Probably you don't just get "parse error", but something like "parse error on line 12", which tells you to look carefully at line 12.

Anyway, you have a problem in your line 12:

Code:
F_PROFILE(f,th,i) = (.0003-.03t)/.02;
.03t is not the same as 0.03*t.
pakk is offline   Reply With Quote

Old   May 22, 2015, 22:15
Default
  #5
New Member
 
Krishnaprasad
Join Date: Mar 2015
Posts: 2
Rep Power: 0
Krishna prasad is on a distinguished road
Quote:
Originally Posted by pakk View Post
It would help if you are more exact on the error that you get.
Probably you don't just get "parse error", but something like "parse error on line 12", which tells you to look carefully at line 12.

Anyway, you have a problem in your line 12:

Code:
F_PROFILE(f,th,i) = (.0003-.03t)/.02;
.03t is not the same as 0.03*t.
thank you sir, I could correct my udf that also worked in fluent well. Thank you dear Mr pakk for you valuable suggestion.
Krishna prasad is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Average static Pressure san.pirate CFX 34 December 6, 2011 15:26
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
UDF to control Static Pressure (in cylinder) James FLUENT 0 July 20, 2004 07:54
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


All times are GMT -4. The time now is 16:35.