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

periodic boundary condition in rectangular duct

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

Like Tree1Likes
  • 1 Post By nedanikou

Reply
 
LinkBack Thread Tools Display Modes
Old   November 6, 2016, 11:11
Default periodic boundary condition in rectangular duct
  #1
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
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?
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 11:45
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
You did not specify your integration method, is it explicit? How do you check for the stability constraint? How do you compute the residuals?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 12:06
Default
  #3
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 12:14
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
what about the Reynolds number? what about the spatial discretization?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 12:21
Default
  #5
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
what about the Reynolds number? what about the spatial discretization?
Reynolds no. is 500 and finite volume method was used for discretization.
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 12:32
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
Quote:
Originally Posted by nedanikou View Post
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?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 12:41
Default
  #7
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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?
thanks to your answer.
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.
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 13:09
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
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?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 13:36
Default
  #9
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
thanks to your help
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 13:49
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
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?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 15:17
Default fully developed laminar flow
  #11
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
fully developed velocity profile and residuals attached please find it.
Attached Files
File Type: pdf fully developed laminar flow of rectangular duct.pdf (20.6 KB, 6 views)
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 15:30
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
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?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 15:42
Default
  #13
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 15:56
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
Quote:
Originally Posted by nedanikou View Post
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?
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 16:23
Default viscous fluid flow of White pge 119-fully developed laminar flow
  #15
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
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
File Type: jpg white.jpg (68.1 KB, 7 views)
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 17:00
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
Quote:
Originally Posted by nedanikou View Post
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.
FMDenaro is online now   Reply With Quote

Old   November 6, 2016, 17:06
Default
  #17
New Member
 
neda sheikh rezazadeh nikou
Join Date: Nov 2016
Location: Iran
Posts: 11
Rep Power: 2
nedanikou is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
FMDenaro likes this.
nedanikou is offline   Reply With Quote

Old   November 6, 2016, 17:27
Default
  #18
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,354
Rep Power: 37
FMDenaro will become famous soon enoughFMDenaro will become famous soon enough
I suggest also to provide the analytical solution as initial field, check if you get the convergence using a low threshold.
FMDenaro is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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


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


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