tilupy.models.saval2D.read

Attributes

AVAILABLE_OUTPUT

All output available for a shaltop simulation.

Functions

extract_saval_ascii(→ numpy.ndarray)

Extract ascii file data generated by saval2D.

Classes

Results

Results of saval2D simulations.

Module Contents

Attributes

tilupy.models.saval2D.read.AVAILABLE_OUTPUT = ['h', 'hvert', 'u', 'hu', 'hu2', 'ux', 'uy', 'hux', 'huy']

All output available for a shaltop simulation.

Implemented states:

  • h : Flow thickness (normal to the surface)

  • hux : Momentum flux component in X direction

  • huy : Momentum flux component in Y direction

Output computed from other output:

  • hvert : True vertical flow thickness

  • ux : Velocity component in X direction

  • uy : Velocity component in Y direction

  • u : Norm of the velocity (from ux and uy)

  • hu : Momentum flux (from h and u)

  • hu2 : Convective momentum flux (from h and u)

Functions

tilupy.models.saval2D.read.extract_saval_ascii(path: str) numpy.ndarray

Extract ascii file data generated by saval2D.

Parameters:

path (str) – Path to the ascii file.

Returns:

Values in the ascii file.

Return type:

numpy.ndarray

Classes

class tilupy.models.saval2D.read.Results(folder, raster_topo='mntsimulation.asc')

Bases: tilupy.read.Results

Results of saval2D simulations.

This class is the results class for saval2D. Reading results from saval2D outputs are done in this class.

This class has all the global and quick attributes of the parent class. The quick attributes are only computed if needed and can be deleted to clean memory.

In addition to these attributes, there are those necessary for the operation of reading the saval2D results.

Parameters:
  • folder (str) – Path to the folder containing the simulation files.

  • raster_topo (str) – Topographic raster name.

_simu_inputs

Path to the input folder of saval2D simulation.

Type:

str

_simu_outputs

Path to the output folder of saval2D simulation.

Type:

str

_raster

Raster file name.

Type:

str

_params

Dictionary storing all simulation parameters.

Type:

dict

get_rheological_parameters(path_to_log: str) list[str]

Get rheological parameters of a saval2D simulation.

Parameters:

path_to_log (str) – Path to the log file containing the value of the rheological parameters.

Returns:

List of rheological parameters : tau/rho, mu and xi.

Return type:

list[str]

get_times(path: str) list[float]

Get simulation time steps.

Parameters:

path (str) – Path to the log file.

Returns:

List of recorded time steps.

Return type:

list[float]