|
[Sponsors] |
lumped parameter udf-include pressure profile |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 5, 2012, 12:59 |
lumped parameter udf-include pressure profile
|
#1 |
Senior Member
Join Date: Feb 2011
Posts: 140
Rep Power: 15 |
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 |
|
October 8, 2012, 07:59 |
lumped parameter udf-udf function in certain range
|
#2 |
Senior Member
Join Date: Feb 2011
Posts: 140
Rep Power: 15 |
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 |
|
May 19, 2015, 06:21 |
|
#3 | |
New Member
Krishnaprasad
Join Date: Mar 2015
Posts: 2
Rep Power: 0 |
Quote:
#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); } |
||
May 19, 2015, 12:22 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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; |
|
May 22, 2015, 23:15 |
|
#5 | |
New Member
Krishnaprasad
Join Date: Mar 2015
Posts: 2
Rep Power: 0 |
Quote:
|
||
August 25, 2024, 17:04 |
|
#6 |
New Member
Ali
Join Date: Apr 2022
Posts: 10
Rep Power: 4 |
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. |
|
|
|
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 |