Skip to content

Boundary Conditions

AstroSnow edited this page Nov 1, 2018 · 6 revisions

There are several inbuilt boundary conditions that can be called. To describe this, we consider a test domain consisting of 5 cells, with 2 ghost cells either side, as shown in the Figure below:

boundary_conditions

Inbuild boundary conditions are described below

Periodic (flag_bnd(i) = 1)

For all variables, the ghost cells are mapped as follows:

L1=4,

L2=5,

R1=1,

R2=2.

Symmetric or free2 (flag_bnd(i) = 2)

Variables are reflected across the boundary. Velocity and magnetic field components through the boundary are reversed, i.e.,

rho(L1)=rho(2)

rho(L2)=rho(1)

vx(L1)=-vx(2)

vx(L2)=-vx(1)

vy(L1)=vy(2)

vy(L2)=vy(1)

vz(L1)=vz(2)

vz(L2)=vz(1)

Pr(L1)=Pr(2)

Pr(L2)=Pr(1)

Bx(L1)=-Bx(2)

Bx(L2)=-Bx(1)

By(L1)=By(2)

By(L2)=By(1)

Bz(L1)=Bz(2)

Bz(L2)=Bz(1)

Symmetric2 (flag_bnd(i) = 3)

rho(L1)=rho(2)

rho(L2)=rho(1)

vx(L1)=-vx(2)

vx(L2)=-vx(1)

vy(L1)=vy(2)

vy(L2)=vy(1)

vz(L1)=-vz(2)

vz(L2)=-vz(1)

Pr(L1)=Pr(2)

Pr(L2)=Pr(1)

Bx(L1)=Bx(2)

Bx(L2)=Bx(1)

By(L1)=-By(2)

By(L2)=-By(1)

Bz(L1)=Bz(2)

Bz(L2)=Bz(1)

Symmetric3 (flag_bnd(i) = 4)

rho(L1)=rho(2)

rho(L2)=rho(1)

vx(L1)=-vx(2)

vx(L2)=-vx(1)

vy(L1)=-vy(2)

vy(L2)=-vy(1)

vz(L1)=vz(2)

vz(L2)=vz(1)

Pr(L1)=Pr(2)

Pr(L2)=Pr(1)

Bx(L1)=Bx(2)

Bx(L2)=Bx(1)

By(L1)=By(2)

By(L2)=By(1)

Bz(L1)=-Bz(2)

Bz(L2)=-Bz(1)