54 for ( r = 0; r < NumPhases; r++ ) {
55 ENuToKMu(PhaseMatrix(r, 1), PhaseMatrix(r, 2), k, mu);
56 k_hmg += k * PhaseMatrix(r, 0);
57 mu_hmg += mu * PhaseMatrix(r, 0);
58 volTot += PhaseMatrix(r, 0);
76 for ( r = 0; r < NumPhases; r++ ) {
77 ENuToKMu(PhaseMatrix(r, 1), PhaseMatrix(r, 2), k, mu);
78 k_hmg += PhaseMatrix(r, 0) / k;
79 mu_hmg += PhaseMatrix(r, 0) / mu;
100 double k, k_min, mu, mu_phase = 0., muMin, muMax;
103 PhaseMatrix1 = PhaseMatrix;
110 for ( i = 0; i < numRows; i++ ) {
112 for ( r = 0; r < numRows; r++ ) {
113 if ( PhaseMatrix1(r, 0) > 0. + 1.e-40 ) {
114 ENuToKMu(PhaseMatrix1(r, 1), PhaseMatrix1(r, 2), k, mu);
123 SortedPhaseMatrix(counter, 0) = PhaseMatrix1(phase, 0);
124 SortedPhaseMatrix(counter, 1) = k_min;
125 SortedPhaseMatrix(counter, 2) = mu_phase;
127 PhaseMatrix1(phase, 0) = 0.;
135 for ( i = 0; i < numRows; i++ ) {
136 if ( SortedPhaseMatrix(i, 2) > muMax ) {
137 muMax = SortedPhaseMatrix(i, 2);
140 if ( SortedPhaseMatrix(i, 2) < muMin ) {
141 muMin = SortedPhaseMatrix(i, 2);
148 for ( i = 0; i < numRows; i++ ) {
149 k_hmg += SortedPhaseMatrix(i, 0) / ( SortedPhaseMatrix(i, 1) + 4. / 3. * muMin );
150 k_hmg_2 += SortedPhaseMatrix(i, 0) / ( SortedPhaseMatrix(i, 1) + 4. / 3. * muMax );
154 k_hmg -= 4. / 3. * muMin;
159 mu_hmg =
gamma( SortedPhaseMatrix,
zeta(SortedPhaseMatrix(0, 1), muMin) );
160 mu_hmg_2 =
gamma( SortedPhaseMatrix,
zeta(SortedPhaseMatrix(numRows - 1, 1), muMax) );
178 double f_r, E_r, nu_r, k_r, mu_r;
179 double E_m, nu_m, k_m, mu_m;
181 double nom_k_MT = 0., denom_k_MT = 0., nom_mu_MT = 0., denom_mu_MT = 0.;
182 double k_S_denom = 0., mu_S_denom = 0.;
183 double alpha_m, beta_m;
191 E_m = PhaseMatrix(refRow, 1);
192 nu_m = PhaseMatrix(refRow, 2);
197 alpha_m = 3. * k_m / ( 3. * k_m + 4 * mu_m );
198 beta_m = 6. * ( k_m + 2. * mu_m ) / ( 5. * ( 3. * k_m + 4. * mu_m ) );
201 for ( r = 0; r < numRows; r++ ) {
202 f_r = PhaseMatrix(r, 0);
203 E_r = PhaseMatrix(r, 1);
204 nu_r = PhaseMatrix(r, 2);
209 nom_k_MT += f_r * k_r / ( 1. + alpha_m * ( k_r / k_m - 1. ) );
210 denom_k_MT += f_r / ( 1. + alpha_m * ( k_r / k_m - 1. ) );
212 nom_mu_MT += f_r * mu_r / ( 1. + beta_m * ( mu_r / mu_m - 1. ) );
213 denom_mu_MT += f_r / ( 1. + beta_m * ( mu_r / mu_m - 1. ) );
215 k_S [ r ] = 1. / ( 1. + alpha_m * ( k_r / k_m - 1. ) );
216 mu_S [ r ] = 1. / ( 1. + beta_m * ( mu_r / mu_m - 1. ) );
220 k_hmg = nom_k_MT / denom_k_MT;
221 mu_hmg = nom_mu_MT / denom_mu_MT;
226 for ( r = 0; r < numRows; r++ ) {
227 f_r = PhaseMatrix(r, 0);
228 E_r = PhaseMatrix(r, 1);
229 nu_r = PhaseMatrix(r, 2);
231 k_S_denom += f_r * 1. / ( 1. + alpha_m * ( k_r / k_m - 1. ) );
232 mu_S_denom += f_r * 1. / ( 1. + beta_m * ( mu_r / mu_m - 1. ) );
235 for ( r = 0; r < numRows; r++ ) {
236 E_r = PhaseMatrix(r, 1);
237 nu_r = PhaseMatrix(r, 2);
240 k_S [ r ] /= k_S_denom;
241 mu_S [ r ] /= mu_S_denom;
248 double f_r, E_r, nu_r, k_r, mu_r;
249 double k_SCS, mu_SCS, nom_k_SCS, denom_k_SCS, nom_mu_SCS, denom_mu_SCS;
251 double alpha_m = 0., beta_m = 0.;
252 double k_S_denom = 0., mu_S_denom = 0.;
263 for (
int i = 1; i < 100; i++ ) {
269 for (
int r = 0; r < numRows; r++ ) {
270 f_r = PhaseMatrix(r, 0);
271 E_r = PhaseMatrix(r, 1);
272 nu_r = PhaseMatrix(r, 2);
278 alpha_m = 3. * k_SCS / ( 3. * k_SCS + 4 * mu_SCS );
279 beta_m = 6. * ( k_SCS + 2. * mu_SCS ) / ( 5. * ( 3. * k_SCS + 4. * mu_SCS ) );
281 nom_k_SCS += f_r * k_r / ( 1 + alpha_m * ( k_r / k_SCS - 1 ) );
282 denom_k_SCS += f_r / ( 1 + alpha_m * ( k_r / k_SCS - 1 ) );
284 nom_mu_SCS += f_r * mu_r / ( 1 + beta_m * ( mu_r / mu_SCS - 1 ) );
285 denom_mu_SCS += f_r / ( 1 + beta_m * ( mu_r / mu_SCS - 1 ) );
288 k_SCS = nom_k_SCS / denom_k_SCS;
289 mu_SCS = nom_mu_SCS / denom_mu_SCS;
298 for (
int r = 0; r < numRows; r++ ) {
299 f_r = PhaseMatrix(r, 0);
300 E_r = PhaseMatrix(r, 1);
301 nu_r = PhaseMatrix(r, 2);
303 k_S [ r ] = 1. / ( 1. + alpha_m * ( k_r /
k_hmg - 1. ) );
304 mu_S [ r ] = 1. / ( 1. + beta_m * ( mu_r /
mu_hmg - 1. ) );
305 k_S_denom += f_r * 1. / ( 1. + alpha_m * ( k_r /
k_hmg - 1. ) );
306 mu_S_denom += f_r * 1. / ( 1. + beta_m * ( mu_r /
mu_hmg - 1. ) );
309 for (
int r = 0; r < numRows; r++ ) {
310 E_r = PhaseMatrix(r, 1);
311 nu_r = PhaseMatrix(r, 2);
313 k_S [ r ] /= k_S_denom;
314 mu_S [ r ] /= mu_S_denom;
350 PhaseMatrix1.setSubMatrix(PhaseMatrix, 1, 1);
352 PhaseMatrix1(NumPhases - 1, 0) = 0.1;
353 PhaseMatrix1(NumPhases - 1, 1) = 10.;
354 PhaseMatrix1(NumPhases - 1, 2) = 0.3;
357 FloatArray r(NumPhases - 1), k(NumPhases), mu(NumPhases);
358 FloatArray Q11(NumPhases - 1), Q21(NumPhases - 1), F(NumPhases), G(NumPhases);
359 FloatMatrix J(2, 2), Jinv(2, 2),
N(2, 2), Nhelp(2, 2), Q(2, 2);
361 double lambda_0 = 0.735;
364 if ( NumPhases < 3 ) {
365 OOFEM_ERROR(
"Number of considered phases must be at least 3 (including hom. medium)");
368 F(NumPhases - 1) = lambda_0 / 3.;
372 for ( i = 0; i < NumPhases - 1; i++ ) {
373 temp1 += PhaseMatrix1(i, 0);
374 r(i) = 1. *
cbrt(temp1);
378 for ( i = 0; i < NumPhases; i++ ) {
379 ENuToKMu( PhaseMatrix1(i, 1), PhaseMatrix1(i, 2), k(i), mu(i) );
388 for ( phi = 0; phi <= NumPhases - 2; phi++ ) {
390 fillJ(J, r(phi), mu, k, phi + 1);
393 fillJ(J, r(phi), mu, k, phi);
395 N.beProductOf(Jinv, J);
406 for ( phi = 1; phi <= NumPhases - 1; phi++ ) {
407 F(phi) = F(NumPhases - 1) * Q11(phi - 1) / Q11(NumPhases - 2);
408 G(phi) = F(NumPhases - 1) * Q21(phi - 1) / Q11(NumPhases - 2);
423 k_hmg = ( 3. * k(NumPhases - 2) * pow(r(NumPhases - 2), 3.) * Q11(NumPhases - 3) - 4. * mu(NumPhases - 2) * Q21(NumPhases - 3) ) / ( 3. * ( pow(r(NumPhases - 2), 3.) * Q11(NumPhases - 3) + Q21(NumPhases - 3) ) );
428 FloatArray B(NumPhases), C(NumPhases), D(NumPhases), A(NumPhases);
430 FloatMatrix L(4, 4), Linv(4, 4), M(4, 4), Mhelp(4, 4), Z(4, 4), M_test(4, 4);
431 std :: vector< FloatMatrix > P_arr(NumPhases);
434 double a, b, c, nu_n,
sqr = 0.;
438 A(NumPhases - 1) =
gamma;
442 Mhelp.beUnitMatrix();
445 for ( phi = 0; phi < NumPhases - 1; phi++ ) {
447 fillL(L, r(phi), mu, k, phi + 1);
451 fillL(L, r(phi), mu, k, phi);
453 M.beProductOf(Linv, L);
497 P_arr [ phi ].resize(4, 4);
498 P_arr [ phi ].beProductOf(M, Mhelp);
499 Mhelp = P_arr [ phi ];
506 P_v(0) = P_arr [ NumPhases - 2 ](1, 1);
507 P_v(1) = -P_arr [ NumPhases - 2 ](1, 0);
508 P_v(2) = P_v(3) = 0.;
510 for ( phi = 1; phi <= NumPhases - 1; phi++ ) {
512 Phelp.
times( A(NumPhases - 1) / sqrt(2.) / ( P_arr [ NumPhases - 2 ](0, 0) * P_arr [ NumPhases - 2 ](1, 1) - P_arr [ NumPhases - 2 ](0, 1) * P_arr [ NumPhases - 2 ](1, 0) ) );
522 for ( phi = 0; phi <= NumPhases - 2; phi++ ) {
524 fillL(L, r(phi), mu, k, phi);
529 P_v.beProductOf(L, Phelp);
532 fillL(L, r(phi), mu, k, phi + 1);
533 Phelp(0) = A(phi + 1);
534 Phelp(1) = B(phi + 1);
535 Phelp(2) = C(phi + 1);
536 Phelp(3) = D(phi + 1);
537 P_v.beProductOf(L, Phelp);
542 for ( i = 0; i <= 3; i++ ) {
543 for ( j = 0; j <= 3; j++ ) {
544 Z(i, j) = P_arr [ NumPhases - 3 ](i, 0) * P_arr [ NumPhases - 3 ](j, 1) - P_arr [ NumPhases - 3 ](j, 0) * P_arr [ NumPhases - 3 ](i, 1);
549 nu_n = ( 3. * k(NumPhases - 2) - 2. * mu(NumPhases - 2) ) / ( 6. * k(NumPhases - 2) + 2. * mu(NumPhases - 2) );
551 a = 4. * pow(r(NumPhases - 2), 10.) * ( 1. - 2. * nu_n ) * ( 7. - 10. * nu_n ) * Z(0, 1) +
552 20. * pow(r(NumPhases - 2), 7.) * ( 7. - 12. * nu_n + 8. * nu_n * nu_n ) * Z(3, 1) +
553 12. * pow(r(NumPhases - 2), 5.) * ( 1. - 2. * nu_n ) * ( Z(0, 3) - 7. * Z(1, 2) ) +
554 20. * pow(r(NumPhases - 2), 3.) * ( 1. - 2. * nu_n ) * ( 1. - 2. * nu_n ) * Z(0, 2) +
555 16. * ( 4. - 5. * nu_n ) * ( 1. - 2. * nu_n ) * Z(3, 2);
557 b = 3. * pow(r(NumPhases - 2), 10.) * ( 1. - 2. * nu_n ) * ( 15. * nu_n - 7. ) * Z(0, 1) +
558 60. * pow(r(NumPhases - 2), 7.) * ( nu_n - 3. ) * nu_n * Z(3, 1) -
559 24. * pow(r(NumPhases - 2), 5.) * ( 1. - 2. * nu_n ) * ( Z(0, 3) - 7. * Z(1, 2) ) -
560 40. * pow(r(NumPhases - 2), 3.) * ( 1. - 2. * nu_n ) * ( 1. - 2. * nu_n ) * Z(0, 2) -
561 8. * ( 1. - 5. * nu_n ) * ( 1. - 2. * nu_n ) * Z(3, 2);
563 c = -pow(r(NumPhases - 2), 10.) * ( 1. - 2. * nu_n ) * ( 7. + 5 * nu_n ) * Z(0, 1) +
564 10. * pow(r(NumPhases - 2), 7.) * ( 7. - nu_n * nu_n ) * Z(3, 1) +
565 12. * pow(r(NumPhases - 2), 5.) * ( 1. - 2. * nu_n ) * ( Z(0, 3) - 7. * Z(1, 2) ) +
566 20. * pow(r(NumPhases - 2), 3.) * ( 1. - 2. * nu_n ) * ( 1. - 2. * nu_n ) * Z(0, 2) -
567 8. * ( 7. - 5. * nu_n ) * ( 1. - 2. * nu_n ) * Z(3, 2);
570 sqr = b * b - 4. * a * c;
572 OOFEM_ERROR(
"Shear modulus does not yield a real number");
575 if ( ( -b - pow(sqr, 0.5) ) >= 0 ) {
576 OOFEM_WARNING(
"Two solutions for the shear modulus were found, continuing with the higher value");
580 mu_hmg = mu(NumPhases - 2) * ( -b + pow(sqr, 0.5) ) / ( 2. * a );
592 double k_Voigt, mu_Voigt, k_Reuss, mu_Reuss;
599 k_hmg = ( 1. - chi ) * k_Reuss + chi * k_Voigt;
600 mu_hmg = ( 1. - chi ) * mu_Reuss + chi * mu_Voigt;
607 double f_i, E_i, f_m, E_m;
615 f_i = PhaseMatrix(0, 0);
616 E_i = PhaseMatrix(0, 1);
617 f_m = PhaseMatrix(1, 0);
618 E_m = PhaseMatrix(1, 1);
620 E_hmg = E_i * ( ( f_i * E_i + ( 1 + f_m ) * E_m ) / ( ( 1. + f_m ) * E_i + f_i * E_m ) );
628 double E_i, f_m, E_m, nu_m;
635 E_i = PhaseMatrix(0, 1);
636 f_m = PhaseMatrix(1, 0);
637 E_m = PhaseMatrix(1, 1);
638 nu_m = PhaseMatrix(1, 2);
640 E_hmg = 1. / ( ( 1. - sqrt(f_m) ) / E_i + 1. / ( E_i * ( ( 1. - sqrt(f_m) ) / sqrt(f_m) ) + E_m ) );
650 double k_KT, mu_KT, nom, denom;
651 double f_i, E_i, nu_i, k_i, mu_i, f_m, E_m, nu_m, mu_m, k_m;
658 f_i = PhaseMatrix(0, 0);
659 E_i = PhaseMatrix(0, 1);
660 nu_i = PhaseMatrix(0, 2);
662 f_m = PhaseMatrix(1, 0);
663 E_m = PhaseMatrix(1, 1);
664 nu_m = PhaseMatrix(1, 2);
667 nom = 1 + ( 4 * mu_m * ( k_i - k_m ) / ( ( 3 * k_i * +4 * mu_m ) * k_m ) ) * f_i;
668 denom = 1 - ( 3 * ( k_i - k_m ) / ( 3 * k_i + 4 * mu_m ) ) * f_i;
669 k_KT = k_m * nom / denom;
671 nom = ( 6 * k_m + 12 * mu_m ) * mu_i + ( 9 * k_m + 8 * mu_m ) * ( f_m * mu_m + f_i * mu_i );
672 denom = ( 9 * k_m + 8 * mu_m ) * mu_m + ( 6 * k_m + 12 * mu_m ) * ( f_m * mu_i + f_i * mu_m );
673 mu_KT = mu_m * nom / denom;
693 mu = E / ( 2. * ( 1. + nu ) );
694 k = E / ( 3. * ( 1. - 2. * nu ) );
699 E = 9. * k * mu / ( 3. * k + mu );
700 nu = ( 3. * k - 2. * mu ) / ( 6. * k + 2 * mu );
705 return mu / 6. * ( 9. * k + 8. * mu ) / ( k + 2. * mu );
715 for ( r = 0; r < NumPhases; r++ ) {
716 gamma += SortedPhaseMatrix(r, 0) / ( SortedPhaseMatrix(r, 2) +
zeta );
729 for ( r = 0; r < NumPhases; r++ ) {
730 volTot += PhaseMatrix(r, 0);
733 if ( volTot < 0.99 || volTot > 1.01 ) {
734 OOFEM_ERROR(
"Volumetric fraction of phases 0-%d is %f, which not the unity\n", NumPhases, volTot);
742 J(0, 1) = 1. / ( pow(r, 2.) );
743 J(1, 0) = 3 * k(phase);
744 J(1, 1) = -4. * mu(phase) / ( pow(r, 3.) );
750 double mu_l = mu(phase);
751 double k_l = k(phase);
752 double nu_l = ( 3. * k_l - 2. * mu_l ) / ( 6. * k_l + 2. * mu_l );
755 L(0, 1) = -6. *nu_l *pow(r, 3.) / ( 1. - 2. * nu_l );
756 L(0, 2) = 3. / pow(r, 4.);
757 L(0, 3) = ( 5. - 4. * nu_l ) / ( ( 1. - 2. * nu_l ) * pow(r, 2.) );
760 L(1, 1) = -( 7. - 4. * nu_l ) * pow(r, 3.) / ( 1. - 2. * nu_l );
761 L(1, 2) = -2. / pow(r, 4.);
762 L(1, 3) = 2. / pow(r, 2.);
765 L(2, 1) = 3. *nu_l *mu_l *pow(r, 2.) / ( 1. - 2. * nu_l );
766 L(2, 2) = -12. * mu_l / pow(r, 5.);
767 L(2, 3) = 2. * ( nu_l - 5. ) * mu_l / ( ( 1. - 2. * nu_l ) * pow(r, 3.) );
770 L(3, 1) = -( 7. + 2 * nu_l ) * mu_l * pow(r, 2.) / ( 1. - 2. * nu_l );
771 L(3, 2) = 8. * mu_l / pow(r, 5.);
772 L(3, 3) = 2. * ( 1 + nu_l ) * mu_l / ( ( 1. - 2. * nu_l ) * pow(r, 3.) );
int giveNumberOfColumns() const
Returns number of columns of receiver.
void hirsch(FloatMatrix &PhaseMatrix, double chi)
Hirsch's scheme combining Voigt and Reuss bounds.
void kusterToksoz(FloatMatrix &PhaseMatrix)
Kuster-Toksoz model for two phases.
void checkVolFraction(FloatMatrix &PhaseMatrix)
Check that the total volumetric fraction is the unity.
void ENuToKMu(const double E, const double nu, double &k, double &mu)
Convert Young's modulus and Poisson's ratio to bulk and shear moduli, isotropic material.
double gamma(FloatMatrix &SortedPhaseMatrix, double zeta)
Auxiliary function.
void fillL(FloatMatrix &L, double r, const FloatArray &mu, const FloatArray &k, int phase)
Auxiliary function for Herve-Zaoui scheme.
void counto(FloatMatrix &PhaseMatrix)
Counto's model for a prismatic inclusion in a prismatic matrix, two phases.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
double mu_hmg_2
Upper shear modulus if applicable.
double k_hmg_2
Upper bound of bulk modulus if applicable.
Class representing vector of real numbers.
void selfConsistent(FloatMatrix &PhaseMatrix)
Self-consistent homogenization method of Hill and Budiansky for spherical isotropic inclusions...
void hansen(FloatMatrix &PhaseMatrix)
Hansen's model for a spherical inclusion in a spherical matrix, for Poisson's ratio 0...
Implementation of matrix containing floating point numbers.
double nu_hmg
Effective Poisson's ratio.
double E_hmg
Effective Young's modulus or the lower bound.
double cbrt(double x)
Returns the cubic root of x.
void reuss(FloatMatrix &PhaseMatrix)
Serial scheme of Reuss for any number of isotropic phases.
void moriTanaka(FloatMatrix &PhaseMatrix, int refRow)
Mori-Tanaka homogenization method for spherical isotropic inclusions.
double nu_hmg_2
Effective Poisson's ratio or the lower bound.
void zero()
Zeroes all coefficients of receiver.
void times(double s)
Multiplies receiver with scalar.
void hashinShtrikmanWalpole(FloatMatrix &PhaseMatrix)
Hashin-Shtrikman-Walpole lower and upper bounds for arbitrary number of isotropic phases...
void printYourself(int out=0)
Print homogenized output.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
void fillJ(FloatMatrix &J, double r, const FloatArray &mu, const FloatArray &k, int phase)
Auxiliary function for Herve-Zaoui scheme.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void kMuToENu(const double k, const double mu, double &E, double &nu)
Convert bulk and shear moduli to Young's modulus and Poisson's ratio, isotropic material.
int giveNumberOfRows() const
Returns number of rows of receiver.
void voigt(FloatMatrix &PhaseMatrix)
Parallel scheme of Voigt for any number of isotropic phases.
double k_hmg
Effective bulk modulus or the lower bound.
#define OOFEM_WARNING(...)
void herveZaoui(FloatMatrix &PhaseMatrix)
Herve and Zaoui's homogenization scheme for n-spherical isotropic domains and arbitrary number of iso...
double zeta(double k, double mu)
Auxiliary function for Hashin-Shtrikman bounds.
double E_hmg_2
Upper bound of Young's modulus if applicable.
double mu_hmg
Effective shear modulus or the lower bound.