|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
- void BndConds::ZeroResiduals( const Geometry &geometry, Equations equsType, CONSVARS rhs[] )
- {
- int i, ib, ibn, ibegn, iendn;
- ibegn = 0;
- for (ib=0; ib<geometry.nSegs; ib++)
- {
- iendn = geometry.ibound[ib].bnodeIndex;
- // symmetry boundary
- if (geometry.btype[ib]>=500 && geometry.btype[ib]<600)
- {
- if (geometry.btype[ib]-500 < 2) // x=const. line -> x-component
- {
- for (ibn=ibegn; ibn<=iendn; ibn++)
- {
- i = geometry.bnode[ibn].node;
- rhs[i].xmom = 0.0;
- }
- }
- else // y=const. line -> y-component
- {
- for (ibn=ibegn; ibn<=iendn; ibn++)
- {
- i = geometry.bnode[ibn].node;
- rhs[i].ymom = 0.0;
- }
- }
- // viscous (no-slip) wall
- }
- else if ((geometry.btype[ib]>=300 && geometry.btype[ib]<400) &&
- equsType==Equations::NavierStokes)
- {
- for (ibn=ibegn; ibn<=iendn; ibn++)
- {
- i = geometry.bnode[ibn].node;
- rhs[i].xmom = 0.0; // velocity components = 0
- rhs[i].ymom = 0.0;
- }
- }
- ibegn = iendn + 1;
- } // boundary
- }
复制代码
为什么要对粘性壁面的残差进行归零? 粘性壁面也是有动量通量和粘性通量的,但是Blazek附带的C++程序,将其通量残差归零,不明白怎么回事,希望高手指点
|
|