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

Treatment of pressure outlet BC on staggered grid

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By lorbekl
  • 1 Post By FMDenaro
  • 1 Post By lorbekl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2018, 03:32
Default Treatment of pressure outlet BC on staggered grid
  #1
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Hey,


In the case of a 1D staggered mesh with a static pressure boundary condition on the outlet and following the SIMPLE algorithm, according to Versteeg (for incompressible SIMPLE), as far as I understand, the discretization at the outlet boundary should look like this:





The velocity at point (N+1) is to be determined in such a way that mass is conserved in the boundary p' cell (scalar cell where p(N) is stored), for example:



mflow_e=mflow_w ----> u_e=(rho*u*A)_w/(rho*A)_e



This formulation however is made for incompressible, steady flows. In the case of an unsteady compressible flow (following the compressible SIMPLE algorithm), where density is also an unknown, how should this velocity be determined?


As a side note, would it make sense to solve the momentum equation for the staggered cell at u(N+1) (the one to the right of the blue one) and get the velocity that way? Although I can not imagine how I would discretize this equation, especially in regards to mflow_e and rho_e for this equation
atulkjoy likes this.

Last edited by lorbekl; October 3, 2018 at 04:49.
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 04:51
Default
  #2
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Just bumping this as I am still looking for a solution
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 11:15
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
For compressible flows, the setting of the BC.s is totally different from a mathematical point of view. And I think there is no advantage in using a staggered grid.
FMDenaro is offline   Reply With Quote

Old   October 3, 2018, 11:37
Default
  #4
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Well that's bad news then. Although I should mention that this algorithm will progress to a solver that should handle flows at lower speeds aswell (the flow will never be hypersonic though, so 0<Ma<1). Do you think I should avoid the staggered grid nevertheless or is there a way to keep the staggered grid?


Also if I may ask, what makes the staggered grid non-advantageous in compressible flow? if you could explain, or if you know of some literature on this matter
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 11:53
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
Well that's bad news then. Although I should mention that this algorithm will progress to a solver that should handle flows at lower speeds aswell (the flow will never be hypersonic though, so 0<Ma<1). Do you think I should avoid the staggered grid nevertheless or is there a way to keep the staggered grid?


Also if I may ask, what makes the staggered grid non-advantageous in compressible flow? if you could explain, or if you know of some literature on this matter

The key to understand the adoption of the staggering is in the old hystory of CFD. The incompressible flow solver had to enforce the divergence-free constraint by solving the pressure equation. At the same time the pressure equation must be discretize to a compact stencil to avoid spurious modes. That is quite automatically obtained by a staggering between the velocity components and the pressure and writing each equation on different grid.


In full compressible code that is useless but staggering could be still used for low-Mach solver.


You could have a read to the book of Peric and Ferziger.
lorbekl likes this.
FMDenaro is offline   Reply With Quote

Old   October 3, 2018, 12:23
Default
  #6
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
For now, assuming that I keep the staggered grid, how would you approach this issue I mentioned in the first post? Thank you for the replies however, I will also have a look at the collocated scheme.
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 12:27
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
For now, assuming that I keep the staggered grid, how would you approach this issue I mentioned in the first post? Thank you for the replies however, I will also have a look at the collocated scheme.



The type of BC.s for an outlet depends on the direction of the characteristic curves, that is on the sign of the eigenvalues for subsonic or supersonic conditions. For example, if M<1 you can fix only the pressure and the other variables must be computed from the interior.
FMDenaro is offline   Reply With Quote

Old   October 3, 2018, 13:23
Default
  #8
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Yes, this is what I have been trying to implement aswell. But I'm getting stuck on the finer details of this implementation. If I fix the pressure at the last node (so that it coincides with the east face of the last inner staggered cell), I'm unsure how to properly extrapolate the other variables to keep them consistent (so that h,p and rho satisfy the equation of state) and to satisfy continuity.



At the inlet it's simple because I have mass flow and total enthalpy as BC and I only need to extrapolate the pressure from the interior to determine enthalpy, density and velocity. And when pressure is updated each iteration, the boundary values are updated aswell.


At the outlet I'm not sure. If i wanted to do it the same way as at the inlet I can extrapolate pressure and total enthalpy to the boundary face from the interior, but what about the mass flux? Can I say that for steady flows m_out=m_in or m_in(N)=m_out(N) and for transient flows m_out(N)=m_in(N)-m_accumulated(N)?


Other than that, I don't really know what else to try, which is why I am looking for some help.
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 13:57
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
Yes, this is what I have been trying to implement aswell. But I'm getting stuck on the finer details of this implementation. If I fix the pressure at the last node (so that it coincides with the east face of the last inner staggered cell), I'm unsure how to properly extrapolate the other variables to keep them consistent (so that h,p and rho satisfy the equation of state) and to satisfy continuity.



At the inlet it's simple because I have mass flow and total enthalpy as BC and I only need to extrapolate the pressure from the interior to determine enthalpy, density and velocity. And when pressure is updated each iteration, the boundary values are updated aswell.


At the outlet I'm not sure. If i wanted to do it the same way as at the inlet I can extrapolate pressure and total enthalpy to the boundary face from the interior, but what about the mass flux? Can I say that for steady flows m_out=m_in or m_in(N)=m_out(N) and for transient flows m_out(N)=m_in(N)-m_accumulated(N)?


Other than that, I don't really know what else to try, which is why I am looking for some help.

In a classical staggered grid, the outlet line has the node for the normal velocity component while the pressure is in the interior node.
In your case you can solve the density equation to get the density at the outlet.
FMDenaro is offline   Reply With Quote

Old   October 3, 2018, 16:11
Default
  #10
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Quote:
In a classical staggered grid, the outlet line has the node for the normal velocity component while the pressure is in the interior node.
Yes that's how my grid is set-up aswell. And I assume by density equation you mean the steady/transient continuity equation solved for density?


If that is the case, would it perhaps be prefferable if I use the continuity eq. to actually calculate the velocity at the outlet, and calculate the density at the outlet via the equation of state (based on an extrapolated pressure and enthalpy)?
atulkjoy likes this.
lorbekl is offline   Reply With Quote

Old   October 3, 2018, 16:16
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
Yes that's how my grid is set-up aswell. And I assume by density equation you mean the steady/transient continuity equation solved for density?


If that is the case, would it perhaps be prefferable if I use the continuity eq. to actually calculate the velocity at the outlet, and calculate the density at the outlet via the equation of state (based on an extrapolated pressure and enthalpy)?

Well, I think that you need to set density, temperature and pressure in the same nodes. You can solve the unsteady density equation at the last node. If required a linear extrapolation can give the density at the outlet line.
However, I still don't see the need to use staggering...
FMDenaro is offline   Reply With Quote

Old   October 4, 2018, 02:28
Default
  #12
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Well the one reason I can find valid is that the model should be able to handle the transition from incompressible liquid to compressible gas (throttling). So a staggered grid might be good due to the velocity-pressure coupling in the incompressible part (which can actually represent the majority of the domain).


Just to clarify, my EOS is not an ideal gas equation or something like that, but an experimental database that can correlate the thermodynamic variables in liquid aswell. A "database of state" one might say. That way I can treat density as a variable in the liquid part (even if it remains the same) and keep only one set of equations.
lorbekl is offline   Reply With Quote

Old   October 4, 2018, 03:50
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
Well the one reason I can find valid is that the model should be able to handle the transition from incompressible liquid to compressible gas (throttling). So a staggered grid might be good due to the velocity-pressure coupling in the incompressible part (which can actually represent the majority of the domain).


Just to clarify, my EOS is not an ideal gas equation or something like that, but an experimental database that can correlate the thermodynamic variables in liquid aswell. A "database of state" one might say. That way I can treat density as a variable in the liquid part (even if it remains the same) and keep only one set of equations.



Not sure to understand what you are doing. You can think about a general compressible flow solver working at low and high Mach but the incompressible flow solver is based on totally different equations.
FMDenaro is offline   Reply With Quote

Old   October 4, 2018, 04:09
Default
  #14
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Quote:
You can think about a general compressible flow solver working at low and high Mach but the incompressible flow solver is based on totally different equations.
Most certainly, but at the 1D level that I have reduced the problem/equations to I see no other difference than those revolving around the density being constant/variable.

My equations:

fd...Darcy friction factor
h0...total enthalpy
lorbekl is offline   Reply With Quote

Old   October 4, 2018, 04:14
Default
  #15
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
But in 1d model, if you introduce the incompressibile constraint, you have only the solution u=constant ...
FMDenaro is offline   Reply With Quote

Old   October 4, 2018, 04:18
Default
  #16
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
In the end that is the result, yes, but what I don't know is how far the incompressible part lasts, before throttling beings (density starts decreasing as gas phase appears and u is no longer constant). That's why I need to be able to predict anything (by this I mean calculating everything even in the incompressible part), even if the solution for the incompressible part is obvious.
lorbekl is offline   Reply With Quote

Old   October 5, 2018, 16:36
Default
  #17
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by lorbekl View Post
In the end that is the result, yes, but what I don't know is how far the incompressible part lasts, before throttling beings (density starts decreasing as gas phase appears and u is no longer constant). That's why I need to be able to predict anything (by this I mean calculating everything even in the incompressible part), even if the solution for the incompressible part is obvious.

I feel like there is a misunderstanding. The density is not the problem per se. Incompressibility doesn't mean that density is constant but means that the velocity field is divergence free. You can have density be constant, temperature dependent, or dependent on temperature and pressure and that would not change the way SIMPLE should be implemented or your solution algorithm.
LuckyTran is offline   Reply With Quote

Old   October 5, 2018, 16:47
Default
  #18
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by LuckyTran View Post
I feel like there is a misunderstanding. The density is not the problem per se. Incompressibility doesn't mean that density is constant but means that the velocity field is divergence free. You can have density be constant, temperature dependent, or dependent on temperature and pressure and that would not change the way SIMPLE should be implemented or your solution algorithm.



yes but in such a simplified 1D model, the divergence-free constraint becomes simply the constraint u= constant. As a consequence, the density equation can be solved analytically as it reduces to d rho/dt + u*d rho/dx =D rho/Dt =0, the exact solution being rho(x,t) = rho(x-u*t,0)
FMDenaro is offline   Reply With Quote

Old   October 8, 2018, 07:08
Default
  #19
Member
 
Join Date: Jan 2018
Posts: 31
Rep Power: 8
lorbekl is on a distinguished road
Quote:
I feel like there is a misunderstanding.
Yes, it seems I made some confusion regarding this problem. Anyways the algorithm itself is (hopefully) not the problem here as a while ago I have managed to get a solution by setting the values of mass fluxes on all faces constant and equal to the mass flux inlet condition (this is a bit of a shortcut that I can afford in a 1D steady case where the mass flux is constant along the domain). The problem arrives when I try to move the model into a transient simulation (where this shortcut is no longer correct), where I fail to properly reconstruct the mass fluxes at the faces. A problem that I believe comes from how I handle the outlet, hence the original question.



In regards to my original question, what seems the most reasonable option to me right now is to calculate the velocity at the outlet face from the continuity equation for the last control volume. Like in the book by Versteeg in the chapter where he handles the pressure inlet/outlet BC.
lorbekl 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
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 06:56
static vs. total pressure auf dem feld FLUENT 17 February 26, 2016 13:04
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC Endel OpenFOAM Running, Solving & CFD 3 September 11, 2014 16:29
simple model, difficult outlet Eric CFX 7 May 23, 2014 08:13
Unsteady pressure differential between inlet and outlet of the pipe for single phase joshi20h FLUENT 0 September 26, 2012 12:41


All times are GMT -4. The time now is 12:41.