50 #define __I( component ) eSInt[component] 63 this->
MULT = 1. / ( 8. *
PI * ( 1. -
nu ) );
80 const double pertDispTens[18],
81 const double unifStrain[6])
84 displacement[0] = pertDispTens[0] * unifStrain[0] + pertDispTens[1] * unifStrain[1] +
85 pertDispTens[2] * unifStrain[2] + pertDispTens[3] * unifStrain[3] + pertDispTens[4] * unifStrain[4] +
86 pertDispTens[5] * unifStrain[5];
88 displacement[1] = pertDispTens[6] * unifStrain[0] + pertDispTens[7] * unifStrain[1] +
89 pertDispTens[8] * unifStrain[2] + pertDispTens[9] * unifStrain[3] + pertDispTens[10] * unifStrain[4] +
90 pertDispTens[11] * unifStrain[5];
92 displacement[2] = pertDispTens[12] * unifStrain[0] + pertDispTens[13] * unifStrain[1] +
93 pertDispTens[14] * unifStrain[2] + pertDispTens[15] * unifStrain[3] + pertDispTens[16] * unifStrain[4] +
94 pertDispTens[17] * unifStrain[5];
108 const double unifStrain[6])
111 strain[0] = pertTens[0] * unifStrain[0] + pertTens[1] * unifStrain[1] + pertTens[2] * unifStrain[2] +
112 pertTens[3] * unifStrain[3] + pertTens[4] * unifStrain[4] + pertTens[5] * unifStrain[5];
114 strain[1] = pertTens[6] * unifStrain[0] + pertTens[7] * unifStrain[1] + pertTens[8] * unifStrain[2] +
115 pertTens[9] * unifStrain[3] + pertTens[10] * unifStrain[4] + pertTens[11] * unifStrain[5];
117 strain[2] = pertTens[12] * unifStrain[0] + pertTens[13] * unifStrain[1] + pertTens[14] * unifStrain[2] +
118 pertTens[15] * unifStrain[3] + pertTens[16] * unifStrain[4] + pertTens[17] * unifStrain[5];
121 strain[3] = pertTens[18] * unifStrain[0] + pertTens[19] * unifStrain[1] + pertTens[20] * unifStrain[2] +
122 pertTens[21] * unifStrain[3] + pertTens[22] * unifStrain[4] + pertTens[23] * unifStrain[5];
124 strain[4] = pertTens[24] * unifStrain[0] + pertTens[25] * unifStrain[1] + pertTens[26] * unifStrain[2] +
125 pertTens[27] * unifStrain[3] + pertTens[28] * unifStrain[4] + pertTens[29] * unifStrain[5];
127 strain[5] = pertTens[30] * unifStrain[0] + pertTens[31] * unifStrain[1] + pertTens[32] * unifStrain[2] +
128 pertTens[33] * unifStrain[3] + pertTens[34] * unifStrain[4] + pertTens[35] * unifStrain[5];
163 bool disp,
bool strn)
183 for (
int i=0; i<nlc; i++) {
196 for (
int i=0; i<nlc; i++) {
211 double loc_coords[3];
217 for (
int i=0; i<nlc; i++) {
247 const double eSInt[13],
double nu,
250 double a1 = sort_a[0], a2 = sort_a[1], a3 = sort_a[2];
318 const double sort_a[3],
const double eInt[13])
450 std::cout <<
"Vypis slozek tenzoru S. (giveSijkl())" << std::endl;
451 for (
int i = 0; i < 36; i++)
452 std::cout <<
"S[" << i <<
"] = " << S[i] << std::endl;
453 std::cout << std::endl;
476 if( S == NULL )
_errorr(
"Field for Eshelby tensor must be allocated" );
477 if( sort_a == NULL )
_errorr(
"Field for sorted semiaxes must be allocated" );
478 if( stiffMat == NULL )
_errorr(
"Field for stiffness matrix of the matrix must be allocated" );
481 double xiBar[3], zeta[3], K[3][3], N[3][3];
483 double STen[3][3][3][3] = {};
484 double G[3][3][3][3] = {};
486 double mltIdx[6][6] = {};
489 double *x1 =
new double[N_partition];
490 double *w1 =
new double[N_partition];
493 double *x2 =
new double[M_partition];
494 double *w2 =
new double[M_partition];
498 epsilon[0][1][2] = epsilon[1][2][0] = epsilon[2][0][1] = 1.;
499 epsilon[0][2][1] = epsilon[2][1][0] = epsilon[1][0][2] = -1;
502 idx[0][0] = 0; idx[0][1] = 3; idx[0][2] = 5;
503 idx[1][0] = 3; idx[1][1] = 1; idx[1][2] = 4;
504 idx[2][0] = 5; idx[2][1] = 4; idx[2][2] = 2;
507 mltIdx[0][0] = 1.; mltIdx[0][1] = 1.; mltIdx[0][2] = 1.; mltIdx[0][3] = .5; mltIdx[0][4] = .5; mltIdx[0][5] = .5;
508 mltIdx[1][0] = 1.; mltIdx[1][1] = 1.; mltIdx[1][2] = 1.; mltIdx[1][3] = .5; mltIdx[1][4] = .5; mltIdx[1][5] = .5;
509 mltIdx[2][0] = 1.; mltIdx[2][1] = 1.; mltIdx[2][2] = 1.; mltIdx[2][3] = .5; mltIdx[2][4] = .5; mltIdx[2][5] = .5;
510 mltIdx[3][0] = 1.; mltIdx[3][1] = 1.; mltIdx[3][2] = 1.; mltIdx[3][3] = .5; mltIdx[3][4] = .5; mltIdx[3][5] = .5;
511 mltIdx[4][0] = 1.; mltIdx[4][1] = 1.; mltIdx[4][2] = 1.; mltIdx[4][3] = .5; mltIdx[4][4] = .5; mltIdx[4][5] = .5;
512 mltIdx[5][0] = 1.; mltIdx[5][1] = 1.; mltIdx[5][2] = 1.; mltIdx[5][3] = .5; mltIdx[5][4] = .5; mltIdx[5][5] = .5;
516 for (
int p = 0; p < M_partition; p++) {
517 for (
int q = 0; q < N_partition; q++) {
518 zeta[0] = sqrt(1.0 - x2[p] * x2[p]) * cos(x1[q]);
519 zeta[1] = sqrt(1.0 - x2[p] * x2[p]) * sin(x1[q]);
522 xiBar[0] = zeta[0] / sort_a[0];
523 xiBar[1] = zeta[1] / sort_a[1];
524 xiBar[2] = zeta[2] / sort_a[2];
526 for (
int i = 0; i < 3; i++)
527 for (
int k = 0; k < 3; k++) {
529 for (
int j = 0; j < 3; j++) {
530 for (
int l = 0; l < 3; l++) {
533 dum += mltIdx[ii][jj]*stiffMat[ii*6+jj] * xiBar[j] * xiBar[l];
540 for (
int i = 0; i < 3; i++)
541 for (
int j = 0; j < 3; j++) {
543 for (
int k = 0; k < 3; k++) {
544 D += epsilon[i][j][k] * K[i][0] * K[j][1] * K[k][2];
545 for (
int l = 0; l < 3; l++) {
546 for (
int m = 0; m < 3; m++) {
547 for (
int n = 0; n < 3; n++) {
548 dum += 0.5 * epsilon[i][k][l] * epsilon[j][m][n] * K[k][m] * K[l][n];
557 for (
int i = 0; i < 3; i++)
558 for (
int j = 0; j < 3; j++)
559 for (
int k = 0; k < 3; k++)
560 for (
int l = 0; l < 3; l++) {
561 G[i][j][k][l] = xiBar[k] * xiBar[l] * N[i][j] / D;
566 for (
int i = 0; i < 3; i++)
567 for (
int j = 0; j < 3; j++) {
568 N[i][j] = K[i][j] = 0.0;
570 for (
int k = 0; k < 3; k++)
571 for (
int l = 0; l < 3; l++)
572 for (
int m = 0; m < 3; m++)
573 for (
int n = 0; n < 3; n++) {
576 STen[i][j][k][l] += 1.0 / (8.0 *
PI) * mltIdx[ii][jj]*stiffMat[ii*6+jj] * (G[i][m][j][n] + G[j][m][i][n]) * w1[q] * w2[p];
583 S[0] = STen[0][0][0][0];
584 S[1] = STen[0][0][1][1];
585 S[2] = STen[0][0][2][2];
586 S[3] = (STen[0][0][0][1] + STen[0][0][1][0]);
587 S[4] = (STen[0][0][1][2] + STen[0][0][2][1]);
588 S[5] = (STen[0][0][0][2] + STen[0][0][2][0]);
590 S[6] = STen[1][1][0][0];
591 S[7] = STen[1][1][1][1];
592 S[8] = STen[1][1][2][2];
593 S[9] = (STen[1][1][0][1] + STen[1][1][1][0]);
594 S[10] = (STen[1][1][1][2] + STen[1][1][2][1]);
595 S[11] = (STen[1][1][0][2] + STen[1][1][2][0]);
597 S[12] = STen[2][2][0][0];
598 S[13] = STen[2][2][1][1];
599 S[14] = STen[2][2][2][2];
600 S[15] = (STen[2][2][0][1] + STen[2][2][1][0]);
601 S[16] = (STen[2][2][1][2] + STen[2][2][2][1]);
602 S[17] = (STen[2][2][0][2] + STen[2][2][2][0]);
604 S[18] = STen[1][2][0][0];
605 S[19] = STen[1][2][1][1];
606 S[20] = STen[1][2][2][2];
607 S[21] = (STen[0][1][0][1] + STen[0][1][1][0]);
608 S[22] = (STen[0][1][1][2] + STen[0][1][2][1]);
609 S[23] = (STen[0][1][0][2] + STen[0][1][2][0]);
611 S[24] = STen[0][2][0][0];
612 S[25] = STen[0][2][1][1];
613 S[26] = STen[0][2][2][2];
614 S[27] = (STen[1][2][0][1] + STen[1][2][1][0]);
615 S[28] = (STen[1][2][1][2] + STen[1][2][2][1]);
616 S[29] = (STen[1][2][0][2] + STen[1][2][2][0]);
618 S[30] = STen[0][1][0][0];
619 S[31] = STen[0][1][1][1];
620 S[32] = STen[0][1][2][2];
621 S[33] = (STen[0][2][0][1] + STen[0][2][1][0]);
622 S[34] = (STen[0][2][1][2] + STen[0][2][2][1]);
623 S[35] = (STen[0][2][0][2] + STen[0][2][2][0]);
649 const double dJij[27],
const double ddJi[27],
const double ddJij[81],
650 const double sort_a[3],
const double x[3])
882 const int length = 36;
888 for (
int i=0; i < length; i++)
889 err += (S2[i] - S1[i]) * (S2[i] - S1[i]);
891 std::cout <<
"Vypis slozek tenzoru S. (ve funkci giveDijkl())" << std::endl;
892 for (
int i = 0; i < 12; i++)
893 std::cout <<
"S[" << i <<
"] = " << S[i] << std::endl;
894 std::cout << std::endl;
895 std::cout <<
"Vypis slozek tenzoru D. (giveDijkl())" << std::endl;
896 for (
int i = 0; i < 36; i++)
897 std::cout <<
"D[" << i <<
"] = " << D[i] << std::endl;
898 std::cout << std::endl;
939 const double dJij[27],
const double sort_a[3],
const double x[3])
941 double xx1 =
SQR(
X1 );
942 double xx2 =
SQR(
X2 );
943 double xx3 =
SQR(
X3 );
944 double x1x2 =
X1 *
X2;
945 double x2x3 = X2 *
X3;
946 double x1x3 =
X1 *
X3;
Class eshelbySoluUniformField.
Class polynomialRootSolution collects functions calculating the roots of polynomial functions...
double D[36]
Perturbation tensor of a point (strains/stresses).
double loc_x[3]
Local coordinates of a point.
virtual void giveDerivativesOfEllipticIntegrals(Point *point, bool intpoint)=0
Function gives the values of Ferers-Dyson's elliptic integral derivatives of the inclusion this->I...
const Problem * P
problem description
double ** displacement
Calculated value - global displacement field.
double x[3]
Global coordinates of a point.
void CopyVector(const double *src, double *dest, long n)
Function copy given number of components from vector, 'a' to vector 'b'.
double L[18]
Perturbation tensor of a point (displacements).
void giveInverseMatrix6x6to12(double *answer, const double *m)
Function computes inverse of the eshelby-like 3x3 matrix 'm' saved in reduced 6x6to12 form...
double S[12]
Eshelby tensor of internal points.
Class eshelbySoluEllipticIntegrals.
The header file of usefull macros.
Collection of the functions of basic manipulations, some of them can be used instead of their counter...
void rotateStrain_L2G(const double *loc, double *glob) const
Function rotate local strain to global.
double ddJij[81]
Second derivatives of elliptic integral Iij.
static void GauLegF(double *x, double *w, const int nPoints, const double minLim, const double maxLim)
double ** locEigStrain_LC
predchazejici arrays slouzi vsude v balancingu pro vypocet v danem lc, tyto pole schovavaji vysledky ...
Single Point data structure - contribution from Single inclusion.
double ** strain
Calculated value - global strain fields.
eshelbySoluEllipticIntegrals * ellInt
double eInt[13]
elliptic potentials of an internal point (position independent)
static double giveLambda(const double a[3], const double x[3], InclusionGeometry shape)
Class inclusion contains and handles all inclusion data.
double locEigStrain[6]
actual local eigenstrain used during 'self_balance' algorithm
void rotateDisplc_L2G(const double *loc, double *glob) const
double dJi[9]
First derivatives of elliptic integral Ii.
double * a
Inclusion semiaxes' dimensions in global arrangement.
double ddJi[27]
Second derivatives of elliptic integral Ii.
double la
Lambda parameter of a point (this is not the Lame lambda !!!).
double dJij[27]
First derivatives of elliptic integral Iij.
virtual void giveEllipticIntegrals(double integrArray[13], double lambda, bool intpoint)=0
Function gives the values of Ferers-Dyson's elliptic integrals of the inclusion this->I.
InclusionGeometry shape
inclusion shape
double eInt[13]
Elliptic potentials of a point.
void transformCoords_G2L(const double *glob, double *loc) const
Function transforms (shift according to origin and rotate) global coordinates to local.
MatrixRecord * matrix
matrix record