wolfgpu.test_scenarios
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
- wolfgpu.test_scenarios.create_swimming_pool(destination_dir: pathlib.Path, width: int = 100, height: int = 50, x_aligned_borders: bool = True, water_height=np.float32(5.0), wall_height=np.float32(100.0), bathy_min=np.float32(0.0), napbin: numpy.ndarray = None, top: numpy.ndarray = None, frott: float = 0.0, suxsuy=True) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
Creates a monobloc prev_sim2D (WOLF 2D) that represents a kind of swimming pool. The pool is open on two of its sides (you have to provide boundary conditions to handle that) or fully closed (no b.c. necessary).
The pool is filled with water. The water is still (no movement). It is frictionless or not.
This class is used for testing purposes.
Its base name will be simul
- Parameters:
x_aligned_borders – True= borders x aligned, False = borders y aligned, “squared” : both borders.
width – width of the pool (number of cells along X axis == Nbx == number of lines of the WolfArray) - default: 100
height – height of the pool (number of cells along Y axis == Nby == number of columns of the WolfArray) - default: 50
water_height – water depth in the pool - default: 5.0
wall_height – height of the walls of the pool – Must be higher than water_height - default: 100
bathy_min – minimum depth of the pool (the bottom of the pool) - default: 0.0
napbin – a numpy array that will be used to fill the napbin array of the simulation
top – a numpy array that will be used to fill the top array of the simulation
frott – friction coefficient of the pool - scalar value
Swimming pool (width*height cells) structure:
////////// with: ‘/’ = masked cell; ‘W’:wall cell, ‘.’:wet cell /WWWWWWWW/ /……../ /……../ /……../ /WWWWWWWW/ //////////
- wolfgpu.test_scenarios.scenario_cube_drop(destination_dir: pathlib.Path, width=None, height=None)[source]
A cube of water spreads into a filled swimming pool.
No boundary conditions.
- wolfgpu.test_scenarios.scenario_still_water(destination_dir: pathlib.Path, width=10, height=10, rockyness=0, water_height=np.float32(5.0))[source]
A frictionless swimming pool filled with completely still, motionless, water.
rockyness = 0 = flat bed. 1: maximum randomness on bed height
- wolfgpu.test_scenarios.scenario_still_water_rocky_bed(destination_dir: pathlib.Path, width=10, height=10)[source]
A swimming pool filled with completely still, motionless, water.
Bed is rocky, with a random height between 0 and 1.
- wolfgpu.test_scenarios.scenario4(destination_dir: pathlib.Path, N: int = 2830, active_surface: float = 0.25, optim_pas: bool = False, npas: int = 100, hini: float = 10.0) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
A block of water at the center of an empty (dry) pool.
Scenario without boundary conditions and friction set to 0.01.
- Parameters:
N – size of the squared pool
active_surface – proportion of the pool that is active (filled with water)
optim_pas – optimize time step
npas – number of time steps to compute
- wolfgpu.test_scenarios.scenario4_odd(destination_dir: pathlib.Path, N: int = 2830, active_surface: float = 0.25, optim_pas: bool = False, npas: int = 100, hini: float = 1.0) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
A block of water at the center of an empty (dry) pool.
Scenario without boundary conditions and friction set to 0.01.
- Parameters:
N – size of the squared pool
active_surface – proportion of the pool that is active (filled with water)
optim_pas – optimize time step
npas – number of time steps to compute
- wolfgpu.test_scenarios.scenario_sine_ground_sine_water(destination_dir: pathlib.Path, N=100, freq=10.0, translate=0)[source]
- wolfgpu.test_scenarios.scenario_multiple_infiltration(dest_dir: pathlib.Path) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
- wolfgpu.test_scenarios.scenario1(destination_dir: pathlib.Path, size=100, bc_qx_factor=1.1, bc_hmod_factor=1.05, friction=0.04, WATER_HEIGHT=10.0, IC_SPEED=1.0)[source]
Water moving left to right
- wolfgpu.test_scenarios.create_steady_flow_swimming_pool_bottom_to_top(destination_dir: pathlib.Path, WATER_HEIGHT=np.float32(10.0), width=50, height=100) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
Water flows steadily from bottom to top (positive direction).
- Parameters:
IC – Water level is flat across the pool and water is moving at some speed.
BC – water gets in the simulation at the same speed as the IC. h is set at the same height as IC where the water leaves the simulation.
There’s no friction.
- wolfgpu.test_scenarios.create_steady_flow_swimming_pool_top_to_bottom(destination_dir: pathlib.Path, WATER_HEIGHT=np.float32(10.0), width=50, height=100) wolfhece.mesh2d.wolf2dprev.prev_sim2D [source]
Water flows steadily from bottom to top (positive direction).
IC: Water level is flat across the pool and water is moving at some speed. BC: water gets in the simulation at the same speed as the IC. h is set at the
same height as IC where the water leaves the simulation.
There’s no friction.
- wolfgpu.test_scenarios.scenario_drying(destination_dir: pathlib.Path, size=100, friction=0.04, WATER_HEIGHT=1.0, top_topo=2.0)[source]
Water moving left to right
- wolfgpu.test_scenarios.save_short_format(wolf: wolfhece.mesh2d.wolf2dprev.prev_sim2D, glsim: wolfgpu.glsimulation.GLSimulation, filename: pathlib.Path, row_slice: slice = None, col_slice: slice = None, transpose=False, hbin=None, qxbin=None, qybin=None)[source]