26 #ifndef ELASTODYNAMICS_KERNEL_HPP_INCLUDED
27 #define ELASTODYNAMICS_KERNEL_HPP_INCLUDED
29 #include <boost/math/constants/constants.hpp>
30 #include <boost/math/special_functions/bessel.hpp>
32 #include "../core/global_definitions.hpp"
33 #include "../core/kernel.hpp"
34 #include "../core/gaussian_quadrature.hpp"
54 : m_nu(nu), m_rho(rho), m_mu(mu), m_omega(omega) {}
55 double get_poisson_ratio()
const {
return m_nu; }
56 double get_mass_density()
const {
return m_rho; }
57 double get_shear_modulus()
const {
return m_mu; }
58 double get_frequency()
const {
return m_omega; }
67 class elastodynamics_3d_U_kernel;
75 using result_t = Eigen::Matrix<std::complex<double>, 3, 3>;
105 using namespace std::complex_literals;
106 using namespace boost::math::double_constants;
110 auto r = rvec.norm();
111 auto gradr = rvec.normalized();
114 auto nu = get_poisson_ratio();
115 auto a2 = (1.-2.*nu)/2./(1.-nu);
116 auto a = std::sqrt(a2);
117 auto mu = get_shear_modulus();
118 auto rho = get_mass_density();
119 auto cS = std::sqrt(mu/rho);
121 auto om = get_frequency();
122 auto kSr = om / cS * r;
125 std::complex<double> psi =
126 std::exp(-1.i*kPr) * a2 * (1.i/kPr + 1./(kPr*kPr)) +
127 std::exp(-1.i*kSr) * (1. - 1.i/kSr - 1./(kSr*kSr));
129 std::complex<double> chi =
130 std::exp(-1.i*kPr) * a2 * (1. - 3.i/kPr - 3./(kPr*kPr)) -
131 std::exp(-1.i*kSr) * (1. - 3.i/kSr - 3./(kSr*kSr));
134 return ( psi * result_t::Identity() + chi * (gradr * gradr.transpose()) ) / (4.*pi*mu*r);
149 using result_t = Eigen::Matrix<std::complex<double>, 3, 3>;
153 static bool const is_singular =
true;
161 static unsigned const singular_quadrature_order = 7;
179 using namespace std::complex_literals;
180 using namespace boost::math::double_constants;
184 auto r = rvec.norm();
186 auto gradr = rvec.normalized();
187 double rdn = gradr.dot(n);
190 auto nu = get_poisson_ratio();
191 auto a2 = (1.-2.*nu)/2./(1.-nu);
192 auto a = std::sqrt(a2);
193 auto mu = get_shear_modulus();
194 auto lambdapermu = (1./a2 - 2.);
195 auto rho = get_mass_density();
196 auto cS = std::sqrt(mu/rho);
198 auto om = get_frequency();
199 auto kSr = om / cS * r;
202 std::complex<double> psi =
203 std::exp(-1.i*kPr) * a2 * ( 1.i/kPr + 1./(kPr*kPr)) +
204 std::exp(-1.i*kSr) * (1. - 1.i/kSr - 1./(kSr*kSr));
206 std::complex<double> chi =
207 std::exp(-1.i*kPr) * a2 * (1. - 3.i/kPr - 3./(kPr*kPr)) -
208 std::exp(-1.i*kSr) * (1. - 3.i/kSr - 3./(kSr*kSr));
210 std::complex<double> dpsi =
211 std::exp(-1.i*kPr) * a2 * (1. - 2.i/kPr - 2./(kPr*kPr)) -
212 std::exp(-1.i*kSr) * (1. + 1.i*kSr - 2.i/kSr - 2./(kSr*kSr));
214 std::complex<double> dchi =
215 std::exp(-1.i*kSr) * (3. + 1.i*kSr - 6.i/kSr - 6./(kSr*kSr)) -
216 std::exp(-1.i*kPr) * a2 * (3. + 1.i*kPr - 6.i/kPr - 6./(kPr*kPr));
218 std::complex<double> A = dpsi - psi;
219 std::complex<double> B = dchi - 3.*chi;
220 std::complex<double>
C = chi;
224 rdn * (result_t::Identity() * (A+
C) + 2.*B*(gradr * gradr.transpose()))
226 (2.*
C + lambdapermu*(A+B+4.*
C)) * (gradr * n.transpose())
228 (A+
C) * (n * gradr.transpose())
243 using result_t = Eigen::Matrix<std::complex<double>, 2, 2>;
247 static bool const is_singular =
true;
255 static unsigned const singular_quadrature_order = 7;
273 using namespace std::complex_literals;
274 using namespace boost::math::double_constants;
275 using boost::math::cyl_hankel_2;
279 auto r = rvec.norm();
280 auto gradr = rvec.normalized();
283 auto nu = get_poisson_ratio();
284 auto a2 = (1.-2.*nu)/2./(1.-nu);
285 auto a = std::sqrt(a2);
286 auto mu = get_shear_modulus();
287 auto rho = get_mass_density();
288 auto cS = std::sqrt(mu/rho);
290 auto om = get_frequency();
291 auto kSr = om / cS * r;
294 std::complex<double> psi = .25i * ((cyl_hankel_2(1, kSr)/kSr - a2 * cyl_hankel_2(1, kPr) / kPr) - cyl_hankel_2(0, kSr));
296 std::complex<double> chi = .25i * (a2 *cyl_hankel_2(2, kPr) - cyl_hankel_2(2, kSr));
299 return ( psi * result_t::Identity() + chi * (gradr * gradr.transpose()) ) / mu;
305 #endif // ELASTODYNAMICS_KERNEL_HPP_INCLUDED