Source code for viiapackage.tools.viia_frequency_tool

### ===================================================================================================================
###   FREQUENCY TOOL
### ===================================================================================================================
# Copyright ©VIIA 2025

### ===================================================================================================================
###   1. Import modules
### ===================================================================================================================

# General imports
from typing import Union, List, Dict

# References for functions and classes in the rhdhv_sd_tools
from rhdhv_sd_tools import frequency_calculation


### ===================================================================================================================
###   2. Function to get the frequency of a wall (including openings)
### ===================================================================================================================

[docs]def viia_frequency_calculation( length: Union[float, int], width: Union[float, int], boundary_condition: Dict[str, str], thickness: Union[float, int], density: Union[int, float], youngs_modulus: Union[int, float], poissons_ratio: Union[float, int], openings: List[Dict] = None, show: bool = False) -> float: """ Calculation of first out-of-plane natural frequency of a plate (wall) with or without openings. .. note:: The natural frequency can be calculated for a maximum of three openings in a wall. Further expansion will be added later. Input: - length (float): Length of the plate or wall, in [m]. - width (float): Width of the plate or height of the wall, in [m]. - boundary_condition (dict): Boundary condition of all the four sides of the wall written in a dictonary format. The available names for the supports are:- 'simply supported', 'fixed' and 'free'. The required keys for the dictionary are 'left', 'right', 'bottom' and 'top'. - thickness (float): Thickness of the plate, in [m]. - density (int/float): Density of the plate, in [kg/m3]. - youngs_modulus (int/float): Young's modulus of the material of the plate, in [Pa] or [N/m2]. - poissons_ratio (float): Poisson's ratio of the plate, in [-]. - openings (list of dict): Information of the location of opening. The dictionary contains the value for 'left_of_opening', 'right_of_opening', 'top_of_opening' and 'bottom_of_opening' for each opening. The values for 'left_of_opening' and 'right_of_opening' should be from the left edge of the wall. The values for 'bottom_of_opening' and 'top_of_opening' should be from the bottom edge of the wall. All dimensions in [m]. - show (bool): Select to show the picture of the mesh. Default value is False. If True, the image of the plate and mesh show in matplotlib. Output: - Returns the first natural frequency of the plate or wall in Hertz. """ return frequency_calculation( length=length, width=width, boundary_condition=boundary_condition, thickness=thickness, density=density, youngs_modulus=youngs_modulus, poissons_ratio=poissons_ratio, openings=openings, show=show)
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================