lizzy.datatypes
- class lizzy.datatypes.SimulationParameters(output_interval: float = -1, fill_tolerance: float = 0.01, has_been_assigned: bool = False, end_step_when_sensor_triggered: bool = False, lightweight: bool = False, in_memory_solve: bool = False, progress_bar: bool = False)
Data class that stores several parameters used by the simulation.
- output_interval
Interval of simulation time between solution write-outs [s]. Default: -1 (write-out every numerical time step)
- Type:
- end_step_when_sensor_triggered
If True, ends current solution step and creates a write-out when a sensor changes state. Default: False
- Type:
- in_memory_solve
If True, solution data is accumulated in memory and written at the end via save_results(). If False (default), solution data is written incrementally to disk during the solve, reducing memory footprint for large simulations. Default: False
- Type:
- assign(**kwargs)
Assigns new values to one or more simulation parameters using keyword arguments.
- Raises:
AttributeError – If any key in kwargs does not correspond to a known attribute.
- print_current()
Prints the currently assigned simulation parameters to the console.
- class lizzy.datatypes.Solution(n_time_states: int, time_step_idx: ndarray, p: ndarray, v: ndarray, v_nodal: ndarray, time: ndarray, fill_factor: ndarray, free_surface: ndarray)
A data class that stores the solution of a simulation. It stores a number of time steps (the ones that were flagged for write-out), up to the instant of its creation.
- time_step_idx
The indices of the time steps that were stored as time states in the solution. The last index corresponds to the time step number at which this solution was saved.
- Type:
ndarray of int, shape (n_time_states,)
- p
The pressure values at each step.
- Type:
np.ndarray of float, shape (n_time_states, N_nodes)
- v
The velocity values at each step.
- Type:
np.ndarray of float, shape (n_time_states, N_elements, 3)
- v_nodal
The nodal velocity values at each step.
- Type:
np.ndarray of float, shape (n_time_states, N_nodes, 3)
- time
The simulation time values at each step.
- Type:
np.ndarray of float, shape (n_time_states,)
- fill_factor
The fill factor values at each step.
- Type:
np.ndarray of float, shape (n_time_states, N_nodes)
- free_surface
The free surface values at each step.
- Type:
np.ndarray of int, shape (n_time_states, N_nodes)