Profile
Profile(self, profile_name='Profile')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_coordinates | The type of the None singleton. |
| dike_y_coordinates | The type of the None singleton. |
| foreland_x_coordinates | The type of the None singleton. |
| foreland_y_coordinates | 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_foreland | Returns whether the profile has a foreland or breakwater |
| remove_breakwater | Remove the breakwater |
| remove_foreland | Remove the foreland |
| 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_foreland_geometry | Change the geometry of the foreland |
| to_dict | Export Profile to dictionary |
| to_prfl | Export to a prfl file |
| transform_wave_conditions | Transform the wave conditions for the schematized foreland |
| 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 foreland (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 foreland (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 foreland (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_foreland
Profile.has_foreland()Returns whether the profile has a foreland or breakwater
Returns
| Name | Type | Description |
|---|---|---|
| bool | True if the profile has a foreland or breakwater |
remove_breakwater
Profile.remove_breakwater()Remove the breakwater Wrapper for set_breakwater()
remove_foreland
Profile.remove_foreland()Remove the foreland Wrapper for set_foreland_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_coordinates,
dike_y_coordinates,
dike_roughness=None,
)Change the geometry of the outer slope of the dike
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dike_x_coordinates | list | A list with the x coordinates of the profile | required |
| dike_y_coordinates | 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_foreland_geometry
Profile.set_foreland_geometry(
foreland_x_coordinates=None,
foreland_y_coordinates=None,
)Change the geometry of the foreland Setting the foreland x and y coordinates to None will remove the foreland.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| foreland_x_coordinates | list | A list with the x coordinates of the foreland (default: None) | None |
| foreland_y_coordinates | list | A list with the y coordinates of the foreland (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 foreland
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 foreland (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 |