# periodic boundary condition in rectangular duct

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

 November 6, 2016, 11:11 periodic boundary condition in rectangular duct #1 New Member   neda sheikh rezazadeh nikou Join Date: Nov 2016 Location: Iran Posts: 11 Rep Power: 2 Hi All, I have written a 3D Incompressible NS solver for solving a rectangular duct flow with periodic boundary conditions along the direction of flow (xi). I wrote periodic boundary as follow Uxi(1:ne,1:nz,1)=Uxi(1:ne,1:nz,nk-2) Uxi(1:ne,1:nz,nk)=Uxi(1:ne,1:nz,3) Ueta(1:nei,1:nz,1)=Ueta(1:nei,1:nz,nki) Ueta(1:nei,1:nz,nk)=Ueta(1:nei,1:nz,2) Uzeta(1:ne,1:nzi,1)=Uzeta(1:ne,1:nzi,nk-1) Uzeta(1:ne,1:nzi,nk)=Uzeta(1:ne,1:nzi,2) P(P(1:ne,1:nz,nk)=P(1:ne,1:nzi,2) P(1:ne,1:nz,1)=P(1:ne,1:nz,nki) xi, eta and zeta are the curvilinear coordinate directions. Initial condition is fully developed laminar velocity profile. Width, height and length of duct is 1m, 1m and 15m, respectively. First I used coarse grid generation (xi=1:100, eta=1:10, zeta=1:10) with relaxation factor of 0.1, results were so close to fully developed laminar flow. Then I used finer grid (xi=1:150, eta=1:20, zeta=1:20) with relaxation factor of 0.01 results were so close to fully developed laminar flow. As I generated finest mesh(xi=1:200, eta=1:40, zeta=1:40), residuals of velocity and continuity started to oscillate. It did not diverge but I am not sure of convergence yet. Is it reasonable to have oscillation in solution domain and then I get reasonble result? I want to do grid convergence test with different sizes of mesh. Would you Please help me... What is wrong?

 November 6, 2016, 11:45 #2 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 You did not specify your integration method, is it explicit? How do you check for the stability constraint? How do you compute the residuals?

November 6, 2016, 12:06
#3
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro You did not specify your integration method, is it explicit? How do you check for the stability constraint? How do you compute the residuals?
Dear FMDenaro
I useduse power-law scheme for momentum equation, which is implicit and SIMPLE for velocity-pressure coupling.

 November 6, 2016, 12:14 #4 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 what about the Reynolds number? what about the spatial discretization?

November 6, 2016, 12:21
#5
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro what about the Reynolds number? what about the spatial discretization?
Reynolds no. is 500 and finite volume method was used for discretization.

November 6, 2016, 12:32
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
Quote:
 Originally Posted by nedanikou Reynolds no. is 500 and finite volume method was used for discretization.
your problem is not totally clear... is the Reynolds computed using u_tau? In such a case you get a turbulent flow...

do you check your code for a smaller Re number (=O(1)) and the exact laminar solution?

November 6, 2016, 12:41
#7
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro your problem is not totally clear... is the Reynolds computed using u_tau? In such a case you get a turbulent flow... do you check your code for a smaller Re number (=O(1)) and the exact laminar solution?
yes, I checked the code for the duct with 116 m length. I tried to use periodic B.C. to decrease running time. This would be only simple study case to check some of the RANS and LES models, but honestly it was the difficult part of coding. Is it possible to decrease the relaxation factor to smaller values like 0.0001? or it is unnecessary.

 November 6, 2016, 13:09 #8 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 RANS is a steady formulation, LES is time-dependent, they are very different and the code (space and time integration methods are very different) ... Could you post the convergence error slope you get at low Re number? What residuals are you controlling? Did you see oscillations in the velocities field? Are you using variable grid near the walls?

November 6, 2016, 13:36
#9
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro RANS is a steady formulation, LES is time-dependent, they are very different and the code (space and time integration methods are very different) ... Could you post the convergence error slope you get at low Re number? What residuals are you controlling? Did you see oscillations in the velocities field? Are you using variable grid near the walls?
I should check the slope variation, it will take time to run my code again.
residual of uxi, ueta, uzeta and continuity
resuxi=resuxi+dabs(Usxi(j,k,i)-Uxi(j,k,i))
resueta=resueta+dabs(Useta(j,k,i)-Ueta(j,k,i))
resuzeta=resuzeta+dabs(Uszeta(j,k,i)-Uzeta(j,k,i)
for the coarse and moderate grid, there was no oscillation in velocity field the after convergence of velocities field.

 November 6, 2016, 13:49 #10 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 Actually, the residuals of the momentum equations should be the discrete time derivatives so that you control that the solution is steady. Oscillations appear in the continuity residual? However, try also to diminuish your convergence thresholds on the finest grid. Could you post the velocity plot superimposed to the exact solutions?

November 6, 2016, 15:17
fully developed laminar flow
#11
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
fully developed velocity profile and residuals attached please find it.
Attached Files
 fully developed laminar flow of rectangular duct.pdf (20.6 KB, 6 views)

 November 6, 2016, 15:30 #12 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 I see that the profile has a not vanishing values at y=0 and is not symmetric with regards to the centerline... also the analytical solution is wrong, has two values at y=0. How do you compute the analytical solution? As you have a 3D duct, you must check both the profile u(y) and u(z). Is the profile along x the same?

November 6, 2016, 15:42
#13
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro I see that the profile has a not vanishing values at y=0 and is not symmetric with regards to the centerline... also the analytical solution is wrong, has two values at y=0. How do you compute the analytical solution? As you have a 3D duct, you must check both the profile u(y) and u(z). Is the profile along x the same?
the analytical formula was calculated based on fully developed laminar formula of velocity from White's book. there is no value at the first and end of velocity formula, I write it myself by mistake. this is a correct formula and symmetric just shifted.
uxi is constant along the duct as it is expected.
velocity residuals shows decreasing slope but continuity increases at the first iterations and then decreases
thanks

November 6, 2016, 15:56
#14
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
Quote:
 Originally Posted by nedanikou the analytical formula was calculated based on fully developed laminar formula of velocity from White's book. there is no value at the first and end of velocity formula, I write it myself by mistake. this is a correct formula and symmetric just shifted. uxi is constant along the duct as it is expected. velocity residuals shows decreasing slope but continuity increases at the first iterations and then decreases thanks
I don't remember that White illustrates the analytical expression for rectangular duct ... I remember the solution for pipe and parallel plates.

Are you sure the solution you use satisfies the equation Lap u = Re* dp/dx with u=0 on the rectangular section?

Furthermore, have you checked that inflow and outflow flow rates are exactly the same?

November 6, 2016, 16:23
viscous fluid flow of White pge 119-fully developed laminar flow
#15
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
viscous fluid flow of White pge 119. pic of formula attached. I am sure about mass inflow and outflow. let me check the residual plot for fine grid.
Attached Images
 white.jpg (68.1 KB, 7 views)

November 6, 2016, 17:00
#16
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
Quote:
 Originally Posted by nedanikou viscous fluid flow of White pge 119. pic of formula attached. I am sure about mass inflow and outflow. let me check the residual plot for fine grid.

yes, depending on the numbers of harmonics you satisfy the equation...you should check if your oscillations depend on the used thresholds.

November 6, 2016, 17:06
#17
New Member

Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
Quote:
 Originally Posted by FMDenaro yes, depending on the numbers of harmonics you satisfy the equation...you should check if your oscillation depend on the used thresholds.
thank you for your patience and valuable guides

 November 6, 2016, 17:27 #18 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,354 Rep Power: 37 I suggest also to provide the analytical solution as initial field, check if you get the convergence using a low threshold.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Madhatter92 CFX 12 January 12, 2016 05:39 Saima CFX 45 September 22, 2015 10:53 kohel_11 FLUENT 3 July 30, 2013 07:37 Anna Tian CFX 1 June 16, 2013 06:28 Mavier CFX 5 April 29, 2013 00:00

All times are GMT -4. The time now is 08:05.