CFD-NHT-EHD分享 http://blog.sciencenet.cn/u/harbinyg Computational Fluid Dynamics; Numerical Heat Transfer; Electrohydrodynamics;

博文

[HELP] About the implemention of periodic boundary conditi

已有 4206 次阅读 2012-6-28 23:15 |个人分类:help|系统分类:科研笔记|关键词:学者| Long, solutions, horizontal, direction, currently

I currently meet some problems with the implementaion of the periodic boundary condition for transient Rayleigh-Benard convection problem.

My code is based on FVM, SIMPLE algorithm and colocatted grid system (with Rhie-Chow interpolation) .

i am prettly sure that my code works for adiabtic boundary condition for temperature (no-slip wall for velocities), as i compared my results with some beachmark solutions.

To simulate a infinite long domain in horizontal direction (my solver is two - dimensional), i want to implment periodic boundary condition for temperature, velocity and pressure fields.

Thus i did some modification of the code,

for tempearture and velocity field, i exchange the values on boundaries, like (a N by N grid )
phi(1, j) = phi(N-1,j)
phi(N,j) = phi(2,j)
then treat the boundary type like Dirichlet condition;

for pressure field,

at the beginning i think we may not need any modification as the problem i considered is not like the other type periodic boundary condition , like there is a incomming flow and we need to guarantee the constant pressure drop.

then i realized that the pressure correction genearlly implicitly incoperates with Neumann boundaries for all boundaries, then i did some modification like temperature field.

However, i failed, as the solver directly divergence in the first two or three time steps and i do not know the reason. I wish someone who has similar experience can help me.

If someone can provide some usful materials, it would be great.

in each time step,
i firstly compute U, V
then compute P
finally compute T

in the subroutine for computing pressure correction,
i first assemble AE, AW, AN, AS, AP and right hand side (Su)
then i set the value on boundaries according to the periodic boundary conditions, take the west side as example,
i set pp(1,j) = pp(N-1,j) , pp stands for pressure correction;
since i have the values on boundaries, i treat it like Dirichlet boundary condition
then i call the linear sysmeter solver ...




https://m.sciencenet.cn/blog-117480-586917.html

上一篇:正式加入这个大家庭!

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-2 08:14

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部