Skip to content

Commit

Permalink
update BC with dens_src and xmom_src
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Jul 25, 2024
1 parent 815890b commit e40a8a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyro/compressible/BC.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def user(bc_name, bc_edge, variable, ccdata):

# we will take the density to be constant, the velocity to
# be outflow, and the pressure to be in HSE
if variable in ["density", "x-momentum", "y-momentum", "ymom_src", "E_src", "fuel", "ash"]:
if variable in ["density", "x-momentum", "y-momentum",
"dens_src", "xmom_src", "ymom_src", "E_src",
"fuel", "ash"]:
v = ccdata.get_var(variable)
j = myg.jlo-1
while j >= 0:
Expand Down Expand Up @@ -99,7 +101,9 @@ def user(bc_name, bc_edge, variable, ccdata):

# we will take the density to be constant, the velocity to
# be outflow, and the pressure to be in HSE
if variable in ["density", "x-momentum", "y-momentum", "ymom_src", "E_src", "fuel", "ash"]:
if variable in ["density", "x-momentum", "y-momentum",
"dens_src", "xmom_src", "ymom_src", "E_src",
"fuel", "ash"]:
v = ccdata.get_var(variable)
for j in range(myg.jhi+1, myg.jhi+myg.ng+1):
v[:, j] = v[:, myg.jhi]
Expand Down

0 comments on commit e40a8a5

Please sign in to comment.