CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Water Hammer Simulation in CFX (http://www.cfd-online.com/Forums/cfx/96460-water-hammer-simulation-cfx.html)

DomBern January 23, 2012 17:31

Water Hammer Simulation in CFX
 
I am currently trying to reproduce the water hammer phenomenon using a FSI method with Ansys and CFX.

To do so, I have used a power point presentation given by an Ansys tech. rep. Unfortunately, the simulation seems to be valid only for the case of a rapid gate closure.

If I slow down the gate closure ( from 0.0008 s to 30 s) , the pressure drops below the static pressure which doesn't make any sense.

Furthermore if I compare results between a 2 s or 30 s closure, they are the same.

Does anyone have an idea of what could be the problem !

Thanks

stumpy January 24, 2012 09:11

Did you use a compressible form of water (density as a function of pressure based on the bulk modulus of water)? What's your wave speed based Courant number (i.e. a Courant number calculated using the speed of sound in water, your mesh length scale in the streamwise direction and your timestep)?

DomBern January 24, 2012 10:57

I am currently using water as fluid and the compressibility expression I use for it is :

998 [kg/m^3]*(1+4.5454E-10*pabs/1[Pa])

Characteristic of my half pipe model are:
Length [ 60 m]
Radius [ 0.5m]
Thickness [0.015m]

My elements have [2 m ] in the streamwise diraction and [ 0.157 m] in the circumferential direction

Timestep is [ 0.001875 s] so the Courant Number is [ 1.21875 ]
(According to a use of [ 1300 m/s] for the wave velocity)

The reference pressure I use for my test is 7500 kPa

stumpy January 24, 2012 16:07

Those settings sound OK. Are you using a mass flow outlet and a total pressure inlet? Could you provide more details on where the results are not making sense. Having the pressure drop below the reference pressure is normal after the gate has closed. You should get an initial high pressure wave moving upstream, then an expansion wave to equalize the pressure moving from the inlet back towards the outlet, then than expansion wave should reflect off the closed outlet and cause a large negative pressure. In the real world that might cause cavitation, but I assume you're not simulating that.
If you have a partially closed gate, then I not too sure how the reflection of that expansion wave will behave.
Also, are you solving the Total Energy equation - if not, turn that on.

DomBern January 24, 2012 16:38

Hello Stumpy,

Thank you for your quick answer !

Here are my parameters:

Outlet: Mass Flow ( CEL function of the closure time and the initial speed)

( 1.8 [m/s]-0.06[m/s^2]*(t))

Opening: Opening press. and direction: 0 Pa

Wall: Ansys Multifield

Symmetry: ( I use half of the pipe to reduce the computation time

*** All the mesh motion are unspecified

I solve the Total Energy Equation

I have a partial gate closure

Results I get : As soon as I start reducing the mass flow at the outlet, the
pressure drops abruptly.After few iterations, the wave motion
starts.

ghorrocks January 24, 2012 17:34

Can you post your CCL and some images of the geometry?

Also it seems your fast opening case opens the gate entirely within one time step, but your slow opening case will open it over many time steps. This means the fast opening case does not have to deal with a partially open gate. Partially open cases can be tricky as you can get flow with high pressure through a small gap which can have compressibility effects and general difficulty in convergence.

DomBern January 25, 2012 10:59

Data for the model
 
5 Attachment(s)
I posted the CCL for the transient and steady-state analysis.

You could also see an isometric and a section view of my model.

Finally, I posted the results I obtained when I plotted the pressure vs time at the outlet.


**** As you will see in the CCL, I analyzed a partial gate closure, but at the end of the analysis, the outlet opening was still large enough to not create small gaps.

Thanks for your help

Dominic

ghorrocks January 26, 2012 07:17

What has the steady state analysis got to do with this?

Why is this an FSI analysis? What is moving?

Your transient CCL file suggests the mass flow transition happens at 50s, but the simulation only runs for about 21s. Have you run it long enough?

I note in your pressure versus time graph the pressure goes way beyond absolute zero. In reality this would be a massive cavitation bubble and not go lower in pressure than approximately the vapour pressure of water.

DomBern January 26, 2012 10:08

What has the steady state analysis got to do with this?
To initiate a transient analysis, a SS analysis is mandatory or else the pipe of the wall will have a sudden acceleration due to the large force causing the solver to fail.

Why is this an FSI analysis? What is moving?
The pipe's wall is moving. CFX transmits the forces produced by the pressure to Ansys through the wall. Ansys transmits the total mesh displacement to CFX . They then iterate until the convergence of both variables.

Your transient CCL file suggests the mass flow transition happens at 50s, but the simulation only runs for about 21s. Have you run it long enough?
The transient analysis starts at 20s due to the 20 iterations in the SS analysis. It runs until about 21s. The mass flow transition starts at 20s and could run until 50s but it stops at 21s due the end of the run.
The 50s in the CEL function is necessary to create the slow mass flow transition. ( It reproduce a gate that would close in 30 seconds......1.8 (m/s)/30 s =0.06 (m/s^2))

The 50 s is the addition of the initial 20 s plus the 30 s closure time.



I note in your pressure versus time graph the pressure goes way beyond absolute zero. In reality this would be a massive cavitation bubble and not go lower in pressure than approximately the vapour pressure of water.

The reference pressure is 7500 kPa so 0 kPa on the graph is a relative pressure.

My problem with this simulation is the initial drop. Theory tells us that the pressure should slowly increase and act as a sinusoidal wave.

stumpy January 26, 2012 15:44

I see... so the pressure drops rather than increases when you start to close the gate. I would add a monitor point for mass flow at the outlet, then compare that to the value specified in the steady state run, just to make sure the mass flow really is decreasing at the start of the transient run (the expressions looked OK to me).
On the structural side how did you run the steady state case? Was it a static analysis, or a transient with time integration off? Did you generate and edit an ANSYS.mf file to switch this back to transient?
I would also look at the transient results after a couple of timesteps. What's the mass flow? Compare the total mesh displacements on the pipe walls near the outlet - did the walls expand compared to the steady state results? If so, look at the forces passed to ANSYS.

ghorrocks January 26, 2012 17:36

In addition to stumpy's comments, I would get this simulation running correctly with no FSI, then add the FSI component. FSI is adding another possible source of error which makes debugging harder.

And I do not know why you say the wave should be sinusoidal. You are not closing the gate sinusoidally, and you have FSI in there which will add another non-linear effect, so why would it be sinusoidal?

DomBern January 27, 2012 14:45

Hello,

I have resolved my problem with the drop of pressure, but I now have another type of problem.

See below the answers to the questions


I see... so the pressure drops rather than increases when you start to close the gate. I would add a monitor point for mass flow at the outlet, then compare that to the value specified in the steady state run, just to make sure the mass flow really is decreasing at the start of the transient run (the expressions looked OK to me).
I have found out what was causing the drop of pressure. For a reason that I don't understand, the total mesh displacement drops to zero at the end of the steady state analysis. If I use the .res file to start the transient analysis, the acceleration induced by the large displacement of the total mesh displacement causes a sudden drop of pressure. To resolve this problem, I start the transient analysis with a .bak file from the SS Analysis.



On the structural side how did you run the steady state case? Was it a static analysis, or a transient with time integration off?
Transient with time integration off ! I turn it on in the mf file just before the transient analysis

Did you generate and edit an ANSYS.mf file to switch this back to transient?
Yes

I would also look at the transient results after a couple of timesteps. What's the mass flow? Compare the total mesh displacements on the pipe walls near the outlet - did the walls expand compared to the steady state results?
Both mesh displacement are the same


In addition to stumpy's comments, I would get this simulation running correctly with no FSI, then add the FSI component. FSI is adding another possible source of error which makes debugging harder.
I have run both analysis ( Structural and CFD) independently and they react both correctly


And I do not know why you say the wave should be sinusoidal. You are not closing the gate sinusoidally, and you have FSI in there which will add another non-linear effect, so why would it be sinusoidal?

You are right here ! When I run Hytran ( 1D Model) for a 30 s steady gate closure, the pressure doesn't vary for the first 27 s. After 27 s, a surge of pressure happens and then the sinusoidal pressure wave starts. I validated my solution with " Pressure transients in water engineering, John Ellis" p.111 fig. 9.6

The results I obtained from a FSI in ANSYS-CFX are different. As soon as I start closing the gate, the sinusoidal pressure wave starts and converge until the end of the simulation


I am now working to resolve this problem

Thanks both of you for your help

Dominic

mausam24 November 21, 2012 00:02

Cavitation in Francis Turbine
 
Can get any ideas on to perform cavitation in Francis Turbine with CFX:confused:

mausam24 November 21, 2012 00:07

Cavitation in Francis Turbine
 
Can get any ideas on to perform cavitation in Francis Turbine with CFX:confused:

gbettega October 27, 2014 10:51

compressible or not?
 
Hello,
in the attached ccl file both at the inlet, and both at the outlet the flow regime has been defined as SUBSONIC. How to obtain wave propagation with these settings?
Regards
Giovanni


All times are GMT -4. The time now is 07:40.