VoxelEngine/FluidSim/FluidSimParameters.py

25 lines
550 B
Python
Raw Permalink Normal View History

2021-10-15 19:21:17 +02:00
class FluidSimParameter:
viscosity = 0.1 / 3.0
# Pr = 1.0
2021-12-20 17:21:46 +01:00
Pr = 1.0
2021-10-15 19:21:17 +02:00
# 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