:py:mod:`wolfgpu.wolf_utils` ============================ .. py:module:: wolfgpu.wolf_utils .. autoapi-nested-parse:: Author: HECE - University of Liege, Stéphane Champailler, Pierre Archambeau Date: 2024 Copyright (c) 2024 University of Liege. All rights reserved. This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited. Module Contents --------------- .. py:data:: wolf_hece_version .. py:function:: swimpool_constant(c, width: int = 100, height: int = 50) -> numpy.ndarray Create a constant swimming pool for testing purposes. .. py:function:: write_wolf_array(wa: wolfhece.wolf_array.WolfArray, generic_name: pathlib.Path) .. py:function:: write_trl(params: wolfhece.mesh2d.wolf2dprev.prev_parameters_simul, generic_name: pathlib.Path) .. py:function:: write_simulation(wolf2d: wolfhece.mesh2d.wolf2dprev.prev_sim2D, wolf_cli_path: pathlib.Path) .. py:function:: force_load(wolf2d: wolfhece.mesh2d.wolf2dprev.prev_sim2D) .. py:function:: create_still_swimming_pool_left_to_right(destination_dir: pathlib.Path, width: int = 100, height: int = 50, WATER_HEIGHT=np.float32(10.0)) -> wolfhece.mesh2d.wolf2dprev.prev_sim2D Water flows left to right IC: Water surface is flat. Water is moving left to right at some speed. There's no friction. BC: water gets in at the same speed as the IC. h is set at the same height than IC where the water leaves the simulation. Such a swimming pool must remain still. .. py:function:: create_still_swimming_pool_right_to_left(destination_dir: pathlib.Path, width: int = 100, height: int = 50, WATER_HEIGHT=np.float32(10.0)) -> wolfhece.mesh2d.wolf2dprev.prev_sim2D Water flows right to left IC: Water level is flat and water is moving at some speed. BC: water gets in at the same speed as the IC. h is set at the same height then IC where the water leaves the simulation. There's no friction. .. py:function:: run_wolf_cli(destination_dir: pathlib.Path, generic_filename='simul') .. py:function:: wait_for_wolf_cli_to_end(wolf_cli_process, destination_dir) .. py:function:: load_wolf_time_steps(base_file: pathlib.Path) .. py:function:: compute_min_step_size(h, qx, qy, courant, dx=1, dy=1) .. py:function:: compute_froude(h, qx, qy) .. py:function:: set_report_frequency(m: wolfhece.mesh2d.wolf2dprev.prev_sim2D, freq: Union[str, int]) .. py:function:: write_simulation_multiblock(wolf2d: wolfhece.mesh2d.wolf2dprev.prev_sim2D, wolfcli_path: pathlib.Path)