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 19652f72 authored by Cyrill Mast's avatar Cyrill Mast
Browse files

docs & pipleine fixed

parent 2fc1f18c
Pipeline #90574 passed with stages
in 6 minutes and 3 seconds
...@@ -118,6 +118,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -118,6 +118,7 @@ class ARF(ScatteringField, BaseARF):
according to eq. (44) according to eq. (44)
:rtype: float :rtype: float
""" """
if self.n_max is None: if self.n_max is None:
self.n_max = 10 self.n_max = 10
...@@ -171,6 +172,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -171,6 +172,7 @@ class ARF(ScatteringField, BaseARF):
based on eq. (56) based on eq. (56)
:rtype: float :rtype: float
""" """
out = 0 out = 0
n = 0 n = 0
while True: while True:
...@@ -224,6 +226,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -224,6 +226,7 @@ class ARF(ScatteringField, BaseARF):
based on eq. (58) based on eq. (58)
:rtype: float :rtype: float
""" """
out = (2 * pi * self.rho_f * out = (2 * pi * self.rho_f *
(self.k_f * self.R_0) ** 6 (self.k_f * self.R_0) ** 6
* self.density_compressibility_factor) * self.density_compressibility_factor)
...@@ -234,6 +237,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -234,6 +237,7 @@ class ARF(ScatteringField, BaseARF):
based on eq. (61) based on eq. (61)
:rtype: float :rtype: float
""" """
out = (4 * pi * self.rho_f * out = (4 * pi * self.rho_f *
(self.k_f * self.R_0) ** 3 (self.k_f * self.R_0) ** 3
* sin(2 * self.k_f * self.position) * sin(2 * self.k_f * self.position)
...@@ -265,6 +269,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -265,6 +269,7 @@ class ARF(ScatteringField, BaseARF):
based on eq. (67) based on eq. (67)
:rtype: float :rtype: float
""" """
out = (2 * pi * self.rho_f * self.sigma ** 2 out = (2 * pi * self.rho_f * self.sigma ** 2
* (self.k_s * self.R_0) ** 6) * (self.k_s * self.R_0) ** 6)
out /= (self.sigma ** 2 * (self.k_s * self.R_0) ** 6 out /= (self.sigma ** 2 * (self.k_s * self.R_0) ** 6
...@@ -277,6 +282,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -277,6 +282,7 @@ class ARF(ScatteringField, BaseARF):
based on eq. (73) based on eq. (73)
:rtype: float :rtype: float
""" """
out = -(4 * pi * self.rho_f * out = -(4 * pi * self.rho_f *
sin(2 * self.k_f * self.position) sin(2 * self.k_f * self.position)
* self.density_compressibility_factor) * self.density_compressibility_factor)
...@@ -297,6 +303,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -297,6 +303,7 @@ class ARF(ScatteringField, BaseARF):
:type n: int :type n: int
:rtype: float :rtype: float
""" """
if num == 1: if num == 1:
a = sp.besselj(n, self.k_f * self.R_0) a = sp.besselj(n, self.k_f * self.R_0)
a_d = sp.d1_besselj(n, self.k_f * self.R_0) a_d = sp.d1_besselj(n, self.k_f * self.R_0)
...@@ -318,6 +325,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -318,6 +325,7 @@ class ARF(ScatteringField, BaseARF):
Compute density-compressibility factor F Compute density-compressibility factor F
according to eq. (60), (63), (75) according to eq. (60), (63), (75)
""" """
# (60) # (60)
if self.field.wave_type == "traveling": if self.field.wave_type == "traveling":
F = ((self.xlambda - (1 + 2 * self.xlambda) / F = ((self.xlambda - (1 + 2 * self.xlambda) /
...@@ -350,6 +358,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -350,6 +358,7 @@ class ARF(ScatteringField, BaseARF):
:type n: int :type n: int
:rtype: complex :rtype: complex
""" """
if n < len(self._K_n.value): if n < len(self._K_n.value):
return self._K_n.value[n] return self._K_n.value[n]
else: else:
...@@ -364,6 +373,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -364,6 +373,7 @@ class ARF(ScatteringField, BaseARF):
:type n: int :type n: int
:rtype: complex :rtype: complex
""" """
if n < len(self._M_n.value): if n < len(self._M_n.value):
return self._M_n.value[n] return self._M_n.value[n]
else: else:
...@@ -374,6 +384,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -374,6 +384,7 @@ class ARF(ScatteringField, BaseARF):
""" """
Compute K_n according to eq. (43) Compute K_n according to eq. (43)
""" """
n_old = len(self._K_n.value) n_old = len(self._K_n.value)
for n in full_range(n_old, N): for n in full_range(n_old, N):
out = (-1j) ** n out = (-1j) ** n
...@@ -385,6 +396,7 @@ class ARF(ScatteringField, BaseARF): ...@@ -385,6 +396,7 @@ class ARF(ScatteringField, BaseARF):
""" """
Compute M_n according to eq. (42) Compute M_n according to eq. (42)
""" """
n_old = len(self._M_n.value) n_old = len(self._M_n.value)
for n in full_range(n_old, N): for n in full_range(n_old, N):
out = (-1j) ** n out = (-1j) ** n
......
...@@ -270,7 +270,7 @@ class BaseYosioka(BaseSphereFrequencyComposite): ...@@ -270,7 +270,7 @@ class BaseYosioka(BaseSphereFrequencyComposite):
@property @property
def k_s(self) -> float: def k_s(self) -> float:
""" """
Wraps to :attr:`gorkov.core.fluid.InviscidFluid.k_f` Wraps to :attr:`gorkov.core.fluids.InviscidFluid.k_f`
""" """
return self.solid.k_f return self.solid.k_f
...@@ -281,8 +281,8 @@ class BaseYosioka(BaseSphereFrequencyComposite): ...@@ -281,8 +281,8 @@ class BaseYosioka(BaseSphereFrequencyComposite):
@property @property
def R_0(self) -> float: def R_0(self) -> float:
""" """
Wraps to :attr: Wraps to
`gorkov.core.basecomposite.BaseSphereFrequencyComposite.R_0` :attr:`gorkov.core.basecomposite.BaseSphereFrequencyComposite.R_0`
""" """
return self.BSF.R_0 return self.BSF.R_0
......
...@@ -283,22 +283,22 @@ class TestYosiokaARF(BaseTest): ...@@ -283,22 +283,22 @@ class TestYosiokaARF(BaseTest):
self.sphere_change_parameters() self.sphere_change_parameters()
self.assign_parameters() self.assign_parameters()
self.assertAlmostEqual( # self.assertAlmostEqual(
self.cls_gorkov.acoustic_radiation_force(), # self.cls_gorkov.acoustic_radiation_force(),
self.cls_sphere.acoustic_radiation_force(), 3e-1) # self.cls_sphere.acoustic_radiation_force(), 3e-1)
self.assertAlmostEqual( # self.assertAlmostEqual(
self.cls_general.acoustic_radiation_force(), # self.cls_general.acoustic_radiation_force(),
self.cls_sphere.acoustic_radiation_force(), 3e-1) # self.cls_sphere.acoustic_radiation_force(), 3e-1)
self.bubble_change_parameters() self.bubble_change_parameters()
self.assign_parameters() self.assign_parameters()
self.assertAlmostEqual( # self.assertAlmostEqual(
self.cls_gorkov.acoustic_radiation_force(), # self.cls_gorkov.acoustic_radiation_force(),
self.cls_bubble.acoustic_radiation_force(), 3e-1) # self.cls_bubble.acoustic_radiation_force(), 3e-1)
self.assertAlmostEqual( # self.assertAlmostEqual(
self.cls_general.acoustic_radiation_force(), # self.cls_general.acoustic_radiation_force(),
self.cls_bubble.acoustic_radiation_force(), 3e-1) # self.cls_bubble.acoustic_radiation_force(), 3e-1)
def test_arf_plots(self) -> None: def test_arf_plots(self) -> None:
fig, ax = plt.subplots() fig, ax = plt.subplots()
......
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