ScatteringField

Examples using this class are:

Frontiers: Copper Particle in Viscous Oil

Frontiers: Copper Particle in Viscous Oil

Doinikov Rigid (1994): Sandstone in Glycerin

Doinikov Rigid (1994): Sandstone in Glycerin

Pressure Plots for different theories

Pressure Plots for different theories

Doinikov 1994 Models

Doinikov 1994 Models

Possible Numerical Problems

Possible Numerical Problems
class osaft.solutions.doinikov1994rigid.scattering.ScatteringField(f, R_0, rho_s, rho_f, c_f, eta_f, zeta_f, p_0, wave_type=WaveType.STANDING, position=None, N_max=5)[source]

Bases: BaseDoinikov1994Rigid, BaseScatteringRigidParticle, BaseScatteringDoinikov1994

Scattering field class for Doinikov (viscous fluid-rigid sphere; 1994)

Parameters:
  • f (Union[Frequency, float, int]) – Frequency [Hz]

  • R_0 (Union[Sphere, float, int]) – Radius of the sphere [m]

  • rho_s (float) – Density of the sphere [kg/m^3]

  • rho_f (float) – Density of the fluid [kg/m^3]

  • c_f (float) – Speed of sound of the fluid [m/s]

  • eta_f (float) – shear viscosity [Pa s]

  • zeta_f (float) – bulk viscosity [Pa s]

  • p_0 (float) – Pressure amplitude of the field [Pa]

  • wave_type (Optional[WaveType], optional) – Type of wave, traveling or standing

    Default: WaveType.STANDING

  • position (Optional[float], optional) – Position in the standing wave field [rad]

    Default: None

  • N_max (int, optional) – Highest order mode included in the computation [-]

    Default: 5

Public Data Attributes:

mu_1

\(\mu_1\) according to (3.16)

mu_2

\(\mu_2\) according to (3.17)

mu_3

\(\mu_3\) according to (3.18)

mu_4

\(\mu_4\) according to (3.19)

Inherited from BaseDoinikov1994Rigid

supported_wavetypes

rho_s

Wraps to osaft.core.solids.RigidSolid.rho_s

Inherited from BaseDoinikov1994
Inherited from BaseSphereFrequencyComposite
Inherited from BaseFrequencyComposite
Inherited from BaseSolution

supported_wavetypes

wave_type

returns the wave type of the solution

Inherited from BaseScatteringRigidParticle

R_0

Inherited from BaseScatteringDoinikov1994

k_f

Returns the wave number in the fluid \(k_f\) [1/m]

k_v

Returns the viscous wave number in the fluid \(k_v\) [1/m]

field

omega

R_0

rho_f

Inherited from BaseScattering

N_max

Cutoff mode number for infinite sums

field

omega

R_0

rho_f

k_f

Public Methods:

xi_n(n)

coefficient \(\xi_n\) (3.22)

gamma_n(n)

coefficient \(\gamma_n\) (3.22)

alpha_n(n)

coefficient \(\alpha_n\) (3.13) and (3.20)

beta_n(n)

coefficient \(\beta_n\) (3.13) and (3.20)

particle_velocity(t)

Particle velocity

Inherited from BaseDoinikov1994
Inherited from BaseFrequencyComposite

input_variables()

Returns all properties that are settable.

Inherited from BaseSolution

copy()

Returns a copy of the object

check_wave_type()

Checks if wave_type is in supported_wavetypes

Inherited from BaseScatteringRigidParticle

particle_velocity(t)

Particle velocity

radial_particle_velocity(r, theta, t[, mode])

Particle velocity in radial direction

tangential_particle_velocity(r, theta, t[, mode])

Particle velocity in tangential direction

Inherited from BaseScatteringDoinikov1994

potential_coefficient(n)

Wrapper to the fluid scattering coefficients for an inviscid fluid

V_r_sc(n, r)

Radial scattering field velocity term of mode n without Legendre coefficients

V_theta_sc(n, r)

Tangential scattering field velocity term of mode n without Legendre coefficients

A_in(n)

Incoming wave amplitude

alpha_n(n)

\(\alpha_n\) coefficient

beta_n(n)

\(\beta_n\) coefficient

Inherited from BaseScattering

radial_acoustic_fluid_velocity(r, theta, t, ...)

Returns the value for the radial acoustic velocity in [m/s].

tangential_acoustic_fluid_velocity(r, theta, ...)

Returns the value for the tangential acoustic velocity in [m/s].

pressure(r, theta, t, scattered, incident[, ...])

Returns the acoustic pressure [Pa].

potential_coefficient(n)

Wrapper to the fluid scattering coefficients for an inviscid fluid

velocity_potential(r, theta, t, scattered, ...)

Returns the velocity potential of the fluid in [m^2/s].

radial_particle_velocity(r, theta, t[, mode])

Returns the value for the radial particle velocity in [m/s].

tangential_particle_velocity(r, theta, t[, mode])

Returns the value for the tangential particle velocity in [m/s].

radial_particle_displacement(r, theta, t[, mode])

Particle displacement in radial direction

tangential_particle_displacement(r, theta, t)

Particle displacement in tangential direction

radial_mode_superposition(radial_func, r, ...)

Returns either a single mode (mode=int) or a the sum until N_max (mode=None).

tangential_mode_superposition(...)

Returns either a single mode (mode=int) or a the sum until N_max (mode=None).

V_r_i(n, r)

Radial incident field velocity term of mode n without Legendre coefficients

V_theta_i(n, r)

Tangential incident field velocity term of mode n without Legendre coefficients

V_r_sc(n, r)

Radial scattering field velocity term of mode n without Legendre coefficients

V_theta_sc(n, r)

Tangential scattering field velocity term of mode n without Legendre coefficients

V_r(n, r, scattered, incident)

Superposition of V_r_sc() and V_r_i() depending on scattered and incident

V_theta(n, r, scattered, incident)

Superposition of V_theta_sc() and V_theta_i() depending on scattered and incident


A_in(n)

Wraps to osaft.core.backgroundfields.BackgroundField.A_in

Parameters:

n (int) – mode number

Return type:

complex

V_r(n, r, scattered, incident)

Superposition of V_r_sc() and V_r_i() depending on scattered and incident

At least one of the two must be True.

Parameters:
  • n (int) – mode

  • r (float) – radial coordinate [m]

  • scattered (bool) – add scattered field

  • incident (bool) – add incident

Return type:

complex

V_r_i(n, r)

Radial incident field velocity term of mode n without Legendre coefficients

Returns radial incident field velocity in [m/s]

Parameters:
  • n (int) – mode

  • r (Union[float, Sequence]) – radial coordinate [m]

Return type:

complex

V_r_sc(n, r)

Radial scattering field velocity term of mode n without Legendre coefficients

Returns radial scattering field velocity in [m/s]

Parameters:
  • n (int) – mode

  • r (float) – radial coordinate [m]

Return type:

complex

V_theta(n, r, scattered, incident)

Superposition of V_theta_sc() and V_theta_i() depending on scattered and incident

At least one of the two must be True.

Parameters:
  • n (int) – mode

  • r (float) – radial coordinate [m]

  • scattered (bool) – add scattered field

  • incident (bool) – add incident

Return type:

complex

V_theta_i(n, r)

Tangential incident field velocity term of mode n without Legendre coefficients

Returns tangential incident field velocity in [m/s]

Parameters:
  • n (int) – mode

  • r (Union[float, Sequence]) – radial coordinate [m]

Return type:

complex

V_theta_sc(n, r)

Tangential scattering field velocity term of mode n without Legendre coefficients

Returns tangential scattering field velocity in [m/s]

Parameters:
  • n (int) – mode

  • r (float) – radial coordinate [m]

Return type:

complex

alpha_n(n)[source]

coefficient \(\alpha_n\) (3.13) and (3.20)

Parameters:

n (int) – order

Return type:

complex

beta_n(n)[source]

coefficient \(\beta_n\) (3.13) and (3.20)

Parameters:

n (int) – order

Return type:

complex

check_wave_type()

Checks if wave_type is in supported_wavetypes

Raises:

WrongWaveTypeError – If wave_type is not supported

Return type:

None

copy()

Returns a copy of the object

Return type:

BaseSolution

gamma_n(n)[source]

coefficient \(\gamma_n\) (3.22)

Parameters:

n (int) – order

Return type:

complex

classmethod input_variables()

Returns all properties that are settable.

Returns a list of the names of all properties that are settable, i.e. all properties that wrap a PassiveVariable.

Return type:

list[str]

particle_velocity(t)[source]

Particle velocity

Returns the value of the particle velocity in the direction of the axis of rotational symmetry of the radiation field in [m/s]

Parameters:

t (float) – time [s]

Return type:

complex

potential_coefficient(n)

Wrapper to the fluid scattering coefficients for an inviscid fluid

This method must be implemented by every theory to have a common interface for other modules.

Parameters:

n (int) – mode

Return type:

complex

pressure(r, theta, t, scattered, incident, mode=None)

Returns the acoustic pressure [Pa].

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • scattered (bool) – add scattered field

  • incident (bool) – add incident

  • mode (Optional[int], optional) – specific mode number of interest; if None then all modes until N_max

    Default: None

Return type:

complex

radial_acoustic_fluid_velocity(r, theta, t, scattered, incident, mode=None)

Returns the value for the radial acoustic velocity in [m/s].

This method must be implemented by every theory to have a common interface for other modules.

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • scattered (bool) – scattered field contribution

  • incident (bool) – incident field contribution

  • mode (Optional[int], optional) – specific mode number of interest; if None then all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

radial_mode_superposition(radial_func, r, theta, t, mode=None)

Returns either a single mode (mode=int) or a the sum until N_max (mode=None).

If mode=int the formula is

\[e^{-i\omega t}\, f_{\text{mode}}(r) \,P_{\text{mode}}(\cos\theta)\]

If mode=None the formula is

\[e^{-i\omega t} \sum_{n=0}^{\text{N}_{\text{max}}} \,f_n(r) \,P_n(\cos\theta)\]

where \(f_\text{n}(r)\) is the radial_func(n, r) passed to the method.

Parameters:
  • radial_func (Callable[[int, float], complex]) – radial function dependent on r

  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (Optional[int], optional) – specific mode number of interest; if None then all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

radial_particle_displacement(r, theta, t, mode=None)

Particle displacement in radial direction

Returns the value of the particle displacement in radial direction in [m]

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (Optional[int], optional) – specific mode number of interest; if None that all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

radial_particle_velocity(r, theta, t, mode=None)

Particle velocity in radial direction

Returns the value of the particle velocity in radial direction in [m/s]

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (Optional[int], optional) – specific mode number of interest; if None that all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

tangential_acoustic_fluid_velocity(r, theta, t, scattered, incident, mode=None)

Returns the value for the tangential acoustic velocity in [m/s].

This method must be implemented by every theory to have a common interface for other modules.

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • scattered (bool) – scattered field contribution

  • incident (bool) – incident field contribution

  • mode (Optional[int], optional) – specific mode number of interest; if None then all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

tangential_mode_superposition(tangential_func, r, theta, t, mode)

Returns either a single mode (mode=int) or a the sum until N_max (mode=None).

If mode=int the formula is

\[e^{-i\omega t}\, f_\text{mode}(r) \,P^1_{\text{mode}}(\cos\theta)\]

If mode=None the formula is

\[e^{-i\omega t}\sum_{n=0}^{\text{N}_{\text{max}}} \,f_n(r) \,P^1_n(\cos\theta)\]

where \(f_n(r)\) is the tangential_func(n, r) passed to the method.

Parameters:
  • tangential_func (Callable[[int, float], complex]) – tangential function dependent on r

  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (int) – specific mode number of interest; if None then all modes until N_max

Return type:

Union[complex, ndarray]

tangential_particle_displacement(r, theta, t, mode=None)

Particle displacement in tangential direction

Returns the value of the particle displacement in tangential direction in [m]

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (Optional[int], optional) – specific mode number of interest; if None that all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

tangential_particle_velocity(r, theta, t, mode=None)

Particle velocity in tangential direction

Returns the value of the particle velocity in tangential direction in [m/s]

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • mode (Optional[int], optional) – specific mode number of interest; if None that all modes until N_max

    Default: None

Return type:

Union[complex, ndarray]

velocity_potential(r, theta, t, scattered, incident, mode=None)

Returns the velocity potential of the fluid in [m^2/s].

Parameters:
  • r (Union[float, Sequence]) – radial coordinate [m]

  • theta (Union[float, Sequence]) – tangential coordinate [rad]

  • t (Union[float, Sequence]) – time [s]

  • scattered (bool) – add scattered field

  • incident (bool) – add incident

  • mode (Optional[int], optional) – specific mode number of interest; if None then all modes until N_max

    Default: None

Return type:

complex

xi_n(n)[source]

coefficient \(\xi_n\) (3.22)

Parameters:

n (int) – order

Return type:

complex

property N_max

Cutoff mode number for infinite sums

Getter:

returns number of infinite sum term

Setter:

automatically invokes osaft.core.variable.BaseVariable.notify()

property R_0: float

Wrapper for osaft.core.geometries.Sphere.R_0

property abs_pos: float

Wraps to osaft.core.backgroundfields.BackgroundField.abs_pos

property area: float

Wrapper for osaft.core.geometries.Sphere.area

property c_f: float

Wraps to osaft.core.fluids.ViscousFluid.c_f

property delta: float

Wraps to osaft.core.fluids.ViscousFluid.delta

property eta_f: float

Wraps to osaft.core.fluids.ViscousFluid.eta_f

property f: float

wrapper for osaft.core.frequency.Frequency.f

property k_f: complex

Wraps to osaft.core.fluids.ViscousFluid.k_f

property k_v: complex

Wraps to osaft.core.fluids.ViscousFluid.k_v

property kappa_f: float

Wraps to osaft.core.fluids.ViscousFluid.kappa_f

property mu_1: complex

\(\mu_1\) according to (3.16)

property mu_2: complex

\(\mu_2\) according to (3.17)

property mu_3: complex

\(\mu_3\) according to (3.18)

property mu_4: complex

\(\mu_4\) according to (3.19)

property norm_delta: float

normalized viscous boundary thickness \(\tilde{\delta}=\frac{\delta}{R_0}\)

property omega: float

wrapper for osaft.core.frequency.Frequency.omega

property p_0: float

Wraps to osaft.core.backgroundfields.BackgroundField.p_0

property position: float

Wraps to osaft.core.backgroundfields.BackgroundField.position

property rho_f: float

Wraps to osaft.core.fluids.ViscousFluid.rho_f

property rho_s: float

Wraps to osaft.core.solids.RigidSolid.rho_s

property rho_t: float

Returns the ratio of the densities \(\tilde{\rho}=\frac{\rho_f}{\rho_s}\)

property volume: float

Wrapper for osaft.core.geometries.Sphere.volume

property wave_type: WaveType

Wraps to osaft.core.backgroundfields.BackgroundField.wave_type

property x: complex

Product of k_f and R_0 \(\hat{x}=k_f R_0\)

property x_0: complex

Real part of \(x\)

property x_v: complex

Product of k_v and R_0 \(x_v=k_v R_0\)

property zeta_f: float

Wraps to osaft.core.fluids.ViscousFluid.zeta_f