def __init__(self, resolution, reynolds_number, mach_number, lattice): self.resolution = resolution self.units = UnitConversion(lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=resolution, characteristic_length_pu=2 * np.pi, characteristic_velocity_pu=1)
def __init__(self, resolution, reynolds_number, mach_number, lattice, initialize_with_zeros=True): self.resolution = resolution self.lattice = lattice self.units = UnitConversion( lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=resolution, characteristic_length_pu=1, characteristic_velocity_pu=1 ) self.initialize_with_zeros = initialize_with_zeros
def __init__(self, resolution, reynolds_number, mach_number, lattice, shear_layer_width=80, initial_perturbation_magnitude=0.05): self.initial_perturbation_magnitude = initial_perturbation_magnitude self.shear_layer_width = shear_layer_width self.resolution = resolution self.units = UnitConversion( lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=resolution, characteristic_length_pu=1, characteristic_velocity_pu=1 )
def __init__(self, resolution_x, resolution_y, reynolds_number, mach_number, lattice, char_length_lu): self.resolution_x = resolution_x self.resolution_y = resolution_y self.units = UnitConversion(lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=char_length_lu, characteristic_length_pu=1, characteristic_velocity_pu=1) self._mask = np.zeros(shape=(self.resolution_x, self.resolution_y), dtype=np.bool)
def __init__(self, resolution, reynolds_number, mach_number, lattice, k0=20, ic_energy=0.5): self.k0 = k0 self.ic_energy = ic_energy self.resolution = resolution self.units = UnitConversion( lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=resolution, characteristic_length_pu=2 * np.pi, characteristic_velocity_pu=None ) self.wavenumbers = [] self.spectrum = []
class DecayingTurbulence_validation: def __init__(self, resolution, reynolds_number, mach_number, lattice, k0=20, ic_energy=0.5, case=None): from lettuce.unit import UnitConversion self.k0 = k0 self.ic_energy = ic_energy self.resolution = resolution self.units = UnitConversion(lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=resolution, characteristic_length_pu=2 * np.pi, characteristic_velocity_pu=None) self.case = case self.dimensions = self.grid[0].shape
def __init__(self, shape, reynolds_number, mach_number, lattice, domain_length_x, char_length=1, char_velocity=1): if len(shape) != lattice.D: raise ValueError( f"{lattice.D}-dimensional lattice requires {lattice.D}-dimensional `shape`" ) self.shape = shape char_length_lu = shape[0] / domain_length_x * char_length self.units = UnitConversion(lattice, reynolds_number=reynolds_number, mach_number=mach_number, characteristic_length_lu=char_length_lu, characteristic_length_pu=char_length, characteristic_velocity_pu=char_velocity) self._mask = np.zeros(shape=self.shape, dtype=np.bool)