SIMPLE BCs for flow in parallel plates

 Register Blogs Members List Search Today's Posts Mark Forums Read

 September 10, 2015, 06:12 SIMPLE BCs for flow in parallel plates #1 New Member   Join Date: Jul 2015 Posts: 18 Rep Power: 10 Hi, I've recently coded up in C++ the SIMPLE algorithm for incompressible flow btn parallel plates (u-momentum eq'n and mass eq'n). I'm using a staggered grid and following the book by Versteeg and Malalasekera (2007). I've run a few test cases with different BC's: - inlet velocity (uniform) with pressure outlet (0) -> uniform velocity distribution throughout flow is attained. - inlet velocity (parabolic) with pressure outlet (0) -> parabolic velocity distribution throughout flow is attained. Other BCs are u=0 at top and bottom wall (u-momentum eq'n) and p'=0 for outlet. The pressure correction equation for top and bottom wall give p'=0 since the source term is always zero (u=0). And the pressure at the inlet is obtained by linear interpolation from inside the domain (Ferziger & Peric, 1997) My question is on the first case - is it correct? Isn't the flow supposed to develop into a parabolic profile towards the outlet?

September 10, 2015, 06:28
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by kabz Hi, I've recently coded up in C++ the SIMPLE algorithm for incompressible flow btn parallel plates (u-momentum eq'n and mass eq'n). I'm using a staggered grid and following the book by Versteeg and Malalasekera (2007). I've run a few test cases with different BC's: - inlet velocity (uniform) with pressure outlet (0) -> uniform velocity distribution throughout flow is attained. - inlet velocity (parabolic) with pressure outlet (0) -> parabolic velocity distribution throughout flow is attained. Other BCs are u=0 at top and bottom wall (u-momentum eq'n) and p'=0 for outlet. The pressure correction equation for top and bottom wall give p'=0 since the source term is always zero (u=0). And the pressure at the inlet is obtained by linear interpolation from inside the domain (Ferziger & Peric, 1997) My question is on the first case - is it correct? Isn't the flow supposed to develop into a parabolic profile towards the outlet?

yes, provided that the lengh of the plate is sufficient, you should get a parobolic velocity profile. What Re number do you set?

September 10, 2015, 06:49
#3
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro yes, provided that the lengh of the plate is sufficient, you should get a parobolic velocity profile. What Re number do you set?

Re=10000
density=1000Kg/m^3
viscosity=0.001Kg/m s
height=0.1m
length=width=1m
velocity=0.05m/s

 September 10, 2015, 07:15 #4 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 at such a Re number you cannot see a developed viscous profile........you have to reduce the Re number of some order of magnutude

September 10, 2015, 08:03
#5
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro at such a Re number you cannot see a developed viscous profile........you have to reduce the Re number of some order of magnutude
Tried it with lower velocities (u=1e-3, u=1e-4) but I still obtain a uniform flow profile.

September 10, 2015, 08:28
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by kabz Tried it with lower velocities (u=1e-3, u=1e-4) but I still obtain a uniform flow profile.
Try for Re=1

September 10, 2015, 09:25
#7
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
I still obtain a uniform velocity profile.

the predicted velocity profile is okay but once i solve the pressure correction equation and correct the velocity, i obtain a uniform profile. See the attached matlab .fig files
Attached Files
 velocities.zip (160.2 KB, 15 views)

September 10, 2015, 10:01
#8
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by kabz I still obtain a uniform velocity profile. the predicted velocity profile is okay but once i solve the pressure correction equation and correct the velocity, i obtain a uniform profile. See the attached matlab .fig files

At Re=1 you should see the viscous parablic profile...something is wrong...are you sure to have reached the steady state?

September 10, 2015, 10:38
#9
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro At Re=1 you should see the viscous parablic profile...something is wrong...are you sure to have reached the steady state?

Yes. At 200 iterations, only the predicted velocity changes but the corrected velocity is maintained. See attached.
Attached Files
 velocities.zip (95.5 KB, 8 views)

 September 10, 2015, 10:46 #10 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 please, post directly the image... however, there is for sure something wrong in the code...check the BC.s after the correction, are they no-slip conditions?

September 11, 2015, 06:55
#11
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro please, post directly the image... however, there is for sure something wrong in the code...check the BC.s after the correction, are they no-slip conditions?
Yes no slip conditions are maintained

 September 11, 2015, 07:01 #12 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 you have a bug in the code ... at Re=1 you should see the two spatially evolving boundary layers aerosjc likes this.

September 15, 2015, 13:43
#13
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
After much debugging, i have some limited success - see images attached.
I get a more or less triangular profile near the outlet

Ignore the pressure at inlet as I've not implemented the linear interpolation from inside the domain.
Attached Images
 ux.jpg (118.2 KB, 10 views) ux2.jpg (48.3 KB, 10 views) uy.jpg (62.6 KB, 9 views) pressure.jpg (107.1 KB, 8 views)

 September 15, 2015, 14:04 #14 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 you found the bug, the results seems physically reasonable now...you can compare with the analytical Blasius solution for a flat plane...then check that after some height a fully parabolic velocity profile is obtained Of course, x=0 is a singular point.

September 15, 2015, 14:27
#15
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro you found the bug, the results seems physically reasonable now...you can compare with the analytical Blasius solution for a flat plane...then check that after some height a fully parabolic velocity profile is obtained Of course, x=0 is a singular point.
My current issue is that it seems to develop a parabolic profile after entry but towards the outlet a "triangular" profile is acquired.

September 15, 2015, 15:06
#16
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by kabz My current issue is that it seems to develop a parabolic profile after entry but towards the outlet a "triangular" profile is acquired.
plot the velcoity at some station and superimpose the parabolic law...anyway, do you have ensured to have a suffient lenght do let the flow develop?

 September 21, 2015, 04:33 #17 New Member   Join Date: Jul 2015 Posts: 18 Rep Power: 10 Hopefully final question: The momentum equations are linearized by using velocity and pressure fields from the previous outer iteration to solve for new fields. Now, at the end of an outer iteration, one has the new corrected velocity and pressure fields - u^{n},v^{n},p^{n}. Are residuals calculated based on the linearized momentum equations (ie using the old velocity fields to compute coefficients and old pressure field to compute flux and then apply the new velocity field to complete the equation) or are the residuals based on the non-linear momentum equations (ie use the new velocity fields to compute coefficients and new pressure field to compute flux and then apply new velocity field to complete the equation)?

 September 21, 2015, 04:36 #18 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 the residual is computed for the discrete equation you really want to satisfy...if you linearized, this discrete equation must provide a vanishing residual. You cannot use the solution vector to compute the residual in a different discrete equation

September 21, 2015, 05:26
#19
New Member

Join Date: Jul 2015
Posts: 18
Rep Power: 10
Quote:
 Originally Posted by FMDenaro the residual is computed for the discrete equation you really want to satisfy...if you linearized, this discrete equation must provide a vanishing residual. You cannot use the solution vector to compute the residual in a different discrete equation

And if one used deferred correction terms (eg bounded higher order schemes), are these computed for residuals or is it safe to ignore them?

September 21, 2015, 05:44
#20
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by kabz And if one used deferred correction terms (eg bounded higher order schemes), are these computed for residuals or is it safe to ignore them?

in the residual you must consider any discrete term you used in the computation... in symbolic term, said vn the solution at step n and A the discrete operators containing all fluxes (bounded or not), the residual at step n can be written (similar to interative methods for linear algebric systems)

A(vn) - s = rn

somehow, for steady solutions, rn can be interpreted as the time derivative you want to drive to zero

 Tags incompressible flow, parallel plates, simple