pyva.properties.materialClasses.Fluid
- class pyva.properties.materialClasses.Fluid(c0=343.0, rho0=1.23, eta=0.01, dynamic_viscosity=1.84e-05, kappa=1.4, Cp=1005.1, heat_conductivity=0.0257673, **kwargs)
Bases:
object
The fluid class deals with fluid properties including damping
This class implements some methods that may not seem reasonable for standart fluids, for example the frequency dependent methods for speed of sound and impedance. They are defined in such a way so that every daugther class can implement those methods especially when they are frequency dependent as for example in case of the equivalent fluid model for fibre materials
- c0
Speed of sound
- Type:
complex
- rho0
Density
- Type:
complex
- eta
Damping loss
- Type:
float
- dampingModell
Identifier for damping model
- Type:
str
- __init__(c0=343.0, rho0=1.23, eta=0.01, dynamic_viscosity=1.84e-05, kappa=1.4, Cp=1005.1, heat_conductivity=0.0257673, **kwargs)
Constructor for Fluid
- Parameters:
c0 (complex, optional) – Speed of sound. The default is 343..
rho0 (complex, optional) – density. The default is 1.23.
eta (float, optional) – Damping loss. The default is 0.01.
dynamic_viscosity (float, optional) – Dynamic viscosity. The default is 1.84e-5.
kappa (float, optional) – ratio of specific heat capacities. The default is 1.4.
Cp (float, optional) – Heat capacity at constant pressure. The default is 1.0051.
heat_conductivity (float, optional) – Heat conductivity. The default is 0.0257673.
**kwargs (dict) – Arbitrary keyword argument list.
dampingModell (str) – Identifier for damping model
- Raises:
ValueError – DESCRIPTION.
- Return type:
None.
Examples
import materialClasses as mc myAir = mc.Fluid()
Methods
__init__
([c0, rho0, eta, dynamic_viscosity, ...])Constructor for Fluid
absorption
(omega, impedance[, theta])Absorption coefficient for interface to other fluids
absorption_diffuse
(omega, z[, theta_max, ...])Diffuse absorption coefficient for interface to other fluids
acoustic_FE
(omega, S[, ID])Acoustic Finite Element radiator/end condition of plane wave fluid
air
(temperature, pressure[, h_rel])Determine precise properties of air from ambient conditions.
c_freq
([omega])Complex, frequency dependent speed of sound
damping
(omega)Damping loss
impedance
([omega])Complex characteristic impedance including damping
infinite_layer_TM
(omega, wavenumber, thickness)Calculated transfermatrix of infinite fluid layer
reflection_factor
(omega, impedance[, theta, ...])Refection factor for interface to other fluids
rho_freq
(omega)density of fluid
shear_wavenumber
(omega)Shear wavenumber according to Maa's theory
wavelength
(omega)- param omega:
DESCRIPTION.
wavenumber
(omega)Wavenumber including damping
Attributes
Prandtl number.
Diffusivity.
Kinematic viscosity.
Kinematic viscosity.
Real characteristic impedance without damping
- property Pr
Prandtl number.
- Returns:
Prandtl number.
- Return type:
float
- absorption(omega, impedance, theta=0)
Absorption coefficient for interface to other fluids
- Parameters:
omega (float) – angular frequency.
impedance (complex) – impedance of interfacing fluid.
theta (float, optional) – angle of incidence. The default is 0.
- Returns:
Absorption coefficient.
- Return type:
complex
- absorption_diffuse(omega, z, theta_max=1.5550883635269477, theta_step=0.015707963267948967)
Diffuse absorption coefficient for interface to other fluids
- Parameters:
omega (float) – angular frequency.
z (complex) – impedance.
theta_max (float, optional) – Maximum integration angle. The default is np.pi/2*0.99.
theta_step (float, optional) – Angle integration step. The default is np.pi/200.
- Returns:
alpha – diffuse field absorption coefficient.
- Return type:
float
- acoustic_FE(omega, S, ID=[1], **kwargs)
Acoustic Finite Element radiator/end condition of plane wave fluid
See also
piston
- Parameters:
omega (float) – angular frequency.
S (float) – tube cross section
ID (list of int, optional) – list of input ID. The default is [1].
**kwargs (TYPE) – DESCRIPTION.
- Raises:
ValueError – DESCRIPTION.
- Returns:
0D aoustic radiation mobility S/Z * p = Q Za = p/Q = p/(v*S) = Z/S
- Return type:
- static air(temperature, pressure, h_rel=0.0)
Determine precise properties of air from ambient conditions.
Implementation is based on [1] that collects numerous papers dealing with various properties of air. Rasmussen condenses all papers into one formula collection.
[1] Rasmussen, K. (1997). Calculation methods for the physical properties of air used in the calibration of microphones.
- Parameters:
temperature (float) – temperature in Kelvin
pressure (float) – atmospheric pressure in bar
h_rel (float) – relative humidity in percent. The default is 0 (dry air).
- Returns:
air with properties according to environmental conditions.
- Return type:
- c_freq(omega=0.0)
Complex, frequency dependent speed of sound
- Parameters:
omega (float) – Angular frequency.
- Returns:
speed of sound.
- Return type:
complex
- damping(omega)
Damping loss
- Parameters:
omega (float or ndarray) – DESCRIPTION.
- Returns:
damping loss.
- Return type:
float or ndarray
- property diffusivity
Diffusivity.
- Returns:
Diffusivity.
- Return type:
float
- impedance(omega=0.0)
Complex characteristic impedance including damping
- Parameters:
omega (float or ndarray, optional) – angular frequency. The default is 0..
- Returns:
characteristic impedance.
- Return type:
complex
- infinite_layer_TM(omega, wavenumber, thickness, ID=[1, 2], **kwargs)
Calculated transfermatrix of infinite fluid layer
Deprecated: This method is part of the FluidLayer class
- Parameters:
omega (float) – angular frequency.
wavenumber (float) – wavenumbner in plane direction.
thickness (float) – thickness of fluid layer.
ID (list if int, optional) – list of input and output ID. The default is [1,2].
**kwargs (TYPE) – DESCRIPTION.
- Raises:
ValueError – DESCRIPTION.
- Returns:
transfer matrix of infinite fluid layer.
- Return type:
- property kinematic_viscosity
Kinematic viscosity.
- Returns:
Kinematic viscosity.
- Return type:
float
- property nu0
Kinematic viscosity.
- Returns:
Kinematic viscosity
- Return type:
float
- reflection_factor(omega, impedance, theta=0, area=1.0)
Refection factor for interface to other fluids
- Parameters:
omega (float) – angular frequency.
impedance (complex) – impedance of interfacing fluid.
theta (float, optional) – angle of incidence. The default is 0.
area (float, optional) – ?????? . The default is 1..
- Returns:
reflection coefficient.
- Return type:
complex
- rho_freq(omega)
density of fluid
For simple fluid the output is the attribute rho0 but for later implementation of fibre material this method is created to initiate the frequency dependence in the mother class
- Parameters:
omega (float) – Angular frequency.
- Returns:
density
- Return type:
complex
- shear_wavenumber(omega)
Shear wavenumber according to Maa’s theory
- Parameters:
omega (float or ndarray) – angular frequency.
- Returns:
wavenumber
- Return type:
complex
- wavelength(omega)
- Parameters:
omega (TYPE) – DESCRIPTION.
- Returns:
wavelength
- Return type:
float
- wavenumber(omega)
Wavenumber including damping
- Parameters:
omega (TYPE) – DESCRIPTION.
- Returns:
Complex wavenumber
- Return type:
complex
- property z0
Real characteristic impedance without damping
- Returns:
Characteristic impedance.
- Return type:
float