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

Water hammer effect

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2017, 07:47
Smile Water hammer effect
  #1
New Member
 
Hamid Masoud
Join Date: Jun 2017
Posts: 10
Rep Power: 9
Masoud91 is on a distinguished road
Hello,

i want to simulate the water hammer effect and have a laminar flow with a slightly compressible fluid.

The steady simulation has a total pressure inlet of 1800 bar and atmospheric pressure at outlet (static pressure: relative pressure 0 bar) and water as fluid.

For the transient simulation i want to load the results of the steady simulation into my transient simulation as initial values and set the new conditions and boundarys for the transient one. I change the outlet to a velocity outlet and set 0 (m/s) to simulate a sudden valve closure. The inlet remains a total pressure inlet. I would like to make water compressible. Shall i set the density as a function of pressure and how can i make that. I can only set values and no functions? Must i turn on the total energy model and why? When i turn it on, it says that i must initialize the temperature in domain initialization (Initialization-Domain Initialization-Initial conition-Temperaure-Temperature) but i cannot initialize the temperaure.

Can anyone help me?
Masoud91 is offline   Reply With Quote

Old   June 13, 2017, 20:13
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
For the transient simulation i want to load the results of the steady simulation into my transient simulation as initial values and set the new conditions and boundarys for the transient one.
Yes, this should be simple.

Quote:
I change the outlet to a velocity outlet and set 0 (m/s) to simulate a sudden valve closure.
A better way might be to make the outlet boundary face a wall.

Quote:
Shall i set the density as a function of pressure and how can i make that.
In the materials tab define a function for density.

Quote:
I can only set values and no functions?
Yes, you can set functions.

Quote:
Must i turn on the total energy model and why?
Water hammer models usually only require a bulk modulus density model. This does not require a total energy model. If that simple linear model of density is not accurate enough you could look at more complex models which require total energy, or even models which use the IAPWS water properties. But only use these more complex material models if the simple linear one is not good enough. They are much harder to use and will make convergence much more challenging.

Quote:
When i turn it on, it says that i must initialize the temperature in domain initialization (Initialization-Domain Initialization-Initial conition-Temperaure-Temperature) but i cannot initialize the temperaure.
Yes, if you use a total energy model you will be modelling temperature as well.
ghorrocks is offline   Reply With Quote

Old   June 15, 2017, 17:09
Smile
  #3
New Member
 
Hamid Masoud
Join Date: Jun 2017
Posts: 10
Rep Power: 9
Masoud91 is on a distinguished road
Hey thanks for the fast response.
How can I make the outlet as a wall? In Fluent I can select the outlet as a wall but in CFX it is different.

My great problem is the function for the density. Where can I insert/ create a function. Or must i create the function under "expressions"

And is the total pressure of 1800bar at inlet correct? I don't have any value for velocity at inlet.

Thanks
Masoud91 is offline   Reply With Quote

Old   June 15, 2017, 19:12
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
In CFX you define the boundary as a wall in CFX-Pre.

Density: In the materials tab. Yes, you will need to create an expression.

Inlet pressure: If inlet pressure is what you know, then use that. If you do not know the velocity you cannot define that as a boundary condition.
ghorrocks is offline   Reply With Quote

Old   June 19, 2017, 10:34
Default Density
  #5
New Member
 
Hamid Masoud
Join Date: Jun 2017
Posts: 10
Rep Power: 9
Masoud91 is on a distinguished road
How can i express the density function? It depends on pressure respectively the axial direction of my pipe.


The function of density is density=(bulk modulus/Speed of sound^2). Where can i set the bulk modulus or Speed of Sound?! And if Speed of Sound is a constant value, bulk modulus must vary, however i read that bulk modulus is constant and for compressible flows. How can i express the pressure dependency?
Masoud91 is offline   Reply With Quote

Old   June 19, 2017, 11:20
Default
  #6
Member
 
Peter
Join Date: Sep 2011
Location: Germany
Posts: 39
Rep Power: 15
PeMo is on a distinguished road
So if you consider compressibility you have a density change based on the current pressure d(rho)/dp=rho/K. To consider the change in density you define (as Glenn already mentioned) a density function based on a reference density, the pressure and the bulk modulus or the speed of sound. (Since speed of sound and and the bulk modulus are linked with the reference density you can only specify one).
Use the Search: How to make the water slightly compressible in CFX? and Chaundry- Applied Hydraulic Transients is also a good place to start
PeMo is offline   Reply With Quote

Old   June 29, 2017, 05:12
Default
  #7
New Member
 
Hamid Masoud
Join Date: Jun 2017
Posts: 10
Rep Power: 9
Masoud91 is on a distinguished road
Thanks, but if i make water slightly compressible, i have to choose a heat transfer model. I have chosen Isothermal with a water temperature of 25 °C. Can i avoid to choose a heat transfer model? Moreover, i have set 6 seconds for total time and 1e-5 as time step. After almost one day my simulation has not even completed and i have accumulated time step of 5000. How can i fasten my simulation?
Masoud91 is offline   Reply With Quote

Old   June 29, 2017, 19:33
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If you have chosen isothermal then the simulation will not model heat transfer.

Quote:
How can i fasten my simulation?
I cannot count the number of times beginners have said they can't use a finer time step, tighter convergence or a fine mesh because the simulation run time is too long. CFD takes time and if you don't have enough time to do it properly then don't bother starting.

You need to:

First:
Use sensitivity studies to determine the mesh size, time step size and convergence criteria you need in your case to get an accurate simulation.

Second:
Once you have determined the simulation settings required to get the accuracy you require, look at your computing resources and work out whether you have the necessary memory and CPU time to achieve the task

Third:
If you don't have enough time or memory then get more computers and licenses so you can do a distributed parallel run

Fourth:
If you can't get enough resources to do it, then simplify the simulation problem and return to step 1.

Fifth:
If you can't simplify it then declare the problem is not solveable with current resources.
ghorrocks 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
Mass imbalance problem in multiphase water and steam CFX case Antech CFX 1 October 26, 2020 05:03
Getting the pressure waves in Fluent for a water hammer problem teopetre FLUENT 2 August 6, 2013 20:24
CCL, FORTRAN and water hammer pingub CFX 3 May 13, 2010 20:15
has anyone simulated water hammer sandeep FLUENT 0 September 4, 2003 11:06
uptodate water distribution network fredius,magige,tanzanian,(e.a) Main CFD Forum 0 January 27, 2002 08:10


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