SWEUtil

Utility Class For Generating Configuration

To use this class, please first import the class with

from SWELib import SWEUtil

SWEUtil.export_bathymetry_from_array

Method to export bathymetry shape from an array (1D or 2D).

SWEUtil.export_bathymetry_from_array(arr, is_2d=False)

Parameters

  • arr: float[] or float[][]

    1D array for non moving bathymetry and 2D array (arr[x][t]) for moving bathmetry of bathymetry shape.

  • is_2d: boolean (default = False) when the value is true then the arr value must be a 2D array, else arr value should be an 1D array used for 2D wave simulation or 1D moving bathymetry

Returns

  • res: bathymetry.dat file

    SimulWave importable file

SWEUtil.export_init_eta_from_array

Method to export initial wave amplitude from an array (1D or 2D).

SWEUtil.export_init_eta_from_array(arr, is_2d=False)

Parameters

  • arr: float[] or float[][]

    1D array for 1D simulation and 2D array (arr[x][y]) for 2D simulation of initial wave amplitude.

  • is_2d: boolean (default = False) when the value is true then the arr value must be a 2D array, else arr value should be an 1D array used for 2D wave simulation

Returns

  • res: init_eta.dat file

    SimulWave importable file

SWEUtil.export_init_u_from_array

SWEUtil.export_bathymetry_from_array(arr)

Parameters

  • arr: float[] or float[][]

    1D array for 1D simulation and 2D array (arr[x][y]) for 2D simulation of initial x-axis horizontal velocity.

Returns

  • res: init_u.dat file

    SimulWave importable file

SWEUtil.export_init_v_from_array

SWEUtil.export_init_v_from_array(arr)

Parameters

  • arr: float[][]

    2D array (arr[x][y]) for 2D simulation of initial y-axis horizontal velocity

Returns

  • res: init_v.dat file

    SimulWave importable file

SWEUtil.export_init_u1_from_array

SWEUtil.export_init_u1_from_array(arr)

Parameters

  • arr: float[]

    1D array of initial wave x-axis horizontal velocity on the first layer

Returns

  • res: init_u1.dat file

    SimulWave importable file

SWEUtil.export_init_u2_from_array

SWEUtil.export_bathymetry_from_array(arr)

Parameters

  • arr: float[]

    1D array of initial wave x-axis horizontal velocity on the second layer

Returns

  • res: init_u2.dat file

    SimulWave importable file

SWEUtil.export_boundary_u_l_from_array

Method to export left boundary wall condition for x-axis horizontal velocity from a 1D array.

SWEUtil.export_boundary_u_l_from_array(arr)

Parameters

  • arr: float[]

    1D array of left boundary wall for x-axis horizontal velocity with size of Nt

Returns

  • res: boundary_u_l.dat file

    SimulWave importable file

SWEUtil.export_boundary_u_r_from_array

Method to export right boundary wall condition for x-axis horizontal velocity from a 1D array.

SWEUtil.export_boundary_u_r_from_array(arr)

Parameters

  • arr: float[]

    1D array of right boundary wall for x-axis horizontal velocity with size of Nt

Returns

  • res: boundary_u_r.dat file

    SimulWave importable file

SWEUtil.export_boundary_v_b_from_array

Method to export back boundary wall condition for y-axis horizontal velocity from a 1D array.

SWEUtil.export_boundary_v_b_from_array(arr)

Parameters

  • arr: float[]

    1D array of back boundary wall for y-axis horizontal velocity with size of Nt

Returns

  • res: boundary_u_b.dat file

    SimulWave importable file

SWEUtil.export_boundary_v_f_from_array

Method to export front boundary wall condition for y-axis horizontal velocity from a 1D array.

SWEUtil.export_boundary_v_f_from_array(arr)

Parameters

  • arr: float[]

    1D array of front boundary wall for y-axis horizontal velocity with size of Nt

Returns

  • res: boundary_u_f.dat file

    SimulWave importable file

Last updated