Acoustofluidics 2022: ARF Comparison

In this example, we reproduce the ARF comparison plot from the abstract book for the conference Acoustofluidics 2022. We compute the ARF on a polystyrene particle in a standing wave in water.

We start off by importing the library and defining all the necessary parameters.

13 import numpy as np
14 from matplotlib import pyplot as plt
15
16 import osaft
17
18 # Frequency
19 f = 5e6  # [Hz]
20 # Radius
21 R_0 = 1e-6  # [m]
22 # Density and speed of sound of polystyrene
23 rho_s = 1020  # [kg/m^3]
24 c_s = 2_350  # [m/s]
25 # Density and speed of sound of the fluid
26 rho_f = 997  # [kg/m^3]
27 c_f = 1_498  # [m/s]
28 # Pressure amplitude
29 p_0 = 1e5  # [Pa]
30 # Particle position
31 d = osaft.pi / 4
32 # Wave Type
33 wave_type = osaft.WaveType.STANDING

For this example we compare three inviscid theories. The models by Yosioka & Kawasima and the model by Gor’kov assume a fluid-like, compressible particle. The latter model is restricted to the long-wavelength regime. The model from Hasegawa & Yosioka assume a solid-elastic particle.

41 # Model from Yosioka & Kawasima
42 yosioka = osaft.yosioka1955.ARF(
43     f=f, R_0=R_0,
44     rho_s=rho_s, c_s=c_s,
45     rho_f=rho_f, c_f=c_f,
46     p_0=p_0, wave_type=wave_type,
47     position=d,
48 )
49
50 # Model from Gor'kov
51 gorkov = osaft.gorkov1962.ARF(
52     f=f, R_0=R_0,
53     rho_s=rho_s, c_s=c_s,
54     rho_f=rho_f, c_f=c_f,
55     p_0=p_0, wave_type=wave_type,
56     position=d,
57 )

Elastic properties of polystyrene for the model of Hasegawa & Yosioka are matched to the compressibility of the other two models.

62 nu_s = 0.4  # [-]
63 E_s = 3 * (1 - 2 * nu_s) / yosioka.scatterer.kappa_f  # [Pa]
64
65 hasegawa = osaft.hasegawa1969.ARF(
66     f=f, R_0=R_0,
67     rho_s=rho_s, E_s=E_s, nu_s=nu_s,
68     rho_f=rho_f, c_f=c_f,
69     p_0=p_0, wave_type=wave_type,
70     position=d,
71 )

Next, we plot the ARF according to the theories while changing the radius of the particle. For a more detailed explanation how this is done checkout this example. For a small particle radius, the models are in good agreement. When the particle becomes larger the model by Gor’kov is no longer valid. Also the other two models are no longer in good agreement. The material model of the particle seems to strongly influence the ARF as higher order modes start to contribute more significantly. To see an animation of these modes checkout this example.

 87 # Changing the font size in Matplotlib
 88 plt.rcParams.update({'font.size': 8})
 89
 90 # Getting a Figure, Axes instance with the right size
 91 fig, ax = plt.subplots(figsize=(3.7, 2.4))
 92
 93 # Plot using the Axes object created above
 94 arf_plot = osaft.ARFPlot('R_0', np.linspace(1e-6, 50e-6, 100))
 95 arf_plot.add_solutions(gorkov, yosioka, hasegawa)
 96 arf_plot.plot_solutions(ax=ax)
 97
 98 # Changing labels
 99 ax.set_xlabel('$R_0$ [$\\mu m$]')
100 ax.set_ylabel('$F^{rad}$ [$N$]')
101 ax.set_xticks(
102     [1e-6, 1e-5, 2e-5, 3e-5, 4e-5, 5e-5],
103     labels=[1, 10, 20, 30, 40, 50],
104 )
105
106 # Adjust layout and display plot
107 fig.tight_layout()
108 plt.show()
example af2022 presentation arf
/home/docs/checkouts/readthedocs.org/user_builds/osaft/checkouts/patch-doinikov2021_streaming/osaft/plotting/datacontainers/arf_datacontainer.py:52: AssumptionWarning: Theory might not be valid anymore!
  self._arf = self._compute_arf_single_process(attr_name, values)

Total running time of the script: ( 0 minutes 1.067 seconds)

Estimated memory usage: 10 MB

Gallery generated by Sphinx-Gallery