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

How to make the water slightly compressible in CFX?

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

Like Tree1Likes
  • 1 Post By womo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2011, 05:05
Default How to make the water slightly compressible in CFX?
  #1
New Member
 
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13
womo is on a distinguished road
Dear all,

I am doing a simulation of flow in porous media and came into a problem. Someone suggest me to make the water slightly compressible. I worked on it for several days but still can not make it. Could anyone help me on it? What settings I need to do to make the water slightly compressible in CFX? Many thanks for your help.

Regards
John
wmplcfd likes this.
womo is offline   Reply With Quote

Old   July 3, 2011, 08:00
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Why do you think slightly compressible water will help? Is it likely that the density change is going to be significant? If not then I guarantee it will not help. Your problem is just obtaining convergence.

But compressible water is easy. Get the bulk modulus from google or somewhere, and define density as a function of pressure. I have done it many times and it works fine. And this is not a simplification, you are actually adding more physics to your model so your model will get more accurate - if compressibility is important.
ghorrocks is offline   Reply With Quote

Old   July 3, 2011, 10:51
Default
  #3
New Member
 
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13
womo is on a distinguished road
Dear ghorrocks,

Thank you so much for your reply. I set the "Heat Transfer" of fluid model to "Total Energy" and defined the water density as "( 997 / (1 - (Absolute Pressure - 101325 [Pa] ) / 2.04e9 [Pa] )) [kg m^-3]". Moreover, a minimum absolute pressure of 1000Pa and a maximum one of 1e6 Pa are set in "Table Generation". However, the model can not work at all. No information is given, even no error code. Could you please help me to figure out the problem in compressibilty setting or is there any other experience of it? Thank you for your kind help.

Regards
John
womo is offline   Reply With Quote

Old   July 3, 2011, 20:03
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Do not use Total energy, just the default isothermal is fine.

Please post your out file to help us diagnose the problem.

But as I said previously, if you are doing this because you have convergence problems this will not help. It is more likely to make it worse.
ghorrocks is offline   Reply With Quote

Old   July 3, 2011, 23:22
Default
  #5
New Member
 
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13
womo is on a distinguished road
Hi ghorrocks,

I turn the total energy to isothermal as your suggestion, but a new problem comes out as bellow:

+--------------------------------------------------------------------+
| ****** Notice ****** |
| While evaluating Static Enthalpy, |
| Absolute Pressure |
| went outside of its lower limit. Its minimum value was |
| -4.3028E+10. The bounds error was handled by clipping. |
| If this situation persists, consider increasing the table range. |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Stopped in routine ENFORCE_BOUNDS |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

I am doing a model of water flowing over a porous medium, with mesh deformation in the water domain. The model can run without mesh deformation in water domain, but can not work with the mesh deformation. Others have suggested to make the water slightly compressible to solve the problem.
womo is offline   Reply With Quote

Old   July 4, 2011, 07:26
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Like I have said, adding compressibility will make convergence worse, not better.

If you have convergence problems forget about compressibility and deal with the convergence problem. Do you intend to run this model incompressible? If you run it incompressible what happens?
ghorrocks is offline   Reply With Quote

Old   July 4, 2011, 09:29
Default
  #7
New Member
 
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13
womo is on a distinguished road
I have run the incompressible model. It can run without mesh deformation of water domain, but can not work with mesh deformation. That's why I would like to try the compressible model. How can I make the porous domain work together with the moving mesh water domain?
womo is offline   Reply With Quote

Old   July 4, 2011, 10:08
Default
  #8
Senior Member
 
Join Date: Apr 2009
Posts: 531
Rep Power: 19
stumpy is on a distinguished road
Please describe more details of the case. Total Energy with compressible water is the correct approach to resolve acoustic waves in water (e.g. water hammer), but it's not clear that this is what you want to do. If your timescale is small enough to resolve acoustic waves generated by a moving boundary then this might be a valid approach.
stumpy is offline   Reply With Quote

Old   March 11, 2016, 11:33
Default
  #9
New Member
 
Dr Matyas Benke
Join Date: Aug 2012
Location: Cranfield, Bedfordshire, UK
Posts: 1
Rep Power: 0
benkematya is on a distinguished road
Quote:
Originally Posted by womo View Post
Dear ghorrocks,

Thank you so much for your reply. I set the "Heat Transfer" of fluid model to "Total Energy" and defined the water density as "( 997 / (1 - (Absolute Pressure - 101325 [Pa] ) / 2.04e9 [Pa] )) [kg m^-3]". Moreover, a minimum absolute pressure of 1000Pa and a maximum one of 1e6 Pa are set in "Table Generation". However, the model can not work at all. No information is given, even no error code. Could you please help me to figure out the problem in compressibilty setting or is there any other experience of it? Thank you for your kind help.

Regards
John

Folks, the equation is similar to the linearised Tait equation, only the CFX implementation is buggy.

The correct formula would be:

997[kg/m3] * ((Abs.Press - 101325 [Pa]) / 2.04e9 + 1.0)
benkematya is offline   Reply With Quote

Old   February 10, 2020, 05:12
Default
  #10
New Member
 
Patrick
Join Date: Feb 2020
Posts: 7
Rep Power: 4
TUD_FT is on a distinguished road
Hi,

i also simulate compressible water flows and using a linearised Tait equatuion such as previously recommended. Moreover, I set the heat transfer option to isothermal.

Now i have some problems with the calculation of density. As you can see in the pictures the density calculation looks like a stairway. Because of this i get jumps in the determination of the local speed of sound. This is physically not valid.

I want to have a smooth function for the density and the local speed of sound.Preferably, the local speed of sound becomes constant by 1484m/s. Becauce of the isothermal heat transfer the local speed of sound shouldn’t change with the tempreature (the tempreature is constant, as i can see in the solver manager or in cfx-post). Furthermore, the pressure based change oft the density shouldn’t influence the local speed of sound, because the relationship between pressure and density is linear. It applies: dp/droh = a^2 --> a = konst. for my assumptions

What do I wrong? How can I get smooth functions for density and local speed of sound? I also vary my cell size and makes sure, that CFL is less than 1, but it didn’t help. I suspect that i have to change some settings in the solver control, but im not sure.


Greetings!
Attached Images
File Type: jpg Pressure.JPG (54.1 KB, 24 views)
File Type: jpg Density.JPG (49.5 KB, 22 views)
File Type: jpg Speed of Sound.JPG (62.4 KB, 19 views)
TUD_FT is offline   Reply With Quote

Old   February 10, 2020, 17:34
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You variations in density are small. You chart does not resolve the variation you are seeing, it just shows 998.3 for everything, so the variation you are getting is much smaller than that.

I suspect the problem is related to resolution in density. Here are some ideas of where that might come from:
* Check the material properties table generation. You might need to change the defaults to give you more resolution in your material properties around the conditions of interest to you.
* Check your reference temperatures and pressures, especially your buoyancy reference pressure (if you have one). Make sure they are set correctly.
* Use double precision numerics.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   February 11, 2020, 06:31
Default
  #12
New Member
 
Patrick
Join Date: Feb 2020
Posts: 7
Rep Power: 4
TUD_FT is on a distinguished road
Thank you for your answer!

Yesterday i tried some new settings and i used double precision, which works really well. Furthermore, i changed the material model from a linearised Tait equatuion to the IAPWS libary. From my point of view, this libary is really useful and a nice way to represent the compressibity of water. With this settings, the simulation works very well. I use it to simulate the sound propagation in water.

My reference states are all set correctly, i have checked it.

Table generation is an aspect that i can propably improve. I set the maximum and minimum values for temperature and pressure to suitable values. Moreover, i increase the number of points to 500. I hope this is enough to add more resolution to my material properties.

One more (and hopefully last) question: How can i add more digits after the decimal point in the monitors of the CFX Solver Manager? I want to take a closer look at the change of density.
TUD_FT is offline   Reply With Quote

Old   February 11, 2020, 17:32
Default
  #13
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Not sure if you can add more precision to Solver Manager. All I can suggest is to look at the available options and see if you can find it.

If you need more accuracy then you probably should extract your data straight out of the results file rather than using solver manager. Have a look at the command line tool CFX5mondata.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   February 12, 2020, 04:25
Default
  #14
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,637
Rep Power: 25
Gert-Jan will become famous soon enough
I had exactly the some problem with temperatures where I added small amounts of energy to my fluid. I noticed that it is impossible to add more precision to the graphs in the solver manager. It is possible to perform a calculation in double precision. But the solver manager stays in single precision. It is simply not able to create plots in double precision.

There are 2 options:
- the easiest way is to remove digits. You can create a "density difference" variable equal to Density-998.7 [kg/m3] and monitor this variable in the solver manager. This removes at least 4 irrelevant digits. Btw, the same applies for CFD-Post. This is also in single precision!!!! Plotting density in a chart will give discontinuous lines, whereas you have a higher chance for continuous lines when plotting this density difference.
- you can perfrom a run with the solver argument "-save". The result is that at the end of the run, the temporary .dir-folder is kept, in which you find a file named "mon". This text file contains the monitoring data. If you run in double precision, the data in this file is in double precision. Open it in a spread sheet and create your own graphs.

Good luck, Gert-Jan

Last edited by Gert-Jan; February 12, 2020 at 05:30.
Gert-Jan is offline   Reply With Quote

Old   February 12, 2020, 07:20
Default
  #15
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Hi Gert-Jan: The "cfx5mondata" command does your second recommendation, and it is arguably a bit more elegant. But beauty is in the eye of the beholder, and if it works for you then it is all good.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply

Tags
compressible flow, porous media

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
Pros and Cons for CFX, CFdesign, COMSOL Val Main CFD Forum 3 June 10, 2011 03:20
Water pump OpenFOAM 15 ANSYS CFX 110 comparation waynezw0618 OpenFOAM Running, Solving & CFD 39 March 5, 2009 13:57
FOAM installation error gcc amp g hanks OpenFOAM Installation 9 January 26, 2006 15:14
CFX 4.4 installation problem Pandu Sattvika CFX 1 December 1, 2001 05:07
File export from CFX 5.3 Sinjae Hyun CFX 1 July 12, 2000 10:20


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