zoomy_core.model.models.legacy.shallow_water_topo module

zoomy_core.model.models.legacy.shallow_water_topo module#

Module zoomy_core.model.models.shallow_water_topo.

class zoomy_core.model.models.legacy.shallow_water_topo.ShallowWaterEquationsWithTopo(**kwargs)#

Bases: Model

Shallow Water Equations with Topography (SWEB). State vector includes bathymetry: Q = [b, h, hu, hv]. Automatically handles 1D and 2D based on ‘dimension’.

dimension = 2#
variables()#

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

aux_variables = 0#
parameters = {'chezy_C': (50.0, 'real'), 'eps': (1e-06, 'positive'), 'g': (9.81, 'positive')}#
get_primitives()#

Extracts primitive variables using a velocity vector U.

Returns:

Bathymetry (Scalar) h: Depth (Scalar) U: Velocity Vector (Matrix of shape [dim, 1]) hinv: Inverse Depth (Scalar)

Return type:

b

flux()#

Returns the Flux Tensor F of shape (n_vars, dimension).

nonconservative_matrix()#

Returns the Non-Conservative Tensor A. Term: g * h * grad(b)

source()#

Source.

chezy_friction_term()#

Chezy friction: S = -1/C^2 * U * |U|

project_2d_to_3d()#

Maps state vector to 3D visualization vector. Out: [b, h, u, v, w, pressure]

class zoomy_core.model.models.legacy.shallow_water_topo.NumericalShallowWaterEquationsWithTopo(**kwargs)#

Bases: ShallowWaterEquationsWithTopo

NumericalShallowWaterEquationsWithTopo. (class).

get_primitives()#

Get primitives.

eigenvalues()#

Eigenvalues.