# Laminar Isothermal Flow in a duct

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

 April 25, 2012, 06:15 Laminar Isothermal Flow in a duct #1 Senior Member   Hector Redal Join Date: Aug 2010 Location: Madrid, Spain Posts: 243 Rep Power: 16 Hello, First of all, I would like to say that I have developed a code using the FEM (Finite Element Method) based on the CBS (Characteristic Based Split) Algorithm. Using this code, now, I would like to simulate a Laminar Isothermal Flow in a rectangular channel for an incompressible flow. I have set up the following boundary conditions: 1. Inlet condition: U1 = 1.0 U2 = 0.0 2. Solid wall condition (walls of the rectangular channel/duct) U1 = 0.0 U2 = 0.0 3. Outlet condition: P = 0.0 But, to my surprised, using this boundary conditions for an incompressible fluid flow, what I get is a recirculation of the flow. When stating a recirculation, I mean to say that the flow at the end of the duct (outlet) enters the domain instead of following the inlet velocity. Very strange. I cannot see the flow developing with the length of the duct / channel. Does anybody have an idea why this is happening? Do I have missed anything? Best regards, Hector.

 April 25, 2012, 10:59 #2 Senior Member     Chris DeGroot Join Date: Nov 2011 Location: Canada Posts: 414 Rep Power: 17 What are the rest of your BCs? How do you specify pressure at the inlet and walls and how do you specify velocity at the outlet? Is the duct long enough for the flow to exit fully-developed?

 April 25, 2012, 11:15 #3 Member   Mosi Owa Join Date: Nov 2011 Posts: 35 Rep Power: 14 Regardless of the duct length, you shouldn't have recirculation. I don't know how you set up pressure outlet but why don't you change your outlet BC to outflow? By that, you just need to set zero gradient for all variables at your outlet and just check for the continuity to be satisfied.

April 25, 2012, 18:49
#4
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by cdegroot What are the rest of your BCs? How do you specify pressure at the inlet and walls and how do you specify velocity at the outlet? Is the duct long enough for the flow to exit fully-developed?
Neither do I specify the pressure at the inlet nor at the walls.
In the inlet and in the walls I specify the velocity.
I only specify the velocity at the inlet. I don't specify the pressure at the outlet.
The length of the duct is ten time the required length for the flow to be developed.

April 25, 2012, 18:55
#5
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by BMCombustor Regardless of the duct length, you shouldn't have recirculation. I don't know how you set up pressure outlet but why don't you change your outlet BC to outflow? By that, you just need to set zero gradient for all variables at your outlet and just check for the continuity to be satisfied.
Do you refer by outflow condition to null velocity gradient?

April 25, 2012, 19:34
#6
Senior Member

Chris DeGroot
Join Date: Nov 2011
Posts: 414
Rep Power: 17
Quote:
 Originally Posted by HectorRedal Neither do I specify the pressure at the inlet nor at the walls. In the inlet and in the walls I specify the velocity. I only specify the velocity at the inlet. I don't specify the pressure at the outlet. The length of the duct is ten time the required length for the flow to be developed.
Hmm... you need to have a boundary condition for both velocity and pressure at all boundaries. You should be extrapolating pressure to the inlet and wall boundaries. Is that what you mean by not specifying pressure perhaps?

April 25, 2012, 20:08
#7
Member

Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 14
Quote:
 Originally Posted by HectorRedal Do you refer by outflow condition to null velocity gradient?
I'm not familiar with the term "null velocity gradient" but I mean that for general variable "PHI" at outlet node is equal to its neighbor, i.e. PHI(N,J)=PHI(N-1,J) which N stands for the outlet node.

 April 25, 2012, 23:30 #8 New Member   mj Join Date: Apr 2010 Posts: 5 Rep Power: 16 I'm not quite sure about what did u mean by "3. Outlet condition:P = 0.0". But I guess the outlet BC might be the problem. I agree with BMCombustor's reply.

 April 26, 2012, 04:57 #9 New Member   Dr. Madhukar M Rao Join Date: Nov 2010 Location: Bangalore, India Posts: 21 Rep Power: 15 Assuming that the CBS has been implemented following the description in "The Finite Element Method - Vol. 3" by Zienkiewicz, Taylor, and Nithiarasu, Chapter 3, the boundary conditions for outflow have been discussed in section 3.8.1 of that book.

April 27, 2012, 11:36
#10
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by cdegroot Hmm... you need to have a boundary condition for both velocity and pressure at all boundaries. You should be extrapolating pressure to the inlet and wall boundaries. Is that what you mean by not specifying pressure perhaps?
May I can disagree with you on this?

I am following an example of the following book:
Fundamentals of the Finite Element Method for Heat and Fluid Flow.
Roland W. Lewis and Perumal Nithiarasu.
Example 7.01.1, on page 218.
As an attachment, I have uploaded the drawing that appears for this example.
You can see, that on boundaries you only need to specify one of the variables: either pressure or velocity.

On the other hand, I totally agree with you that on boundaries you need to extrapolate the pressure, but in my opinion using the velocity boundary condition, and the conservation momentum equation.

Do you agree on this?
Attached Images
 example_7_10_1.jpg (24.8 KB, 12 views)

April 27, 2012, 11:41
#11
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by BMCombustor I'm not familiar with the term "null velocity gradient" but I mean that for general variable "PHI" at outlet node is equal to its neighbor, i.e. PHI(N,J)=PHI(N-1,J) which N stands for the outlet node.
Sorry for the misleading information I could have provided you with.
When stating "null velocity gradient", I mean to say that the gradient of the velocity is null. This is equivalent to say that at the far end of the duct, the velocity at one point is the same as the velocity of their neighbors. I think that this statement is in agreement with what you have stated.

Maybe then I need to change the boundary condition at the end of the duct for a boundary condition that enforces this condition.

Thanks for your help and support.

April 27, 2012, 11:46
#12
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by madhukar_m_rao Assuming that the CBS has been implemented following the description in "The Finite Element Method - Vol. 3" by Zienkiewicz, Taylor, and Nithiarasu, Chapter 3, the boundary conditions for outflow have been discussed in section 3.8.1 of that book.

As you have correctly mentioned, I am following the description of the book from Zienkiewicz.
But, I am trying to simulate the example that appears on other book:
Fundamentals of the Finite Element Method for Heat and Fluid flow, W. Lewis and P. Nithiarasu.
You can find it on chapter 7.10.1.
I have uploaded in a previous response a copy of the drawing that appears in the book related to this example.

You can take a look at it.
Any comment suggestion will be highly appreciated.

April 27, 2012, 11:51
#13
Senior Member

Chris DeGroot
Join Date: Nov 2011
Posts: 414
Rep Power: 17
Quote:
 Originally Posted by HectorRedal May I can disagree with you on this? I am following an example of the following book: Fundamentals of the Finite Element Method for Heat and Fluid Flow. Roland W. Lewis and Perumal Nithiarasu. Example 7.01.1, on page 218. As an attachment, I have uploaded the drawing that appears for this example. You can see, that on boundaries you only need to specify one of the variables: either pressure or velocity. On the other hand, I totally agree with you that on boundaries you need to extrapolate the pressure, but in my opinion using the velocity boundary condition, and the conservation momentum equation. Do you agree on this?
You may indeed disagree. First, I must admit I am not experienced in finite element methods; my background is in finite volume methods. However, in order to have a well-posed mathematical problem, a parabolic PDE needs conditions on all boundaries. If your numerical method somehow internally takes care of the pressure at boundaries where it is not specified, then fine, but this is still a boundary condition. Can you perhaps elaborate on how your method treats pressure at boundaries where it is unspecified? Similarly, how are you treating velocity at the outlet?

 April 27, 2012, 17:01 #14 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,781 Rep Power: 71 Can I have some answer about the following points? - Are you using a 2D steady or unsteady formulation ? What about your Re number? - Have you checked the divergence-free constraint in each element? - What about the shape functions for V and p? - Have you checked if the solution is independent from the fixed pressure value? It must be...

 April 28, 2012, 10:41 #15 New Member   Dr. Madhukar M Rao Join Date: Nov 2010 Location: Bangalore, India Posts: 21 Rep Power: 15 Dear Hector, Have you validated your code for the driven cavity problem or any similar benchmark problem without inlet/outlet? For the channel problem, how are you calculating / setting the pressure at the inlet and the velocities at the outlet? (See Fig 3.2 in Zienkiewicz's book). Regards,

April 28, 2012, 11:13
#16
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by madhukar_m_rao Dear Hector, Have you validated your code for the driven cavity problem or any similar benchmark problem without inlet/outlet? For the channel problem, how are you calculating / setting the pressure at the inlet and the velocities at the outlet? (See Fig 3.2 in Zienkiewicz's book). Regards,

I have validated my code towards the benchmark typical test case that is the lid driven cavity flow problem, as you precisely has stated.
The results that I am getting for this test case can be found at the following link to my personal web site:

They are not very good results. There is a slightly error. I bitterly must admit that I don't know where the problem is. I am struggling to discover where the error is.

Regarding the boundary conditions, as mentioned before, I do not set neither the pressure at the inlet, nor the velocity at the outlet.

Kind regards,

April 28, 2012, 11:17
#17
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by FMDenaro Can I have some answer about the following points? - Are you using a 2D steady or unsteady formulation ? What about your Re number? - Have you checked the divergence-free constraint in each element? - What about the shape functions for V and p? - Have you checked if the solution is independent from the fixed pressure value? It must be...
Dear Filippo,

I am using a unsteady formulation.
The Reynolds number I am using is 10 (Re = 10).
I am using the an equal shape formulation for the Velocity and Pressure fields.
I have not checked if the solution is independent from the fixed pressure value, but once I check it, I will come back with the results.

Thanks for your help and support.
Kind regards.

April 28, 2012, 13:15
#18
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
Quote:
 Originally Posted by HectorRedal Dear Filippo, I am using a unsteady formulation. The Reynolds number I am using is 10 (Re = 10). I am using the an equal shape formulation for the Velocity and Pressure fields. I have not checked if the solution is independent from the fixed pressure value, but once I check it, I will come back with the results. Thanks for your help and support. Kind regards.
ok,m don't forget to check the divergence-free constraint.
Furthermore, how do you check the steady condition? I am not an expert of FEM, however I remember that velocity and pressure should have different degree in the shape functions, try to check the BB conditions.
Are you using a coupling velocity-pressure formulation?

May 1, 2012, 01:05
#19
New Member

Join Date: Nov 2010
Location: Bangalore, India
Posts: 21
Rep Power: 15
Quote:
 Originally Posted by HectorRedal Dear Madhukar, I have validated my code towards the benchmark typical test case that is the lid driven cavity flow problem, as you precisely has stated. The results that I am getting for this test case can be found at the following link to my personal web site: https://sites.google.com/site/hector.../cfd-example-1 They are not very good results. There is a slightly error. I bitterly must admit that I don't know where the problem is. I am struggling to discover where the error is. Regarding the boundary conditions, as mentioned before, I do not set neither the pressure at the inlet, nor the velocity at the outlet. Kind regards,
[1] Regarding the driven cavity case on your website, you can try
mesh refinement to see if you get a better match.

[2] I would recommend verification and validation as described in the
book, "Verification of Computer Codes in Computational Science and
Engineering," by Knupp and Salari, Chapman & Hall/CRC, 2003.

[3] For the channel problem, what are your initial conditions?
and time step?

[4] After the first time step, what is the computed pressure at the
inlet nodes and the computed velocities at the outlet nodes?

May 3, 2012, 13:31
#20
Senior Member

Hector Redal
Join Date: Aug 2010
Posts: 243
Rep Power: 16
Quote:
 Originally Posted by madhukar_m_rao [1] Regarding the driven cavity case on your website, you can try mesh refinement to see if you get a better match. [2] I would recommend verification and validation as described in the book, "Verification of Computer Codes in Computational Science and Engineering," by Knupp and Salari, Chapman & Hall/CRC, 2003. [3] For the channel problem, what are your initial conditions? and time step? [4] After the first time step, what is the computed pressure at the inlet nodes and the computed velocities at the outlet nodes?

Next, I am going to answer your questions, so as to pinpoint which is the problem with my code.

The initial conditions for the problem are the following:
- velocity equal to zero in all nodes that do not have a boundary condition for the velocity
- pressure equal to zero in all nodes that do not have a boundary condition for the pressure.

The time step is set to a value minor than the value specified for the CFL condition for this algorithm.

After the first step of the algorithm, I have observed the following strange behaviour (I am using an structured grid formed with quad elements):
For odd nodes, the velocity goes in the same direction than the velocity boundary conditions.
For even nodes, the velocity goes in the contrary direction than the velocity boundary conditions.

In the outlet, the velocity goes in the same direction as in the inlet, but as you can observe, there are a lot of nodes (inner nodes) that have the velocity with a direction opposite to the boundary conditions.

Quite strange!

Does this behaviour have to do with the incompressiblity of the fluid?

Best regards,

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

 Similar Threads Thread Thread Starter Forum Replies Last Post junbbung FLUENT 2 November 26, 2022 21:22 rvallejo CFX 1 November 16, 2009 09:49 kjetil OpenFOAM Running, Solving & CFD 3 July 21, 2009 09:15 jane luo Main CFD Forum 15 April 12, 2004 17:49 Peter Kostka Main CFD Forum 3 May 9, 2002 17:02

All times are GMT -4. The time now is 06:09.