Skip to content

Commit 984425d

Browse files
committed
update
1 parent 2ff29be commit 984425d

File tree

1 file changed

+12
-3
lines changed
  • Exec/science/xrb_spherical/analysis

1 file changed

+12
-3
lines changed

Exec/science/xrb_spherical/analysis/slice.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,18 @@ def slice(fnames:List[str], fields:List[str],
8686

8787
center = centers[loc]
8888
else:
89-
R = r_center*np.sin(theta)
90-
Z = r_center*np.cos(theta)
91-
if R < 0.5*width:
89+
# If theta is provided explicitely, then assume this is the theta corresponding to
90+
# flame front. Then keep the front at ~3/4 of the plotting width.
91+
92+
# Determine dtheta that displaces from center to ~3/4 of the plotting domain
93+
threeQuarterTheta = np.arcsin(0.75 * width / r_center)
94+
halfTheta = np.arcsin(0.5 * width / r_center)
95+
dtheta = threeQuarterTheta - halfTheta
96+
97+
# Determine center using theta but also displace it by dtheta
98+
R = r_center*np.sin(theta - dtheta)
99+
Z = r_center*np.cos(theta - dtheta)
100+
if R < 0.75*width:
92101
R = 0.5*width
93102
center = [R, Z]
94103

0 commit comments

Comments
 (0)