40 #include <lifev/core/LifeV.hpp> 41 #include <lifev/navier_stokes/function/Womersley.hpp> 42 #include <lifev/navier_stokes/function/bessel/bessel.hpp> 46 const Real Pi = 3.14159265358979323846264338328;
50 Real r = std::sqrt (z * z + y * y);
51 std::complex<
Real> z2, b2;
52 z2 = 2.*r / S_D * S_z1;
54 Real u = real (S_A / S_L / S_rho / S_wi * (1. - b2 / S_b1) * std::exp (S_wi * t) );
71 return S_A / S_L * (S_L - x) * std::cos (S_w * t);
76 Real r = std::sqrt (y * y + z * z);
77 std::complex<
Real> z2, b2;
78 z2 = 2.*r / S_D * S_z1;
80 b2 = -2. / S_D * S_z1 * S_cj0p;
81 Real u_r = real (S_A / S_L / S_rho / S_wi * +b2 / S_b1 * std::exp (S_wi * t) );
153 return uexact (t, x, y, z, i);
155 return pexact (t, x, y, z, 1);
168 return xexact (t, x, y, z, i);
174 return uexact (t, x, y, z, i);
180 return pexact (t, x, y, z, 0);
186 Real r = std::sqrt (y * y + z * z);
187 Real n[3] = {0., 0., 0.};
189 if ( x < 1e-6 / S_L )
193 else if ( x > S_L * (1 - 1e-6) )
197 else if ( r > S_D / 2.*0.9 )
210 out += S_mu * grad_u (k, t, x, y, z, i) * n[k];
216 out += S_mu * grad_u (i, t, x, y, z, k) * n[k];
219 out -= pexact (t, x, y, z, i) * n[i];
226 const Real& z,
const ID& i )
228 Real r = std::sqrt (y * y + z * z);
229 Real n[3] = {0., 0., 0.};
230 if ( x < 1e-6 / S_L )
234 else if ( x > S_L * (1 - 1e-6) )
238 else if ( r > S_D / 2.*0.9 )
254 Real r = std::sqrt (y * y + z * z);
255 Real n[3] = {0., 0., 0.};
257 if ( x < 1e-6 / S_L )
261 else if ( x > S_L * (1 - 1e-6) )
265 else if ( r > S_D / 2.*0.9 )
278 out += S_mu * grad_u (k, t, x, y, z, i) * n[k];
284 out += S_mu * grad_u (i, t, x, y, z, k) * n[k];
293 Real r = std::sqrt (y * y + z * z);
294 Real n[3] = {0., 0., 0.};
295 if ( x < 1e-6 / S_L )
299 else if ( x > S_L * (1 - 1e-6) )
303 else if ( r > S_D / 2.*0.9 )
318 wss = fShearStress (t, x, y, z, i);
322 s_n_n += fShearStress (t, x, y, z, k) * n[k];
330 void Womersley::setParamsFromGetPot (
const GetPot& dataFile )
332 S_mu = dataFile
( "fluid/physics/viscosity", 1.
);
333 S_flagStrain = dataFile
( "fluid/physics/flag_strain", 0
);
334 S_nu = S_mu / dataFile
( "fluid/physics/density", 1.
);
335 S_D = dataFile
( "fluid/problem/D", 1.
);
336 S_T = dataFile
( "fluid/problem/T", 1.
);
337 S_rho = dataFile
( "fluid/physics/density", 1.
);
338 S_W0 = S_D / 2 * std::sqrt (2 * Pi / S_nu / S_T);
339 S_L = dataFile
( "fluid/problem/L", 1.
);
341 S_ii = std::complex<
Real> (0., 1.);
344 S_z1 = S_W0 * std::pow (S_ii, 1.5);
349 void Womersley::showMe()
351 std::cout <<
"Kynetic viscosity " << S_nu << std::endl;
352 std::cout <<
"Pipe radius " << S_D / 2. <<
" Pipe lenght " << S_L << std::endl;
353 std::cout <<
"Oscillation period " << S_T << std::endl;
354 std::cout <<
"Pressure Drop " << S_A << std::endl;
355 std::cout <<
"Womersley Number " << S_D / 2.*std::sqrt (S_w / S_nu) << std::endl;
358 Real Womersley::S_nu;
359 Real Womersley::S_mu;
360 Int Womersley::S_flagStrain;
362 Real Womersley::S_rho;
364 Real Womersley::S_W0;
368 std::complex<
Real> Womersley::S_cj1, Womersley::S_cy0, Womersley::S_cy1,
369 Womersley::S_cj0p, Womersley::S_cj1p, Womersley::S_cy0p, Womersley::S_cy1p ,
370 Womersley::S_z1, Womersley::S_b1 , Womersley::S_ii, Womersley::S_wi;
double operator()(const char *VarName, const double &Default) const
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
int cbessjy01(std::complex< double > z, std::complex< double > &cj0, std::complex< double > &cj1, std::complex< double > &cy0, std::complex< double > &cy1, std::complex< double > &cj0p, std::complex< double > &cj1p, std::complex< double > &cy0p, std::complex< double > &cy1p)
double Real
Generic real data.
int operator()(const char *VarName, int Default) const
const UInt nDimensions(NDIM)
uint32_type UInt
generic unsigned integer (used mainly for addressing)