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

Water hammer simulation in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2021, 17:13
Wink Water hammer simulation in Fluent
  #1
New Member
 
Purohit Parth
Join Date: Mar 2021
Posts: 1
Rep Power: 0
Parth0208 is on a distinguished road
I am trying to simulate water hammer effect in a pipe.
The condition is that, when I close outlet for 2 sec, then water hammer should occur. I am simulating 2 water hammer effects in 30 secs.
from 0 to 13 sec the inlet velocity is 2 m/s, from 13 to 15 sec it is 0, from 15 to 28 it is again 2 m/s, then again from 28 to 30 sec it is 0 m/s.
For this I have tried to write IF statement in UDF, but it is showing error.
BCs: @Inlet: Pressure inlet, @Outlet: Velocity inlet, @Wall: wall

Function that I wrote:
IF(13[s]<=t&&t<=15[s], 0[m/s], 2[m/s])
IF(28[s]<=t&&t<=30[s], 0[m/s], 2[m/s])

Kindly help me.
thank you
Parth0208 is offline   Reply With Quote

Old   April 2, 2021, 21:50
Default
  #2
Member
 
Yasser Selima
Join Date: Mar 2009
Location: Canada
Posts: 52
Rep Power: 19
Yasser is on a distinguished road
I am assuming you have a typo in your boundary conditions ... but anyway, You don't need UDF .. you can use expression. If you want to use a UDF, you need to use DEFINE_PROFILE

Go to the UDF manual and look at the examples and try to modify one to fit your case. And if it doesn't work, bring it here and someone will help you for debugging
Yasser is offline   Reply With Quote

Reply

Tags
fluent - udf, udf code


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
looking for a smart interface matlab fluent chary FLUENT 24 June 18, 2021 09:07
Cfd simulation for water hammer phenomenon MihaiG CFD Freelancers 1 November 17, 2017 05:48
Ricardo Wave Water Injection Simulation randomspeedfreak Main CFD Forum 0 April 2, 2015 12:20
question about simulation of falling water film mengyue1 FLUENT 2 March 30, 2014 10:16
Getting the pressure waves in Fluent for a water hammer problem teopetre FLUENT 2 August 6, 2013 19:24


All times are GMT -4. The time now is 11:42.