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

lumped parameter udf-include pressure profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2012, 12:59
Default lumped parameter udf-include pressure profile
  #1
Senior Member
 
Join Date: Feb 2011
Posts: 140
Rep Power: 15
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, 07:59
Default lumped parameter udf-udf function in certain range
  #2
Senior Member
 
Join Date: Feb 2011
Posts: 140
Rep Power: 15
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, 06: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, 12:22
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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, 23: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

Old   August 25, 2024, 17:04
Default
  #6
New Member
 
Ali
Join Date: Apr 2022
Posts: 10
Rep Power: 4
Luxalyn is on a distinguished road
Hi Lilly;

Could you find a solution for this UDF? I'm facing with the same problem and I would really appreciate being in touch with you about this.

I hope you may help me

Sincerely Yours.
Luxalyn is offline   Reply With Quote

Reply


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
Average static Pressure san.pirate CFX 35 September 27, 2020 12:47
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 08: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 08:55.