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

Pulsating Pressure User Defined Function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2020, 02:32
Default Pulsating Pressure User Defined Function
  #1
New Member
 
Vignesh
Join Date: Feb 2020
Posts: 19
Rep Power: 6
vigneshkrish333 is on a distinguished road
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..
vigneshkrish333 is offline   Reply With Quote

Old   February 6, 2020, 03:20
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Ansys Fluent Customization manual
look for DEFINE_PROFILE macro
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   February 6, 2020, 03:22
Default UDF not required
  #3
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm 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
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 04:06
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 13:19
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


All times are GMT -4. The time now is 09:06.