Equipment
- haskoning_atr_tools.vibration_contour_plot.equipment.equipment_functions.create_equipments_from_file(project, file_path: Path | str, sheet_name: str | int = 0, activity_filter: Literal['continuous', 'intermittent', 'emergency'] | None = None, column_mapping: dict[str, str] | None = None) List[Equipment][source]
Function to create equipments from file for vibration analysis.
- Input:
project (obj): Project object containing collections of objects and project variables.
file_path (Path or str): Path to file containing the equipment data for vibration analysis. The file can be provided as Excel-file or csv-file. In case of Excel, the sheet name should be provided for the worksheet with the equipment data. In both cases the header should be provided in row 1. When providing a column ‘Calculate’ the user can specify to use the equipment or not (overrules other filters). If column is not present, all equipments will be loaded, depending on other filters applied.
sheet_name (str or int): Sheet name or index of sheet with the equipment data. Default value is 0, selecting the first sheet in the Excel file. Input is ignored for csv-files.
activity_filter (list): Optional input to limit the equipments loaded in the vibration simulation based on the activity. Provide one or more of the following activity types in the list: ‘continuous’, ‘intermittent’, or ‘emergency’. Default value is None, all equipments are loaded.
column_mapping (dict): Optional input to specify other column headers for the input of the file. This might be convenient if the data is provided with other column names. Default value is None, the default names are used for loading the equipments from the file.
- Output:
The equipments are created and added to the project, based on the provided filters.
Returns list of instances of Equipment class created in the function.
- haskoning_atr_tools.vibration_contour_plot.equipment.equipment_functions.create_frequency_domain_data_from_equipments(project, sampling_rate: float) List[FrequencyDomainData][source]
Function to create frequency domain data for all the equipments defined in the project. The frequency domain data contains the combination of the harmonic component and the white noise component. The white noise component is not included in the part where the harmonic component is defined.
- Input:
project (obj): Project object containing collections of objects and project variables.
sampling_rate (float): Frequency sampling rate, in [Hz].
- Output:
The harmonic, white noise and combined frequency domain data are created for all the equipments and added to the respective lists in project, ‘fdd_harmonic_collection’, ‘fdd_noise_collection’ and ‘fdd_sources_collection’.
Returns list of the combined frequency domain data.
- class haskoning_atr_tools.vibration_contour_plot.equipment.equipment.Equipment(name: str, id: int, coordinates: tuple[float, float, float], vibration_source_level: float, min_frequency: float, max_frequency: float, flat_noise_percent: float, activity: Literal['continuous', 'intermittent', 'emergency'], _rpm: float | None = None, _center_frequency: float | None = None, _angular_frequency: float | None = None, _frequency_domain_data: FrequencyDomainData = None)[source]
Bases:
objectInstances of this class represent a piece of equipment that generates vibrations for vibration analysis purposes.
- Input:
name (str): The name of the equipment.
id (int): The identifier of the equipment.
coordinates (list of float): The coordinates (e.g., [x, y, z]) of the equipment’s location, values in [m].
vibration_source_level (float): The source vibration level emitted by the equipment, in [dB].
min_frequency (float): The minimum frequency of the vibration range the equipment produces, in [Hz].
max_frequency (float): The maximum frequency of the vibration range the equipment produces, in [Hz].
flat_noise_percent (float): Percentage of flat noise added to the vibration signal, in [%].
activity (str): Description of the activity or operational state of the equipment. Select from ‘continuous’, ‘intermittent’ or ‘emergency’.
rpm, center_frequency, angular_frequency (float): Optional input. Provide at least one of these to compute the others.
- property angular_frequency: float
Returns the value of the angular frequency of the equipment vibration, in [rad/s].
- property center_frequency: float
Returns the value of the center frequency of the equipment vibration, in [Hz].
- create_frequency_domain_data(project, sampling_rate: float, lowest_frequency: float = 0.0) FrequencyDomainData[source]
Method of ‘Equipment’ to create frequency domain data for this equipment. The frequency domain data contains the combination of the harmonic component and the white noise component. The white noise component is not included in the part where the harmonic component is defined.
- Input:
project (obj): Project object containing collections of objects and project variables.
sampling_rate (float): Frequency sampling rate, in [Hz].
lowest_frequency (float): Lower frequency bound, in [Hz]. Default value is `1Hz.
- Output:
The harmonic, white noise and combined frequency domain data is created for this equipment and added to the respective lists in project, ‘fdd_harmonic_collection’, ‘fdd_noise_collection’ and ‘fdd_sources_collection’.
Returns the combined frequency domain data.
- property frequency_domain_data: FrequencyDomainData | None
Returns the frequency spectrum of the equipment vibration, in [1/min].
- property rpm: float
Returns the value of the rounds per minute of the equipment vibration, in [1/min].
- property vibration_source_level_in_v: float
Returns the vibration source level as velocity, in [m/s].
Target
- haskoning_atr_tools.vibration_contour_plot.target.target_functions.create_targets_from_file(project, file_path: Path | str, sheet_name: str | int = 0, column_mapping: dict[str, str] | None = None) List[Target][source]
Function to create targets from file for vibration analysis.
- Input:
project (obj): Project object containing collections of objects and project variables.
file_path (Path or str): Path to file containing the target data for vibration analysis. The file can be provided as Excel-file or csv-file. In case of Excel, the sheet name should be provided for the worksheet with the target data. In both cases the header should be provided in row 1. When providing a column ‘Calculate’ the user can specify to use the target or not (overrules other filters). If column is not present, all targets will be loaded, depending on other filters applied.
sheet_name (str or int): Sheet name or index of sheet with the target data. Default value is 0, selecting the first sheet in the Excel file. Input is ignored for csv-files.
column_mapping (dict): Optional input to specify other column headers for the input of the file. This might be convenient if the data is provided with other column names. Default value is None, the default names are used for loading the targets from the file.
- Output:
The targets are created and added to the project, based on the provided filters.
Returns list of instances of Target class created in the function.
- haskoning_atr_tools.vibration_contour_plot.target.target_functions.load_target_limits_from_file(project, file_path: Path | str, limit_type: Literal['velocity'] = 'velocity', sheet_name: str | int = 0, column_mapping: dict[str, str] | None = None) Dict[str, List[Target]][source]
Function to add the vibration limits from file to the targets for the vibration assessment.
- Input:
project (obj): Project object containing collections of objects and project variables.
file_path (Path or str): Path to file containing the vibration limit data for vibration analysis. The file can be provided as Excel-file or csv-file. In case of Excel, the sheet name should be provided for the worksheet with the vibration limit data. In both cases the header should be provided in row 1. The remaining columns in the file will be checked for match with the type specified for the target. In case of a match the data is loaded.
limit_type (str): Select the type of limits provided. Currently, only ‘velocity’ can be selected. Default value is velocity.
sheet_name (str or int): Sheet name or index of sheet with the vibration limit data. Default value is 0, selecting the first sheet in the Excel file. Input is ignored for csv-files.
column_mapping (dict): Optional input to specify other column headers for the input of the file. This might be convenient if the data is provided with other column names. Default value is None, the default names are used for loading the vibration limits from the file.
- Output:
The vibration limits are added to the targets with the corresponding type.
Returns dictionary of target types with the target instances.
- class haskoning_atr_tools.vibration_contour_plot.target.target.Target(id: int, coordinates: tuple[float, float, float], category: str, type: str | None = None, name: str | None = None, limits: dict[str, TargetVibrationLimits] | None = None)[source]
Bases:
objectInstances of this class represent the position where the output of the vibration simulation is assessed.
- Input:
id (int): The identifier of the target.
coordinates (list of float): The coordinates (e.g., [x, y, z]) of the target’s location, values in [m].
category (str): The category of the target. This is a property of the specification supplier, but currently not used in the tool.
type (str): Optional input for the type of the target. The type is used when adding vibration limits to the target, as these are specified per type. Default value is None.
name (str): Optional input for the name of the target. The targets in the simulation are identified by their ID, name is only used for plotting.
limits (dict): Optional input for the vibration requirements.
- class haskoning_atr_tools.vibration_contour_plot.target.target.TargetVibrationLimits(limit_type: Literal['velocity'], frequencies: List[float], limits: List[float])[source]
Bases:
objectInstance contains the vibration limits that apply to the target.
- Input:
limit_type (str): Select the type of limits provided. Currently, only ‘velocity’ can be selected.
frequencies (list of float): List of frequencies for the vibration limits, values in [Hz].
limits (list of float): List of limits for the vibration at the target, values in [m/s] for limit-type ‘velocity’.
Mesh
- haskoning_atr_tools.vibration_contour_plot.mesh.generate_mesh.generate_constrained_mesh(project, x_range: Tuple[float, float], y_range: Tuple[float, float], mesh_area: float, constraint_points: List | None = None, line_segments: List[List[float]] | None = None) Mesh[source]
Function to generate mesh for the vibration simulation. The mesh is constrained for the positions of equipment and targets.
- Input:
project (obj): Project object containing collections of objects and project variables.
x_range (tuple): Tuple of lower and upper bound of the x-axis limits, values in [m].
y_range (tuple): Tuple of lower and upper bound of the y-axis limits, values in [m].
mesh_area (float): Maximum size of the mesh elements, in [m2].
constraint_points (list of lists of 2 floats): The user can specify additional points that are used to constrain the mesh on. Default value is None.
line_segments (list of lists of 2 floats): The user can specify additional lines that are used to constrain the mesh on. Default value is None.
- Output:
Returns the generated mesh.
The mesh is created within the x- and y- range defined by the user. The equipment and targets in the project constrain the mesh.
The created mesh is added to the project.
- class haskoning_atr_tools.vibration_contour_plot.mesh.mesh.Mesh(mesh_elements: List[ForwardRef('MeshElement')])[source]
Bases:
object- dimensions() List[Tuple[float, float]][source]
Method of ‘Mesh’ to collect the bounding box of the mesh.
Simulation
- class haskoning_atr_tools.vibration_contour_plot.simulation.material.Material(name: str, density: float, shear_modulus: float, poisson_ratio: float, quality_factor: float)[source]
Bases:
objectInstances of this class represent the material properties for the vibration simulation.
- Input:
name (str): Name of the material. For example ‘Limestone’.
density (float): Value of the density of the material, ρ, in [kg/m3].
shear_modulus (float): Value of the shear modulus of the material, G, in [GPa].
poisson_ratio (float): Value of the Poisson’s ratio of the material, ν, in [-].
quality_factor (float): Quality factor of the material, Q, in [-].
- property barkan_material_parameter: float
Returns the value of the Barkan material property of the material, ρ_B, in [1/m].
- property rayleigh_wave_speed: float
Returns the value of the Rayleigh wave speed of the material, c_R, in [m/s].
- property shear_speed: float
Returns the value of the shear speed of the material, c_s, in [m/s].
- haskoning_atr_tools.vibration_contour_plot.simulation.material_functions.create_materials_from_file(project, file_path: Path | str, sheet_name: str | int | None = 0, material: str | List[str] | None = None, column_mapping: dict[str, str] | None = None) Dict[str, Material][source]
Function to collect the material properties from file for the vibration assessment.
- Input:
project (obj): Project object containing collections of objects and project variables.
file_path (Path or str): Path to file containing the material properties for the vibration analysis. The file can be provided as Excel-file or csv-file. In case of Excel, the sheet name should be provided for the worksheet with the material properties. In both cases the header should be provided in row 1.
sheet_name (str or int): Sheet name or index of sheet with the material properties. Default value is 0, selecting the first sheet in the Excel file. Input is ignored for csv-files.
material (str): Select to load only the requested material or materials (when list is provided). Only materials with this name or these names are loaded.
column_mapping (dict): Optional input to specify other column headers for the input of the file. This might be convenient if the data is provided with other column names. Default value is None, the default names are used for loading the material properties from the file.
- Output:
The material properties are collected from file.
Returns dictionary of materials.
- haskoning_atr_tools.vibration_contour_plot.simulation.simulation_functions.create_vibration_simulation(project, name: str, material: Material, activity: Literal['continuous', 'intermittent', 'emergency'] = 'continuous') VibrationSimulation[source]
Function to create the vibration simulation.
- Input:
project (obj): Project object containing collections of objects and project variables.
name (str): The name of the vibration simulation.
material (Material): Material containing the material properties for the vibration simulation.
activity (str): Select the activity for the vibration sources. For the activity or operational state of the equipment, select from ‘continuous’, ‘intermittent’ or ‘emergency’. Default value is ‘continuous’.
- Output:
The vibration simulation is created based on requested parameters and the requested vibration sources are added. The simulation object is added to the project.
Returns the vibration simulation object.
- haskoning_atr_tools.vibration_contour_plot.simulation.simulation_functions.create_vibration_sources(project, activity: Literal['continuous', 'intermittent', 'emergency'] = 'continuous') List[VibrationSource][source]
Function to create the vibration sources at the location of the equipment. This function matches the location of the equipment to the mesh-node in the vibration simulation.
- Input:
project (obj): Project object containing collections of objects and project variables.
activity (str): Select the activity for the vibration sources. For the activity or operational state of the equipment, select from ‘continuous’, ‘intermittent’ or ‘emergency’. Default value is ‘continuous’.
- Output:
Returns list of vibration sources at the mesh-node or location of the equipment.
- class haskoning_atr_tools.vibration_contour_plot.simulation.vibration_simulation.VibrationSimulation(name: str, material: Material, vibration_sources: List[VibrationSource], gamma: float = 0.5)[source]
Bases:
objectThe instance of the VibrationSimulation manages a collection of vibration sources and calculates the total vibration field.
- add_vibration_source(vibration_source: VibrationSource)[source]
Method of ‘VibrationSimulation’ adds a single VibrationSource object to the simulation.
- calculate_level_per_node_per_source(amplitude_type: Literal['velocity', 'decibel'] = 'velocity', vibration_source: VibrationSource | None = None)[source]
Method of ‘VibrationSimulation’ calculates the total vibration level at a given point by summing the contributions from all sources.
- class haskoning_atr_tools.vibration_contour_plot.simulation.vibration_simulation.VibrationSource(id: int, mesh_node: MeshNode, equipment: Equipment | None = None, z: float = 0)[source]
Bases:
objectInstances of the VibrationSource class represent a single vibration source.
- calculate_level_at_point(target_point: MeshNode, amplitude_type: Literal['velocity', 'decibel'] = 'velocity')[source]
Calculates the target vibration velocity level per frequency at the requested point due to this single vibration source.
- Input:
target_point (MeshNode): The target point.
material (Material): The material properties to be used in the attenuation model.
amplitude_type (str): The type of amplitude of the vibration level. Select from ‘decibel’ or ‘velocity’. Default value is ‘velocity’.
- Returns:
Returns the vibration level at the requested point for this single vibration source.
Plot
- class haskoning_atr_tools.vibration_contour_plot.plot.contour_plot.ContourPlot(mesh: Mesh, figure_size: Tuple[float, float], file_name: str, values: List[float])[source]
Bases:
ATRBasePlottingMixinUtility for rendering filled contour maps of vibration levels on a triangular mesh. This class offers both Matplotlib-based static plotting (plot) and an optional Plotly-based interactive variant (plot_plotly).
- static continuous_colour_map(levels: Sequence[float] | None = None, v_min: float | None = None, v_max: float | None = None, center: float | None = None, bad: str = 'lightgray', under: str = 'white', over: str = 'black', N: int = 256, ascending_levels: bool = True) Tuple[Colormap, Normalize][source]
Static method to build a continuous colour map and corresponding normalisation.
- Input:
levels (list of float) Optional input for sequence of contour levels to derive v-min and v-max and shape the normalisation.
v_min, v_max (float): Optional input for explicit range boundaries to be used when levels is not provided.
center (float): Optional input to use a two-slope normalisation. Default value is None.
bad, under, over (str): Special colours for NaN/under/over-range values. Defaults are ‘lightgrey’ for bad values, ‘white’ for under-range values and ‘black’ for over-range values.
N (int): Number of color entries in the continuous map.
ascending_levels (bool): Select to reverse the palette, so lower levels map to lower-intensity colours. Default value is True.
- Output:
Returns tuple with two items: * Continuous colour map derived from palette in config-file. * Normalisation to apply to map data values to colours. If None, Matplotlib infers it.
- static discrete_colour_map(levels: Sequence[float]) Tuple[Colormap, Normalize][source]
Static method to build a discrete colour map with bins defined by ‘levels’.
- Input:
levels (list of float): List with the bin boundaries. For N intervals there are N-1 bins.
- Output:
Returns tuple with two items: * Discrete colour map derived from palette in config-file. * Boundary normalisation that maps values into the discrete bins.
- property figure_size: Tuple[float, float]
Matplotlib figure size in inches (width, height).
- property mesh
Mesh on which contours are computed and drawn.
- plot(nodes: List[MeshNode], triangles: List[List[int]], n_levels: int = 10, line_segments: List[List[List[float]]] | None = None, vibration_sources: List[VibrationSource] | None = None, sources_colour: str = 'blue', targets: List[Target] | None = None, targets_colour: str = 'blue', plot_origin: bool = True, show_mesh: bool = True, label_font_size: int = 8, colour_map_type: Literal['continuous', 'discrete'] = 'discrete', min_val: float | None = None, max_val: float | None = None, governing_total_level_dict: dict | None = None, colour_map: Optional = None, show: bool = False, file_path: Path | bool | str | None = True) Tuple[Axes, Path | None][source]
Render a filled contour plot using Matplotlib with optional annotations and overlays. The user can select to show and/or save to file.
- Input:
nodes (list of MeshNode): Mesh nodes.
triangles (list of list of int): Triangulation indices (triplets of node indices).
n_levels (int): Number of contour levels. Default value 10.
line_segments (list of list of list of float): Optional input for additional lines to be drawn in red. List of 2-point segments, each segment: [[x0, y0], [x1, y1]]. Default value is None.
vibration_sources (list of VibrationSource). Optional input to add source markers and labels at source node coordinates to contour plot. Default value is None.
sources_colour (str): Optional input for the colour of the source markers (if provided). Default value is ‘blue’.
targets (list of Target). Optional input to add target markers and labels at target node coordinates to contour plot. Default value is None.
targets_colour (str): Optional input for the colour of the target markers (if provided). Default value is ‘blue’.
plot_origin (bool): Select to draw a marker at the origin. Default value is True.
show_mesh (bool): Draw mesh triangles as light wireframe overlays. Default value is True.
label_font_size (int): Font size for labels (sources, targets and origin). Default value is 14.
colour_map_type (str): Select from ‘continuous’ or ‘discrete’ for the type of colour map to be used in the contour plot. Default value is ‘discrete’.
min_val, max_val (float): Optional override of automatic min and max from the data z. Default value is None.
governing_total_level_dict (dict): If provided, used to annotate governing frequency per node/target. Default value is None.
colour_map (matplotlib colormap): If provided, overrides the internally constructed colour map. Default value is None.
show (bool): Select to display the figure window in GUI. Default value is False.
file_path (str, Path or bool): Optional input to save the figure as file. Default value is True, in which case the figure is saved to the default location. Input of False or None will not save the figure. String or Path input wille save to the specified path. file_path=True uses <file_name>_contour.png in project.results_folder when available.
- Output:
Returns tuple with two items: * Axes instance of the matplotlib plot. * Returns the path of the saved figure, if selected.
- plot_plotly(nodes: List[MeshNode], n_levels: int = 10, colour_map_name: str = 'Plasma', line_segments: List[List[List[float]]] | None = None, vibration_sources: List[VibrationSource] | None = None, min_val: float | None = None, max_val: float | None = None) None[source]
Draft interactive contour plot using Plotly. Saves an HTML file next to results.
Warning
Functionality in development.
- Input:
nodes (list of MeshNode): Mesh nodes.
n_levels (int): Number of contour levels. Default value 10.
colour_map_name (str): Name of colour map to use. Default value is ‘Plasma’.
line_segments (list of list of list of float): Optional input for additional lines to be drawn in red. List of 2-point segments, each segment: [[x0, y0], [x1, y1]]. Default value is None.
vibration_sources (list of VibrationSource). Optional input to add source markers and labels at source node coordinates to contour plot. Default value is None.
min_val, max_val (float): Optional override of automatic min and max from the data z. Default value is None.
governing_total_level_dict (dict): If provided, used to annotate governing frequency per node/target. Default value is None.
colour_map (matplotlib colormap): If provided, overrides the internally constructed colour map. Default value is None.
show (bool): Select to display the figure window in GUI. Default value is False.
file_path (str, Path or bool): Optional input to save the figure as file. Default value is True, in which case the figure is saved to the default location. Input of False or None will not save the figure. String or Path input wille save to the specified path. file_path=True uses <file_name>_contour.png in project.results_folder when available.
- Output:
Generates plotly figure in browser.
- property values: ndarray
List with data values for the plot.
- static z_values(z: List[float]) ndarray[source]
Static method to prepare values for usage in the contour plot.
- Input:
z (list of float): Scalar values per mesh node (same order as nodes). Negative infinity values in z are replaced by the minimum finite value (or 0 if none).
- Output:
Returns the cleaned values in Numpy array.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_contour(project, at_frequencies: List[float], vibration_simulation: VibrationSimulation, figure_size: Tuple[float, float] = (10, 8), line_segments: List[List[List[float]]] | None = None, amplitude_type: Literal['velocity', 'decibel'] = 'decibel', n_levels: int = 10, align_colour_bar: bool = False, show_mesh: bool = True, min_limit: float | None = None, max_limit: float | None = None, sources_colour: str = 'blue', targets_colour: str = 'blue', plot_origin: bool = True, label_font_size: int = 10, colour_map_type: Literal['continuous', 'discrete'] = 'discrete', colour_map: Optional = None, show: bool = False) List[Path][source]
Function to create per-frequency filled contour plots of total vibration level across the mesh.
- Input:
project (obj): Project object containing collections of objects and project variables.
at_frequencies (list of float): Frequencies, in [Hz], at which to render individual contour plots.
vibration_simulation (VibrationSimulation): Simulation object.
figure_size (tuple of two floats): Matplotlib figure size in inches (width, height). Default value is (10, 8).
line_segments (list of list of list of float): Optional input for additional lines to be drawn in red.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘decibel’.
n_levels (int): Number of contour levels in the plot. Default value 10.
align_colour_bar (bool): Select to share a common min/max (computed across requested frequencies). Default value is False.
show_mesh (bool): Draw mesh triangles as light wireframe overlays. Default value is True.
min_limit, max_limit (float): Lower and upper bound used when align_color_bar=True (floor / cap). Default value is None, minimum and maximum are based on the data.
sources_colour (str): Optional input for the colour of the source markers (if provided). Default value is ‘blue’.
targets_colour (str): Optional input for the colour of the target markers (if provided). Default value is ‘blue’.
plot_origin (bool): Select to draw a marker at the origin. Default value is True.
label_font_size (int): Font size for labels (sources, targets and origin). Default value is 10.
colour_map_type (str): Select from ‘continuous’ or ‘discrete’ for the type of colour map to be used in the contour plot. Default value is ‘discrete’.
colour_map (matplotlib colormap): If provided, overrides the internally constructed colour map. Default value is None.
show (bool): Select to display the figure window in GUI. Default value is False.
- Output:
Creates contour plots and returns list of saved file paths (png) for each requested frequency. Files are saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_f_spectrum_against_limits_at_targets(project, amplitude_type: Literal['velocity', 'decibel'] = 'decibel', log_scale_x: bool = False, log_scale_y: bool | None = None, show: bool = False, line_width: float = 1) List[Path][source]
Plot frequency spectra at each target location, including the compliance limits set for the target.
- Input:
project (obj): Project object containing collections of objects and project variables.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘velocity’.
log_scale_x, log_scale_y (bool): Select to apply logarithmic scaling for the x and y-axis. Default value is False, no logarithmic scaling.
show (bool): Select to display the figure window in GUI. Default value is False.
line_width (float): Specify the line width used in the plot. Default value is 1.
- Output:
Creates the spectra at each target location and returns the list of file paths of the created png-files. Files are saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_f_spectrum_all_targets(project, amplitude_type: Literal['decibel', 'velocity'] = 'velocity', log_scale_x: bool = False, log_scale_y: bool | None = None, show: bool = False, line_width: float = 1, compliance_limits: bool = False) Path | List[Path][source]
Plot frequency spectrum with all targets in one graph, optionally including compliance limits.
- Input:
project (obj): Project object containing collections of objects and project variables.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘velocity’.
log_scale_x, log_scale_y (bool): Select to apply logarithmic scaling for the x and y-axis. Default value is False, no logarithmic scaling.
show (bool): Select to display the figure window in GUI. Default value is False.
line_width (float): Specify the line width used in the plot. Default value is 1.
- Output:
Creates the spectrum of all target locations for all compliance limits and returns the file paths of the created png-files. Files are saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_f_spectrum_at_multiple_nodes(project, nodes: list[MeshNode | list[float]], target_names: list, target_type: str | None = None, mep_limits: dict = None, amplitude_type: Literal['decibel', 'velocity'] = 'velocity', log_scale_x: bool = False, log_scale_y: bool = False, show: bool = False, line_width: float = 1) Path[source]
Plot frequency spectrum at multiple nodes in one graph.
- Input:
project (obj): Project object containing collections of objects and project variables.
nodes (list of MeshNode or list of float): Either a list of MeshNode or a list of coordinates x, y, (z) used to look up the node on the mesh.
target_names (list of str): Input for the name of the targets for labels.
target_type (str): Input for the type of the targets. Default value is None.
mep_limits (dict): Specify the compliance limits used in the plot. Default value is None.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘velocity’.
log_scale_x, log_scale_y (bool): Select to apply logarithmic scaling for the x and y-axis. Default value is False, no logarithmic scaling.
show (bool): Select to display the figure window in GUI. Default value is False.
line_width (float): Specify the line width used in the plot. Default value is 1.
- Output:
Creates the spectra for multiple nodes in one graph at the requested location and returns the file path of the created png-file. File is saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_f_spectrum_at_node(project, node: MeshNode | list[float], amplitude_type: Literal['velocity', 'decibel'] = 'velocity', log_scale_x: bool = False, log_scale_y: bool = False, plot_components: bool = False, mep_limits: dict | None = None, target_name: str | int | None = None, show: bool = False, line_width: float = 1) Path[source]
Plot frequency spectrum at node.
- Input:
project (obj): Project object containing collections of objects and project variables.
node (MeshNode or list of float): Either a MeshNode or coordinates x, y, (z) used to look up the node on the mesh.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘velocity’.
log_scale_x, log_scale_y (bool): Select to apply logarithmic scaling for the x and y-axis. Default value is False, no logarithmic scaling.
plot_components (bool): Select to include the spectra of the components in the plot. Default value is False.
mep_limits (dict): Specify the compliance limits used in the plot. Default value is None.
target_name (str or int): Optional input for the name or ID of the target for titles.
show (bool): Select to display the figure window in GUI. Default value is False.
line_width (float): Specify the line width used in the plot. Default value is 1.
- Output:
Creates the spectrum at the requested location and returns the file path of the created png-file. File is saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_f_spectrum_at_targets(project, amplitude_type: Literal['velocity', 'decibel'] = 'velocity', log_scale_x: bool = False, log_scale_y: bool = False, plot_components: bool = False, show: bool = False, line_width: float = 1)[source]
Plot frequency spectra at each target location, optionally including component curves.
- Input:
project (obj): Project object containing collections of objects and project variables.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘velocity’.
log_scale_x, log_scale_y (bool): Select to apply logarithmic scaling for the x and y-axis. Default value is False, no logarithmic scaling.
plot_components (bool): Select to include the spectra of the components in the plot. Default value is False.
show (bool): Select to display the figure window in GUI. Default value is False.
line_width (float): Specify the line width used in the plot. Default value is 1.
- Output:
Creates the spectra at each target location and returns the list of file paths of the created png-files. Files are saved in the results folder specified for the project.
- haskoning_atr_tools.vibration_contour_plot.plot.plot_functions.plot_governing_contour(project, vibration_simulation: VibrationSimulation, figure_size: Tuple[float, float] = (10, 8), line_segments: List[List[List[float]]] | None = None, amplitude_type: Literal['velocity', 'decibel'] = 'decibel', n_levels: int = 10, show_mesh: bool = True, min_limit: float | None = None, max_limit: float | None = None, sources_colour: str = 'blue', targets_colour: str = 'blue', plot_origin: bool = True, label_font_size: int = 10, colour_map_type: Literal['continuous', 'discrete'] = 'discrete', colour_map: Optional = None, show: bool = False, use_plotly: bool = False) Path | None[source]
Function to create single governing contour plot.
- Input:
project (obj): Project object containing collections of objects and project variables.
vibration_simulation (VibrationSimulation): Simulation object.
figure_size (tuple of two floats): Matplotlib figure size in inches (width, height). Default value is (10, 8).
line_segments (list of list of list of float): Optional input for additional lines to be drawn in red.
amplitude_type (str): Amplitude domain, select from ‘velocity’ or ‘decibel’. Used for total level per frequency. Default value is ‘decibel’.
n_levels (int): Number of contour levels in the plot. Default value 10.
show_mesh (bool): Draw mesh triangles as light wireframe overlays. Default value is True.
min_limit, max_limit (float): Lower and upper bound used when align_color_bar=True (floor / cap). Default value is None, minimum and maximum are based on the data.
sources_colour (str): Optional input for the colour of the source markers (if provided). Default value is ‘blue’.
targets_colour (str): Optional input for the colour of the target markers (if provided). Default value is ‘blue’.
plot_origin (bool): Select to draw a marker at the origin. Default value is True.
label_font_size (int): Font size for labels (sources, targets and origin). Default value is 10.
colour_map_type (str): Select from ‘continuous’ or ‘discrete’ for the type of colour map to be used in the contour plot. Default value is ‘discrete’.
colour_map (matplotlib colormap): If provided, overrides the internally constructed colour map. Default value is None.
show (bool): Select to display the figure window in GUI. Default value is False.
use_plotly (bool): Select to use plotly to generate the image. Default value is False, using matplotlib. Plotly is used for interactive plotting.
- Output:
Creates governing contour plot and returns file path of the created png-file. File is saved in the results folder specified for the project.