
[Sponsors] 
How to make the water slightly compressible in CFX? 

LinkBack  Thread Tools  Search this Thread  Display Modes 
July 3, 2011, 05:05 
How to make the water slightly compressible in CFX?

#1 
New Member
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13 
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 

July 3, 2011, 08:00 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
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. 

July 3, 2011, 10:51 

#3 
New Member
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13 
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 

July 3, 2011, 20:03 

#4 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
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. 

July 3, 2011, 23:22 

#5 
New Member
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13 
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. 

July 4, 2011, 07:26 

#6 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
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? 

July 4, 2011, 09:29 

#7 
New Member
John
Join Date: Mar 2011
Posts: 7
Rep Power: 13 
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?


July 4, 2011, 10:08 

#8 
Senior Member
Join Date: Apr 2009
Posts: 531
Rep Power: 19 
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.


March 11, 2016, 11:33 

#9  
New Member
Dr Matyas Benke
Join Date: Aug 2012
Location: Cranfield, Bedfordshire, UK
Posts: 1
Rep Power: 0 
Quote:
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) 

February 10, 2020, 05:12 

#10 
New Member
Patrick
Join Date: Feb 2020
Posts: 7
Rep Power: 4 
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 cfxpost). 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! 

February 10, 2020, 17:34 

#11 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
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. 

February 11, 2020, 06:31 

#12 
New Member
Patrick
Join Date: Feb 2020
Posts: 7
Rep Power: 4 
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. 

February 11, 2020, 17:32 

#13 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
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. 

February 12, 2020, 04:25 

#14 
Senior Member
GertJan
Join Date: Oct 2012
Location: Europe
Posts: 1,637
Rep Power: 25 
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 Density998.7 [kg/m3] and monitor this variable in the solver manager. This removes at least 4 irrelevant digits. Btw, the same applies for CFDPost. 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 .dirfolder 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, GertJan Last edited by GertJan; February 12, 2020 at 05:30. 

February 12, 2020, 07:20 

#15 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135 
Hi GertJan: 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. 

Tags 
compressible flow, porous media 
Thread Tools  Search this Thread 
Display Modes  


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 