CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Periodic Boundary Condition (https://www.cfd-online.com/Forums/main/107569-periodic-boundary-condition.html)

 C.C October 1, 2012 11:50

Periodic Boundary Condition

Hi all,
I have a problem... I want simulate a flow in a pipe considering 2D axissymetric geometry with periodic boundary condition, but the pressure across the pipe length have a strange behavior with negative values. If I consider the inlet velocity boundary condition and outlet pressure boundary condition, the pressure profile is correct, but I need an entrance region and with the periodic boundary condition I can reduce the length...
Please, someone can help me... What is wrong? Is the periodic boundary condition advisable for my problem?
Thanks

 hnemati October 2, 2012 04:15

do you use pressure force in streamwise direction?

 C.C October 2, 2012 05:47

I specified the mass flow rate and I want the value of pressure drop to compare with experimental data.

 flotus1 October 2, 2012 05:48

Applying a periodic boundary condition in streamwise direction by simply copying the values from the outlet to the inlet results in the situation you observe.
Since there is a pressure drop along the channel, the pressure level gets lower every iteration. You could check this by running two simulations with different numbers of iterations.

 hnemati October 2, 2012 05:59

Yes I know, but for priodic simulation the important part is dp which should be included in stramwise momentum equation to force the flow. for example for a channel this pressure force is :dpdx = 12./Re ,where Re is based on height of channel.

 flotus1 October 2, 2012 06:08

So then what is the problem?
in an incompressible flow, you can compare the pressure drop (i.e. pressure derivative) to experimental data, independent of the pressure level.

Of course it would be more correct to rescale the pressure at the periodic interface, but the derivative remains unchanged by this procedure.

 leflix October 3, 2012 05:17

Quote:
 Originally Posted by C.C (Post 384394) Is the periodic boundary condition advisable for my problem? Thanks
Yes for sure, but I guess the problem is how you implement these periodic boundary conditions.
first you should apply Phy(NI)=Phy(1) and Phy(0)=Phy(NI-1)
(BC are on node 0 and NI)
Phy stands for u,v, P.
If your solver is explicit it is easy, if your solver is implicit then you have to
deal with this in your matrix.
After you have to include in the x momentum the pressure drop to maintain the flow. It is related to the mass flow rate and in the case of a pipe flow or a channel flow there is an analytical expression.

 FMDenaro October 3, 2012 05:49

Quote:
 Originally Posted by leflix (Post 384677) Yes for sure, but I guess the problem is how you implement these periodic boundary conditions. first you should apply Phy(NI)=Phy(1) and Phy(0)=Phy(NI-1) (BC are on node 0 and NI) Phy stands for u,v, P. If your solver is explicit it is easy, if your solver is implicit then you have to deal with this in your matrix. After you have to include in the x momentum the pressure drop to maintain the flow. It is related to the mass flow rate and in the case of a pipe flow or a channel flow there is an analytical expression.
I agree, if you use the non-dimensional form of the equation, where the Re_tau is the relevant non-dimensional number, the non-dimensional pressure gradient the force the flow in the stream-wise direction is simply -1

 C.C October 3, 2012 06:30

Quote:
 Originally Posted by leflix (Post 384677) Yes for sure, but I guess the problem is how you implement these periodic boundary conditions. first you should apply Phy(NI)=Phy(1) and Phy(0)=Phy(NI-1) (BC are on node 0 and NI) Phy stands for u,v, P. If your solver is explicit it is easy, if your solver is implicit then you have to deal with this in your matrix. After you have to include in the x momentum the pressure drop to maintain the flow. It is related to the mass flow rate and in the case of a pipe flow or a channel flow there is an analytical expression.
I'm using Ansys Fluent to simulate the pipe flow and in the pressure profile the pressure has negative values

 leflix October 3, 2012 06:41

Quote:
 Originally Posted by C.C (Post 384695) I'm using Ansys Fluent to simulate the pipe flow and in the pressure profile the pressure has negative values

But if you use Fluent , periodic BC are already implemented and you have nothing to do, just click on "Periodic Boundary Condition" :D
If it doesn't work it is because you certainly did something wrong previously...

 FMDenaro October 3, 2012 06:42

Quote:
 Originally Posted by C.C (Post 384695) I'm using Ansys Fluent to simulate the pipe flow and in the pressure profile the pressure has negative values
negative values of the pressure means nothing useful... you must assess that youy have a basic (constant) negative pressure gradient with a superimposed periodic pressure fluctuation

 prasanthnitt October 7, 2012 13:51

2D Channel Flow eith Periodic boundaries in the streamwise directions

Hi All,

I have written a 2D Incompressible NS solver for solving a channel flow with periodic boundary conditions. I am using a fractional step method(Kim and Moin 1985 JCP). I have non dimensionalized the equations. The rey_no is set to 100.

Channel Dimensions:
2 units: in the stream-wise and in the normal direction
Time integration scheme:
AB-2

A constant pressure gradient of value -2.0/rey_no is specified.
Staggered grid.
Periodic bcn in the stream-wise direction:
u(ni,.)=u(1,.)
u(0,.)=u(ni-1,.)

V(ni+1,.)=v(1,.)
v(0,.)=v(ni,.)

p(ni+1,.)=p(1,.)
p(0,.)=p(ni,.)

u and v represent the horizontal velocity components.
p represents pressure.

Boundary conditions in the normal direction:
u(:,0)=-u(:,1) //No Slip
u(:,nj+1)=-u(:,nj) //No penetration

v(:,0)=0.0
v(:,nj)=0.0

dp/dn =0 at y=0 and y=2

Initial condition:
I have tried several:
u(:, j )=1.0
u(:,j)=parabola with centerline velocity=1

So, the analytical solution for this problem is a parabola with centerline velocity=1.
But in my case the centerline velocity is greater than 1. I don't know why this is happening.
Help of any kind would be appreciated. I would be more than happy to provide any extra information.

Cheers
Prasanth

 leflix October 12, 2012 12:48

Quote:
 Originally Posted by prasanthnitt (Post 385363) So, the analytical solution for this problem is a parabola with centerline velocity=1. But in my case the centerline velocity is greater than 1. I don't know why this is happening. Prasanth
Hi Prasanth,

No in the case of a channel flow the dimensionless velocity on the centerline is 1.5
Is it what you obtained?

 prasanthnitt October 13, 2012 01:29

[QUOTE

No in the case of a channel flow the dimensionless velocity on the centerline is 1.5
Is it what you obtained?[/QUOTE]

Its 1.5 if you normalize with the average velocity. I am normalizing with the centre-line velocity.
The issue has been fixed. I applied the pressure gradient in the velocity update step (from u* to u n+1) and it worked.

Thanks.

 leflix October 14, 2012 11:41

Quote:
 Originally Posted by prasanthnitt (Post 386374) [QUOTE I am normalizing with the centre-line velocity. The issue has been fixed. I applied the pressure gradient in the velocity update step (from u* to u n+1) and it worked. Thanks.
ok it's fine!!

 Kamu November 17, 2012 10:28

Hello all
I am using a periodic boundary condition pipe flow with an insert. I read in FLUENT user guide that the pressure drop has two components, a linear varying component and a periodic component. How do you get the periodic component? Is there a way of post processing the pressure drop that includes the two components???

 sbaffini November 18, 2012 11:21

There is no reason to post process the linearly varying part, as ALL the information you need about it is in the periodic condition panel, that is gradient and direction. The periodic component is the only one you get as solution and it is the only one available in the post processing.

If you want, you can define a custom field function with the following variable:

p + dp/dx*(x-x0) + dp/dy*(y-y0) + dp/dz*(z-z0)

and you get them both

 Kamu November 19, 2012 02:52

Quote:
 Originally Posted by sbaffini (Post 392795) There is no reason to post process the linearly varying part, as ALL the information you need about it is in the periodic condition panel, that is gradient and direction. The periodic component is the only one you get as solution and it is the only one available in the post processing. If you want, you can define a custom field function with the following variable: p + dp/dx*(x-x0) + dp/dy*(y-y0) + dp/dz*(z-z0) and you get them both
Thanks Sbaffini for your reply. When i put in the custom field function i will get the pressure at a given point. My dilemma is that when you define periodic conditions the inlet and outlet are combined and the pressure I get is at inlet. to get the pressure drop, dp = Pin-Pout! How do I get Pout?

 sbaffini November 19, 2012 05:50

In the custom field function above, the pressure is the one effectively solved for by Fluent; in this case it gives you p_in = p_out (at least for the straight pipe case).

If you performed a periodic computation by fixing the mass flow, then dp/dx is available in the periodic b.c. panel (it also has a direction, which you needed to fix... hopefully, along the pipe axis). So, to know the presure jump in your case you just need to compute dp/dx * L where L is the length of the pipe

 Kamu November 19, 2012 05:58

Periodic pressure drop

Quote:
 Originally Posted by sbaffini (Post 392903) In the custom field function above, the pressure is the one effectively solved for by Fluent; in this case it gives you p_in = p_out (at least for the straight pipe case). If you performed a periodic computation by fixing the mass flow, then dp/dx is available in the periodic b.c. panel (it also has a direction, which you needed to fix... hopefully, along the pipe axis). So, to know the presure jump in your case you just need to compute dp/dx * L where L is the length of the pipe
Dear Paolo,
Thanks very much for the help. This is what i had settled for i would get dp/dx and then multiply by the length of the pipe. I realized that when i compute the friction factor it does not agree with that from experimental data. And when I use the linear gradient in the periodic panel it gives me an accurate answer! Could I be getting dp/dx at a wrong surface?

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