wolfhece.mesh2d.topo_unsteady

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.mesh2d.topo_unsteady.UnsteadyTopoBathymetry(filename_wo_extension: str | pathlib.Path, dx_dy: tuple[float, float])[source]

Manage unsteady topo/bathymetry data for WOLF2D meshes and dike breach.

Position is in “.topipar” file. Array data is in “.topi” file.

_genfile[source]
_topiparfile[source]
_topifile[source]
_arrays_ref: list[wolfhece.wolf_array.WolfArray][source]
_unsteady_arrays[source]
_read_topipar() dict[source]

Read the .topipar file and return parameters as a dictionary.

_read_topi()[source]

Read the .topi file and populate unsteady arrays.

read_all()[source]

Read all unsteady topo/bathymetry data from files.

find_first_time_with_difference(reference_array: wolfhece.wolf_array.WolfArray) float | None[source]

Find the first time where the unsteady topo/bathymetry differs from the reference array.

find_first_time_with_difference_greater_than(reference_array: wolfhece.wolf_array.WolfArray, threshold: float) float | None[source]

Find the first time where the unsteady topo/bathymetry differs from the reference array by more than a threshold.

find_last_time_with_difference(reference_array: wolfhece.wolf_array.WolfArray) float | None[source]

Find the last time where the unsteady topo/bathymetry differs from the reference array.

get_times() list[float][source]

Get the list of available times for unsteady topo/bathymetry data.

get_array_at_time(time: float) wolfhece.wolf_array.WolfArray | None[source]

Get the topo/bathymetry array at a specific time.

get_array_at_nearest_time(time: float) wolfhece.wolf_array.WolfArray | None[source]

Get the topo/bathymetry array at the nearest available time.

find_nearest_time(time: float) float | None[source]

Find the nearest available time for unsteady topo/bathymetry data.

find_nearest_time_index(time: float) int | None[source]

Find the index of the nearest available time for unsteady topo/bathymetry data.