42 #ifndef MUMECH_INCLUSION_H 43 #define MUMECH_INCLUSION_H 135 bool scan_eAngles_RAD (
Stream *stream);
137 bool scan_eAngles_DEG (
Stream *stream);
139 virtual bool scan_locEigStrain_LC (
Stream *stream,
int lc) = 0;
142 virtual void allocate_nlc_fields (
void);
147 virtual void input_data_initialize_and_check_consistency (
void);
149 virtual void initialize (
const Inclusion *prevInclRec) = 0;
151 virtual void SBA_computeInitialStrains (
int lc) = 0;
153 virtual bool point_is_affected (
const double *point)
const = 0;
160 bool point_is_inside (
const double *coords,
double epsilon = 0.0)
const;
163 void transformCoords_G2L (
const double *glob,
double *loc)
const;
165 void transformCoords_L2G (
const double *loc,
double *glob)
const;
168 void rotateStrain_G2L (
const double *glob,
double *loc)
const;
170 void rotateStrain_L2G (
const double *loc,
double *glob)
const;
172 void rotateDisplc_L2G (
const double *loc,
double *glob)
const;
175 void ActingIncls_allocate (
void);
178 int find_overlap (
const Inclusion *incl)
const;
180 bool is_inside_of_BB (
const double *bb1,
const double *bb2)
const;
183 void set_centroids (
double x,
double y);
184 void set_centroids (
double x,
double y,
double z);
188 void set_Semiaxes_dimensions (
double x,
double y);
189 void set_Semiaxes_dimensions (
double x,
double y,
double z);
190 void set_Euller_angles_deg (
double x);
191 void set_Euller_angles_deg (
double x,
double y,
double z);
195 void set_all_2d (
double x,
double y,
double e,
double n,
196 double a1,
double a2,
double e1);
197 void set_all_3d (
double x,
double y,
double z,
double e,
double n,
198 double a1,
double a2,
double a3,
199 double e1,
double e2,
double e3 );
203 double give_volume(
void );
209 void update_approximations(
int lc);
211 void Eps02EpsTau(
double *e_tau,
const double *e_0);
214 void EAdeg2rad (
void);
223 void giveTransformationStrainOperator (
double oper[12],
const double C[12],
const double C1[12],
const double S[12]);
225 void give_EshelbyMatrixFull (
double** answer)
const;
227 void give_EshelbyMatrixReduced (
double* answer)
const;
230 void give_StiffnessMatrixFull (
double* answer)
const;
232 void give_StiffnessMatrixReduced (
double* answer)
const;
235 void give_TeMatrix_G2L (
double* answer)
const;
237 void give_TeMatrix_L2G (
double* answer)
const;
240 const double** give_EshelbyPertDisplc_internal (
int lc,
int nlc,
const double *coords);
242 const double** give_EshelbyPertStrain_internal (
int lc,
int nlc);
244 const double** give_EshelbyPertStress_internal (
int lc,
int nlc);
248 void add_EshelbyPertStrain_internal_SIFCM(
double **strain,
int lc,
int nlc,
double **e_t_SIFCM);
249 void add_EshelbyPertStress_internal_SIFCM(
double **stress,
int lc,
int nlc,
double **e_t_SIFCM,
double **e_s_ext_add);
261 void give_EshelbyPertFields_external (
Point *point,
int lc,
int nlc,
bool disp,
bool strn);
263 double compute_supplement_energy (
int lc);
266 virtual void computeVolume() = 0;
295 double locEigStrain[6];
296 double locEigStrainTot[6];
297 double globEigStrainTotal[6];
309 bool scan_locEigStrain_LC (
Stream *stream,
int lc);
311 bool scan_globEigStrain_LC (
Stream *stream,
int lc);
314 void allocate_nlc_fields (
void);
319 void input_data_initialize_and_check_consistency (
void);
321 void initialize (
const Inclusion *prevInclRec);
323 void SBA_computeInitialStrains (
int lc);
325 bool point_is_affected (
const double *point)
const;
328 void SBA_updateGlobAndLocStrains (
Point *point);
340 void init_EigStrain_LC (
int lc);
344 virtual void computeVolume();
365 if(index==1)
return I1;
366 if(index==2)
return I2;
367 if(index==11)
return I11;
368 if(index==22)
return I22;
369 if(index==12 || index==21)
return I12;
374 lambda = x[0] * x[0] + x[1] * x[1] - a[0] * a[0];
375 I1 = I2 = 2.*
PI*a[0] * a[0] / (a[0] * a[0] + lambda);
376 I11 = I22 = I12 =
PI*a[0] * a[0] / (a[0] * a[0] * a[0] * a[0] + 2.*a[0] * a[0] * lambda + lambda*lambda);
379 double b = a[0] * a[0] + a[1] * a[1] - x[0] * x[0] - x[1] * x[1];
380 double c = a[0] * a[0] * a[1] * a[1] - x[0] * x[0] * a[1] * a[1] - a[0] * a[0] * x[1] * x[1];
381 double Di = b*b - 4 * c;
382 lambda = 0.5*(-b + sqrt(Di));
383 I1 = 4.*
PI*a[0] * a[1] / (a[1] * a[1] - a[0] * a[0])*(pow(a[1] * a[1] + lambda, 0.5) / pow(a[0] * a[0] + lambda, 0.5) - 1.);
384 I2 = 4.*
PI*a[0] * a[1] / (a[0] * a[0] - a[1] * a[1])*(pow(a[0] * a[0] + lambda, 0.5) / pow(a[1] * a[1] + lambda, 0.5) - 1.);
385 I12 = 1.*(I2 - I1) / (a[0] * a[0] - a[1] * a[1]);
386 I11 = 1. / 3. * ((I1 + I2) / (a[0] * a[0] + lambda) - I12);
387 I22 = 1. / 3. * ((I1 + I2) / (a[1] * a[1] + lambda) - I12);
405 double x_last_derivation[2];
437 bool scan_locEigStrain_LC (
Stream *stream,
int lc);
440 void allocate_nlc_fields (
void);
445 void input_data_initialize_and_check_consistency (
void);
447 void initialize (
const Inclusion *prevInclRec);
449 void SBA_computeInitialStrains (
int lc);
451 bool point_is_affected (
const double *point)
const;
455 double S_give(
int index);
459 double derivative_step(
double delitel);
461 void derivative_preparation();
463 double dI(
int index,
int smer1,
int smer2);
467 void compute_S_int();
469 double r(
int i,
int j);
471 double compute_D(
int i,
int j,
int k,
int l);
473 void compute_matrix_D();
477 void compute_strain_pert_from_eps_zero_int(
const double *point,
double *es,
double *ez);
479 void compute_strain_pert_from_eps_zero_ext(
const double *point,
double *es,
double *ez);
481 void compute_from_eps_tau(
const double *point,
vektor &es,
vektor &et);
483 void giveExtStrainPert (
const double *point,
double **strain,
int lc,
int nlc);
485 void compute_initial_eps_tau(
int strainID);
488 void compute_eps_tau(
int strainID,
double *e_tau,
double *e_z_add,
bool add);
490 void update_eps_tau(
int strainID,
const double *e_z_add);
493 void getDisplacement(
const double *point,
double **displacement,
int lc,
int nlc,
int _pointInside);
496 virtual void computeVolume();
507 #endif // end of MUMECH_INCLUSION_H
double * origin
coordinates of the inclusions' centorids
file of various types and symbolic constant definitions
double * T
GLOBAL->LOCAL displacement vector transfrmation matrix; 3x3 or 2x2 for 3d or 2d.
Class InclusionRecord contains and handles all inclusion data.
int pomocne_body_spocitane
const Problem * P
problem description
eshelbySoluUniformField * esuf
Class of function for homogenization of stress fields.
double actionRadius
Action radius of the inclusion.
void set_Inclusion_shape(InclusionGeometry val)
double * SInv
Inverse of Eshelby tensor.
double * C
Isotropic elastic stiffness tensor of an inclusion stored in reduced form (from the total 9/36 matrix...
The header file of usefull macros.
double * eAngles
Euller angles.
double * Te
GLOBAL->LOCAL strain/stress tensor transfrmation matrix; full matrix 6x6 or 3x3 for 3d or 2d...
double ** globPert_displc
u star - Global perturbation displacement. Toto muze byt alokovany v problemu a odtud jen ukazovatko...
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 ** approx_points_eps_tau
double * TInv
LOCAL->GLOBAL displacement vector transfrmation matrix; TInv = T^-1 (inversion) = T^T (transposed) ...
eshelbySoluEllipticIntegrals * ellInt
double ndiff_1
derivative step for the first derivations
double ** globPert_stress
sigma star - Global perturbation stress.
bool any_derivative_preparation_computed
double nu
Poisson's ratio.
double * a
Inclusion semiaxes' dimensions in global arrangement.
double ** Epsilon_Tau
field of epsilon tau, set by SBalgorithm for every load
Class of the functions calculating the values of elliptic integrals and its derivatives.
InclusionGeometry
Inclusion shapes' type.
long id
identification number
double ** globPert_strain
epsilon star - Global perturbation strain.
InclusionGeometry shape
inclusion shape
int noActingIncls
Number of acting inclusions.
double E
Young's modulus.
double * S
Eshelby tensor.
void set_Youngs_modulus(double val)
double * TeInv
LOCAL->GLOBAL strain/stress tensor transfrmation matrix; full matrix 6x6 or 3x3 for 3d or 2d...
double ** globEigStrain_LC
int * actingIncls
Set of inclusions which act to the "this" one.
void set_Poissons_ratio(double val)
double ndiff_2
derivative step for the second derivations
double SQRactionRadius
Action radius of the inclusion ^2.