CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Implementation of periodic boundary condition on a 2D channel (https://www.cfd-online.com/Forums/main/250783-implementation-periodic-boundary-condition-2d-channel.html)

Divyaprakash July 9, 2023 08:32

Implementation of periodic boundary condition on a 2D channel
 
Hi,

Using https://www.montana.edu/mowkes/resea...0_02_28_v2.pdf document as a reference I wrote a code in Fortran, and I used that as a fluid solver to couple it with a simple structure solver via immersed boundary method.


I am now looking to simulate periodic boundary conditions at the two ends of the domain to simulate channel flow. However, I am getting very confused when it comes to applying boundary conditions for periodicity with the staggered grids of U, V, and P. Till now, all my efforts have failed.


Looking at the document (notations on page 3) can someone please tell me how one would apply periodicity to the left and right walls?

FMDenaro July 9, 2023 12:59

Quote:

Originally Posted by Divyaprakash (Post 853060)
Hi,

Using https://www.montana.edu/mowkes/resea...0_02_28_v2.pdf document as a reference I wrote a code in Fortran, and I used that as a fluid solver to couple it with a simple structure solver via immersed boundary method.


I am now looking to simulate periodic boundary conditions at the two ends of the domain to simulate channel flow. However, I am getting very confused when it comes to applying boundary conditions for periodicity with the staggered grids of U, V, and P. Till now, all my efforts have failed.


Looking at the document (notations on page 3) can someone please tell me how one would apply periodicity to the left and right walls?




Looking at Fig.1:


u(imax+1,j)=u(imin,j)
v(imax+1,j)=v(imin,j)
p(imax+1,j)=p(imin,j)


be careful on the pressure, you solve only for the fluctuationg part, a constant driving force is added explicitly in the momentu equation.

Divyaprakash July 10, 2023 03:12

Quote:

Originally Posted by FMDenaro (Post 853069)
Looking at Fig.1:


u(imax+1,j)=u(imin,j)
v(imax+1,j)=v(imin,j)
p(imax+1,j)=p(imin,j)


be careful on the pressure, you solve only for the fluctuationg part, a constant driving force is added explicitly in the momentu equation.


I need to calculate the right hand side(RHS) of the above equations in order to assign them to the left hand side. My issue is that I am unable to figure out how I would calculate the RHS in your equations?

FMDenaro July 10, 2023 03:34

Quote:

Originally Posted by Divyaprakash (Post 853090)
I need to calculate the right hand side(RHS) of the above equations in order to assign them to the left hand side. My issue is that I am unable to figure out how I would calculate the RHS in your equations?

Periodicity criterion applies for all nodes, not only on the boundaries.
Thus, you can write the equations at imin by considering any node at imin-1= imax-1.


All times are GMT -4. The time now is 01:57.