|
[Sponsors] |
March 25, 2021, 18:13 |
Water hammer simulation in Fluent
|
#1 |
New Member
Purohit Parth
Join Date: Mar 2021
Posts: 1
Rep Power: 0 |
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 |
|
April 2, 2021, 22:50 |
|
#2 |
Member
Yasser Selima
Join Date: Mar 2009
Location: Canada
Posts: 51
Rep Power: 19 |
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 |
|
Tags |
fluent - udf, udf code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
looking for a smart interface matlab fluent | chary | FLUENT | 24 | June 18, 2021 10:07 |
Cfd simulation for water hammer phenomenon | MihaiG | CFD Freelancers | 1 | November 17, 2017 06:48 |
Ricardo Wave Water Injection Simulation | randomspeedfreak | Main CFD Forum | 0 | April 2, 2015 13:20 |
question about simulation of falling water film | mengyue1 | FLUENT | 2 | March 30, 2014 11:16 |
Getting the pressure waves in Fluent for a water hammer problem | teopetre | FLUENT | 2 | August 6, 2013 20:24 |