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 73b525ff authored by Jonas Fankhauser's avatar Jonas Fankhauser
Browse files

Non functional tests for plotting library removed

parent 04d368e6
Pipeline #97984 passed with stages
in 5 minutes and 26 seconds
......@@ -174,7 +174,7 @@ class TestYosioka(BaseTest):
for key in self.cls_dict:
try:
self.assertEqual(
self.compute_xlambda(), self.cls_dict[key].xlambda)
self.compute_xlambda(), self.cls_dict[key].lambda_rho)
except AttributeError:
pass
......
from plotting.plot_Acoustofluidics import PlotAcoustofluidics
from tests.basetest import BaseTestComposite
from gorkov import Gorkov1962
class TestPlotARF(BaseTestComposite):
def setUp(self) -> None:
super().setUp()
self.c_f = 1500
self.rho_f = 1000
self.rho_s = 1e3
self.c_s = 5968
self.f = 1e6
self.p0 = 1e3
self.pos = 1e-5
self.R0 = 1e-3
self.cls = Gorkov1962.ARF(self.f,
self.R0, self.rho_s, self.c_s,
self.rho_f, self.c_f,
'standing', self.p0, self.pos)
def randomly_change_parameters(self) -> None:
self.f = self.randomly_change_number(self.f)
self.c_f = self.randomly_change_number(self.c_f)
self.rho_f = self.randomly_change_number(self.rho_f)
self.rho_s = self.randomly_change_number(self.rho_s)
self.c_s = self.randomly_change_number(self.c_s)
self.p0 = self.randomly_change_number(self.p0)
self.pos = self.randomly_change_number(self.pos)
self.R0 = self.randomly_change_number(self.R0)
def assign_parameters(self) -> None:
# standing wave
self.cls.f = self.f
self.cls.c_f = self.c_f
self.cls.rho_f = self.rho_f
self.cls.rho_s = self.rho_s
self.cls.c_s = self.c_s
self.cls.p_0 = self.p0
self.cls.position = self.pos
self.cls.R_0 = self.R0
def test_plot_arf(self) -> None:
a = PlotAcoustofluidics(ARF=self.cls)
a.plot_ARF(res=1000, wavelength=0.0015)
print(self.cls.field.lambda_f)
from plotting.plot_Acoustofluidics import PlotAcoustofluidics
from tests.basetest import BaseTestComposite
from gorkov import Yosioka1955
class TestPlotVarious(BaseTestComposite):
def setUp(self) -> None:
super().setUp()
# Geometry
self.R_0 = 50e-6
# Frequency
self.f = 1e5
# Solid parameters
self.E_s = 0.32e10
self.nu_s = 0.35
self.rho_s = 1.05e3
self.c_s = 1.5e3
# Fluid parameters
self.rho_f = 1e3
self.c_f = 1.5e3
self.eta_f = 1e-3
self.eta_p = 9e-3
self.zeta_f = 0
self.zeta_p = 0
self.lambda_M = 1e-6
# Incident field
self.p0 = 10e3
self.wave_type = 'traveling'
self.inf_type = 'radius'
self.pos = 1e-4
n_max = 10
self.cls = Yosioka1955.ARF(frequency=self.f,
radius=self.R_0, rho_s=self.rho_s,
rho_f=self.rho_f, c_f=self.c_f,
c_s=self.c_s, p_0=self.p0,
position=self.pos,
wave_type=self.wave_type,
particle_type="analytical", N_max=n_max)
def randomly_change_parameters(self) -> None:
self.f = self.randomly_change_number(self.f)
self.c_f = self.randomly_change_number(self.c_f)
self.rho_f = self.randomly_change_number(self.rho_f)
self.rho_s = self.randomly_change_number(self.rho_s)
self.c_s = self.randomly_change_number(self.c_s)
self.p0 = self.randomly_change_number(self.p0)
self.pos = self.randomly_change_number(self.pos)
self.R0 = self.randomly_change_number(self.R0)
def assign_parameters(self) -> None:
# standing wave
self.cls.f = self.f
self.cls.c_f = self.c_f
self.cls.rho_f = self.rho_f
self.cls.rho_s = self.rho_s
self.cls.c_s = self.c_s
self.cls.p_0 = self.p0
self.cls.position = self.pos
self.cls.R_0 = self.R0
def test_plot_various(self) -> None:
a = PlotAcoustofluidics(baseclass=self.cls)
a.plot_dummy(real=False, twoD_plot=False)
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