CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Multiphase simulation with RPG table (https://www.cfd-online.com/Forums/cfx/206977-multiphase-simulation-rpg-table.html)

Lucy089 September 20, 2018 11:05

Multiphase simulation with RPG table
 
Hi everyone,


I am trying to simulate with Ansys CFX a very simple quasi 2D case with liquid nitrogen in order to investigate cavitation.
In order to better match the numerical results with the experimental ones I want to use real gas properties. I have Refprop so I used the RPG generator recommended by Ansys to generate a table for nitrogen (https://support.ansys.com/portal/sit...extfmt=default).

For the table generation I use following ranges:
Tmin-Tmax: 63.5K – 200K; Pmin-Pmax: 6.9Pa – 50e5Pa with respectively 150 points.
In Ansys CFX I create two materials using the same RPG table: for liquid nitrogen I specify N2 and for gaseous nitrogen N2VAP.
First, I just want to simulate both phases but without cavitation in order to get an initial solution. I use the homogeneous model Total Energy for the heat transfer specifying the static temperature of 77.64 K at inlet. The boundary conditions are:
Inlet --> velocity 10 m/s and static temperature
Outlet --> static pressure 7e5 Pa

The simulation starts, however I get this warning from the first iteration:
+--------------------------------------------------------------------+
| Table bounds warnings at: END OF TIME STEP |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| |
| Independent variables went out of bounds while computing the |
| variables listed below using table interpolation. In each case |
| the bounds error was handled by clipping or extrapolation. |
| If this situation persists, consider increasing the table range. |
| |
+--------------------------------------------------------------------+
| |
| Location Name : Fluid |
| Mesh location : VERTICES |
| Routine : UPD_LOCALE_PROP1 |
| Partition : 32 |
| Variable Name : N2Liquid.Temperature |
| Ind. Variable : N2Liquid.Static Enthalpy |
| Bound : Upper |
| Max Value : -1.2073E+05 |
| Handled By : Extrapolation |
| |
+--------------------------------------------------------------------+


It seems that the ranges for the table generation have to be increased. Therefore, I have changed it to the possible max and min but the problem persists.
Furthermore, the results that I am getting do not make any sense.
The enthalpy should be around -121 kJ and I get -2.5 kJ. Consequently, the temperature is not correct: it should be 77.64 K and I get over the entire domain 123.6 K, which is by the way the maximal saturation temperature. And of course all other fluid properties are wrong.

It’s four days that I am trying to fix the problem, I have read several threads here in the forum, but I really don’t know how to fix the problem.
I don’t understand if CFX is wrongly reading the RPG table or if the RPG table itself is wrong.

Any idea or suggestions? Please I really need your help!!!

ghorrocks September 20, 2018 18:37

You should not define your properties table so tightly about your expected result. As CFX converges the solver is likely to use some way-off values of properties before it homes in as it converges. Also, numerical artefacts like overshoots and wiggles means that even a converged solution will probably exceed expected bounds on properties.

So make the property table much wider for temperature and pressure and that will help.

Lucy089 September 21, 2018 04:28

1 Attachment(s)
Thank you very much for the reply!

Ok, now I have increased the bounds to:
Tmin-Tmax: 22K – 5000K
Pmin-Pmax: 6Pa – 2e9 Pa

But it doesn’t help, I get the same problem.
The interesting thing is that in the warning it is written that the max value of the static enthalpy is -121 kJ/kg which is in fact the enthalpy that I should get with 77 K. But:
1) Looking in the table this is not the max value
2) Looking into the results the static enthalpy is about 5.8 kJ/kg

I don’t understand what CFX is doing because the static enthalpy is defined in the Theory guide as: h_stat = u_stat+p_stat/rho_stat. I suppose u_stat is the enthalpy taken from the table, p_stat is calculated but what about rho_stat?

I have attached also the CCL of my simulation. Perhaps there is a mistake that I can’t see…

ghorrocks September 21, 2018 06:32

By the way, does this simulation converge properly if you use constant properties? Define your nitrogen with representative constant properties and make sure you can converge with that simple model. If the simple does not converge you have no hope with the RGP model.

Also, I have never seen anybody use real gas properties with a cavitation model before. Getting cavitation models to converge in constant properties is hard enough without adding the extra complexity of real gas properties. You may have to simplify your gas model to get convergence.

Lucy089 September 21, 2018 07:30

4 Attachment(s)
Several researchers numerically investigate cavitation using real gas properties. Here some examples of the same case/ geometry that I am trying to simulate:
https://www.sciencedirect.com/scienc...11227517303521
https://www.sciencedirect.com/scienc...11227515000570
http://fluidsengineering.asmedigital...icleid=1430135

The first one even use CFX and the NIST databank, so I know that it is feasible. I have tried to contact the author but I didn’t get an answer yet.

The simulation with constant properties converge very well. However, the numerical results do not match properly the experimental one and I am quite sure that the cause is the missing temperature dependency of the fluid properties. Therefore, I have started to use RPG tables but something is wrong and I can’t figure out what…
I have the impression that the table that I am using is somehow defect. For example, there is a saturation table after TABLE_9, but the saturation table is not listed in the header.
However, since I define in the material tab the Thermodynamic State Liquid or Gas (see pictures below) it shouldn’t make any difference…

LUO DAN October 15, 2018 09:13

Why you chose "Gas Phase Combustion" in material group rather than "user"??

Lucy089 October 15, 2018 09:38

@ Luo Dan: Which benefit would bring me switching to user?

By the way, I have spoken with Ansys and fixed the probelm!
Since my fluid is cryogenic I have to "tell" to CFX how to deal with the RPG table. First, you have to enable the beta features Edit->Options->General->Beta Options. The selection of the RPG Liquid Properties is then visible in the GUI and you have to switch from "saturated" to "subcooled".
Now the RPG table is working! However, when using the RPG it is better to do a sensitivity study of the parameters Tmin Tmax Pmin and Pmax for the table generation. I have noticed that depending on these parameters the fluid properties such as static enthalpy, static entropy, density, etc vary a lot and I have tried different ranges in order to match the values given in NIST.

LUO DAN October 16, 2018 01:54

1 Attachment(s)
But liquid Phase Combustion is a material group, while RGP is generated by external procedure, so we choose user. As for RGP liquid properities, we can edit in "material properties".

LUO DAN October 16, 2018 01:57

hi lucy,
Can you share the rgp generator with me by the dropbox link? I donot have an ANSYS account. I will appreciate it. Thank you!


All times are GMT -4. The time now is 02:56.