pyva.models.TMmodel
- class pyva.models.TMmodel(layers, **kwargs)
Bases:
object
The TMmodel class deals with systems that are described best a set of infiniteLayer objects that are represented by transfer matrices and coupling conditions.
- __init__(layers, **kwargs)
Class constructor of TMmodel
- Parameters:
layers (tuple or lost of AcousticLayer) – lay-up of different infinitly extende layers
**kwargs (dict) – Arbitrary keyword agrguments
- Return type:
None.
Methods
V0
([boundary_condition])Multilayer state variable V_0 of Allards D0 matrix.
__init__
(layers, **kwargs)Class constructor of TMmodel
absorption
(omega, kx[, in_fluid, ID, ...])Calculates the surface absorption with specified end condition and input fluid
absorption_diffuse
(omega[, theta_max, ...])diffuse surface absorption with specified end condition and input fluid
add_BC
(BC)Adds boundary condition
allard_matrix
(omega[, kx, ...])Calculate Allard matrix of all layers.
connect
(omega[, kx])Calculate TM of all layers by simple transfermatrix multiplication.
impedance
(omega[, kx, ID, ...])impedance provides the surface impedance of a TMmodel with specified end condition
impedance_allard
(omega[, kx, ID, ...])impedance provides the surface impedance of a TMmodel with specified end condition
insertion_loss
(omega, kx[, fluid, Signal])calculates the insertion loss for plate radiation
insertion_loss_diffuse
(omega, plate[, ...])calculates the diffurse field insertion loss for plate radiation
kx_DataAxis
(kx)Creates DataAxis from kx vector
stiffness_matrix
(omega, distances, ks, dA[, ...])Calculate stiffness matrix of TMmodel
stiffness_matrix_mesh
(omega, mesh)Calculate stiffness matrix of TMmodel for mesh
stiffness_matrix_wavenumber
(omega[, kx])provides the stiffness matrix of TMM
transmission_allard
(omega[, kx, ID, fluids, ...])Calculate the transmission of TMM according to Allards method.
transmission_coefficient
(omega, kx[, ...])provides the acoustic transmission coefficient of TMmodel objects
transmission_diffuse
(omega[, theta_max, ...])- param omega:
angular frequency.
Attributes
Property method for boundary conditions (BC) form
N
Property method for boundary conditions
Property methods for loads
- property BC
Property method for boundary conditions (BC) form
- Returns:
boundary conditions.
- Return type:
TYPE
- V0(boundary_condition='equivalent_fluid')
Multilayer state variable V_0 of Allards D0 matrix.
The state variable is determined by the DOF left of the connection and the right side of the each layer.
Layers of same nature are considered as one layer because they can be calculated by simple transfermatrix multiplication.
So, every change in layer nature require new DOFs.
- Parameters:
boundary_condition (str) – str for end condition ‘equivalent_fluid’ of ‘fixed’. The default is ‘equivalent_fluid’
- Returns:
(v0,v1) – excitation dof (V0) and the response dofs of the layer set.
- Return type:
tuple of mC.DOF
- absorption(omega, kx, in_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01), ID=1, boundary_condition='fixed', allard=False, signal=True, out_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01))
Calculates the surface absorption with specified end condition and input fluid
- Parameters:
omega (float) – angular frequency
kx (ndarray of float) – surface wavenumber.
in_fluid (fluid, optional) – irradiating fluid. The default is matC.Fluid().
ID (int, optional) – ID for surface condition (can be an inner ID). The default is 1.
boundary_condition (str or Signal, optional) – boundary_condition. The default is ‘fixed’.
signal (bool, optional) – Switch for Signal (True) or array (False) output. The default is True.
- Returns:
absorption coefficient
- Return type:
- absorption_diffuse(omega, theta_max=1.3613568165555772, theta_step=0.017453292519943295, in_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01), ID=1, boundary_condition='fixed', allard=False, signal=True, out_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01))
diffuse surface absorption with specified end condition and input fluid
- Parameters:
omega (ndarray or float) – angular frequency
theta_max (float, optional) – Maximum angle for diffuse field integeration. The default is 78/180*np.pi.
theta_step (float, optional) – Angle step for diffuse field integeration. The default is np.pi/180.
in_fluid (fluid, optional) – Fluid of sound field. The default is matC.Fluid().
ID (int, optional) – ID of considered layer. The default is 1.
boundary_condition (str, optional) – End condtion. The default is ‘fixed’.
signal (bool) – Switch for Signal output, The default is True.
allard (bool) – Switch for calculation method, The default is False
- Returns:
Absorption coefficient
- Return type:
Signal, ndarray
- add_BC(BC)
Adds boundary condition
- Parameters:
BC (TYPE) – DESCRIPTION.
- Return type:
None.
- allard_matrix(omega, kx=0.0, boundary_condition='equivalent_fluid', out_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01), reduced=False)
Calculate Allard matrix of all layers.
Namely the matrix given by equation (11.79) and the terminiation given by (11.82) or (11.85)
- Parameters:
omega (float) – angular frequency.
kx (ndarray of float, optional) – wavenumber in x-direction. The default is 0..
boundary_condition (str) – identifier for end condition
out_fluid (Fluid) – Fluid at the end condition. The default is air.
reduces (boolean) – Switch for reduced matrix according to section 11.6.2 of [All2009]
**kwargs (TYPE) – DESCRIPTION.
- Returns:
TM_ – overall Allard Matrix D0 matrix.
- Return type:
- property boundary_conditions
Property method for boundary conditions
- Returns:
boundary conditions.
- Return type:
TYPE
- connect(omega, kx=0.0, **kwargs)
Calculate TM of all layers by simple transfermatrix multiplication.
Multiplication makes sense only for layers of same nature. If porous layers are involved (and they are not modelled as equivalent fluid) the multiplication involves a connection matrix [I] that consideres the porosity.
- Parameters:
omega (float) – angular frequency.
kx (ndarray of float, optional) – wavenumber in x-direction. The default is 0..
**kwargs (TYPE) – DESCRIPTION.
- Returns:
TM_ – overall transfer matrix.
- Return type:
- impedance(omega, kx=0.0, ID=1, boundary_condition='fixed', signal=True, out_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01))
impedance provides the surface impedance of a TMmodel with specified end condition
- Parameters:
ID (int) – ID for surface condition (can be an inner ID)
boundary_condition (str) – at end of layers
signal (bool, optional) – Switch for Signal (True) or array (False) output. The default is True.
- Returns:
impedance at port one
- Return type:
- impedance_allard(omega, kx=0.0, ID=1, boundary_condition='fixed', signal=True, out_fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01))
impedance provides the surface impedance of a TMmodel with specified end condition
- Parameters:
ID (int) – ID for surface condition (can be an inner ID)
boundary_condition (str) – at end of layers
signal (bool, optional) – Switch for Signal (True) or array (False) output. The default is True.
- Returns:
impedance at port one
- Return type:
- insertion_loss(omega, kx, fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01), Signal=False)
calculates the insertion loss for plate radiation
- Parameters:
omega (float) – angular frequency.
kx (ndarray of float) – wavenumber in x-direction.
fluid (matC.Fluid) – fluid material that is connected to the outer trim surface
Signal (bool, optional) – switch if ndarray or singal output is desired.
- Return type:
insertion loss
- insertion_loss_diffuse(omega, plate, theta_max=1.3613568165555772, theta_step=0.017453292519943295, fluid=Fluid(c0=343.0, rho0=1.23, eta=0.01))
calculates the diffurse field insertion loss for plate radiation
- Parameters:
omega (float) – angular frequency.
plate (2Dstructure) – reference plate with applied trim.
theta_max (float, optional) – maximum integration angle. The default is 78/180*np.pi.
theta_step (float, optional) – integral sampling step size. The default is np.pi/180.
fluid (matC.Fluid) – fluid material that is connected to the outer trim surface
- Returns:
insertion loss.
- Return type:
TYPE
- kx_DataAxis(kx)
Creates DataAxis from kx vector
- Parameters:
kx (ndarray) – wavenumber in x-direction.
- Returns:
wavenumber in x-direction.
- Return type:
- property loads
Property methods for loads
- Returns:
loads.
- Return type:
load
- stiffness_matrix(omega, distances, ks, dA, Nstep=10)
Calculate stiffness matrix of TMmodel
- Parameters:
omega (float) – angular frequency.
distances (ndarray) – distances for discrete mesh.
ks (fload) – maximum wavenumber integration limit
dA (float) – element area
Nstep (int, optional) – Number of intervals for numeric wavenumber integration. The default is 10.
- Returns:
D11 (ndarray) – 1-1 coeffcient of stifness matrix.
D12 (ndarray) – 1-2 coeffcient of stifness matrix equal to D21.
D22 (ndarray) – 2-2 coeffcient of stifness matrix.
- stiffness_matrix_mesh(omega, mesh)
Calculate stiffness matrix of TMmodel for mesh
- Parameters:
omega (float) – angular frequency.
mesh (mesh) – grid points on surface.
- Returns:
Stiffness matrix of TMmodel for mesh.
- Return type:
- stiffness_matrix_wavenumber(omega, kx=0.0)
provides the stiffness matrix of TMM
- Parameters:
omega (float) – angular frequency.
kx (ndarray or float, optional) – wavenumber in x-direction. The default is 0..
- Returns:
stiffness matrix in wavenumber space.
- Return type:
- transmission_allard(omega, kx=0.0, ID=1, fluids=(Fluid(c0=343.0, rho0=1.23, eta=0.01), Fluid(c0=343.0, rho0=1.23, eta=0.01)), signal=True, plot=0)
Calculate the transmission of TMM according to Allards method.
- Parameters:
ID (int) – ID for surface condition (can be an inner ID)
boundary_condition (str) – at end of layers
signal (bool, optional) – Switch for Signal (True) or array (False) output. The default is True.
- Returns:
impedance at port one
- Return type:
- transmission_coefficient(omega, kx, fluids=(Fluid(c0=343.0, rho0=1.23, eta=0.01), Fluid(c0=343.0, rho0=1.23, eta=0.01)), ID=0, signal=True)
provides the acoustic transmission coefficient of TMmodel objects
- Parameters:
omega (TYPE) – angular frequency.
kx (TYPE) – surface wavenumber.
fluids (tuple of fluid, optional) – 2x1 vector of fluids. The default is (matC.Fluid(),matC.Fluid()).
ID (int, optional) – node ID for output. The default is 0.
- Returns:
transmission coefficient.
- Return type:
- transmission_diffuse(omega, theta_max=1.3613568165555772, theta_step=0.017453292519943295, fluids=(Fluid(c0=343.0, rho0=1.23, eta=0.01), Fluid(c0=343.0, rho0=1.23, eta=0.01)), ID=0, signal=True, allard=False)
- Parameters:
omega (float) – angular frequency.
plate (2Dstructure) – reference plate with applied trim.
theta_max (float, optional) – maximum integration angle. The default is 78/180*np.pi.
theta_step (float, optional) – integral sampling step size. The default is np.pi/180.
fluids (tuple of fluids, optional) – vector of coupled fluids. The default is (matC.Fluid(),matC.Fluid()).
ID (int, optional) – node ID for output Signal. The default is 0.
signal (bool, optional) – Switch for Signal (True) or array (False) output. The default is True.
- Returns:
diffuse field transmission coefficient.
- Return type:
ndarray of Signal