|
[Sponsors] |
Treatment of pressure outlet BC on staggered grid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 21, 2018, 03:32 |
Treatment of pressure outlet BC on staggered grid
|
#1 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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 Last edited by lorbekl; October 3, 2018 at 04:49. |
|
October 3, 2018, 04:51 |
|
#2 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
Just bumping this as I am still looking for a solution
|
|
October 3, 2018, 11:15 |
|
#3 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
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.
|
|
October 3, 2018, 11:37 |
|
#4 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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 |
|
October 3, 2018, 11:53 |
|
#5 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
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. |
||
October 3, 2018, 12:23 |
|
#6 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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.
|
|
October 3, 2018, 12:27 |
|
#7 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
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. |
||
October 3, 2018, 13:23 |
|
#8 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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. |
|
October 3, 2018, 13:57 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
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. In your case you can solve the density equation to get the density at the outlet. |
||
October 3, 2018, 16:11 |
|
#10 | |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
Quote:
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)? |
||
October 3, 2018, 16:16 |
|
#11 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
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... |
||
October 4, 2018, 02:28 |
|
#12 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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. |
|
October 4, 2018, 03:50 |
|
#13 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
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. |
||
October 4, 2018, 04:09 |
|
#14 | |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
Quote:
My equations: fd...Darcy friction factor h0...total enthalpy |
||
October 4, 2018, 04:14 |
|
#15 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
But in 1d model, if you introduce the incompressibile constraint, you have only the solution u=constant ...
|
|
October 4, 2018, 04:18 |
|
#16 |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
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.
|
|
October 5, 2018, 16:36 |
|
#17 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 65 |
Quote:
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. |
||
October 5, 2018, 16:47 |
|
#18 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
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) |
||
October 8, 2018, 07:08 |
|
#19 | |
Member
Join Date: Jan 2018
Posts: 31
Rep Power: 8 |
Quote:
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. |
||
|
|
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 |