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

CFX & Tait EOS

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2015, 16:07
Default CFX & Tait EOS
  #1
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Hi to everyone,

I have implemented the Tait equation of state in CFX in order to simulate the propagation of waves inside a weakly compressible liquid (such as water). The EOS has the form:

p(rho) = B*((rho/rho0)^n-1)-pref

where B=rho0*c0^2/n and rho0 and c0 are the reference density and speed of sound respectively. For water these are rho0=998.2kg/m3 and c0=1500m/s (also lets assume that pref=0Pa).

I have tried to check how this model works in a shock tube case. For comparison I have used a density based solver of mine and the exact Riemann solver. The shock tube has: (x<0, rho=1050kg/m3, U=0, p=136897106.1) and (x>0, rho=999kg/m3, U=0, p=1804442.093). The computational mesh is trivial and Cartesian, with a span from -2 to 2 and a resolution of dx=0.004.

The analytic solution with the exact solver is:
rho_star=1025.152kg/m3
u_star=40.462m/s
p_star= 65917422Pa

As can be seen in the image, the density based solver (blue line) get the Riemann solution correctly. On the other hand, even if CFX (red line) predicts more or less the same pattern, it produces lots of wiggles and underesimates the u_star.

The settings used in CFX can be found in the attached ccl. Briefly:
- 2nd order backward Euler in time
- High resolution for advection
- compressible timestepping = t
- global max courant 0.75

Indicative output is posted in the out_sample.zip file. It is a sample, since I cannot upload the full out file, but more or less the pattern is the same, the MAX residuals are well below 10^-5 and the variable ranges are reasonable (no variable clipping..).

Has anyone else experienced this? Are there any suggestions on how to improve the performance of the solver, while maintaining high accuracy for the resolution of pressure waves?

Any thoughts are welcome.
Thanks in advance
Attached Images
File Type: jpg Tait_cfx.jpg (21.4 KB, 43 views)
Attached Files
File Type: txt Tait.ccl.txt (20.8 KB, 20 views)
File Type: zip out_sample.zip (44.6 KB, 10 views)

Last edited by fivos; February 4, 2015 at 16:10. Reason: Improved image quality & clarity
fivos is offline   Reply With Quote

Old   February 4, 2015, 16:30
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
These wiggles are a well known result of the numerical discretisation in a mesh based Navier Stokes solver. I discuss this in my PhD where I used 1D shock tube flow as a validation case: https://opus.lib.uts.edu.au/research/handle/2100/248 section 5.2, and there is lots of literature and textbooks on this topic as well.

In short:
* The wiggles are inherent in a second order discretisation.
* You can eliminate the wiggles by going to first order but then you loose fidelity of the shock wave.
* The hi-res advection scheme is about as good as you are going to get in CFX to reduce them.
* Likewise for temporal discretisation. Second order gets you closer to the ideal shock wave but gives you wiggles. First order reduces the wiggles but has more diffusion.
* A finer mesh will reduce the wiggles
* A time step sensitivity study can also reduce the wiggles.
ghorrocks is offline   Reply With Quote

Old   February 4, 2015, 17:47
Default
  #3
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Hi ghorrocks,

thank you for your answer, I will take a look in your Phd, however I do not completely agree with your explanation. A pure (i.e. unlimited) second order solver (or higher) will produce numerical overshoot/undershoot and this is natural and well known (as Godunov theorem, numerical dispersion ,gibbs phenomenon etc...). However no one uses an unlimited high order scheme, because it is practically useless; something is introduced either slope limiting, flux limiting, or artificial viscosity to make the method Total Variation Diminishing (TVD). For example the density based solver of which the results I compared to CFX is 2nd order accurate in space (MUSCL & SuperBee limiter) and 4th in time (RK4), yet it does not produce significant wiggles, only some minor, hardly even noticeable at the shock wave.

I do not recall what exactly CFX uses for High Resolution, but I cannot believe that a code as CFX, oriented towards compressible stuff, LES, aeroacoustics and, generally, high fidelity simulations has not TVD schemes to prevent significant oscillations from building up, since these would ruin such simulations.

I think that this could be more related to inappropriate limiter choice or something like that.

Again thanks and any thoughts are welcome.
fivos is offline   Reply With Quote

Old   February 4, 2015, 18:14
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The Hires scheme in CFX is effectively a TVD scheme. See the theory manual for further details.

I do not know what density based solver you used for why it does not produce wiggles, but all pressure based CFD software I know produces wiggles or smears the shock wave. And all the CFD software I have used have some form of TVD scheme, so TVD does not eliminate the problem, just reduce it.

The results you posted have a lot of very high frequency wiggles at the shock. A lot more and much higher frequency than I normally see with my work. So in your case I suspect the unusual EOS is making the numerics additionally unstable to make the wiggles much worse than normal. What does it look like when you use ideal gas for your EOS?

(Yay! That is my 10000th post. That's a lot of typing )
ghorrocks is offline   Reply With Quote

Old   February 5, 2015, 04:51
Default
  #5
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Hi ghorrocks,

The density based solver I am using is based on the work of Toro and Irvings (http://onlinelibrary.wiley.com/doi/1...O;2-S/abstract); essentially it is a primitive variable solver (p, u, rho), with MUSCL reconstruction and Superbee limiter. I did not say it does not produce wiggles; it does produce, but only minor (something similar to what you get in your phd - I agree with you that all high order schemes will produce some sort of wiggles, but not the mess I got..).

Probably, the oscillations are due to increased stiffness of the EOS I have used, i.e. small density changes produce large pressure changes. I have seen in the past that not that stiff EOS (like the ideal gas), do not cause so much wiggling..

In you PhD you used some more tricks, like modifying the standard Rhie-Chow pressure interpolation, quadratic timestepping (?) in CFX.. are these available in new CFX versions? (I have seen the Rhie-Choow option, but not the other modifications you mention in the phd).

Thanks in advance
fivos is offline   Reply With Quote

Old   February 5, 2015, 05:24
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
My PhD was on CFX4. This was the structured mesh predecessor of the current unstructured mesh CFX. It was also a SIMPLE based solver so it had quite different numerics to the current CFX. So there will be options I used on my PhD which are not available in the current CFX.

As your EOS is quite stiff as you say I suggest you do some experiments with the CFX options for the Rhie-Chow, pressure interpolation and the other related stuff. Also have a look at the expert parameters. I bet you can find some options which reduce the wiggles. I do not often suggest playing with solver parameters but I suspect this is a case where it might be called for.
ghorrocks is offline   Reply With Quote

Old   February 5, 2015, 12:22
Default
  #7
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Thanks ghorroks,

I will try to find if behaviour can be improved through advanced solver options/expert parameters.

And, by the way, I wish you to reach 100K posts
fivos is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CFX Treatment of Laminar and Turbulent Flows Jade M CFX 18 September 15, 2022 07:08
CFX pressure in Simulations problem nasdak CFX 1 April 14, 2010 13:22
Different flow pattern between OpenFOAM and CFX AirS OpenFOAM 0 January 12, 2010 07:08
PhD using CFX Rui CFX 9 May 28, 2007 05:59
FSI using CFX and ANSYS Bi Chang CFX 2 May 10, 2005 04:47


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