Skip to main content
to be more precise
Source Link
Fei Zhu
  • 146
  • 3

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either gets reflected($\mathbf{b}==1||\mathbf{b}==2$)or or not change ($\mathbf{b}!=1\&\&\mathbf{b}!=2$) at domain boundary. The condition $\mathbf{b}$ is a user option, $\mathbf{b}==1$ is used to set reflected values at the horizonal boundaries, and $\mathbf{b}==2$ is to set reflected values at vertical boundaries, and $\mathbf{b}$ of other values are used. To be more clear:

  • $\mathbf{b}==1$: field values at horizonal boundaries get reflected, field values at vertical boundaries do not change.
  • $\mathbf{b}==2$: field values at vertical boundaries get reflected, field values at horizonal boundaries do not change.
  • $\mathbf{b}== other\ value$: field values at neither vertical nor horizonal boundaries do not change.

set_bnd could be called multiple times to indicate fieldset desired boundary values won't change for both horizonal and vertical boundaries.

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either gets reflected($\mathbf{b}==1||\mathbf{b}==2$)or not change ($\mathbf{b}!=1\&\&\mathbf{b}!=2$) at domain boundary. The condition $\mathbf{b}$ is a user option, $\mathbf{b}==1$ is used to set reflected values at the horizonal boundaries, $\mathbf{b}==2$ is to set reflected values at vertical boundaries, and $\mathbf{b}$ of other values are used to indicate field values won't change for both horizonal and vertical boundaries.

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either gets reflected or not change at domain boundary. The condition $\mathbf{b}$ is a user option, $\mathbf{b}==1$ is used to set reflected values at the horizonal boundaries, and $\mathbf{b}==2$ is to set reflected values at vertical boundaries. To be more clear:

  • $\mathbf{b}==1$: field values at horizonal boundaries get reflected, field values at vertical boundaries do not change.
  • $\mathbf{b}==2$: field values at vertical boundaries get reflected, field values at horizonal boundaries do not change.
  • $\mathbf{b}== other\ value$: field values at neither vertical nor horizonal boundaries do not change.

set_bnd could be called multiple times to set desired boundary values.

corrected little mistakes in explanation
Source Link
Fei Zhu
  • 146
  • 3

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either not changegets reflected($\mathbf{b}==1$$\mathbf{b}==1||\mathbf{b}==2$)or gets reflectednot change ($\mathbf{b}==2$$\mathbf{b}!=1\&\&\mathbf{b}!=2$) at domain boundary. The condition $\mathbf{b}$ is a user option, $\mathbf{b}==1$ is used to set reflected values at the horizonal boundaries, $\mathbf{b}==2$ is to set reflected values at vertical boundaries, and $\mathbf{b}$ of other values are used to indicate field values won't change for both horizonal and vertical boundaries.

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either not change($\mathbf{b}==1$)or gets reflected ($\mathbf{b}==2$) at domain boundary. The condition $\mathbf{b}$ is a user option.

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either gets reflected($\mathbf{b}==1||\mathbf{b}==2$)or not change ($\mathbf{b}!=1\&\&\mathbf{b}!=2$) at domain boundary. The condition $\mathbf{b}$ is a user option, $\mathbf{b}==1$ is used to set reflected values at the horizonal boundaries, $\mathbf{b}==2$ is to set reflected values at vertical boundaries, and $\mathbf{b}$ of other values are used to indicate field values won't change for both horizonal and vertical boundaries.

Source Link
Fei Zhu
  • 146
  • 3

It's Dirichlet boundary condition. The quantities at domain boundaries will take either the same value as its inner neighbor or the negated value, depending on the condition $\mathbf{b}$. Take velocity field for instance, velocity of fluid will either not change($\mathbf{b}==1$)or gets reflected ($\mathbf{b}==2$) at domain boundary. The condition $\mathbf{b}$ is a user option.