diff options
Diffstat (limited to 'DiskRTZ.py')
-rw-r--r-- | DiskRTZ.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -43,6 +43,7 @@ class DiskBase(): self.mdotr_rz = None; self.mdotr_r = None self.rho_rz = None; self.rho_r = None self.mass_r = None + self.total_mass = None # MinMax Holders self.rho_rz_min = None; self.rho_rz_max = None self.mdotr_rz_g0_min = None; self.mdotr_rz_g0_max = None @@ -103,6 +104,7 @@ class DiskIo(DiskBase): self.rho_rz = npz["rho_rz"] self.rho_r = npz["rho_r"] self.mass_r = npz["mass_r"] + self.total_mass = npz["total_mass"] self.mdotr_rz_g0_max = npz["mdotr_rz_g0_max"] self.mdotr_rz_g0_min = npz["mdotr_rz_g0_min"] self.mdotr_rz_l0_max = npz["mdotr_rz_l0_max"] @@ -139,6 +141,7 @@ class DiskIo(DiskBase): rho_rz = self.rho_rz, \ rho_r = self.rho_rz, \ mass_r = self.mass_r, \ + total_mass = self.total_mass, \ mdotr_rz_g0_max = self.mdotr_rz_g0_max, \ mdotr_rz_g0_min = self.mdotr_rz_g0_min, \ mdotr_rz_l0_max = self.mdotr_rz_l0_max, \ @@ -235,11 +238,16 @@ class DiskReduce(DiskReduceBase): """Compute Mass in Radial Bins.""" self.mass_r = self.rho_r * self.dl["dr"] + def add_to_total_mass(self): + """Add Mass per Radial To Get Total Mass.""" + self.total_mass = np.sum(self.mass_r) + def reduce_all(self): self.compute_mdotr_rz() self.integrate_rho_to_rz() self.integrate_rho_to_r() self.compute_mass_r() + self.add_to_total_mass() self.add_mdotr_to_r() class DiskPlots(DiskReduce): |