To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit b75109e7 authored by Christoph Goering's avatar Christoph Goering
Browse files

Unification where the units are in doc-string

parent 003e381d
......@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added - Jonas Fankhauser
- Streaming, Scattering, and ARF for Doinikov's Theory of viscoelastic fluids
of 2021
## [0.2.9] - 2021-04-15
### Changed - Christoph Goering
- unified position of units in doc string
## [0.2.8] - 2021-04-13
### Added - Cyrill Mast
- Acoustic Energy
......@@ -20,11 +29,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- changed names of special functions
- updated tests for special funcitons
## [Unreleased]
### Added - Jonas Fankhauser
- Streaming, Scattering, and ARF for Doinikov's Theory of viscoelastic fluids
of 2021
## [0.2.5] - 2021-03-01
### Added - Cyrill Mast
- Spherical Neumann Functions
......
......@@ -23,9 +23,10 @@ class BackgroundField:
:param p_0: pressure amplitude in [Pa]
:type p_0: float
:param wave_type: wave type: either standing or traveling / travelling
:type wave_type: Optional[float]
:type wave_type: str = 'traveling'
:param position: position of the particle in the standing wave
field in [m], will be ignored for travelling wave
:type position: Optional[float] = None
:rtype: None
"""
......@@ -222,11 +223,11 @@ class BackgroundField:
"'traveling'/'travelling' or 'standing'")
def A_in(self, n: int) -> complex:
"""Incident amplitude at order n
"""Incident amplitude at order n [Pa s]
:param n: order [-]
:param n: order
:type n: int
:rtype: complex [Pa s]
:rtype: complex
"""
if n < len(self._A_in.value):
return self._A_in.value[n]
......
......@@ -16,9 +16,9 @@ class InviscidFluid(BaseFrequencyComposite):
:param frequency: frequency in [Hz]
:type frequency: Union[int, float, Frequency]
:param rho: density in [km / m^3]
:param rho: density in [km/m^3]
:type rho: float
:param c: speed of sound [m / s]
:param c: speed of sound [m/s]
:type c: float
:rtype: None
"""
......@@ -84,25 +84,25 @@ class InviscidFluid(BaseFrequencyComposite):
@property
def kappa_f(self) -> float:
"""Returns the compressibility of the fluid
"""Returns the compressibility of the fluid [1/Pa]
:rtype: float [1/Pa]
:rtype: float
"""
return self._kappa_f.value
@property
def k_f(self) -> float:
"""Returns the wave number.
"""Returns the wave number [rad s^-1]
:rtype: float [rad s^-1]
:rtype: float
"""
return self._k_f.value
@property
def lambda_f(self) -> float:
"""Returns the wavelength
"""Returns the wavelength [m]
:rtype: float [m]
:rtype: float
"""
return self._lambda_f.value
......@@ -135,9 +135,9 @@ class ViscousFluid(InviscidFluid):
:param frequency: frequency in [Hz]
:type frequency: Union[int, float, Frequency]
:param rho: density in [km / m^3]
:param rho: density in [km/m^3]
:type rho: float
:param c: speed of sound [m / s]
:param c: speed of sound [m/s]
:type c: float
:param eta_f: shear viscosity [Pa s]
:type eta_f: float
......@@ -212,17 +212,17 @@ class ViscousFluid(InviscidFluid):
@property
def k_f(self) -> complex:
"""Returns the wave number in the fluid
"""Returns the wave number in the fluid [1/m]
:rtype: complex [1/m]
:rtype: complex
"""
return self._k_f.value
@property
def k_v(self) -> complex:
"""Returns the viscous wave number in the fluid
"""Returns the viscous wave number in the fluid [1/m]
:rtype: complex [1/m]
:rtype: complex
"""
return self._k_v.value
......@@ -230,15 +230,15 @@ class ViscousFluid(InviscidFluid):
def delta(self) -> float:
"""Returns the boundary layer thickness
:rtype: float [-]
:rtype: float
"""
return self._delta.value
@property
def lambda_v(self) -> float:
"""Returns the viscous wave length
"""Returns the viscous wave length [m]
:rtype: float [m]
:rtype: float
"""
return self._lambda_v.value
......@@ -274,9 +274,9 @@ class ViscoelasticFluid(ViscousFluid):
:param frequency: frequency in [Hz]
:type frequency: Union[int, float, Frequency]
:param rho: density in [km / m^3]
:param rho: density in [km/m^3]
:type rho: float
:param c: speed of sound [m / s]
:param c: speed of sound [m/s]
:type c: float
:param eta_f: shear viscosity of fluid component [Pa s]
:type eta_f: float
......@@ -393,57 +393,57 @@ class ViscoelasticFluid(ViscousFluid):
@property
def eta_c(self) -> complex:
"""Complex acoustic shear viscosity of the fluid.
"""Complex acoustic shear viscosity of the fluid [Pa s]
:rtype: complex [Pa s]
:rtype: complex
"""
return self._eta_c.value
@property
def zeta_c(self) -> complex:
"""Complex acoustic bulk viscosity of the fluid.
"""Complex acoustic bulk viscosity of the fluid [Pa s]
:rtype: complex [Pa s]
:rtype: complex
"""
return self._zeta_c.value
@property
def k_f(self) -> complex:
"""Returns the wave number in the fluid
"""Returns the wave number in the fluid [1/m]
:rtype: complex [1/m]
:rtype: complex
"""
return self._k_f.value
@property
def k_v(self) -> complex:
"""Returns the viscous wave number in the fluid
"""Returns the viscous wave number in the fluid [1/m]
:rtype: complex [1/m]
:rtype: complex
"""
return self._k_v.value
@property
def viscosity_term(self) -> complex:
"""Returns the viscosity term
"""Returns the viscosity term [Pa s]
:rtype: complex [Pa s]
:rtype: complex
"""
return self._viscosity_term.value
@property
def C_eta(self) -> complex:
"""Returns an often used shear viscosity term in viscoelastic fluids
"""Returns an often used shear viscosity term in viscoelastic fluids [Pa s]
:rtype: complex [Pa s]
:rtype: complex
"""
return self._C_eta.value
@property
def C_zeta(self) -> complex:
"""Returns an often used bulk viscosity term in viscoelastic fluids
"""Returns an often used bulk viscosity term in viscoelastic fluids [Pa s]
:rtype: complex [Pa s]
:rtype: complex
"""
return self._C_zeta.value
......
......@@ -61,9 +61,9 @@ class Frequency:
@property
def omega(self) -> float:
"""Returns the angular frequency.
"""Returns the angular frequency [rad/s].
:rtype: float [rad s^-1]
:rtype: float
"""
return self._omega.value
......
......@@ -60,17 +60,17 @@ class Sphere:
@property
def A(self) -> float:
"""Returns the surface area of the sphere.
"""Returns the surface area of the sphere [m^2]
:rtype: float [m^2]
:rtype: float
"""
return self._A.value
@property
def V(self) -> float:
"""Returns the volume of the sphere.
"""Returns the volume of the sphere [m^3]
:rtype: float [m^3]
:rtype: float
"""
return self._V.value
......
......@@ -156,49 +156,49 @@ class ElasticSolid(RigidSolid):
@property
def B_s(self) -> float:
"""Returns the Bulk modulus of the solid
"""Returns the Bulk modulus of the solid [Pa]
:rtype: float [Pa]
:rtype: float
"""
return self._B_s.value
@property
def kappa_s(self) -> float:
"""Returns the compressibility of the solid
"""Returns the compressibility of the solid [1/Pa]
:rtype: float [1/Pa]
:rtype: float
"""
return self._kappa_s.value
@property
def c_l(self) -> float:
"""Returns the longitudinal wave speed in the solid
"""Returns the longitudinal wave speed in the solid [m/s]
:rtype: float [m/s]
:rtype: float
"""
return self._c_l.value
@property
def c_t(self) -> float:
"""Return the transverse wave speed in the sold
"""Return the transverse wave speed in the solid [m/s]
:rtype: float [m/s]
:rtype: float
"""
return self._c_t.value
@property
def k_l(self) -> float:
"""Returns the longitudinal wave number in the solid
"""Returns the longitudinal wave number in the solid [1/m]
:rtype: float [1/m]
:rtype: float
"""
return self._k_l.value
@property
def k_t(self) -> float:
"""Returns the transverse wave number in the solid
"""Returns the transverse wave number in the solid [1/m]
:rtype: float [1/m]
:rtype: float
"""
return self._k_t.value
......
......@@ -84,7 +84,7 @@ class ARF(BaseARF, BaseSphereFrequencyComposite):
log.debug(repr(self))
def acoustic_radiation_force(self) -> float:
"""Computes the ARF and returns the force in Newton. Checks before
"""Computes the ARF and returns the force in Newton [N]. Checks before
computation of assumption of theory small particle radius to pressure
field wavelength is valid.
......@@ -155,7 +155,7 @@ class ARF(BaseARF, BaseSphereFrequencyComposite):
@property
def f1(self) -> float:
"""Monopole factor.
"""Monopole factor [-]
:rtype: float
"""
......@@ -163,7 +163,7 @@ class ARF(BaseARF, BaseSphereFrequencyComposite):
@property
def f2(self) -> float:
"""Dipole factor.
"""Dipole factor [-]
:rtype: float
"""
......@@ -171,7 +171,7 @@ class ARF(BaseARF, BaseSphereFrequencyComposite):
@property
def Phi(self) -> float:
"""Acoustic contrast factor
"""Acoustic contrast factor [-]
:rtype: float
"""
......
......@@ -128,7 +128,7 @@ class BaseKing(BaseSphereFrequencyComposite):
@property
def f2(self) -> float:
"""Dipole factor.
"""Dipole factor [-]
:rtype: float
"""
......@@ -136,7 +136,7 @@ class BaseKing(BaseSphereFrequencyComposite):
@property
def Phi(self) -> float:
"""Acoustic contrast factor
"""Acoustic contrast factor [-]
:rtype: float
"""
......
......@@ -8,7 +8,7 @@ class BaseARF(ABC):
@abstractmethod
def acoustic_radiation_force(self) -> float:
""" Returns the value for the ARF in Newton based on input parameters.
""" Returns the value for the ARF in Newton [N] based on input parameters.
This method must be implemented by every theory to have a common
interface for other modules.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment