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

CFX simulation of trans-critical CO2 does not converge

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ghorrocks
  • 1 Post By evcelica

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2024, 03:59
Default CFX simulation of trans-critical CO2 does not converge
  #1
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Description of the problem: The physical model is a labyrinth seal, the inlet is supercritical state, and the outlet is two-phase state.

Numerical methods: Given the total temperature and total pressure at the inlet, given the static pressure at the outlet, RGP (real gas property) was used for CO2 physical properties, HBM (homogeneous binary mixture) model was used for two-phase simulation.

Current problems: My current practice is to fix the inlet pressure and gradually reduce the outlet pressure. Once the outlet pressure is reduced a lot, especially near the critical point, the value begins to oscillate and not converge, and the import and export mass flow rate is not conserved.

There are researchers who use CFX to do trans-critical CO2 numerical simulation work, please give some suggestions, whether in terms of physical properties, or pre-treatment Settings, grid ... Thank you very much.
w sy is offline   Reply With Quote

Old   November 20, 2024, 05:59
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
This is a very complex model and there are many, many things which could be causing your issues. You have not given enough detail for me to make specific suggestions, but definitely have a read of this FAQ: https://www.cfd-online.com/Wiki/Ansy...gence_criteria

As it discusses the general approach for convergence difficulties.

But one specific suggestion I will make is: For a multiphase model with complex material properties the quality of the mesh will be vital. So any efforts you make in improving your mesh will help, even if you think your current mesh is "OK". This model is going to be more demanding on mesh quality than normal, so extra effort to get the mesh quality improved will help a lot.
Opaque likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   November 20, 2024, 10:00
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 1,875
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by w sy View Post
Description of the problem: The physical model is a labyrinth seal, the inlet is supercritical state, and the outlet is two-phase state.

Numerical methods: Given the total temperature and total pressure at the inlet, given the static pressure at the outlet, RGP (real gas property) was used for CO2 physical properties, HBM (homogeneous binary mixture) model was used for two-phase simulation.

Current problems: My current practice is to fix the inlet pressure and gradually reduce the outlet pressure. Once the outlet pressure is reduced a lot, especially near the critical point, the value begins to oscillate and not converge, and the import and export mass flow rate is not conserved.

There are researchers who use CFX to do trans-critical CO2 numerical simulation work, please give some suggestions, whether in terms of physical properties, or pre-treatment Settings, grid ... Thank you very much.
I assume you have already simulated the ideal gas case, regardless if the phase change or trans-critical properties are not exact.

How did that case converge? What adjustments out of the ordinary did you make?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   November 20, 2024, 10:22
Default reply
  #4
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
This is a very complex model and there are many, many things which could be causing your issues. You have not given enough detail for me to make specific suggestions, but definitely have a read of this FAQ: https://www.cfd-online.com/Wiki/Ansy...gence_criteria

As it discusses the general approach for convergence difficulties.

But one specific suggestion I will make is: For a multiphase model with complex material properties the quality of the mesh will be vital. So any efforts you make in improving your mesh will help, even if you think your current mesh is "OK". This model is going to be more demanding on mesh quality than normal, so extra effort to get the mesh quality improved will help a lot.
First of all, thank you very much for your attention and suggestions. I will seriously consider your suggestions, which will be very helpful for me to solve the problem.

My model comes from other people's references. It is a labyrinth seal, but it has only one tooth, so the geometry is relatively simple. The grid is divided into structured grids using ICEM software, the mesh quality is very high, and the near wall is encrypted.

The current situation is as follows: for example, when the given inlet pressure is 10MPa(A), the calculation can be convergent when the outlet pressure is 9.2MPa(A). However, when the outlet pressure continues to decrease, such as to 8.5MPa(A), the calculation will not collapse, but the outlet mass flow rate starts to fluctuate, and the relative deviation of the inlet and outlet flow rate is nearly 10%. I suspect that this may be related to the physical properties of CO2, because the physical properties of CO2 change extremely violently near the critical point, and when the outlet gets closer and closer to the critical state point, the value is unstable.
w sy is offline   Reply With Quote

Old   November 20, 2024, 10:36
Default reply
  #5
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by Opaque View Post
I assume you have already simulated the ideal gas case, regardless if the phase change or trans-critical properties are not exact.

How did that case converge? What adjustments out of the ordinary did you make?
First of all, thank you very much for your attention and suggestions. Your way of dealing with the problem is very good.

I haven't done a simulation of the ideal gas yet. My model is derived from other people's references, and my aim is to cite his experiments to validate my numerical method. In the original article, a labyrinth seal was tested under several working conditions. The inlet pressure and temperature of each group were fixed, and only the outlet pressure was changed. I am currently calculating convergence in two conditions. The inlet pressure is 10MPa(A). When my outlet pressure drops to, for example, 8.5MPa(A), the calculation does not converge, and the residual level remains between 10e-2 and 10e-3. The relative deviation of the inlet and outlet flow is nearly 10%, and the outlet flow has been fluctuating.

What I have done so far:
1. I have tried different resolution grids;
2. Adjusted the auto timescale from 0.0001 to 1;
3. The discrete accuracy (upwind/high resolution) of advection scheme and turbulence numerics is adjusted;
4. Tried the temperature and pressure range of different RGP(real gas property) tables, as well as the temperature and pressure interval;
w sy is offline   Reply With Quote

Old   November 20, 2024, 10:54
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,875
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by w sy View Post
First of all, thank you very much for your attention and suggestions. Your way of dealing with the problem is very good.

I haven't done a simulation of the ideal gas yet. My model is derived from other people's references, and my aim is to cite his experiments to validate my numerical method. In the original article, a labyrinth seal was tested under several working conditions. The inlet pressure and temperature of each group were fixed, and only the outlet pressure was changed. I am currently calculating convergence in two conditions. The inlet pressure is 10MPa(A). When my outlet pressure drops to, for example, 8.5MPa(A), the calculation does not converge, and the residual level remains between 10e-2 and 10e-3. The relative deviation of the inlet and outlet flow is nearly 10%, and the outlet flow has been fluctuating.

What I have done so far:
1. I have tried different resolution grids;
2. Adjusted the auto timescale from 0.0001 to 1;
3. The discrete accuracy (upwind/high resolution) of advection scheme and turbulence numerics is adjusted;
4. Tried the temperature and pressure range of different RGP(real gas property) tables, as well as the temperature and pressure interval;
It is not trivial to isolate the root of the instability for complex models. Like in any area, it is best to learn the basics and increment complexity.

Attempt to run the same model using ideal gas, and see what happens. If the instability stays there, perhaps softer, you know the problem is not real gas. If it goes away regardless how much you change the outlet pressure -> thermodynamic non-linearity impacting the convergence.

Even if the problem is real gas, my next step would be "real gas ONLY". Remove the binary mixture, and use the "real gas model" for the gas phase ONLY, rinse and repeat.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   November 20, 2024, 11:08
Default reply
  #7
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by Opaque View Post
It is not trivial to isolate the root of the instability for complex models. Like in any area, it is best to learn the basics and increment complexity.

Attempt to run the same model using ideal gas, and see what happens. If the instability stays there, perhaps softer, you know the problem is not real gas. If it goes away regardless how much you change the outlet pressure -> thermodynamic non-linearity impacting the convergence.

Even if the problem is real gas, my next step would be "real gas ONLY". Remove the binary mixture, and use the "real gas model" for the gas phase ONLY, rinse and repeat.
Thank you very much. Next I will take your advice and try it.

For example, phase transition will occur only when the outlet pressure is lower than 7MPa, while no phase transition will occur when the inlet pressure is higher than 7MPa. Therefore, when I calculate the outlet pressure of 8.5MPa, I do not use the binary mixture model, but only give pure CO2 gas, and the situation of non-convergence is the same as that with the binary mixture.
w sy is offline   Reply With Quote

Old   November 20, 2024, 14:36
Default
  #8
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,188
Rep Power: 23
evcelica is on a distinguished road
What Temperature range is this simulation?
The previous suggestions are great, I'd follow those first.

Why Pressure IN and Pressure OUT conditions? Why not Mass Flow Inlet and Pressure Outlet, which is known to be much more stable. Even Pressure IN and MassFlow Out would be better than Pressure/Pressure, which can be a pain. Then you can tune your boundary conditions or create flow curves and you can get the same results as you wanted with your Pressure/Pressure conditions, just with better numerical stability.

I know you said you studied table step size, but this would be one suggestion to make it very fine, even several hundred MB .rgp file is no big deal.
What .rgp file writer are you using? ANSYS has a great one built in which uses python. I found it better than NISTtoRGP program I used previously.
Opaque likes this.
evcelica is offline   Reply With Quote

Old   November 20, 2024, 15:29
Default
  #9
Senior Member
 
Join Date: Jun 2009
Posts: 1,875
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by evcelica View Post
What Temperature range is this simulation?
The previous suggestions are great, I'd follow those first.

Why Pressure IN and Pressure OUT conditions? Why not Mass Flow Inlet and Pressure Outlet, which is known to be much more stable. Even Pressure IN and MassFlow Out would be better than Pressure/Pressure, which can be a pain. Then you can tune your boundary conditions or create flow curves and you can get the same results as you wanted with your Pressure/Pressure conditions, just with better numerical stability.

I know you said you studied table step size, but this would be one suggestion to make it very fine, even several hundred MB .rgp file is no big deal.
What .rgp file writer are you using? ANSYS has a great one built in which uses python. I found it better than NISTtoRGP program I used previously.
Thank you for noticing this. I assumed P_t at the inlet.

Static Pressure inlet -> Static Pressure outlet setup is doomed to fail. It is an ill-conditioned setup.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   November 20, 2024, 20:36
Default reply
  #10
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by evcelica View Post
What Temperature range is this simulation?
The previous suggestions are great, I'd follow those first.

Why Pressure IN and Pressure OUT conditions? Why not Mass Flow Inlet and Pressure Outlet, which is known to be much more stable. Even Pressure IN and MassFlow Out would be better than Pressure/Pressure, which can be a pain. Then you can tune your boundary conditions or create flow curves and you can get the same results as you wanted with your Pressure/Pressure conditions, just with better numerical stability.

I know you said you studied table step size, but this would be one suggestion to make it very fine, even several hundred MB .rgp file is no big deal.
What .rgp file writer are you using? ANSYS has a great one built in which uses python. I found it better than NISTtoRGP program I used previously.
Thank you very much for your attention and suggestions.

About Temperature/pressure range: 10~3.4 MPa 318.98~272.28 K (covering all working conditions)

As for boundary conditions: The pressure inlet/mass flow outlet was tried before, but unfortunately the situation that emerged was similar to the given pressure inlet/pressure outlet.

About RGP: I currently use the code written by myself to generate the RGP table. I don't know much about NISTtoRGP you mentioned and the built-in code of ANSYS, please tell me where I can get these codes, thank you.
w sy is offline   Reply With Quote

Old   November 20, 2024, 20:47
Default
  #11
Senior Member
 
Join Date: Jun 2009
Posts: 1,875
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by w sy View Post
Thank you very much for your attention and suggestions.

About Temperature/pressure range: 10~3.4 MPa 318.98~272.28 K (covering all working conditions)

As for boundary conditions: The pressure inlet/mass flow outlet was tried before, but unfortunately the situation that emerged was similar to the given pressure inlet/pressure outlet.

About RGP: I currently use the code written by myself to generate the RGP table. I don't know much about NISTtoRGP you mentioned and the built-in code of ANSYS, please tell me where I can get these codes, thank you.
What release of the Ansys CFX Solver are you using?

Are you familiar with all the nuisances of the equation of state within the dome, just below the critical point?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   November 20, 2024, 22:02
Default
  #12
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by Opaque View Post
What release of the Ansys CFX Solver are you using?

Are you familiar with all the nuisances of the equation of state within the dome, just below the critical point?
Thank you very much.

I am using ANSYS CFX 20.1, 2018 and 2024 versions which I have tried.

At present, even if the phase transition is not considered, when the outlet pressure is above the critical point, that is, they are all in a supercritical state, the calculation does not converge. Of course, the problem becomes more complicated when the calculation is within the dome.
w sy is offline   Reply With Quote

Old   November 21, 2024, 03:55
Default
  #13
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Doesn't this mean that it is looking likely the simulation is transient and therefore will never converge steady state? You will find that discussed in the FAQ I posted way back in post #2.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   November 22, 2024, 04:03
Default reply
  #14
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Doesn't this mean that it is looking likely the simulation is transient and therefore will never converge steady state? You will find that discussed in the FAQ I posted way back in post #2.
Thank you very much.

I am currently considering and implementing transient computing, and this idea really comes from your posted FAQ.
w sy is offline   Reply With Quote

Old   November 22, 2024, 04:06
Default
  #15
New Member
 
Join Date: Nov 2024
Posts: 8
Rep Power: 2
w sy is on a distinguished road
Quote:
Originally Posted by w sy View Post
Description of the problem: The physical model is a labyrinth seal, the inlet is supercritical state, and the outlet is two-phase state.

Numerical methods: Given the total temperature and total pressure at the inlet, given the static pressure at the outlet, RGP (real gas property) was used for CO2 physical properties, HBM (homogeneous binary mixture) model was used for two-phase simulation.

Current problems: My current practice is to fix the inlet pressure and gradually reduce the outlet pressure. Once the outlet pressure is reduced a lot, especially near the critical point, the value begins to oscillate and not converge, and the import and export mass flow rate is not conserved.

There are researchers who use CFX to do trans-critical CO2 numerical simulation work, please give some suggestions, whether in terms of physical properties, or pre-treatment Settings, grid ... Thank you very much.
Sincerely welcome to do the SCO2 researchers to join the discussion, express your views, share your problems and solutions, and so on, we will make progress together.
w sy is offline   Reply With Quote

Reply


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
Simulation results of cfx and fluent are different. dhehdxhdaus FLUENT 1 August 10, 2022 03:20
My multi-step combustion simulation in CFX doesnt work out for steady state Xun CFX 10 November 25, 2021 14:26
Verifying results for a wind turbine blade simulation in ANSYS CFX Joystix CFX 3 April 27, 2012 18:52
Boundary condition setting regarding turbine simulation using CFX Lacerlacer CFX 11 March 12, 2012 10:32
3-D Contaminant Dispersal Simulation Apple L S Chan Main CFD Forum 1 December 23, 1998 11:06


All times are GMT -4. The time now is 13:59.