class FluidSimParameter: viscosity = 0.1 / 3.0 # Pr = 1.0 Pr = 1.0 # vc = 1.0 vc = 0.5 def __init__(self, height: int): self.t1 = 3 * self.viscosity + 0.5 self.t2 = (2 * self.t1 - 1) / (2 * self.Pr) + 0.5 self.g = (self.vc ** 2) / height self.R = self.Pr * self.g * (height ** 3) / (self.viscosity ** 2) class MagmaParameter(FluidSimParameter): viscosity = 10 ** 19 Pr = 10 ** 25 class WaterParameter(FluidSimParameter): viscosity = 8.9 * 10 ** -4 Pr = 7.56 vc = 0.05