CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Laminar steady flow between parallel plates using Fortran (https://www.cfd-online.com/Forums/main/125851-laminar-steady-flow-between-parallel-plates-using-fortran.html)

saaghi November 1, 2013 15:46

Laminar steady flow between parallel plates using Fortran
 
Hello,

I have developed a code to solve momentum and energy equations in a lid driven cavity using QUICK scheme to interpolate the convective terms and MMIM1 method to avoid checker board pressure field problem (since collocated grids have been employed) and my results were compatible with the benchmark.

Now I am going to solve laminar steady flow between two parallel plates including the entrance length. We have uniform velocity at the entrance.

To solve the momentum equation, I changed the near boundary source terms at the outlet and the boundary values at the inlet and outlet boundaries. Since my outlet is at fully developed region, the velocity gradient has set to be zero at this boundary and for inlet boundary I used dirihlet boundary conditions.

The problem is that the axial velocity vanishes in the axial direction and it will be zero after a specific length. I was wondering if any of you has experienced the same problem before or has any idea to help me. I appreciate if you help me in this regard.

Thanks in advance,

FMDenaro November 1, 2013 16:38

Quote:

Originally Posted by saaghi (Post 460170)
Hello,

I have developed a code to solve momentum and energy equations in a lid driven cavity using QUICK scheme to interpolate the convective terms and MMIM1 method to avoid checker board pressure field problem (since collocated grids have been employed) and my results were compatible with the benchmark.

Now I am going to solve laminar steady flow between two parallel plates including the entrance length. We have uniform velocity at the entrance.

To solve the momentum equation, I changed the near boundary source terms at the outlet and the boundary values at the inlet and outlet boundaries. Since my outlet is at fully developed region, the velocity gradient has set to be zero at this boundary and for inlet boundary I used dirihlet boundary conditions.

The problem is that the axial velocity vanishes in the axial direction and it will be zero after a specific length. I was wondering if any of you has experienced the same problem before or has any idea to help me. I appreciate if you help me in this regard.

Thanks in advance,


Are you solving a compressible flow problem? Actually, for incompressible flows you cannot have that the flow rate changes along the axis.

As very simple check, I suggest to set inflow and outflow to Dirichlet BC for laminar flow, that is the parabolic velocity profile. Check if you get a steady Poiseuille solution. Then, if everything works fine, set the outlet with Neumann condition and see what happens.

saaghi November 2, 2013 09:20

1 Attachment(s)
Dear Filippo,

Thank you very much for the idea, it helped me in a way.
I tried the Poiseuille flow profile at both the inlet and outlet boundaries. The result I achieved still have a serious problem as you see in following link:

Attachment 26545

It tells me that the problem in my code was not at the boundaries. It seems to be in momentum equation solution itself.

But what I can not understand is if something is wrong with momentum solution why I got an accurate answer in lid driven cavity problem?

Sincerely,

FMDenaro November 2, 2013 09:27

Quote:

Originally Posted by saaghi (Post 460237)
Dear Filippo,

Thank you very much for the idea, it helped me in a way.
I tried the Poiseuille flow profile at both the inlet and outlet boundaries. The result I achieved still have a serious problem as you see in following link:

Attachment 26543

It tells me that the problem in my code was not at the boundaries. It seems to be in momentum equation solution itself.

But what I can not understand is if something is wrong with momentum solution why I got an accurate answer in lid driven cavity problem?

Sincerely,


I cannot see the attachment... I suggest to work still on the Poiseuille case, try to initialise with the analytical solution and check if the divergence-free constraint is fulfilled. Use a low Re number

saaghi November 2, 2013 09:39

Thanks for the help, sure I will try to do that.
Sorry, I edited the attachment link.

FMDenaro November 2, 2013 09:47

Quote:

Originally Posted by saaghi (Post 460241)
Thanks for the help, sure I will try to do that.
Sorry, I edited the attachment link.


There is for sure an error in the code, I see the inflow and outflow that simply diffuse the parabolic profile in the interior. It seems that the pressure gradient does not enter into the solution

saaghi November 3, 2013 08:23

I have tried to check the code with different relaxation factors and different grid numbers. I have been bewildered by the result. The result is completely different for different relaxation factors and different grid numbers.

I don't understand why I should get completely different results when I only change the number of grids?! Is this normal?

saaghi November 14, 2013 15:35

Hello,

I am still dealing with two problems in my code:
1- my solution is sensitive to the grid number
2- The velocity oscillates at a few entrance nodes

I believe the problem can be from outlet boundary pressure . I have been using a two point extrapolation to find the outlet pressure but I recently found an article which said:

"The outlet pressure is set equal to the sum of the pressure of upstream nodes and a uniform bulk pressure correction."

But I can't find anything about the term "uniform bulk pressure correction" in the literature.

Appreciate if you share any information about the outlet pressure boundary condition.

Sincerely

mrtzmoosavian February 7, 2016 01:28

Dear all

I am looking for a simple fortran code for steady state flow solver in a pipe 2d and 3d

your help would be appreciated

mechiebud April 5, 2016 15:11

Quote:

Originally Posted by saaghi (Post 460170)
Hello,

I have developed a code to solve momentum and energy equations in a lid driven cavity using QUICK scheme to interpolate the convective terms and MMIM1 method to avoid checker board pressure field problem (since collocated grids have been employed) and my results were compatible with the benchmark.

Now I am going to solve laminar steady flow between two parallel plates including the entrance length. We have uniform velocity at the entrance.

To solve the momentum equation, I changed the near boundary source terms at the outlet and the boundary values at the inlet and outlet boundaries. Since my outlet is at fully developed region, the velocity gradient has set to be zero at this boundary and for inlet boundary I used dirihlet boundary conditions.

The problem is that the axial velocity vanishes in the axial direction and it will be zero after a specific length. I was wondering if any of you has experienced the same problem before or has any idea to help me. I appreciate if you help me in this regard.

Thanks in advance,

Hi,
I too am facing the same issue.A llong the length of the channel the velocity decreases but ideally it should increse. Could you please guide me if your issue is resolved.

Mateja July 2, 2020 09:23

Flow between horizontal plates in fortran
 
Hello,
I am solving laminar, Incompressible flow between two horizontal parallel plates in FORTRAN. The Boundary conditions (BC) that I used are as follows:

For Velocity Dirichlet at the Inlet (that makes a parabolic profile), No slip at the walls and Neumann at the Outlet.
For Pressure Dirichlet at the Outlet, Dirichlet at the Outlet and Neumann at the Walls. The Pressure velocity correction is done through PISO.
Right now, I am using 30 Pa pressure at the Inlet and 0 at the Outlet and the program works.

Is it a good idea to use both pressure and velocity boundary conditions at the Inlet? My colleague told me that I should use one of these, Otherwise the system is overdetermined. Or I should use zero pressure at the outlet only (I am not sure if it works or not)?

If anyone can ellaborate this.


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