# Path: Sea/model/subsystems/SubsystemStructural.py
# class SubsystemStructural(Subsystem):
#     """
#     Abstract base class for all Structural subsystems.
#     """
#     __metaclass__ = abc.ABCMeta  
#     
#     
#     @property
#     def velocity(self):
#         """
#         Vibrational velocity :math:`v`.
#         
#         .. math:: v = \\sqrt{\\frac{E}{m}}
#         """
#         try:
#             return np.sqrt(self.energy / self.component.mass)
#         except FloatingPointError:
#             return np.zeros(self.frequency.amount)
#             
#     @property
#     def velocity_level(self):
#         """
#         Velocity level.
#         
#         .. math:: L_v = 20 \\log_{10}{\\frac{v}{v_0}}
#         """
#         try:
#             return 20 * np.log10(self.velocity / (5 * 10**(-8)) ) 
#         except FloatingPointError:
#             return np.zeros(self.frequency.amount)


import numpy as np
from ComponentStructural import ComponentStructural
from ..subsystems import SubsystemStructural
        
        .. math:: c_{L,g}^{1D} = c_{L,\\phi}^{1D}
        """
        return self.soundspeed_phase
    
    @property
    def average_frequency_spacing(self):
        """Average frequency spacing for longitudinal waves.
        
        :rtype: :class:`numpy.ndarray`
        
        .. math:: \\overline{\\delta f}_L^{1D} = \\frac{c_{L, \\phi}^{1D}}{2L}
        
        See Lyon, eq. 8.1.7
        """
        return self.soundspeed_group / (2.0 * self.component.length)
        
    @property
    def impedance_force_point_edge(self):
        """Impedance for longitudinal waves in a bar when excited at a point by a force.
    
        :rtype: :class:`numpy.ndarray`
    
        .. math:: Z_{L}^{F, 1D} = 2 \\rho S c_L
        
        See Lyon, table 10.1, first row.
        """
        return 2.0 * self.component.material.density * self.component.cross_section * self.soundspeed_group
    
   

# Path: Sea/model/subsystems/SubsystemStructural.py
# class SubsystemStructural(Subsystem):
#     """
#     Abstract base class for all Structural subsystems.
#     """
#     __metaclass__ = abc.ABCMeta  
#     
#     
#     @property
#     def velocity(self):
#         """
#         Vibrational velocity :math:`v`.
#         
#         .. math:: v = \\sqrt{\\frac{E}{m}}
#         """
#         try:
#             return np.sqrt(self.energy / self.component.mass)
#         except FloatingPointError:
#             return np.zeros(self.frequency.amount)
#             
#     @property
#     def velocity_level(self):
#         """
#         Velocity level.
#         
#         .. math:: L_v = 20 \\log_{10}{\\frac{v}{v_0}}
#         """
#         try:
#             return 20 * np.log10(self.velocity / (5 * 10**(-8)) ) 
#         except FloatingPointError:
#             return np.zeros(self.frequency.amount)


# Path: Sea/model/components/Component1DBeam.py
import numpy as np
from ComponentStructural import ComponentStructural
from ..subsystems import SubsystemStructural

        
        .. math:: c_{L,g}^{1D} = c_{L,\\phi}^{1D}
        """
        return self.soundspeed_phase
    
    @property
    def average_frequency_spacing(self):
        """Average frequency spacing for longitudinal waves.
        
        :rtype: :class:`numpy.ndarray`
        
        .. math:: \\overline{\\delta f}_L^{1D} = \\frac{c_{L, \\phi}^{1D}}{2L}
        
        See Lyon, eq. 8.1.7
        """
        return self.soundspeed_group / (2.0 * self.component.length)
        
    @property
    def impedance_force_point_edge(self):
        """Impedance for longitudinal waves in a bar when excited at a point by a force.
    
        :rtype: :class:`numpy.ndarray`
    
        .. math:: Z_{L}^{F, 1D} = 2 \\rho S c_L
        
        See Lyon, table 10.1, first row.
        """
        return 2.0 * self.component.material.density * self.component.cross_section * self.soundspeed_group
    
   

class SubsystemBend(SubsystemStructural):