
[Sponsors] 
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,nk2) 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,nk1) 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,004
Rep Power: 35 
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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 
Quote:
I useduse powerlaw scheme for momentum equation, which is implicit and SIMPLE for velocitypressure coupling. 

November 6, 2016, 12:14 

#4 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
what about the Reynolds number? what about the spatial discretization?


November 6, 2016, 12:21 

#5 
New Member
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 

November 6, 2016, 12:32 

#6  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
Quote:
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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 
Quote:
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,004
Rep Power: 35 
RANS is a steady formulation, LES is timedependent, 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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 
Quote:
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. thanks to your help 

November 6, 2016, 13:49 

#10 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 
fully developed velocity profile and residuals attached please find it.


November 6, 2016, 15:30 

#12 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 
Quote:
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,004
Rep Power: 35 
Quote:
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 119fully developed laminar flow

#15 
New Member
neda sheikh rezazadeh nikou
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.


November 6, 2016, 17:00 

#16  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
Quote:
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
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2 

November 6, 2016, 17:27 

#18 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,004
Rep Power: 35 
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  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem in setting Boundary Condition  Madhatter92  CFX  12  January 12, 2016 05:39 
sliding mesh problem in CFX  Saima  CFX  45  September 22, 2015 10:53 
About periodic boundary condition.  kohel_11  FLUENT  3  July 30, 2013 07:37 
Question about heat transfer coefficient setting for CFX  Anna Tian  CFX  1  June 16, 2013 06:28 
Low Mixing time Problem  Mavier  CFX  5  April 29, 2013 00:00 