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

Laminar Isothermal Flow in a duct

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 3, 2012, 13:55
Default
  #21
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,653
Rep Power: 23
FMDenaro will become famous soon enough
Quote:
Originally Posted by HectorRedal View Post
Dear Madhukar,
First of all, I would like to thank you for your ideas and help you had provided to me.

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,
I suspect you are simply encountering spurious solution, your patchwork resembles that one encountered with FV non-staggered grids...

First of all, I suggest starting with an initial condition of uniform flow everiwhere (U= constant, V=0) and a linear pressur law along x
FMDenaro is online now   Reply With Quote

Old   May 5, 2012, 09:23
Default
  #22
New Member
 
Dr. Madhukar M Rao
Join Date: Nov 2010
Location: Bangalore, India
Posts: 20
Rep Power: 6
madhukar_m_rao is on a distinguished road
Quote:
Originally Posted by HectorRedal View Post
Dear Madhukar,
First of all, I would like to thank you for your ideas and help you had provided to me.

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,
Most likely. What element types are you using for the velocity and pressure?
Also, are you using split A or split B formulation for time-stepping (see Zienkiewicz's book) ?
madhukar_m_rao is offline   Reply With Quote

Old   May 6, 2012, 14:55
Default
  #23
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 7
HectorRedal is on a distinguished road
Quote:
Originally Posted by madhukar_m_rao View Post
Most likely. What element types are you using for the velocity and pressure?
Also, are you using split A or split B formulation for time-stepping (see Zienkiewicz's book) ?
I am using Quad elements in the mesh.

I am using the split A formulation for the time-stepping.
According to the reference (Zienkiewicz's book), this split allows the use of equal interpolation for the shape functions in quad elements.
I am using shape functions for the velocity and for the pressure with equal degrees for both.
HectorRedal is offline   Reply With Quote

Old   May 7, 2012, 02:32
Default
  #24
New Member
 
Dr. Madhukar M Rao
Join Date: Nov 2010
Location: Bangalore, India
Posts: 20
Rep Power: 6
madhukar_m_rao is on a distinguished road
Quote:
Originally Posted by HectorRedal View Post
I am using Quad elements in the mesh.

I am using the split A formulation for the time-stepping.
According to the reference (Zienkiewicz's book), this split allows the use of equal interpolation for the shape functions in quad elements.
I am using shape functions for the velocity and for the pressure with equal degrees for both.
You can try one or both of the following:

[1] use a velocity/pressure element combination that satisfies BB.

[2] ensure global mass conservation by adjusting the outlet velocity field
such that the outlet mass flow matches the inlet mass flow.

Best regards,
Madhukar
madhukar_m_rao is offline   Reply With Quote

Old   May 7, 2012, 12:51
Default
  #25
Member
 
Join Date: May 2010
Posts: 55
Rep Power: 7
hewei is on a distinguished road
Quote:
Originally Posted by madhukar_m_rao View Post
You can try one or both of the following:

[1] use a velocity/pressure element combination that satisfies BB.

[2] ensure global mass conservation by adjusting the outlet velocity field
such that the outlet mass flow matches the inlet mass flow.

Best regards,
Madhukar
Hi Madhukar,
It seems that I did the same simulation work. I just set the all pressure conditions as zerogradient except the outlet one is fivedvalue 0.
And the velocity is uniform: U=1 and V=0 at inlet, fixed wall is zero and outlet is zerogradient.
the solution as shown in pic,the left down one is the velocity at inlet and right one is the velocity at x=4.
I find the velocity at the inlet is not zero but half of the inlet. I am not sure if the solution is right or not.
Thank you,
Wei
Attached Images
File Type: jpg velocity at x=0 and x=4.jpg (28.3 KB, 4 views)

Last edited by hewei; May 7, 2012 at 15:11.
hewei is offline   Reply With Quote

Old   May 7, 2012, 15:48
Red face
  #26
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 7
HectorRedal is on a distinguished road
Quote:
Originally Posted by madhukar_m_rao View Post
You can try one or both of the following:

[1] use a velocity/pressure element combination that satisfies BB.

[2] ensure global mass conservation by adjusting the outlet velocity field
such that the outlet mass flow matches the inlet mass flow.

Best regards,
Madhukar
Dear Madhukar,

Firtst of all, I would like to thank you for your help and support.
After this, I would like to mention that accorting to the reference (Zienkiewicz, chapter 3.4: Circunventing the Babuska - Brezzi restricction ), split A avoids any restriction on the nature of the two shape functions used for velocity and for pressue.
As I have mentioned in an previous answer, I am using equal degree in both velocity shape functions and pressure shape functions.

According to this reference:
A finite element formulation for the Stokes problem allowing equal velocity-pressure interpolation. Ramon Codina - Jordi Blasco. Comput. Methods Appl. Mech. Engrg 143 (1997) 373 - 391, the use of equal velocity interpolation can be used in the CBS scheme algorithm.

Consequently, a doubt arises to me at this point. If according to Zienkiewicz and Codina/Blasco this type of interpolation functions are feasible, why are they failing in my case?

Kind regards.
HectorRedal is offline   Reply With Quote

Old   May 7, 2012, 15:50
Default
  #27
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 7
HectorRedal is on a distinguished road
Quote:
Originally Posted by hewei View Post
Hi Madhukar,
It seems that I did the same simulation work. I just set the all pressure conditions as zerogradient except the outlet one is fivedvalue 0.
And the velocity is uniform: U=1 and V=0 at inlet, fixed wall is zero and outlet is zerogradient.
the solution as shown in pic,the left down one is the velocity at inlet and right one is the velocity at x=4.
I find the velocity at the inlet is not zero but half of the inlet. I am not sure if the solution is right or not.
Thank you,
Wei
Hi Hewei,

I would like bring up the following question.
Are you using the same algorithm than me for carrying this simulation?
What I would like to know if you are using the CBS algorithm for the finite element method.

Best regards,
HectorRedal is offline   Reply With Quote

Old   May 7, 2012, 17:11
Default
  #28
Member
 
Join Date: May 2010
Posts: 55
Rep Power: 7
hewei is on a distinguished road
Quote:
Originally Posted by HectorRedal View Post
Hi Hewei,

I would like bring up the following question.
Are you using the same algorithm than me for carrying this simulation?
What I would like to know if you are using the CBS algorithm for the finite element method.

Best regards,
Hi Hector,
I used the OpenFoam to simulate the flow, as we know ,the OpenFoam is basically on FV method,I adopted the icoFoam to do that, so I am not sure this information may help you on FEM.

yours,
Wei
hewei is offline   Reply With Quote

Old   May 8, 2012, 00:05
Default
  #29
New Member
 
Dr. Madhukar M Rao
Join Date: Nov 2010
Location: Bangalore, India
Posts: 20
Rep Power: 6
madhukar_m_rao is on a distinguished road
Quote:
Originally Posted by hewei View Post
Hi Madhukar,
It seems that I did the same simulation work. I just set the all pressure conditions as zerogradient except the outlet one is fivedvalue 0.
And the velocity is uniform: U=1 and V=0 at inlet, fixed wall is zero and outlet is zerogradient.
the solution as shown in pic,the left down one is the velocity at inlet and right one is the velocity at x=4.
I find the velocity at the inlet is not zero but half of the inlet. I am not sure if the solution is right or not.
Thank you,
Wei
Have you checked global mass conservation?

Assuming that you wrote your own code, you can check the results against
one of the freely available open source codes.

Best regards,
Madhukar
madhukar_m_rao is offline   Reply With Quote

Old   June 2, 2012, 07:04
Default
  #30
Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 67
Rep Power: 7
HectorRedal is on a distinguished road
Quote:
Originally Posted by madhukar_m_rao View Post
Have you checked global mass conservation?

Assuming that you wrote your own code, you can check the results against
one of the freely available open source codes.

Best regards,
Madhukar
Hi Madhukar,

After struggling with the code, I discovered a bug in my code when assembling the force terms in the CBS Algorithm. The force term were correctly calculated, but the assembly utility failed to assemble the forces from each element.
Once I have fixed this bug, I have re-run the test case. I am enclosing the results I have obtained.

It appears to me that this are miles better than the ones I had previously got.

What's your impression about these new results?

I have also updated the results for the lid driven cavity flow.
You can take a look at them in the following link:
https://sites.google.com/site/hector.../cfd-example-1

I would like to thank all of you for your kind help and support.
Thank you very much!!!

Best regards,
Hector Redal
Attached Images
File Type: png LaminarIsothermalFlow.png (33.0 KB, 5 views)
HectorRedal is offline   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
Laminar flow and wall roughness junbbung FLUENT 1 December 2, 2012 06:57
Laminar Flow rvallejo CFX 1 November 16, 2009 10:49
Laminar field as initial state for turbulent two phase pipe flow kjetil OpenFOAM Running, Solving & CFD 3 July 21, 2009 09:15
flow simulation across a small fan jane luo Main CFD Forum 15 April 12, 2004 17:49
Divergence of Laminar Flow With Eddy ??? Peter Kostka Main CFD Forum 3 May 9, 2002 17:02


All times are GMT -4. The time now is 14:26.