Profile

Profile(
    self,
    profile_name='Profile',
    crest_level=None,
    orientation=None,
    cota_slope=None,
)

Profile class

TODO: Implement support for sheet piles

Attributes

Name Description
breakwater_level Convert a string or number to a floating-point number, if possible.
breakwater_type Breakwater classes for profiles.
dike_crest_level The type of the None singleton.
dike_orientation The type of the None singleton.
dike_roughness The type of the None singleton.
dike_x The type of the None singleton.
dike_y The type of the None singleton.
foreshore_x The type of the None singleton.
foreshore_y The type of the None singleton.
profile_name The type of the None singleton.

Methods

Name Description
calculate_crest_level Calculate the crest level for a given overtopping discharge
calculate_overtopping Calculate the overtopping discharge
calculate_runup Calculate the runup height
draw_profile Draw a cross-section of the profile
from_dictionary Create a profile from a dictionary
from_gebugekb_tool Import a profile from the GEBUGEKB plugin.
from_prfl Import a profile from a .prfl file
has_foreshore Returns whether the profile has a foreshore or breakwater
remove_breakwater Remove the breakwater
remove_foreshore Remove the foreshore
set_breakwater Change the breakwater
set_dike_crest_level Change the crest level
set_dike_geometry Change the geometry of the outer slope of the dike
set_dike_orientation Change the dike orientation
set_foreshore_geometry Change the geometry of the foreshore
to_dict Export Profile to dictionary
to_prfl Export to a prfl file
transform_wave_conditions Transform the wave conditions for the schematized foreshore
validate_profile Function to validate the profile.

calculate_crest_level

Profile.calculate_crest_level(
    q_overtopping,
    water_level,
    significant_wave_height,
    spectral_wave_period,
    wave_direction,
    tp_tspec=1.1,
    dll_settings=None,
)

Calculate the crest level for a given overtopping discharge

Parameters

Name Type Description Default
q_overtopping float Critical overtopping discharge required
water_level Union[float, list] List or float with the water level required
significant_wave_height Union[float, list] List or float with the significant wave height required
spectral_wave_period Union[float, list] List or float with the spectral wave period required
wave_direction Union[float, list] List or float with the wave direction required
tp_tspec float Ratio between Tp and Tspec, only used for dam and foreshore (default : 1.1) 1.1

Returns

Name Type Description
Union[float, list] List or float with the crest level

calculate_overtopping

Profile.calculate_overtopping(
    water_level,
    significant_wave_height,
    spectral_wave_period,
    wave_direction,
    tp_tspec=1.1,
    dll_settings=None,
)

Calculate the overtopping discharge

Parameters

Name Type Description Default
water_level Union[float, list] List or float with the water level required
significant_wave_height Union[float, list] List or float with the significant wave height required
spectral_wave_period Union[float, list] List or float with the spectral wave period required
wave_direction Union[float, list] List or float with the wave direction required
tp_tspec float Ratio between Tp and Tspec, only used for dam and foreshore (default : 1.1) 1.1

Returns

Name Type Description
Union[float, np.ndarray] List or float with the overtopping discharge

calculate_runup

Profile.calculate_runup(
    water_level,
    significant_wave_height,
    spectral_wave_period,
    wave_direction,
    tp_tspec=1.1,
    dll_settings=None,
)

Calculate the runup height

Parameters

Name Type Description Default
water_level Union[float, list] List or float with the water level required
significant_wave_height Union[float, list] List or float with the significant wave height required
spectral_wave_period Union[float, list] List or float with the spectral wave period required
wave_direction Union[float, list] List or float with the wave direction required
tp_tspec float Ratio between Tp and Tspec, only used for dam and foreshore (default : 1.1) 1.1

Returns

Name Type Description
Union[float, list] List or float with the runup height

draw_profile

Profile.draw_profile()

Draw a cross-section of the profile

from_dictionary

Profile.from_dictionary(dictionary)

Create a profile from a dictionary

Parameters

Name Type Description Default
dictionary dict Dictionary with all profile settings required

from_gebugekb_tool

Profile.from_gebugekb_tool(sql_path, profile_name='Profile', berm_slope=1 / 100)

Import a profile from the GEBUGEKB plugin.

Parameters

Name Type Description Default
sql_path str Path to the ‘1.sql’ file required
profile_name str Name of the profile (default: ‘Profile’) 'Profile'
berm_slope float If applicable: slope of the berm (default : 1/100) 1 / 100

Returns

Name Type Description
Profile Profile object

from_prfl

Profile.from_prfl(prfl_path, profile_name='Profile')

Import a profile from a .prfl file

Parameters

Name Type Description Default
prfl_path str Path to the ‘.prfl’ file required
profile_name str Name of the profile (default: ‘Profile’) 'Profile'

Returns

Name Type Description
Profile Profile object

has_foreshore

Profile.has_foreshore()

Returns whether the profile has a foreshore or breakwater

Returns

Name Type Description
bool True if the profile has a foreshore or breakwater

remove_breakwater

Profile.remove_breakwater()

Remove the breakwater Wrapper for set_breakwater()

remove_foreshore

Profile.remove_foreshore()

Remove the foreshore Wrapper for set_foreshore_geometry()

set_breakwater

Profile.set_breakwater(breakwater_type=None, breakwater_level=0.0)

Change the breakwater

set_dike_crest_level

Profile.set_dike_crest_level(dike_crest_level)

Change the crest level

Parameters

Name Type Description Default
dike_crest_level float The crest level of the dike required

set_dike_geometry

Profile.set_dike_geometry(dike_x, dike_y, dike_roughness=None)

Change the geometry of the outer slope of the dike

Parameters

Name Type Description Default
dike_x list A list with the x coordinates of the profile required
dike_y list A list with the y coordinates of the profile required
dike_roughness list A list with the roughness of the profile (default : all parts 1.0) None

set_dike_orientation

Profile.set_dike_orientation(dike_orientation)

Change the dike orientation

Parameters

Name Type Description Default
dike_orientation float The dike orientation required

set_foreshore_geometry

Profile.set_foreshore_geometry(foreshore_x=None, foreshore_y=None)

Change the geometry of the foreshore Setting the foreshore x and y coordinates to None will remove the foreshore.

Parameters

Name Type Description Default
foreshore_x list A list with the x coordinates of the foreshore (default: None) None
foreshore_y list A list with the y coordinates of the foreshore (default: None) None

to_dict

Profile.to_dict()

Export Profile to dictionary

Returns

Name Type Description
dictionary Dictionary with all profile settings

to_prfl

Profile.to_prfl(export_path, id='Onbekend000', memo='')

Export to a prfl file

export_path : str Path to where the profile has to be exported id : str Id used in RisKeer memo : str Memo to be added to the prfl file

transform_wave_conditions

Profile.transform_wave_conditions(
    water_level,
    significant_wave_height,
    spectral_wave_period,
    wave_direction,
    tp_tspec=1.1,
    force_array=False,
)

Transform the wave conditions for the schematized foreshore

Parameters

Name Type Description Default
water_level Union[float, list] Water level required
significant_wave_height Union[float, list] Significant wave height required
spectral_wave_period Union[float, list] Spectral wave period required
wave_direction Union[float, list] Wave direction required
tp_tspec float Ratio between Tp and Tspec, only used for dam and foreshore (default : 1.1) 1.1
force_array bool Always force to return an array False

Returns

Name Type Description
np.ndarray Water level and transformed wave conditions (h, hs, tp, dir)

validate_profile

Profile.validate_profile()

Function to validate the profile.

Returns

Name Type Description
bool True if the profile is OK