wolfhece.scenario.imposebc_void

Author: HECE - University of Liege, 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

class wolfhece.scenario.imposebc_void.Impose_Boundary_Conditions[source]

Impose_Boundary_Conditions

impose_bc(simul: wolfgpu.simple_simulation.SimpleSimulation)[source]

FR

Cette fonction doit être particularisée afin d’appliquer des conditions aux limites à la simulation. L’instance de simulation est passée en argument et ne doit pas être créee/modifiée.

Les conditions limites sont imposées en énumérant les cellules de la grille de calcul. La convention est “1-based” (i.e. la première cellule, en bas à gauche, est la cellule (1,1)).

Les types de CL supportées sont dans la classe “BoundaryConditionsTypes” (voir wolfgpu/simple_simulation.py).

Les directions de CL supportées sont dans la classe “Direction” (voir wolfgpu/simple_simulation.py). Il s’agit de conditions faibles -> imposées sur le bord de la cellule. Les directions sont soit “LEFT” ou “BOTTOM”. L’énumération d’une cellule (i,j) permet donc d’imposer la condition sur le bord gauche de la cellule (i-1/2,j) et sur le bord bas de la cellule (i,j-1/2).

EN

This function must be specialized in order to apply boundary conditions to the simulation. The simulation is passed as an argument and must not be created/modified.

Boundary conditions are imposed by enumerating the cells of the computation grid. The convention used is “1-based” (i.e., the first cell, at the bottom left, is cell (1,1)).

The supported boundary condition types are in the “BoundaryConditionsTypes” class (see wolfgpu/simple_simulation.py).

The supported boundary condition directions are in the “Direction” class (see wolfgpu/simple_simulation.py). These are weak conditions imposed on the cell’s edge. The directions are either “LEFT” or “BOTTOM.” Enumerating a cell (i, j) thus imposes the condition on the left edge of cell (i-1/2, j) and on the bottom edge of cell (i, j-1/2).

Exemple :

# Weak Normal Froude condition (value 0.3) on the left edge of the cell (3,997) -> (3,1002) for j in range(997,1003):

simul.add_boundary_condition(i=3, j=j, bc_type=BoundaryConditionsTypes.FROUDE_NORMAL, bc_value=.3, border=Direction.LEFT)

wolfhece.scenario.imposebc_void.create_empty_method(method_name, method_signature, docstring, imports)[source]
wolfhece.scenario.imposebc_void.create_new_file(filepath: pathlib.Path)[source]