99import eos
1010from util import msg
1111
12- def user (bcName , bcEdge , variable , my_data ):
13-
12+ def user (bc_name , bc_edge , variable , my_data ):
13+ """
14+ A hydrostatic boundary. This integrates the equation of HSE into
15+ the ghost cells to get the pressure and density under the assumption
16+ that the specific internal energy is constant.
17+
18+ Upon exit, the ghost cells for the input variable will be set
19+
20+ Parameters
21+ ----------
22+ bc_name : {'hse'}
23+ The descriptive name for the boundary condition -- this allows
24+ for pyro to have multiple types of user-supplied boundary
25+ conditions. For this module, it needs to be 'hse'.
26+ bc_edge : {'ylb', 'yrb'}
27+ The boundary to update: ylb = lower y boundary; yrb = upper y
28+ boundary.
29+ variable : {'density', 'x-momentum', 'y-momentum', 'energy'}
30+ The variable whose ghost cells we are filling
31+ my_data : CellCenterData2d object
32+ The data object
33+
34+ """
1435 dens = my_data .get_var ("density" )
1536 xmom = my_data .get_var ("x-momentum" )
1637 ymom = my_data .get_var ("y-momentum" )
@@ -21,9 +42,9 @@ def user(bcName, bcEdge, variable, my_data):
2142
2243 myg = my_data .grid
2344
24- if (bcName == "hse" ):
45+ if (bc_name == "hse" ):
2546
26- if (bcEdge == "ylb" ):
47+ if (bc_edge == "ylb" ):
2748
2849 # lower y boundary
2950
@@ -73,7 +94,7 @@ def user(bcName, bcEdge, variable, my_data):
7394 msg .fail ("error: variable not defined" )
7495
7596
76- elif (bcEdge == "yrb" ):
97+ elif (bc_edge == "yrb" ):
7798
7899 # upper y boundary
79100
@@ -128,4 +149,4 @@ def user(bcName, bcEdge, variable, my_data):
128149
129150
130151 else :
131- msg .fail ("error: bc type %s not supported" % (bcName ) )
152+ msg .fail ("error: bc type %s not supported" % (bc_name ) )
0 commit comments