CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Pulsating Pressure User Defined Function (https://www.cfd-online.com/Forums/fluent/224069-pulsating-pressure-user-defined-function.html)

vigneshkrish333 February 6, 2020 02:32

Pulsating Pressure User Defined Function
 
I am working on a compressor piping related piping phenomena,where i want to give a pulsating pressure as a input which has a base pressure of 1724 kPa and a varying value of 68.9476 kPa with a frequency of 20 Hz. As I am a beginner I came to that i have to give UDF for this purpose,can anyone pls give the UDF code....
y=1724+68.9476(sin(2*pi*20*t))

Thank You..:):):)

AlexanderZ February 6, 2020 03:20

Ansys Fluent Customization manual
look for DEFINE_PROFILE macro

vinerm February 6, 2020 03:22

UDF not required
 
You do not require UDF for this. You can use a transient profile. Format is given in Fluent User Guide. For your convenience, it is

((nameOfProfileWhateverYouWant transient 3 0)
(time
0
1
2)
(press
68
70
71.5)
)

You can choose the name of the profile; no spaces are allowed in the name, you can use underscore, numbers, etc. transient is a keyword and has to be as it is. First number shows the number of data points. I have used 3 at time 0, 1, and 2 seconds. Units are all SI. Numbers can be real. Time values must be in ascending order. The last number in the first line is a boolean; can either be 0 or 1. 0 implies non-periodic. You can use 1 since you have periodic data. That way, you can provide data for only one time-period but still run the simulation for as many time-periods as you want. If that value is set to 0, then after the last time given in profile, value of the variable retains the last value. So, with the above profile, after 3 seconds, pressure will be maintained at 71.5 Pa. Use enough points to resolve the shape of the curve.


All times are GMT -4. The time now is 03:02.