38 const string& name_,
double resistivity_,
double deviation_,
double length_) :
39 AcousticMaterialBase(name_), resistivity(resistivity_), thickness(1.0), deviation(deviation_), length(length_)
58 computeQ(incidence_angle, Rp, Fw, Q);
90 double k_value, FSurSigma;
100 K.
getTabValReel()[i] = k_value * (1 + 10.8 * pow(FSurSigma, -0.7));
112 double cosPhi = cos(angle);
116 for (
unsigned int i = 0 ; i < Z.
getNbValues(); i++)
122 operand = std::sqrt(
CPLX_UN - ((k_value * cosPhi / K_value) * (k_value * cosPhi / K_value)));
132 double k0_value, k_value, intv_a, intv_b;
136 for (
unsigned int i=0; i < size; i++)
139 k_value = k0_value*sin(angle);
142 intv_a = sqrt(k0_value)/100;
143 std::vector<double> u_alpha(size),integrande_alpha1(size),integrande_alpha2(size);
144 for (
int j=0; j<=100; j++)
146 u_alpha.push_back(j*intv_a);
147 double u_value = k0_value - u_alpha[j]*u_alpha[j];
148 double u_2value = 2*k0_value - u_alpha[j]*u_alpha[j];
149 double expression1a = 1.0/(k0_value*sqrt(u_2value))\
150 *((k0_value*k0_value+k_value*u_value)*(k0_value*k0_value+k_value*u_value))\
152 double expression2a = 1.0/(k0_value*sqrt(u_2value))\
153 *((k0_value*k0_value-k_value*u_value)*(k0_value*k0_value-k_value*u_value))\
155 integrande_alpha1.push_back(expression1a);
156 integrande_alpha2.push_back(expression2a);
158 double alpha1 =
trapz(u_alpha, integrande_alpha1) ;
159 double alpha2 =
trapz(u_alpha, integrande_alpha2) ;
160 double alpha = alpha1 + alpha2;
163 integrande_alpha1.clear();
164 integrande_alpha2.clear();
168 std::vector<double> u_beta(size),integrande_beta1(size),integrande_beta2(size);
169 for (
int j=0; j<=100; j++)
171 u_beta.push_back(j*intv_b);
172 double u_value = k0_value*k0_value+u_beta[j]*u_beta[j];
173 double expression1b = 1.0/(k0_value*sqrt(u_value))\
174 *(k0_value*k0_value+k_value*sqrt(u_value))*(k0_value*k0_value+k_value*sqrt(u_value))\
176 double expression2b = 1.0/(k0_value*sqrt(u_value))\
177 *(k0_value*k0_value-k_value*sqrt(u_value))*(k0_value*k0_value-k_value*sqrt(u_value))\
179 integrande_beta1.push_back(expression1b);
180 integrande_beta2.push_back(expression2b);
182 double beta1 = -
trapz(u_beta, integrande_beta1) ;
183 double beta2 = -
trapz(u_beta, integrande_beta2) ;
184 double beta = beta1 + beta2;
187 integrande_beta1.clear();
188 integrande_beta2.clear();
211 return (sigma*sigma)*(lc/(2*sqrt(
M_PI)))*exp(-1.0/4*((k*lc)*(k*lc)));
216 unsigned int size = u.size();
217 double sum = std::accumulate(integrande.begin()+1,integrande.end()-1,(integrande.front()+integrande.back())/2);
218 sum *= (u.back()-u.front())/size;
225 double sinPhi = sin(angle);
228 for (
unsigned int i = 0 ; i < Zs.
getNbValues() ; i++)
241 TYComplex zs_value, invZs_value, cplxTempo, wTemp;
244 double sinPhi = sin(angle);
246 for (
unsigned int i = 0 ; i < W.
getNbValues() ; i++)
251 invZs_value = 1.0 / zs_value;
252 cplxTempo = (sinPhi + invZs_value) * (sinPhi + invZs_value);
254 wTemp = std::sqrt(1.0 / 2.0 *
CPLX_J * k_value * length * cplxTempo) ;
277 double sqrt_pi = sqrt(
M_PI);
291 const double epsilon = 1.0E-20;
292 double valeur, tampon;
298 valeur = (fabs(tampon) < epsilon ? epsilon : tampon) ;
303 valeur = (fabs(tampon) < epsilon ? epsilon : tampon) ;
313 for (
size_t i = 0 ; i < localW.
getNbValues() ; i++)
318 if (((fabs(reelW) < 3.9) && (fabs(imagW) < 3.0)))
322 else if (((fabs(reelW) >= 3.9) && (fabs(reelW) < 6.0)) ||
323 ((fabs(imagW) >= 3.0) && (fabs(imagW) < 6.0)))
340 for (
size_t i = 0 ; i < localW.
getNbValues() ; i++)
347 if ((re < 0) && (im > 0))
352 else if ((re > 0) && (im < 0))
361 else if ((re < 0) && (im < 0))
372 else if ((re > 0) && (im > 0))
385 for (
unsigned int i = 0 ; i < Fw.
getNbValues(); i++)
399 const double pi =
M_PI;
400 const int nbIterations = 5;
401 const double h = 0.8;
402 const double h2 = h * h;
404 double x = fabs(wValue.real());
405 double y = fabs(wValue.imag());
408 double modW = x2 + y2;
410 double A1 = cos(2.0 * x * y);
411 double B1 = sin(2.0 * x * y);
412 double C1 = exp(-2.0 * pi * y / h) - cos(2.0 * pi * x / h) ;
413 double D1 = sin(2.0 * pi * x / h);
414 double P2 = 2.0 * exp(-(x2 + 2.0 * pi * y / h - y2)) * (A1 * C1 - B1 * D1) / (C1 * C1 + D1 * D1);
415 double Q2 = 2.0 * exp(-(x2 + 2.0 * pi * y / h - y2)) * (A1 * D1 + B1 * C1) / (C1 * C1 + D1 * D1);
421 H0 = h * y / (pi * modW) + P2;
423 else if (y == (pi / h))
425 H0 = h * y / (pi * modW) + (P2 / 2.0);
429 H0 = h * y / (pi * modW);
434 K0 = h * x / (pi * modW) - Q2;
436 else if (x == (pi / h))
438 K0 = h * x / (pi * modW) - (Q2 / 2.0) ;
442 K0 = h * x / (pi * modW);
449 double coeff_y = 2.0 * y * h / pi;
450 double coeff_x = 2.0 * x * h / pi;
451 double diviseur = 0.0;
452 double expMn2h2 = 0.0;
453 for (
int n = 1 ; n <= nbIterations; n++)
455 n2 = (double)(n * n);
456 diviseur = ((y2 - x2 + n2 * h2) * (y2 - x2 + n2 * h2) + (4.0 * y2 * x2));
457 expMn2h2 = exp(-n2 * h2);
459 H = H + coeff_y * expMn2h2 * (modW + n2 * h2) / diviseur;
460 K = K + coeff_x * expMn2h2 * (modW - n2 * h2) / diviseur;
471 G =
CPLX_J * wValue * ((0.4613135 / (w2 - 0.1901635)) +
472 (0.09999216 / (w2 - 1.7844927)) +
473 (0.002883894 / (w2 - 5.5253437))) ;
484 G =
CPLX_J * wValue * ((0.5124242 / (w2 - 0.2752551)) +
485 (0.05176536 / (w2 - 2.724745))) ;
492 double x = fabs(W.real());
493 double y = fabs(W.imag());
495 double cos2xy = cos(2 * x * y);
496 double sin2xy = sin(2 * x * y);
498 return 2.0 * exp(y * y - x * x) * (cos2xy +
CPLX_J * sin2xy) - conj(G);
536 double X = distance / support_size;
538 if (X < 1.0) {
return _tabCor[0]; }
539 if (X > 300.0) {
return 1.0; }
542 while (_tabRA[i] < X && i < 12) { i++; }
545 return (_tabCor[i] - _tabCor[i - 1]) / (_tabRA[i] - _tabRA[i - 1]) * (X - _tabRA[i - 1]) + _tabCor[i - 1];
554 double cosPhi = cos( support_normal.angle( direction ) );
556 double C = calculC(distance);
558 for (
unsigned int i = 0 ; i < directivity_spectrum.
getNbValues() ; i++)
562 q = (1 + (ka / (ka + 0.4)) * cosPhi) * C;
567 return directivity_spectrum;
588 3.9213E-02, 3.8299E-02, 3.5626E-02, 3.1399E-02, 2.5933E-02, 1.9633E-02, 1.2955E-02,
589 6.3631E-03, 2.9321E-04, -4.8880E-03, -8.9124E-03, -1.1631E-02, -1.3023E-02, -1.3192E-02,
590 -1.2351E-02, -1.0793E-02, -8.8587E-03, -6.8993E-03, -5.2361E-03, -4.1269E-03, -3.7380E-03
593 1.5295E-01, 1.4940E-01, 1.3903E-01, 1.2260E-01, 1.0132E-01, 7.6753E-02, 5.0654E-02,
594 2.4837E-02, 1.0112E-03, -1.9370E-02, -3.5229E-02, -4.5960E-02, -5.1463E-02, -5.2134E-02,
595 -4.8805E-02, -4.2637E-02, -3.4980E-02, -2.7223E-02, -2.0640E-02, -1.6250E-02, -1.4711E-02
598 3.3341E-01, 3.2573E-01, 3.0323E-01, 2.6755E-01, 2.2126E-01, 1.6765E-01, 1.1054E-01,
599 5.3866E-02, 1.4017E-03, -4.3595E-02, -7.8677E-02, -1.0242E-01, -1.1455E-01, -1.1590E-01,
600 -1.0831E-01, -9.4383E-02, -7.7136E-02, -5.9688E-02, -4.4893E-02, -3.5032E-02, -3.1576E-02
603 5.7143E-01, 5.5835E-01, 5.2003E-01, 4.5914E-01, 3.7992E-01, 2.8790E-01, 1.8948E-01,
604 9.1440E-02, 3.3045E-04, -7.8073E-02, -1.3934E-01, -1.8081E-01, -2.0183E-01, -2.0382E-01,
605 -1.8997E-01, -1.6488E-01, -1.3394E-01, -1.0271E-01, -7.6267E-02, -5.8657E-02, -5.2487E-02
608 8.5759E-01, 8.3811E-01, 7.8096E-01, 6.8997E-01, 5.7125E-01, 4.3285E-01, 2.8419E-01,
609 1.3542E-01, -3.4683E-03, -1.2348E-01, -2.1752E-01, -2.8120E-01, -3.1323E-01, -3.1559E-01,
610 -2.9322E-01, -2.5329E-01, -2.0429E-01, -1.5494E-01, -1.1321E-01, -8.5459E-02, -7.5741E-02
613 1.1831E+00, 1.1564E+00, 1.0781E+00, 9.5307E-01, 7.8950E-01, 5.9808E-01, 3.9154E-01,
614 1.8377E-01, -1.1197E-02, -1.8049E-01, -3.1367E-01, -4.0394E-01, -4.4902E-01, -4.5143E-01,
615 -4.1811E-01, -3.5943E-01, -2.8771E-01, -2.1567E-01, -1.5487E-01, -1.1446E-01, -1.0033E-01
618 1.5403E+00, 1.5058E+00, 1.4044E+00, 1.2424E+00, 1.0296E+00, 7.7974E-01, 5.0881E-01,
619 2.3480E-01, -2.3835E-02, -2.4970E-01, -4.2827E-01, -5.4964E-01, -6.0999E-01, -6.1221E-01,
620 -5.6552E-01, -4.8406E-01, -3.8483E-01, -2.8537E-01, -2.0156E-01, -1.4594E-01, -1.2649E-01
623 1.9232E+00, 1.8805E+00, 1.7546E+00, 1.5530E+00, 1.2876E+00, 9.7474E-01, 6.3391E-01,
624 2.8725E-01, -4.2025E-02, -3.3151E-01, -5.6184E-01, -7.1921E-01, -7.9754E-01, -7.9976E-01,
625 -7.3751E-01, -6.2935E-01, -4.9783E-01, -3.6618E-01, -2.5541E-01, -1.8197E-01, -1.5631E-01
628 2.3273E+00, 2.2758E+00, 2.1243E+00, 1.8812E+00, 1.5605E+00, 1.1808E+00, 7.6540E-01,
629 3.4042E-01, -6.6025E-02, -4.2610E-01, -7.1493E-01, -9.1390E-01, -1.0138E+00, -1.0170E+00,
630 -9.3769E-01, -7.9931E-01, -6.3089E-01, -4.6239E-01, -3.2076E-01, -2.2695E-01, -1.9418E-01
633 2.7492E+00, 2.6887E+00, 2.5106E+00, 2.2244E+00, 1.8459E+00, 1.3965E+00, 9.0236E-01,
634 3.9399E-01, -9.5749E-02, -5.3340E-01, -8.8806E-01, -1.1353E+00, -1.2618E+00, -1.2684E+00,
635 -1.1715E+00, -1.0001E+00, -7.9063E-01, -5.8088E-01, -4.0461E-01, -2.8794E-01, -2.4721E-01
638 3.1894E+00, 3.1197E+00, 2.9141E+00, 2.5834E+00, 2.1451E+00, 1.6229E+00, 1.0464E+00,
639 4.4972E-01, -1.2959E-01, -6.5256E-01, -1.0819E+00, -1.3865E+00, -1.5474E+00, -1.5627E+00,
640 -1.4504E+00, -1.2450E+00, -9.9164E-01, -7.3698E-01, -5.2275E-01, -3.8095E-01, -3.3145E-01
643 3.6467E+00, 3.5674E+00, 3.3337E+00, 2.9572E+00, 2.4572E+00, 1.8599E+00, 1.1978E+00,
644 5.0838E-01, -1.6650E-01, -7.8278E-01, -1.2969E+00, -1.6703E+00, -1.8769E+00, -1.9100E+00,
645 -1.7875E+00, -1.5497E+00, -1.2509E+00, -9.4848E-01, -6.9332E-01, -5.2427E-01, -4.6524E-01
648 4.0966E+00, 4.0077E+00, 3.7455E+00, 3.3227E+00, 2.7605E+00, 2.0874E+00, 1.3388E+00,
649 5.5573E-01, -2.1615E-01, -9.2821E-01, -1.5310E+00, -1.9786E+00, -2.2366E+00, -2.2918E+00,
650 -2.1605E+00, -1.8882E+00, -1.5398E+00, -1.1845E+00, -8.8398E-01, -6.8475E-01, -6.1517E-01
653 4.5369E+00, 4.4382E+00, 4.1471E+00, 3.6774E+00, 3.0522E+00, 2.3026E+00, 1.4670E+00,
654 5.8981E-01, -2.7973E-01, -1.0889E+00, -1.7833E+00, -2.3100E+00, -2.6256E+00, -2.7083E+00,
655 -2.5709E+00, -2.2632E+00, -1.8614E+00, -1.4484E+00, -1.0982E+00, -8.6591E-01, -7.8478E-01
658 4.9652E+00, 4.8566E+00, 4.5361E+00, 4.0188E+00, 3.3298E+00, 2.5030E+00, 1.5798E+00,
659 6.0833E-01, -3.5883E-01, -1.2655E+00, -2.0530E+00, -2.6626E+00, -3.0418E+00, -3.1586E+00,
660 -3.0192E+00, -2.6764E+00, -2.2180E+00, -1.7428E+00, -1.3386E+00, -1.0703E+00, -9.7666E-01
663 5.3802E+00, 5.2615E+00, 4.9111E+00, 4.3454E+00, 3.5916E+00, 2.6865E+00, 1.6752E+00,
664 6.0927E-01, -4.5493E-01, -1.4582E+00, -2.3388E+00, -3.0336E+00, -3.4819E+00, -3.6400E+00,
665 -3.5043E+00, -3.1278E+00, -2.6105E+00, -2.0689E+00, -1.6065E+00, -1.2994E+00, -1.1921E+00
668 5.7809E+00, 5.6519E+00, 5.2709E+00, 4.6558E+00, 3.8360E+00, 2.8514E+00, 1.7510E+00,
669 5.9048E-01, -5.6989E-01, -1.6679E+00, -2.6400E+00, -3.4203E+00, -3.9418E+00, -4.1484E+00,
670 -4.0235E+00, -3.6166E+00, -3.0391E+00, -2.4271E+00, -1.9025E+00, -1.5536E+00, -1.4318E+00
673 6.1672E+00, 6.0276E+00, 5.6153E+00, 4.9496E+00, 4.0623E+00, 2.9966E+00, 1.8057E+00,
674 5.5010E-01, -7.0558E-01, -1.8960E+00, -2.9562E+00, -3.8199E+00, -4.4165E+00, -4.6786E+00,
675 -4.5731E+00, -4.1408E+00, -3.5029E+00, -2.8170E+00, -2.2262E+00, -1.8328E+00, -1.6954E+00
678 6.5395E+00, 6.3890E+00, 5.9446E+00, 5.2269E+00, 4.2703E+00, 3.1214E+00, 1.8382E+00,
679 4.8645E-01, -8.6398E-01, -2.1439E+00, -3.2877E+00, -4.2304E+00, -4.9013E+00, -5.2244E+00,
680 -5.1475E+00, -4.6969E+00, -4.0000E+00, -3.2376E+00, -2.5767E+00, -2.1360E+00, -1.9820E+00
683 6.8987E+00, 6.7370E+00, 6.2595E+00, 5.4883E+00, 4.4602E+00, 3.2257E+00, 1.8476E+00,
684 3.9797E-01, -1.0472E+00, -2.4141E+00, -3.6356E+00, -4.6504E+00, -5.3917E+00, -5.7788E+00,
685 -5.7401E+00, -5.2805E+00, -4.5278E+00, -3.6868E+00, -2.9524E+00, -2.4616E+00, -2.2901E+00
688 7.2462E+00, 7.0730E+00, 6.5614E+00, 5.7349E+00, 4.6328E+00, 3.3096E+00, 1.8335E+00,
689 2.8322E-01, -1.2576E+00, -2.7091E+00, -4.0024E+00, -5.0802E+00, -5.8841E+00, -6.3348E+00,
690 -6.3433E+00, -5.8859E+00, -5.0828E+00, -4.1626E+00, -3.3514E+00, -2.8078E+00, -2.6178E+00
693 7.5836E+00, 7.3985E+00, 6.8516E+00, 5.9679E+00, 4.7890E+00, 3.3735E+00, 1.7953E+00,
694 1.4071E-01, -1.4979E+00, -3.0326E+00, -4.3913E+00, -5.5215E+00, -6.3766E+00, -6.8863E+00,
695 -6.9488E+00, -6.5063E+00, -5.6609E+00, -4.6621E+00, -3.7715E+00, -3.1726E+00, -2.9630E+00
698 7.9125E+00, 7.7152E+00, 7.1317E+00, 6.1886E+00, 4.9299E+00, 3.4179E+00, 1.7326E+00,
699 -3.1215E-02, -1.7709E+00, -3.3886E+00, -4.8069E+00, -5.9777E+00, -6.8694E+00, -7.4281E+00,
700 -7.5480E+00, -7.1343E+00, -6.2574E+00, -5.1825E+00, -4.2103E+00, -3.5537E+00, -3.3237E+00
703 8.2345E+00, 8.0244E+00, 7.4032E+00, 6.3983E+00, 5.0563E+00, 3.4431E+00, 1.6449E+00,
704 -2.3448E-01, -2.0804E+00, -3.7824E+00, -5.2552E+00, -6.4540E+00, -7.3646E+00, -7.9573E+00,
705 -8.1330E+00, -7.7614E+00, -6.8670E+00, -5.7206E+00, -4.6657E+00, -3.9491E+00, -3.6977E+00
708 8.5510E+00, 8.3278E+00, 7.6673E+00, 6.5982E+00, 5.1690E+00, 3.4493E+00, 1.5312E+00,
709 -4.7147E-01, -2.4305E+00, -4.2200E+00, -5.7434E+00, -6.9574E+00, -7.8668E+00, -8.4733E+00,
710 -8.6970E+00, -8.3789E+00, -7.4837E+00, -6.2733E+00, -5.1355E+00, -4.3570E+00, -4.0835E+00
713 8.8632E+00, 8.6262E+00, 7.9252E+00, 6.7892E+00, 5.2687E+00, 3.4364E+00, 1.3906E+00,
714 -7.4501E-01, -2.8265E+00, -4.7089E+00, -6.2803E+00, -7.4966E+00, -8.3829E+00, -8.9783E+00,
715 -9.2352E+00, -8.9780E+00, -8.1010E+00, -6.8372E+00, -5.6177E+00, -4.7758E+00, -4.4793E+00
718 9.1717E+00, 8.9207E+00, 8.1775E+00, 6.9719E+00, 5.3555E+00, 3.4041E+00, 1.2212E+00,
719 -1.0587E+00, -3.2745E+00, -5.2580E+00, -6.8767E+00, -8.0824E+00, -8.9219E+00, -9.4773E+00,
720 -9.7454E+00, -9.5504E+00, -8.7116E+00, -7.4086E+00, -6.1105E+00, -5.2042E+00, -4.8840E+00
723 9.4773E+00, 9.2117E+00, 8.4247E+00, 7.1465E+00, 5.4296E+00, 3.3517E+00, 1.0212E+00,
724 -1.4170E+00, -3.7824E+00, -5.8785E+00, -7.5458E+00, -8.7278E+00, -9.4948E+00, -9.9776E+00,
725 -1.0228E+01, -1.0089E+01, -9.3081E+00, -7.9839E+00, -6.6123E+00, -5.6413E+00, -5.2969E+00
728 9.7800E+00, 9.4993E+00, 8.6669E+00, 7.3131E+00, 5.4905E+00, 3.2779E+00, 7.8776E-01,
729 -1.8253E+00, -4.3595E+00, -6.5844E+00, -8.3040E+00, -9.4487E+00, -1.0115E+01, -1.0489E+01,
730 -1.0688E+01, -1.0589E+01, -9.8825E+00, -8.5589E+00, -7.1217E+00, -6.0864E+00, -5.7173E+00
733 1.0080E+01, 9.7834E+00, 8.9039E+00, 7.4713E+00, 5.5375E+00, 3.1815E+00, 5.1771E-01,
734 -2.2903E+00, -5.0181E+00, -7.3937E+00, -9.1727E+00, -1.0265E+01, -1.0798E+01, -1.1024E+01,
735 -1.1130E+01, -1.1049E+01, -1.0427E+01, -9.1291E+00, -7.6373E+00, -6.5392E+00, -6.1452E+00
738 1.0376E+01, 1.0064E+01, 9.1354E+00, 7.6206E+00, 5.5698E+00, 3.0605E+00, 2.0709E-01,
739 -2.8202E+00, -5.7735E+00, -8.3303E+00, -1.0180E+01, -1.1202E+01, -1.1563E+01, -1.1594E+01,
740 -1.1565E+01, -1.1468E+01, -1.0935E+01, -9.6893E+00, -8.1576E+00, -6.9995E+00, -6.5807E+00
743 1.0668E+01, 1.0339E+01, 9.3604E+00, 7.7600E+00, 5.5861E+00, 2.9127E+00, -1.4879E-01,
744 -3.4253E+00, -6.6463E+00, -9.4274E+00, -1.1367E+01, -1.2295E+01, -1.2433E+01, -1.2217E+01,
745 -1.2003E+01, -1.1852E+01, -1.1400E+01, -1.0234E+01, -8.6812E+00, -7.4676E+00, -7.0243E+00
748 1.0956E+01, 1.0609E+01, 9.5782E+00, 7.8886E+00, 5.5849E+00, 2.7355E+00, -5.5553E-01,
749 -4.1185E+00, -7.6641E+00, -1.0733E+01, -1.2791E+01, -1.3593E+01, -1.3439E+01, -1.2909E+01,
750 -1.2457E+01, -1.2206E+01, -1.1820E+01, -1.0758E+01, -9.2063E+00, -7.9436E+00, -7.4766E+00
753 1.1237E+01, 1.0873E+01, 9.7877E+00, 8.0051E+00, 5.5648E+00, 2.5261E+00, -1.0198E+00,
754 -4.9166E+00, -8.8666E+00, -1.2322E+01, -1.4549E+01, -1.5171E+01, -1.4623E+01, -1.3692E+01,
755 -1.2939E+01, -1.2540E+01, -1.2193E+01, -1.1254E+01, -9.7309E+00, -8.4279E+00, -7.9385E+00
758 1.1512E+01, 1.1129E+01, 9.9878E+00, 8.1084E+00, 5.5239E+00, 2.2812E+00, -1.5494E+00,
759 -5.8416E+00, -1.0313E+01, -1.4320E+01, -1.6807E+01, -1.7156E+01, -1.6046E+01, -1.4592E+01,
760 -1.3464E+01, -1.2864E+01, -1.2521E+01, -1.1718E+01, -1.0253E+01, -8.9208E+00, -8.4107E+00
763 1.1778E+01, 1.1376E+01, 1.0177E+01, 8.1972E+00, 5.4605E+00, 1.9974E+00, -2.1540E+00,
764 -6.9238E+00, -1.2098E+01, -1.6967E+01, -1.9918E+01, -1.9789E+01, -1.7805E+01, -1.5641E+01,
765 -1.4046E+01, -1.3190E+01, -1.2810E+01, -1.2145E+01, -1.0769E+01, -9.4225E+00, -8.8943E+00
768 1.2035E+01, 1.1614E+01, 1.0355E+01, 8.2703E+00, 5.3729E+00, 1.6709E+00, -2.8454E+00,
769 -8.2070E+00, -1.4393E+01, -2.0830E+01, -2.4847E+01, -2.3638E+01, -2.0073E+01, -1.6886E+01,
770 -1.4703E+01, -1.3528E+01, -1.3066E+01, -1.2530E+01, -1.1275E+01, -9.9329E+00, -9.3900E+00
773 1.2282E+01, 1.1841E+01, 1.0521E+01, 8.3267E+00, 5.2594E+00, 1.2974E+00, -3.6384E+00,
774 -9.7578E+00, -1.7557E+01, -2.7951E+01, -3.7266E+01, -3.0744E+01, -2.3208E+01, -1.8396E+01,
775 -1.5453E+01, -1.3891E+01, -1.3297E+01, -1.2873E+01, -1.1769E+01, -1.0452E+01, -9.8987E+00
785 double theta = direction.
angle(support_normal);
788 if (theta < -
M_PI) { theta = theta +
M_2PI; }
789 if (theta >
M_PI) { theta = theta -
M_2PI; }
792 int indice_theta = (int)(20 * theta /
M_PI);
793 for (
unsigned int i = 0 ; i < spectre_ka.
getNbValues(); i++)
796 ka = ka > 3.8 ? 3.8 : ka ;
797 int indice_Ka = (int)(10 * ka);
799 directivity_spectrum.
getTabValReel()[i] = compute_q(indice_Ka, indice_theta, ka, theta);
802 return directivity_spectrum;
811 int indiceKaTab = ka_idx > 0 ? ka_idx - 1 : 0;
812 indiceKaTab = indiceKaTab > (
NB_KA - 2) ?
NB_KA - 2 : indiceKaTab;
814 double tabQ1_1 = _tabQ[indiceKaTab] [theta_idx];
815 double tabQ1_2 = _tabQ[indiceKaTab] [theta_idx + 1];
816 double tabQ2_1 = _tabQ[indiceKaTab + 1][theta_idx];
817 double tabQ2_2 = _tabQ[indiceKaTab + 1][theta_idx + 1];
819 double ka1 = ka_idx / 10.0;
820 double ka2 = (ka_idx + 1) / 10.0;
822 double theta1 = theta_idx *
M_PI / 20.0;
823 double theta2 = (theta_idx + 1) *
M_PI / 20.0;
825 double val1 = tabQ1_1 + (theta - theta1) * (tabQ1_2 - tabQ1_1) / (theta2 - theta1);
826 double val2 = tabQ2_1 + (theta - theta1) * (tabQ2_2 - tabQ2_1) / (theta2 - theta1);
828 double val = val1 + (ka2 - ka) * (val2 - val1) / (ka2 - ka1);
831 return pow(10.0, val / 10.0);
856 2.0382E+00, 2.0382E+00, 1.7752E+00, 1.7752E+00, 2.0382E+00, 2.0382E+00, 1.6953E+00,
857 1.4101E+00, 1.2860E+00, 1.1729E+00, 8.1142E-01, 6.0152E-01, 4.4591E-01, 3.3056E-01,
858 2.4505E-01, 1.8165E-01, 1.3466E-01, 9.9827E-02, 7.4003E-02, 5.4859E-02, 4.0667E-02,
859 5.4859E-02, 7.4003E-02, 9.9827E-02, 1.3466E-01, 1.8165E-01, 2.4505E-01, 3.3056E-01,
860 4.4591E-01, 6.0152E-01, 8.1142E-01, 1.1729E+00, 1.2860E+00, 1.4101E+00, 1.6953E+00,
861 2.0382E+00, 2.0382E+00, 1.7752E+00, 1.7752E+00, 2.0382E+00, 2.0382E+00
864 1.0215E+00, 1.0215E+00, 1.0215E+00, 1.1201E+00, 1.2860E+00, 1.2860E+00, 1.2860E+00,
865 1.4765E+00, 1.6190E+00, 1.6190E+00, 1.6190E+00, 1.1201E+00, 7.7490E-01, 5.3610E-01,
866 3.7089E-01, 2.5659E-01, 1.7752E-01, 1.2281E-01, 8.4966E-02, 5.8782E-02, 4.0667E-02,
867 5.8782E-02, 8.4966E-02, 1.2281E-01, 1.7752E-01, 2.5659E-01, 3.7089E-01, 5.3610E-01,
868 7.7490E-01, 1.1201E+00, 1.6190E+00, 1.6190E+00, 1.6190E+00, 1.4765E+00, 1.2860E+00,
869 1.2860E+00, 1.2860E+00, 1.1201E+00, 1.0215E+00, 1.0215E+00, 1.0215E+00
872 2.1534E+00, 1.7911E+00, 1.4898E+00, 1.3587E+00, 1.4227E+00, 1.7105E+00, 1.7105E+00,
873 1.4898E+00, 1.3587E+00, 1.3587E+00, 1.3587E+00, 9.6189E-01, 6.8096E-01, 4.8209E-01,
874 3.4129E-01, 2.4162E-01, 1.7105E-01, 1.2109E-01, 8.5728E-02, 6.0691E-02, 4.2966E-02,
875 6.0691E-02, 8.5728E-02, 1.2109E-01, 1.7105E-01, 2.4162E-01, 3.4129E-01, 4.8209E-01,
876 6.8096E-01, 9.6189E-01, 1.3587E+00, 1.3587E+00, 1.3587E+00, 1.4898E+00, 1.7105E+00,
877 1.7105E+00, 1.4227E+00, 1.3587E+00, 1.4898E+00, 1.7911E+00, 2.1534E+00
880 1.4385E+00, 1.4385E+00, 1.4385E+00, 1.5773E+00, 1.8109E+00, 1.8109E+00, 2.1772E+00,
881 1.9857E+00, 1.5063E+00, 1.0912E+00, 9.0762E-01, 6.7283E-01, 4.9877E-01, 3.6975E-01,
882 2.7410E-01, 2.0319E-01, 1.5063E-01, 1.1166E-01, 8.2776E-02, 6.1363E-02, 4.5489E-02,
883 6.1363E-02, 8.2776E-02, 1.1166E-01, 1.5063E-01, 2.0319E-01, 2.7410E-01, 3.6975E-01,
884 4.9877E-01, 6.7283E-01, 9.0762E-01, 1.0912E+00, 1.5063E+00, 1.9857E+00, 2.1772E+00,
885 1.8109E+00, 1.8109E+00, 1.5773E+00, 1.4385E+00, 1.4385E+00, 1.4385E+00
888 3.5678E+00, 4.2895E+00, 4.4916E+00, 3.7360E+00, 2.7065E+00, 2.2511E+00, 1.2954E+00,
889 8.5586E-01, 7.8055E-01, 8.5586E-01, 7.1187E-01, 5.4001E-01, 4.0964E-01, 3.1074E-01,
890 2.3572E-01, 1.7881E-01, 1.3564E-01, 1.0290E-01, 7.8055E-02, 5.9211E-02, 4.4916E-02,
891 5.9211E-02, 7.8055E-02, 1.0290E-01, 1.3564E-01, 1.7881E-01, 2.3572E-01, 3.1074E-01,
892 4.0964E-01, 5.4001E-01, 7.1187E-01, 8.5586E-01, 7.8055E-01, 8.5586E-01, 1.2954E+00,
893 2.2511E+00, 2.7065E+00, 3.7360E+00, 4.4916E+00, 4.2895E+00, 3.5678E+00
896 1.1891E+01, 9.8907E+00, 7.1652E+00, 4.5209E+00, 2.6015E+00, 1.4970E+00, 1.2452E+00,
897 7.8565E-01, 5.4353E-01, 4.5209E-01, 3.7603E-01, 3.0565E-01, 2.4844E-01, 2.0194E-01,
898 1.6414E-01, 1.3342E-01, 1.0845E-01, 8.8151E-02, 7.1652E-02, 5.8241E-02, 4.7340E-02,
899 5.8241E-02, 7.1652E-02, 8.8151E-02, 1.0845E-01, 1.3342E-01, 1.6414E-01, 2.0194E-01,
900 2.4844E-01, 3.0565E-01, 3.7603E-01, 4.5209E-01, 5.4353E-01, 7.8565E-01, 1.2452E+00,
901 1.4970E+00, 2.6015E+00, 4.5209E+00, 7.1652E+00, 9.8907E+00, 1.1891E+01
904 4.5941E+00, 4.5941E+00, 4.5941E+00, 4.1899E+00, 3.1784E+00, 1.8290E+00, 1.2653E+00,
905 1.0051E+00, 8.3600E-01, 6.9535E-01, 5.7837E-01, 4.4896E-01, 3.4850E-01, 2.7052E-01,
906 2.0999E-01, 1.6301E-01, 1.2653E-01, 9.8221E-02, 7.6244E-02, 5.9184E-02, 4.5941E-02,
907 5.9184E-02, 7.6244E-02, 9.8221E-02, 1.2653E-01, 1.6301E-01, 2.0999E-01, 2.7052E-01,
908 3.4850E-01, 4.4896E-01, 5.7837E-01, 6.9535E-01, 8.3600E-01, 1.0051E+00, 1.2653E+00,
909 1.8290E+00, 3.1784E+00, 4.1899E+00, 4.5941E+00, 4.5941E+00, 4.5941E+00
912 3.8007E+00, 3.1613E+00, 3.0190E+00, 2.7534E+00, 2.3981E+00, 2.3981E+00, 1.9946E+00,
913 1.4450E+00, 1.0961E+00, 8.7070E-01, 6.0237E-01, 4.6759E-01, 3.6297E-01, 2.8175E-01,
914 2.1871E-01, 1.6977E-01, 1.3179E-01, 1.0230E-01, 7.9408E-02, 6.1641E-02, 4.7848E-02,
915 6.1641E-02, 7.9408E-02, 1.0230E-01, 1.3179E-01, 1.6977E-01, 2.1871E-01, 2.8175E-01,
916 3.6297E-01, 4.6759E-01, 6.0237E-01, 8.7070E-01, 1.0961E+00, 1.4450E+00, 1.9946E+00,
917 2.3981E+00, 2.3981E+00, 2.7534E+00, 3.0190E+00, 3.1613E+00, 3.8007E+00
920 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00,
921 1.7698E+00, 1.2244E+00, 8.4708E-01, 5.8603E-01, 4.5491E-01, 3.5312E-01, 2.7411E-01,
922 2.1278E-01, 1.6517E-01, 1.2821E-01, 9.9523E-02, 7.7254E-02, 5.9968E-02, 4.6550E-02,
923 5.9968E-02, 7.7254E-02, 9.9523E-02, 1.2821E-01, 1.6517E-01, 2.1278E-01, 2.7411E-01,
924 3.5312E-01, 4.5491E-01, 5.8603E-01, 8.4708E-01, 1.2244E+00, 1.7698E+00, 2.3330E+00,
925 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00, 2.3330E+00
934 double theta = direction.
angle(support_normal);
937 if (theta < 0) { theta = theta +
M_2PI; }
940 int indice_theta = (int)(20.0 * theta /
M_PI);
944 for (
unsigned int i = 0 ; i < directivity_spectrum.
getNbValues(); i++)
947 ka = ka > 20.0 ? 20.0 : ka ;
949 int indice_Ka = find_Ka_idx(ka);
951 directivity_spectrum.
getTabValReel()[i] = compute_q(indice_Ka, indice_theta, ka, theta);
954 return directivity_spectrum;
959 double tabQ1_1 = _tabQ[indice_Ka] [indice_theta];
960 double tabQ1_2 = _tabQ[indice_Ka] [indice_theta + 1];
961 double tabQ2_1 = _tabQ[indice_Ka + 1][indice_theta];
962 double tabQ2_2 = _tabQ[indice_Ka + 1][indice_theta + 1];
964 double ka1 = _tabKa[indice_Ka];
965 double ka2 = _tabKa[indice_Ka + 1];
967 double theta1 = indice_theta *
M_PI / 20;
968 double theta2 = (indice_theta + 1) *
M_PI / 20;
970 double val1 = tabQ1_1 + (theta - theta1) * (tabQ1_2 - tabQ1_1) / (theta2 - theta1);
971 double val2 = tabQ2_1 + (theta - theta1) * (tabQ2_2 - tabQ2_1) / (theta2 - theta1);
973 return val1 + (ka - ka1) * (val2 - val1) / (ka2 - ka1);
980 while ((_tabKa[indice] < ka) && (indice < (
NB_KA - 1))) { indice++; }
982 return indice > (
NB_KA - 2) ?
NB_KA - 2 : indice - 1;
989 const Point& position_,
992 : position(position_)
993 , spectrum(spectrum_)
994 , directivity(directivity_)
1000 const Point& position_
1007 double cumul_x=0., cumul_y=0., cumul_z=0., cumul_level = 0.;
1008 std::deque<double> tabLevels;
1010 for(
unsigned int i=0; i<tabSources_.size(); i++)
1012 tabLevels.push_back( ::pow( 10, tabSources_[i].spectrum.valGlobDBA()/10 ) );
1015 for(
unsigned int i=0; i<tabSources_.size(); i++)
1017 cumul_x = cumul_x + tabSources_[i].position._x * tabLevels[i];
1018 cumul_y = cumul_y + tabSources_[i].position._y * tabLevels[i];
1019 cumul_z = cumul_z + tabSources_[i].position._z * tabLevels[i];
1020 cumul_level = cumul_level + tabLevels[i];
1023 centroid.
_x = cumul_x / cumul_level;
1024 centroid.
_y = cumul_y / cumul_level;
1025 centroid.
_z = cumul_z / cumul_level;
double compute_q(int indice_Ka, int indice_theta, double ka, double theta)
This file provides the declaration of the entities of the model, which inherit from BaseEntity...
void erfc_G_computation(const ComplexSpectrum &localW, ComplexSpectrum &G)
void computeQ(double angle, ComplexSpectrum &Rp, ComplexSpectrum &Fw, ComplexSpectrum &Q)
Compute reflection coefficient.
static const double _tabRA[]
RA form factor.
TYComplex cotanh(const TYComplex &valeur)
virtual OSpectre sum(const OSpectre &spectre) const
Arithmetic sum of two spectrums in one-third Octave.
Point position
Destructor.
void limit_W_values(ComplexSpectrum &localW)
const OSpectre & get_k() const
Get the wave number spectrum.
double compute_q(int ka_idx, int theta_idx, double ka, double theta)
static const double _tabCor[]
Correction factors.
void computeZs(double angle, ComplexSpectrum Z, ComplexSpectrum &spectrum)
Compute specific impedance.
TYComplex erfcCas1(const TYComplex &wValue) const
: Functions used in Fw computation
AcousticBuildingMaterial(const string &name_, const ComplexSpectrum &spectrum)
Constructor.
void sgn_G_computation(const ComplexSpectrum &localW, ComplexSpectrum &G)
ComplexSpectrum K
Wave number.
TYComplex erfcCas3(const TYComplex &wValue) const
TYComplex erfcCas2(const TYComplex &wValue) const
static const double _tabQ[NB_KA][NB_THETA]
double trapz(std::vector< double > u, std::vector< double > integrande)
void computeRp(double angle, const ComplexSpectrum &Zs, ComplexSpectrum &Rp)
Compute reflection coefficient for plane waves.
std::complex< double > TYComplex
static OTabFreq getTabFreqExact()
virtual double * getTabValReel()
Get an array of the real values of the spectrum.
virtual unsigned int getNbValues() const
Number of values in the spectrum.
virtual void setType(TYSpectreType type)
Set the spectrum type.
void computeFw(ComplexSpectrum localW, ComplexSpectrum &Fw)
Compute function of numeric distance.
TYComplex sgnReIm(const TYComplex &W, const TYComplex &G) const
: function used in G computation
OSpectreComplex toModulePhase() const
Conversion to module/phase.
ComplexSpectrum asEyring() const
Returns a spectrum with Eyring formulae.
double _y
y coordinate of OCoord3D
double _x
x coordinate of OCoord3D
AcousticReceptor(const Point &position_)
Constructor to build a receptor defined by the its position.
void computeZc()
Compute characteristic impedance.
AcousticMaterialBase(const string &name_)
Constructor.
void computeK()
Compute wave number.
static AtmosphericConditions * atmosphere
Pointer to current atmosphere.
static const double _tabQ[NB_KA][NB_THETA]
static AtmosphericConditions * atmosphere
Characteristic size of support face.
AcousticSource(const Point &point_, const Spectrum &spectrum_, SourceDirectivityInterface *directivity)
Constructor to build a source defined by a point, spectrum, directivity.
ComplexSpectrum Zc
Characteristic impedance.
virtual Spectrum lwAdjustment(Vector direction, double distance)
Directivity of a volume face.
double * getTabValImag()
Get an array of the imaginary values of the spectrum.
virtual Spectrum lwAdjustment(Vector direction, double distance)
Directivity of a baffled face source.
virtual double * getTabValReel()
std::vector< double > OTabFreq
Frequencies collection.
std::deque< AcousticSource > source_pool_t
Array of sources.
int find_Ka_idx(double ka)
virtual OSpectre mult(const OSpectre &spectre) const
Multiplication of two spectrums.
Class for the definition of atmospheric conditions.
ComplexSpectrum spectrum
Spectrum to store acoustic values at different frequencies.
virtual Spectrum lwAdjustment(Vector direction, double distance)
Directivity of a chimney face source.
virtual OSpectre exp(const double coef=1.0)
Compute e^(coef * spectre) of this spectrum.
double _z
z coordinate of OCoord3D
double angle(const OVector3D &vector) const
Computes the angle between this vector and another vector.
Store acoustic power values for different frequencies.
Point ComputeAcousticCentroid(const source_pool_t &tabSources_)
double gaussianSpectrum(double const k, double const sigma, double const lc)
virtual ComplexSpectrum get_absorption(double incidence_angle, double length)
Destructor.
void computeW(double angle, double length, const ComplexSpectrum &Zs, ComplexSpectrum &W)
Compute numeric distance.
ComplexSpectrum Zf
Effective impedance.
static const double _tabKa[NB_KA]
Interface for source directivity classes (SphericalSourceDirectivity, CommonFaceDirectivity, ...)
double get_ISO9613_G()
Absorption given by ISO9613.
void computeZf(double angle, ComplexSpectrum Zs)
Compute effective impedance in rough ground.
double calculC(double distance)
Compute directivity factor.
AcousticGroundMaterial(const string &name_, double resistivity_, double deviation_, double length_)
Constructor.