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,
44     R_0=R_0,
45     rho_s=rho_s,
46     c_s=c_s,
47     rho_f=rho_f,
48     c_f=c_f,
49     p_0=p_0,
50     wave_type=wave_type,
51     position=d,
52 )
53
54 # Model from Gor'kov
55 gorkov = osaft.gorkov1962.ARF(
56     f=f,
57     R_0=R_0,
58     rho_s=rho_s,
59     c_s=c_s,
60     rho_f=rho_f,
61     c_f=c_f,
62     p_0=p_0,
63     wave_type=wave_type,
64     position=d,
65 )

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

70 nu_s = 0.4  # [-]
71 E_s = 3 * (1 - 2 * nu_s) / yosioka.scatterer.kappa_f  # [Pa]
72
73 hasegawa = osaft.hasegawa1969.ARF(
74     f=f,
75     R_0=R_0,
76     rho_s=rho_s,
77     E_s=E_s,
78     nu_s=nu_s,
79     rho_f=rho_f,
80     c_f=c_f,
81     p_0=p_0,
82     wave_type=wave_type,
83     position=d,
84 )

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.

100 # Changing the font size in Matplotlib
101 plt.rcParams.update({"font.size": 8})
102
103 # Getting a Figure, Axes instance with the right size
104 fig, ax = plt.subplots(figsize=(3.7, 2.4))
105
106 # Plot using the Axes object created above
107 arf_plot = osaft.ARFPlot("R_0", np.linspace(1e-6, 50e-6, 100))
108 arf_plot.add_solutions(gorkov, yosioka, hasegawa)
109 arf_plot.plot_solutions(ax=ax)
110
111 # Changing labels
112 ax.set_xlabel("$R_0$ [$\\mu m$]")
113 ax.set_ylabel("$F^{rad}$ [$N$]")
114 ax.set_xticks(
115     [1e-6, 1e-5, 2e-5, 3e-5, 4e-5, 5e-5],
116     labels=[1, 10, 20, 30, 40, 50],
117 )
118
119 # Adjust layout and display plot
120 fig.tight_layout()
121 plt.show()
example af2022 presentation arf
/home/docs/checkouts/readthedocs.org/user_builds/osaft/checkouts/stable/osaft/plotting/datacontainers/arf_datacontainer.py:56: 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.030 seconds)

Estimated memory usage: 9 MB

Gallery generated by Sphinx-Gallery