CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Mass Conservation and Convergence in Transient CFD Simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree27Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2023, 05:51
Default Mass Conservation and Convergence in Transient CFD Simulation
  #1
New Member
 
Join Date: Jan 2023
Posts: 7
Rep Power: 3
CFDParty is on a distinguished road
Hello all,

I'm running a transient CFD simulation using ANSYS Fluent, and I have a question about mass conservation. In my simulation, I have a velocity inlet and a static wall with no outlet. I understand that in this configuration, mass cannot be conserved because the flow is entering the volume without any way to exit. However, I have noticed that the solution still converges even when mass conservation is not satisfied. The residuals are continuity, x-velocity, and y-velocity.

I'm curious if anyone can provide some insights into why the solution would converge even when mass conservation is not satisfied in a transient simulation. Additionally, I'm wondering if this means that the simulation results may not be physically meaningful. Any thoughts or suggestions would be greatly appreciated.

Thank you!
CFDParty is offline   Reply With Quote

Old   April 28, 2023, 09:53
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by CFDParty View Post
Hello all,

I'm running a transient CFD simulation using ANSYS Fluent, and I have a question about mass conservation. In my simulation, I have a velocity inlet and a static wall with no outlet. I understand that in this configuration, mass cannot be conserved because the flow is entering the volume without any way to exit. However, I have noticed that the solution still converges even when mass conservation is not satisfied. The residuals are continuity, x-velocity, and y-velocity.

I'm curious if anyone can provide some insights into why the solution would converge even when mass conservation is not satisfied in a transient simulation. Additionally, I'm wondering if this means that the simulation results may not be physically meaningful. Any thoughts or suggestions would be greatly appreciated.

Thank you!
A compressible flow solver can simulate such a problem, nothing particular in that. The total mass increases until a certain value of the pressure difference
FMDenaro is offline   Reply With Quote

Old   April 28, 2023, 10:07
Default
  #3
New Member
 
Join Date: Jan 2023
Posts: 7
Rep Power: 3
CFDParty is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
A compressible flow solver can simulate such a problem, nothing particular in that. The total mass increases until a certain value of the pressure difference
Indeed, I understand that that would be the case with a compressible solver. In my case I'm using an incompressible fluid. My question above is more, why is it possible that the solution converges even when mass conservation is not satisfied when using an incompressible fluid?
CFDParty is offline   Reply With Quote

Old   April 28, 2023, 11:09
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by CFDParty View Post
Indeed, I understand that that would be the case with a compressible solver. In my case I'm using an incompressible fluid. My question above is more, why is it possible that the solution converges even when mass conservation is not satisfied when using an incompressible fluid?
I have no answer, it should not…
FMDenaro is offline   Reply With Quote

Old   April 28, 2023, 15:31
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,750
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Mass conservation means mass cannot be spontaneously created or destroyed. You have an inlet and no outlet, you are supplying mass. This is not a case of mass conservation being violated. The total mass increases with time. If you drink a cup of orange juice, mass conservation laws are not being violated. It is poor wording of the issue.

With regards to when mass conservation issues are encountered with incompressible scenarios... This can occur when you have a closed volume and do a transient simulation since mass can be created/destroyed at each timestep in the incompressible formulation. You have an inlet, it is not a closed volume so this scenario would apply. And even if you were simulating a closed volume, the solution would still converge, you would just violate the mass conservation property. The solution cannot impose the global mass conservation property due to finite precision.
Aeronautics El. K. likes this.
LuckyTran is offline   Reply With Quote

Old   April 28, 2023, 15:38
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by LuckyTran View Post
Mass conservation means mass cannot be spontaneously created or destroyed. You have an inlet and no outlet, you are supplying mass. This is not a case of mass conservation being violated. The total mass increases with time. If you drink a cup of orange juice, mass conservation laws are not being violated. It is poor wording of the issue.

With regards to when mass conservation issues are encountered with incompressible scenarios... This can occur when you have a closed volume and do a transient simulation since mass can be created/destroyed at each timestep in the incompressible formulation. You have an inlet, it is not a closed volume so this scenario would apply. And even if you were simulating a closed volume, the solution would still converge, you would just violate the mass conservation property. The solution cannot impose the global mass conservation property due to finite precision.

But for incompressible flows you have to satisfy div V = 0. That means a reverse flow should appear in inlet to balance the mass entrance.
FMDenaro is offline   Reply With Quote

Old   April 28, 2023, 16:52
Default
  #7
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,191
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by CFDParty View Post
Indeed, I understand that that would be the case with a compressible solver. In my case I'm using an incompressible fluid. My question above is more, why is it possible that the solution converges even when mass conservation is not satisfied when using an incompressible fluid?
Can you define what you mean by "converges"? I'm guessing this is not machine precision...
sbaffini is offline   Reply With Quote

Old   April 28, 2023, 17:46
Default
  #8
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
But for incompressible flows you have to satisfy div V = 0. That means a reverse flow should appear in inlet to balance the mass entrance.



Kind of. Fluent solvers for



Sum(fluxes) = 0.


Flux is vel dot area plus rhie and chow dissipation flux. So not exactly same as div( vel) = 0.
arjun is offline   Reply With Quote

Old   April 28, 2023, 17:52
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by arjun View Post
Kind of. Fluent solvers for



Sum(fluxes) = 0.


Flux is vel dot area plus rhie and chow dissipation flux. So not exactly same as div( vel) = 0.



But that is just a trick to avoid spurious modes in the pressur for non-staggered grid. And yes, that means the div V = 0 is not satisfied at machine precision but only up to the local truncation error.

But I doubt this is the case when a mass flow enters without any way to let it go out, that would be possible in a density-based solver when it get raise of an increasing in the mass in time.

It would be useful to see the velocity field.
FMDenaro is offline   Reply With Quote

Old   April 28, 2023, 19:38
Default
  #10
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,750
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Fluent isn't a true incompressible M=0 solver even when you use the pressure-based approach. Simply using the pressure-based solver also does not mean you are in an incompressible flow regime. Only when you use constant density fluid is the calculation actually incompressible.

A velocity inlet isn't a mass flow inlet either. The density drops at the inlet and permits an inward velocity up until all the reflections catch up inside the domain.

That being said, if it is known that the fluid is incompressible, why even are we doing this simulation in the first place? There is no physically realizable solution, why are we even discussing whether any results might not be physically meaningful, when we know they are not from the get go? It is as if we are rolling dice and trying to explain why the dice are biased because they never roll heads.
arjun and Aeronautics El. K. like this.
LuckyTran is offline   Reply With Quote

Old   April 29, 2023, 04:17
Default
  #11
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
But that is just a trick to avoid spurious modes in the pressur for non-staggered grid. And yes, that means the div V = 0 is not satisfied at machine precision but only up to the local truncation error.



Well in theory yes but in practice the Rhie and Chow term is quite significant in most cases.





In this case though this might be the reason fluent "converges".
arjun is offline   Reply With Quote

Old   April 29, 2023, 04:18
Default
  #12
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by LuckyTran View Post
Fluent isn't a true incompressible M=0 solver even when you use the pressure-based approach. Simply using the pressure-based solver also does not mean you are in an incompressible flow regime. Only when you use constant density fluid is the calculation actually incompressible.

A velocity inlet isn't a mass flow inlet either. The density drops at the inlet and permits an inward velocity up until all the reflections catch up inside the domain.

That being said, if it is known that the fluid is incompressible, why even are we doing this simulation in the first place? There is no physically realizable solution, why are we even discussing whether any results might not be physically meaningful, when we know they are not from the get go? It is as if we are rolling dice and trying to explain why the dice are biased because they never roll heads.



It again shows that solver's convergence is meaningless if the solution it produces is not accurate or does not meet physical meaning.
arjun is offline   Reply With Quote

Old   April 29, 2023, 05:06
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Well, even if you permit density to change that does not ensure to fulfill the steady mass conservation with a velocity inlet. You should have that the velocity changes sign at the inlet. There is no way to get the mass balance to be satisfied. Otherwise the total mass must increase in time.



In general, only Exact projection methods fulfill div V =0 at machine precision, but this constraint is not satisfied in general, for example in the Approximate projection method.


And Fluent has the NITA where the fractional method used with the PRESTO option should produce an Exact projection method (at least theoretically) if the residual is driven to machine accuracy.



The issue is still open in my opinion...
FMDenaro is offline   Reply With Quote

Old   April 29, 2023, 08:14
Default
  #14
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
Well, even if you permit density to change that does not ensure to fulfill the steady mass conservation with a velocity inlet. You should have that the velocity changes sign at the inlet.
.



I understand what you are saying but for Fluent this does not have to be true. As mentioned it does not enforce div(vel) = 0,, where this would be true.



In fact, if you use inlet condition fluent will be forcing velocities. (so if you plot you will see all velocities pointing in). Whether it adds Rhie and Chow terms at inlet or not I CAN NOT tell because this is software based. (For example in wildkatze we do not add ).
arjun is offline   Reply With Quote

Old   April 29, 2023, 14:09
Default
  #15
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by arjun View Post
I understand what you are saying but for Fluent this does not have to be true. As mentioned it does not enforce div(vel) = 0,, where this would be true.



In fact, if you use inlet condition fluent will be forcing velocities. (so if you plot you will see all velocities pointing in). Whether it adds Rhie and Chow terms at inlet or not I CAN NOT tell because this is software based. (For example in wildkatze we do not add ).
But that should drive to an instability of the run due to the stifness of pressure, how can it converge?

And why using NITA with the staggered pressure Fluent would not be able to drive to Div V = 0 at machine precision without using the Rhie and Chow interpolation ?
FMDenaro is offline   Reply With Quote

Old   April 30, 2023, 00:50
Default
  #16
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
But that should drive to an instability of the run due to the stifness of pressure, how can it converge?

And why using NITA with the staggered pressure Fluent would not be able to drive to Div V = 0 at machine precision without using the Rhie and Chow interpolation ?



from what i understand from fluent, in this case fluxes from walls might be non zero.




Also from OP it is not clear what level of convergence is achieved. If it is to the machine precision then it would be very strange.
arjun is offline   Reply With Quote

Old   April 30, 2023, 20:17
Default
  #17
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,191
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I think we need to know exactly from OP which level of convergence he reached before attempting an answer. Because, honestly, I think it is impossibile to have the continuity converged with an unsteady incompressible solver in this case, no matter what form of pressure equation and mass flux is used, as long as it is consistent with the continuous continuity equation.
FMDenaro likes this.
sbaffini is offline   Reply With Quote

Old   May 1, 2023, 03:57
Default
  #18
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sbaffini View Post
I think we need to know exactly from OP which level of convergence he reached before attempting an answer.

Yes.





Quote:
Originally Posted by sbaffini View Post
Because, honestly, I think it is impossibile to have the continuity converged with an unsteady incompressible solver in this case, no matter what form of pressure equation and mass flux is used, as long as it is consistent with the continuous continuity equation.



I think here by convergence you mean continuity residuals dropping very low (or to machine precision).





This i say this because i think the solver might reduce the residuals and then converge to some pressure values. That means continuity residuals become stable but non zero (or significantly high).



PS: I did one experiment and this is what i observed from wildkatze. (non zero but stable continuity residual)
arjun is offline   Reply With Quote

Old   May 1, 2023, 04:41
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,865
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by arjun View Post
Yes.










I think here by convergence you mean continuity residuals dropping very low (or to machine precision).





This i say this because i think the solver might reduce the residuals and then converge to some pressure values. That means continuity residuals become stable but non zero (or significantly high).



PS: I did one experiment and this is what i observed from wildkatze. (non zero but stable continuity residual)
Stable residuals also for the momentum? That is did you get a steady solution? Could you show the velocity and density fields ?
FMDenaro is offline   Reply With Quote

Old   May 1, 2023, 08:07
Default
  #20
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by FMDenaro View Post
Stable residuals also for the momentum? That is did you get a steady solution? Could you show the velocity and density fields ?



For this case yes. (Don't claim that this shall always happen).


Pipe case run with setting outlet as Wall.
Attached Images
File Type: jpeg ResPress01.jpeg (53.2 KB, 20 views)
File Type: jpeg Vel01.jpeg (147.7 KB, 21 views)
arjun 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
axial compressor mass flow convergence issue jyotir SU2 5 July 5, 2024 10:06
SU2 NACA0012 Transitional flow simulation Convergence Issues morgJ SU2 0 July 21, 2022 08:42
mass flow conservation in transient simulations egonalter CFX 20 July 27, 2017 08:18
Problem with an old Simulation FrankW CFX 3 February 8, 2016 05:28
Mass conservation problem in mixing tank multiphase simulation rockewan FLUENT 0 April 6, 2010 13:34


All times are GMT -4. The time now is 00:39.