65 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
69 double c = cos(rot *
M_PI / 180.);
70 double s = sin(rot *
M_PI / 180.);
73 c *c *strain.
at(1) - c * s * strain.
at(6) + s * s * strain.
at(2),
74 c *c *strain.
at(2) + c * s * strain.
at(6) + s * s * strain.
at(1),
76 c *strain.
at(4) + s * strain.
at(5),
77 c *strain.
at(5) - s * strain.
at(4),
78 ( c * c - s * s ) * strain.
at(6) + 2 * c * s * ( strain.
at(1) - strain.
at(2) ),
81 auto rotStress =
static_cast< StructuralMaterial *
>( layerMat )->giveRealStressVector_3d(rotStrain, gp, tStep);
84 c *c *rotStress.at(1) + 2 * c * s * rotStress.at(6) + s * s * rotStress.at(2),
85 c *c *rotStress.at(2) - 2 * c * s * rotStress.at(6) + s * s * rotStress.at(1),
87 c *rotStress.at(4) - s * rotStress.at(5),
88 c *rotStress.at(5) + s * rotStress.at(4),
89 ( c * c - s * s ) * rotStress.at(6) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
92 return static_cast< StructuralMaterial *
>( layerMat )->giveRealStressVector_3d(strain, gp, tStep);
95 OOFEM_ERROR(
"Only cubes and wedges are meaningful for layered cross-sections");
103 IntArray strainControl = { 1, 2, 4, 5, 6 };
111 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
114 double c = cos(rot *
M_PI / 180.);
115 double s = sin(rot *
M_PI / 180.);
118 c *c *strain.
at(1) - c * s * strain.
at(6) + s * s * strain.
at(2),
119 c *c *strain.
at(2) + c * s * strain.
at(6) + s * s * strain.
at(1),
121 c *strain.
at(4) + s * strain.
at(5),
122 c *strain.
at(5) - s * strain.
at(4),
123 ( c * c - s * s ) * strain.
at(6) + 2 * c * s * ( strain.
at(1) - strain.
at(2) ),
126 auto rotStress = mat->giveRealStressVector_ShellStressControl(rotStrain, strainControl, gp, tStep);
129 c *c *rotStress.at(1) + 2 * c * s * rotStress.at(6) + s * s * rotStress.at(2),
130 c *c *rotStress.at(2) - 2 * c * s * rotStress.at(6) + s * s * rotStress.at(1),
132 c *rotStress.at(4) - s * rotStress.at(5),
133 c *rotStress.at(5) + s * rotStress.at(4),
134 ( c * c - s * s ) * rotStress.at(6) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
137 return mat->giveRealStressVector_ShellStressControl(strain, strainControl, gp, tStep);
140 OOFEM_ERROR(
"Only _3dDegShell mode is meaningful for layered shells");
165 double totThick = 0.0;
173 auto lgpw = layerGp->giveWeight();
177 totThick += layerThick * lgpw;
182 interface->computeStrainVectorInLayer(layerStrain, strain, masterGp, layerGp, tStep);
183 auto reducedLayerStress =
dynamic_cast< StructuralMaterial *
>( layerMat )->giveRealStressVector_PlaneStress(layerStrain, layerGp, tStep);
184 answer.
at(1) += reducedLayerStress.at(1) * layerThick * lgpw;
185 answer.
at(2) += reducedLayerStress.at(2) * layerThick * lgpw;
186 answer.
at(3) += reducedLayerStress.at(3) * layerThick * lgpw;
189 answer *= ( 1. / totThick );
192 status->letTempStressVectorBe(answer);
216 OOFEM_ERROR(
"Only cubes and wedges are meaningful for layered cross-sections");
222 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
224 auto tangent =
static_cast< StructuralMaterial *
>( layerMat )->give3dMaterialStiffnessMatrix(rMode, gp, tStep);
228 double c = cos(rot *
M_PI / 180.);
229 double s = sin(rot *
M_PI / 180.);
232 c *c, s *s, 0., 0., 0., -c * s,
233 s *s, c *c, 0., 0., 0., c *s,
234 0., 0., 1., 0., 0., 0.,
235 0., 0., 0., c, s, 0.,
236 0., 0., 0., -s, c, 0.,
237 2 * c * s, -2 * c * s, 0., 0., 0., c *c - s * s,
240 return unrotate(tangent, rotTangent);
251 double totThick = 0.;
258 auto sgpw = slaveGP->giveWeight();
260 totThick += layerThick * sgpw;
261 auto subAnswer =
dynamic_cast< StructuralMaterial *
>( layerMat )->givePlaneStressStiffMtrx(rMode, slaveGP, tStep);
262 answer += layerThick * sgpw * subAnswer;
266 return answer * ( 1. / totThick );
296 if ( interface ==
nullptr ) {
297 OOFEM_ERROR(
"element with no layer support encountered");
305 auto lgpw = layerGp->giveWeight();
310 double layerZeta = layerGp->giveNaturalCoordinate(3);
311 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
314 interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
320 reducedLayerStress = layerMat->giveRealStressVector_2dBeamLayer(layerStrain, layerGp, tStep);
323 answer.
at(1) += reducedLayerStress.
at(1) * layerWidth * layerThick * lgpw;
324 answer.
at(2) += reducedLayerStress.
at(1) * layerWidth * layerThick * lgpw * layerZCoord;
335 status->letTempStressVectorBe(answer);
359 if ( interface ==
nullptr ) {
360 OOFEM_ERROR(
"element with no layer support encountered");
368 auto lgpw = layerGp->giveWeight();
373 double layerZeta = layerGp->giveNaturalCoordinate(3);
374 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
377 interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
382 double c = cos(rot *
M_PI / 180.);
383 double s = sin(rot *
M_PI / 180.);
386 c *c *layerStrain.
at(1) - c * s * layerStrain.
at(5) + s * s * layerStrain.
at(2),
387 c *c *layerStrain.
at(2) + c * s * layerStrain.
at(5) + s * s * layerStrain.
at(1),
388 c *layerStrain.
at(3) + s * layerStrain.
at(4),
389 c *layerStrain.
at(4) - s * layerStrain.
at(3),
390 ( c * c - s * s ) * layerStrain.
at(5) + c * s * ( layerStrain.
at(1) - layerStrain.
at(2) ),
393 auto rotStress = layerMat->giveRealStressVector_PlateLayer(rotStrain, layerGp, tStep);
395 reducedLayerStress = {
396 c *c *rotStress.at(1) + 2 * c * s * rotStress.at(5) + s * s * rotStress.at(2),
397 c *c *rotStress.at(2) - 2 * c * s * rotStress.at(5) + s * s * rotStress.at(1),
398 c *rotStress.at(3) - s * rotStress.at(4),
399 c *rotStress.at(4) + s * rotStress.at(3),
400 ( c * c - s * s ) * rotStress.at(5) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
403 reducedLayerStress = layerMat->giveRealStressVector_PlateLayer(layerStrain, layerGp, tStep);
406 answer.
at(1) += reducedLayerStress.
at(1) * layerWidth * layerThick * lgpw * layerZCoord;
407 answer.
at(2) += reducedLayerStress.
at(2) * layerWidth * layerThick * lgpw * layerZCoord;
408 answer.
at(3) += reducedLayerStress.
at(5) * layerWidth * layerThick * lgpw * layerZCoord;
409 answer.
at(4) += reducedLayerStress.
at(4) * layerWidth * layerThick * lgpw * ( 5. / 6. );
410 answer.
at(5) += reducedLayerStress.
at(3) * layerWidth * layerThick * lgpw * ( 5. / 6. );
421 status->letTempStressVectorBe(answer);
437 if ( interface ==
nullptr ) {
438 OOFEM_ERROR(
"element with no layer support encountered");
446 auto lgpw = layerGp->giveWeight();
451 double layerZeta = layerGp->giveNaturalCoordinate(3);
452 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
455 interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
460 double c = cos(rot *
M_PI / 180.);
461 double s = sin(rot *
M_PI / 180.);
464 c *c *layerStrain.
at(1) - c * s * layerStrain.
at(5) + s * s * layerStrain.
at(2),
465 c *c *layerStrain.
at(2) + c * s * layerStrain.
at(5) + s * s * layerStrain.
at(1),
466 c *layerStrain.
at(3) + s * layerStrain.
at(4),
467 c *layerStrain.
at(4) - s * layerStrain.
at(3),
468 ( c * c - s * s ) * layerStrain.
at(5) + c * s * ( layerStrain.
at(1) - layerStrain.
at(2) ),
471 auto rotStress = layerMat->giveRealStressVector_PlateLayer(rotStrain, layerGp, tStep);
473 reducedLayerStress = {
474 c *c *rotStress.at(1) + 2 * c * s * rotStress.at(5) + s * s * rotStress.at(2),
475 c *c *rotStress.at(2) - 2 * c * s * rotStress.at(5) + s * s * rotStress.at(1),
476 c *rotStress.at(3) - s * rotStress.at(4),
477 c *rotStress.at(4) + s * rotStress.at(3),
478 ( c * c - s * s ) * rotStress.at(5) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
481 reducedLayerStress = layerMat->giveRealStressVector_PlateLayer(layerStrain, layerGp, tStep);
485 answer.
at(1) += reducedLayerStress.
at(1) * layerWidth * layerThick * lgpw;
486 answer.
at(2) += reducedLayerStress.
at(2) * layerWidth * layerThick * lgpw;
487 answer.
at(3) += reducedLayerStress.
at(5) * layerWidth * layerThick * lgpw;
489 answer.
at(4) += reducedLayerStress.
at(1) * layerWidth * layerThick * layerZCoord * lgpw;
490 answer.
at(5) += reducedLayerStress.
at(2) * layerWidth * layerThick * layerZCoord * lgpw;
491 answer.
at(6) += reducedLayerStress.
at(5) * layerWidth * layerThick * layerZCoord * lgpw;
493 answer.
at(7) += reducedLayerStress.
at(4) * layerWidth * layerThick * lgpw * ( 5. / 6. );
494 answer.
at(8) += reducedLayerStress.
at(3) * layerWidth * layerThick * lgpw * ( 5. / 6. );
506 status->letTempStressVectorBe(answer);
516 for (
int i = 1; i <= 8; i++ ) {
517 rstrain.
at(i) = strain.
at(i);
520 for (
int i = 1; i <= 8; i++ ) {
521 answer.
at(i) = ra.
at(i);
532 status->letTempStressVectorBe(answer);
552 double totThick = 0.0;
560 auto lgpw = layerGp->giveWeight();
564 totThick += layerThick * lgpw;
569 interface->computeStrainVectorInLayer(layerStrain, strain, masterGp, layerGp, tStep);
572 auto reducedLayerStress =
dynamic_cast< StructuralMaterial *
>( layerMat )->giveRealStressVector_PlaneStress(layerStrainMembrane, layerGp, tStep);
573 answer.
at(1) += reducedLayerStress.at(1) * layerThick * lgpw;
574 answer.
at(2) += reducedLayerStress.at(2) * layerThick * lgpw;
575 answer.
at(3) += reducedLayerStress.at(3) * layerThick * lgpw;
581 answer.
at(4) = strain.
at(4) * de.at(4, 4) * totThick;
582 answer *= ( 1. / totThick );
586 status->letTempStressVectorBe(answer);
594 OOFEM_ERROR(
"Not supported in given cross-section (yet).");
599 MatResponseMode rMode,
607 if ( mode == _2dBeam ) {
609 }
else if ( mode == _3dBeam ) {
611 }
else if ( mode == _2dPlate ) {
613 }
else if ( mode == _3dShell ) {
619 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
622 mat->giveStiffnessMatrix(answer, rMode, gp, tStep);
651 auto lgpw = layerGp->giveWeight();
658 double c = cos(rot *
M_PI / 180.);
659 double s = sin(rot *
M_PI / 180.);
662 c *c, s *s, 0., 0., -c * s,
663 s *s, c *c, 0., 0., c *s,
666 2 * c * s, -2 * c * s, 0., 0., c *c - s * s,
668 layerMatrix =
unrotate(layerMatrix, rotTangent);
676 double layerZeta = layerGp->giveNaturalCoordinate(3);
677 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
678 double layerZCoord2 = layerZCoord * layerZCoord;
683 answer.
at(1, 1) += layerMatrix.at(1, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
684 answer.
at(1, 2) += layerMatrix.at(1, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
685 answer.
at(1, 3) += layerMatrix.at(1, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
687 answer.
at(2, 1) += layerMatrix.at(2, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
688 answer.
at(2, 2) += layerMatrix.at(2, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
689 answer.
at(2, 3) += layerMatrix.at(2, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
691 answer.
at(3, 1) += layerMatrix.at(5, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
692 answer.
at(3, 2) += layerMatrix.at(5, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
693 answer.
at(3, 3) += layerMatrix.at(5, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
696 answer.
at(4, 4) += layerMatrix.at(4, 4) * lgpw * layerWidth * layerThick * ( 5. / 6. );
697 answer.
at(4, 5) += layerMatrix.at(4, 3) * lgpw * layerWidth * layerThick * ( 5. / 6. );
698 answer.
at(5, 4) += layerMatrix.at(3, 4) * lgpw * layerWidth * layerThick * ( 5. / 6. );
699 answer.
at(5, 5) += layerMatrix.at(3, 3) * lgpw * layerWidth * layerThick * ( 5. / 6. );
721 double shearcoeff = 5. / 6.;
727 auto lgpw = layerGp->giveWeight();
739 c *c, s *s, 0., 0., -c * s,
740 s *s, c *c, 0., 0., c *s,
743 2 * c * s, -2 * c * s, 0., 0., c *c - s * s,
745 layerMatrix =
unrotate(layerMatrix, rotTangent);
753 double layerZeta = layerGp->giveNaturalCoordinate(3);
754 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
755 double layerZCoord2 = layerZCoord * layerZCoord;
760 answer.
at(1, 1) += layerMatrix.at(1, 1) * lgpw * layerWidth * layerThick;
761 answer.
at(1, 2) += layerMatrix.at(1, 2) * lgpw * layerWidth * layerThick;
762 answer.
at(1, 3) += layerMatrix.at(1, 5) * lgpw * layerWidth * layerThick;
764 answer.
at(2, 1) += layerMatrix.at(2, 1) * lgpw * layerWidth * layerThick;
765 answer.
at(2, 2) += layerMatrix.at(2, 2) * lgpw * layerWidth * layerThick;
766 answer.
at(2, 3) += layerMatrix.at(2, 5) * lgpw * layerWidth * layerThick;
768 answer.
at(3, 1) += layerMatrix.at(5, 1) * lgpw * layerWidth * layerThick;
769 answer.
at(3, 2) += layerMatrix.at(5, 2) * lgpw * layerWidth * layerThick;
770 answer.
at(3, 3) += layerMatrix.at(5, 5) * lgpw * layerWidth * layerThick;
774 answer.
at(4, 4) += layerMatrix.at(1, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
775 answer.
at(4, 5) += layerMatrix.at(1, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
776 answer.
at(4, 6) += layerMatrix.at(1, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
778 answer.
at(5, 4) += layerMatrix.at(2, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
779 answer.
at(5, 5) += layerMatrix.at(2, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
780 answer.
at(5, 6) += layerMatrix.at(2, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
782 answer.
at(6, 4) += layerMatrix.at(5, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
783 answer.
at(6, 5) += layerMatrix.at(5, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
784 answer.
at(6, 6) += layerMatrix.at(5, 5) * lgpw * layerWidth * layerThick * layerZCoord2;
787 answer.
at(7, 7) += layerMatrix.at(4, 4) * lgpw * layerWidth * layerThick * shearcoeff;
788 answer.
at(7, 8) += layerMatrix.at(4, 3) * lgpw * layerWidth * layerThick * shearcoeff;
789 answer.
at(8, 7) += layerMatrix.at(3, 4) * lgpw * layerWidth * layerThick * shearcoeff;
790 answer.
at(8, 8) += layerMatrix.at(3, 3) * lgpw * layerWidth * layerThick * shearcoeff;
812 answer.
assemble(d, { 1, 2, 3, 4, 5, 6, 7, 8 });
825 answer.
at(1, 1) -= answer.at(1, 3) * answer.at(3, 1) / answer.at(3, 3);
826 answer.at(2, 1) -= answer.at(2, 3) * answer.at(3, 1) / answer.at(3, 3);
827 answer.at(1, 2) -= answer.at(1, 3) * answer.at(3, 2) / answer.at(3, 3);
828 answer.at(2, 2) -= answer.at(2, 3) * answer.at(3, 2) / answer.at(3, 3);
830 answer.at(3, 1) = 0.0;
831 answer.at(3, 2) = 0.0;
832 answer.at(3, 3) = 0.0;
833 answer.at(2, 3) = 0.0;
834 answer.at(1, 3) = 0.0;
859 auto lgpw = layerGp->giveWeight();
874 double layerZeta = layerGp->giveNaturalCoordinate(3);
875 double layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
876 double layerZCoord2 = layerZCoord * layerZCoord;
881 answer.
at(1, 1) += layerMatrix.at(1, 1) * lgpw * layerWidth * layerThick;
882 answer.
at(1, 3) += layerMatrix.at(1, 2) * lgpw * layerWidth * layerThick;
884 answer.
at(2, 2) += layerMatrix.at(1, 1) * lgpw * layerWidth * layerThick * layerZCoord2;
885 answer.
at(2, 3) += layerMatrix.at(1, 2) * lgpw * layerWidth * layerThick * layerZCoord2;
887 answer.
at(3, 1) += layerMatrix.at(2, 1) * lgpw * layerWidth * layerThick *
beamShearCoeffxz;
888 answer.
at(3, 3) += layerMatrix.at(2, 2) * lgpw * layerWidth * layerThick *
beamShearCoeffxz;
908 ds.at(4, 4) = 2.0 * de.at(3, 3);
928 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
932 double c = cos(rot *
M_PI / 180.);
933 double s = sin(rot *
M_PI / 180.);
937 c *c, s *s, 0., 0., 0., -c * s, 0., 0., -c * s,
938 s *s, c *c, 0., 0., 0., c *s, 0., 0., c *s,
939 0., 0., 1., 0., 0., 0., 0., 0., 0.,
940 0., 0., 0., c, s, 0., 0., 0., 0.,
941 0., 0., 0., -s, c, 0., 0., 0., 0.,
942 c *s, -c * s, 0., 0., 0., c *c, 0., 0., -s * s,
943 0., 0., 0., 0., 0., 0., c, s, 0.,
944 0., 0., 0., 0., 0., 0., -s, c, 0.,
945 c *s, -c * s, 0., 0., 0., -s * s, 0., 0., -c * c,
948 auto rotvF =
dot(Q, vF);
950 auto rotvP =
static_cast< StructuralMaterial *
>( layerMat )->giveFirstPKStressVector_3d(rotvF, gp, tStep);
952 auto vP =
Tdot(Q, rotvP);
955 return static_cast< StructuralMaterial *
>( layerMat )->giveFirstPKStressVector_3d(vF, gp, tStep);
958 OOFEM_ERROR(
"Only cubes and wedges are meaningful for layered cross-sections");
1025 MatResponseMode rMode,
1036 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1039 mat->giveStiffnessMatrix(answer, rMode, gp, tStep);
1050 OOFEM_ERROR(
"Only cubes and wedges are meaningful for layered cross-sections");
1056 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1058 auto tangent =
static_cast< StructuralMaterial *
>( layerMat )->give3dMaterialStiffnessMatrix_dPdF(rMode, gp, tStep);
1060 if ( this->
layerRots.at(layer) != 0. ) {
1062 double c = cos(rot *
M_PI / 180.);
1063 double s = sin(rot *
M_PI / 180.);
1066 c *c, s *s, 0., 0., 0., -c * s, 0., 0., -c * s,
1067 s *s, c *c, 0., 0., 0., c *s, 0., 0., c *s,
1068 0., 0., 1., 0., 0., 0., 0., 0., 0.,
1069 0., 0., 0., c, s, 0., 0., 0., 0.,
1070 0., 0., 0., -s, c, 0., 0., 0., 0.,
1071 c *s, -c * s, 0., 0., 0., c *c, 0., 0., -s * s,
1072 0., 0., 0., 0., 0., 0., c, s, 0.,
1073 0., 0., 0., 0., 0., 0., -s, c, 0.,
1074 c *s, -c * s, 0., 0., 0., -s * s, 0., 0., -c * c,
1142 int size = gradientStressVector3d->
giveSize();
1149 gradientStressVector3d->
at(3) = 0.;
1152 for (
int i = 2; i <= 5; i++ ) {
1153 gradientStressVector3d->
at(i) = 0.;
1161 return gradientStressVector3d;
1176 if ( gradientStrainVector3d->
giveSize() != 6 ) {
1182 gradientStrainVector3d->
at(3) = 0.;
1185 for (
int i = 2; i <= 5; i++ ) {
1186 gradientStrainVector3d->
at(i) = 0.;
1194 return gradientStrainVector3d;
1323 this->
layerMidZ.at(j) = layerBottomZ + thickness * 0.5;
1324 layerBottomZ += thickness;
1339 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1365 int points1 = ( int ) floor(
cbrt(
double ( npoints ) ) + 0.5);
1378 if ( npoints == 2 ) {
1412 for (
int i = 0; i < ilayer; i++ ) {
1428 auto slave = masterGp->giveSlaveGaussPoint(
giveSlaveGPIndex(ilayer, igp) );
1429 if ( slave ==
nullptr ) {
1438 const auto &masterCoords = masterGp->giveNaturalCoordinates();
1440 auto masterMode = masterGp->giveMaterialMode();
1447 int numberOfSlaves = 0;
1451 masterGp->gaussPoints.resize(numberOfSlaves);
1463 double currentZCoord = currentZTopCoord - this->
layerThicks.at(j + 1) * ( 1 + sgpc(k) ) / 2.0;
1464 if ( masterCoords.giveSize() > 0 ) {
1465 zCoord.
at(1) = masterCoords.at(1);
1468 if ( masterCoords.giveSize() > 1 ) {
1469 zCoord.
at(2) = masterCoords.at(2);
1472 zCoord.
at(3) = ( 2.0 * currentZCoord - top - bottom ) / ( top - bottom );
1475 masterGp->gaussPoints [
giveSlaveGPIndex(j, k) ] =
new GaussPoint(masterGp->giveIntegrationRule(), j + 1, zCoord, sgpw(k) / 2.0, slaveMode);
1499 printf(
"Cross Section with properties: \n");
1501 printf(
"Layer Materials: \n");
1503 printf(
"Thickness of each layer: \n");
1506 printf(
"Width of each layer: \n");
1554 if ( masterMode == _2dPlate ) {
1556 }
else if ( masterMode == _2dBeam ) {
1557 return _2dBeamLayer;
1558 }
else if ( ( masterMode == _PlaneStress ) || ( masterMode == _PlaneStressRot ) ) {
1559 return _PlaneStress;
1560 }
else if ( ( masterMode == _3dShell ) || ( masterMode == _3dShellRot ) ) {
1562 }
else if ( masterMode == _3dDegeneratedShell ) {
1563 return _3dDegeneratedShell;
1564 }
else if ( masterMode == _3dMat ) {
1567 throw std::runtime_error(
"unsupported material mode");
1584 }
else if ( aProperty ==
CS_Area ) {
1600 double dh = 2.0 / noLayers;
1601 lCoords = gp->giveNaturalCoordinates();
1602 double lowXi = -1.0;
1604 for (
int i = 1; i <= noLayers; i++ ) {
1605 if ( lCoords.
at(3) > lowXi && lCoords.
at(3) < lowXi + dh ) {
1610 OOFEM_ERROR(
"LayeredCrossSection :: giveLayer - the actual integration point can not be associated with a layer in the cross section");
1623 }
else if ( aProperty ==
CS_Area ) {
1649 if ( !this->
domain->giveMaterial(this->giveLayerMaterial(i) )->isCharacteristicMtrxSymmetric(rMode) ) {
1664 answer.
resize(numInterfaces);
1666 for (
int i = 1; i <= numInterfaces; i++ ) {
1669 answer.
at(i) = interfaceZ * ( 2.0 / totalThickness );
1681 integrationRulesArray.clear();
1682 integrationRulesArray.reserve(
nLayers);
1683 for (
int i = 0; i <
nLayers; i++ ) {
1685 integrationRulesArray.back()->SetUpPointsOnWedge(numInPlanePoints, numPointsThickness, _3dMat);
1707 double scaleFactor = 0.999;
1711 for (
GaussPoint *gp: * layerIntegrationRulesArray [ layer - 1 ] ) {
1715 double deltaxi = gp->giveNaturalCoordinates().at(3) * this->
giveLayerThickness(layer) / totalThickness;
1716 double xinew = xiMid_i + deltaxi * scaleFactor;
1717 FloatArray lcoords = gp->giveNaturalCoordinates();
1718 lcoords.
at(3) = xinew;
1719 gp->setNaturalCoordinates(lcoords);
1728 int startIndx,
int endIndx,
bool dynamic) :
1740 int nPoints = nPointsTri * nPointsThickness;
1745 FloatArray coords_xi1, coords_xi2, coords_xi, weights_tri, weights_thickness;
1754 if ( nPointsThickness != 1 ) {
1758 for (
int i = 1, ind = 0; i <= nPointsThickness; i++ ) {
1759 for (
int j = 1; j <= nPointsTri; j++ ) {
1762 weights_tri.
at(j) * weights_thickness.
at(i), mode);
1765 if ( i == 1 && nPointsThickness > 1 ) {
1767 }
else if ( i == nPointsThickness && nPointsThickness > 1 ) {
1806 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1808 if ( this->
layerRots.at(layer) != 0. ) {
1812 double c = cos(rot *
M_PI / 180.);
1813 double s = sin(rot *
M_PI / 180.);
1815 int ret = layerMat->
giveIPValue(rotVal, gp, type, tStep);
1823 c *c *rotVal.
at(1) + 2 * c * s * rotVal.
at(6) + s * s * rotVal.
at(2),
1824 c *c *rotVal.
at(2) - 2 * c * s * rotVal.
at(6) + s * s * rotVal.
at(1),
1826 c *rotVal.
at(4) - s * rotVal.
at(5),
1827 c *rotVal.
at(5) + s * rotVal.
at(4),
1828 ( c * c - s * s ) * rotVal.
at(6) - c * s * ( rotVal.
at(1) - rotVal.
at(2) )
1832 c *c *rotVal.
at(1) + c * s * rotVal.
at(6) + s * s * rotVal.
at(2),
1833 c *c *rotVal.
at(2) - c * s * rotVal.
at(6) + s * s * rotVal.
at(1),
1835 c *rotVal.
at(4) - s * rotVal.
at(5),
1836 c *rotVal.
at(5) + s * rotVal.
at(4),
1837 ( c * c - s * s ) * rotVal.
at(6) - 2 * c * s * ( rotVal.
at(1) - rotVal.
at(2) )
1841 c *rotVal.
at(1) - s * rotVal.
at(2), s *rotVal.
at(1) + c * rotVal.
at(2), rotVal.
at(3)
1850 return layerMat->
giveIPValue(answer, gp, type, tStep);
1870 int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1872 return layerMat->
give(aProperty, gp);
1874 double average = 0.;
#define REGISTER_CrossSection(class)
void giveInputRecord(DynamicInputRecord &input) override
Dictionary propertyDictionary
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
virtual void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
void initializeFrom(InputRecord &ir) override
virtual void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Material * giveMaterial(int n)
virtual MaterialMode giveMaterialMode()
virtual integrationDomain giveIntegrationDomain() const
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual const char * giveClassName() const =0
double & at(std::size_t i)
Index giveSize() const
Returns the size of receiver.
double at(std::size_t i, std::size_t j) const
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
static void giveTriCoordsAndWeights(int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &weights)
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
int giveNumber()
Returns number of receiver.
bool hasSlaveGaussPoint()
IntegrationPointStatus * setMaterialStatus(std::unique_ptr< IntegrationPointStatus > ptr, IntegrationPointStatusIDType key=IPSID_Default)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
Element * giveElement()
Returns corresponding element to receiver.
int giveNumberOfIntegrationPoints() const
virtual int SetUpPointsOnCubeLayers(int nPoints1, int nPoints2, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
virtual int SetUpPointsOn3dDegShellLayers(int nPointsXY, int nPointsZ, MaterialMode mode, const FloatArray &layerThickness)
IntegrationRule(int n, Element *e, int startIndx, int endIndx, bool dynamic)
int setUpIntegrationPoints(integrationDomain intdomain, int nPoints, MaterialMode matMode)
virtual int SetUpPointsOnWedgeLayers(int nPointsTri, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
integrationDomain giveIntegrationDomain() const
void printYourself() override
Prints receiver state on stdout. Useful for debugging.
FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *) override
FloatArrayF< 2 > giveRealStress_Warping(const FloatArrayF< 2 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 3, 3 > give2dBeamStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
void giveInputRecord(DynamicInputRecord &input) override
void createMaterialStatus(GaussPoint &iGP) override
FloatArrayF< 9 > giveGeneralizedStress_ShellRot(const FloatArrayF< 9 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatArray layerRots
Rotation of the material in each layer.
FloatMatrixF< 5, 5 > giveStiffnessMatrix_dPdF_PlaneStrain(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 6, 6 > give3dDegeneratedShellStiffMtrx(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const override
void setupLayeredIntegrationRule(std::vector< std::unique_ptr< IntegrationRule > > &layerIntegrationRulesArray, Element *el, int numInPlanePoints)
FloatMatrixF< 3, 3 > give2dPlateSubSoilStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArray layerThicks
Thickness for each layer.
int giveLayer(GaussPoint *gp) const
double giveLayerMidZ(int layer) const
FloatMatrixF< 4, 4 > giveStiffnessMatrix_PlaneStrain(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 5 > giveGeneralizedStress_Plate(const FloatArrayF< 5 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 8 > giveGeneralizedStress_Shell(const FloatArrayF< 8 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
void giveCharMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) override
int giveNumIntegrationPointsInLayer() const
double midSurfaceZcoordFromBottom
FloatArrayF< 3 > giveGeneralizedStress_Beam2d(const FloatArrayF< 3 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
double midSurfaceXiCoordFromBottom
int giveNumberOfLayers() const
double giveLayerThickness(int layer) const
void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override
FloatMatrixF< 4, 4 > giveStiffnessMatrix_dPdF_PlaneStress(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 3, 3 > giveStiffnessMatrix_PlaneStress(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
IntArray layerMaterials
Material of each layer.
FloatMatrixF< 1, 1 > giveStiffnessMatrix_1d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *) override
FloatArrayF< 3 > giveRealStress_PlaneStress(const FloatArrayF< 3 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 4 > giveRealStress_PlaneStrain(const FloatArrayF< 4 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
IntArray layerIntegrationPoints
int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element) override
int checkConsistency() override
FloatArrayF< 4 > giveGeneralizedStress_MembraneRot(const FloatArrayF< 4 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 6 > giveGeneralizedStress_Beam3d(const FloatArrayF< 6 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
IntArray interfacerMaterials
Interface (cohesive zone) material for each interface.
static MaterialMode giveCorrespondingSlaveMaterialMode(MaterialMode mode)
FloatArrayF< 1 > giveFirstPKStress_1d(const FloatArrayF< 1 > &reducedvF, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 4, 4 > giveMembraneRotStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
void mapLayerGpCoordsToShellCoords(std::vector< std::unique_ptr< IntegrationRule > > &layerIntegrationRulesArray)
double computeIntegralThick() const
Returns the total thickness of all layers.
FloatArrayF< 3 > giveGeneralizedStress_PlateSubSoil(const FloatArrayF< 3 > &generalizedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 9, 9 > giveStiffnessMatrix_dPdF_3d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 6, 6 > give3dBeamStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 5, 5 > give2dPlateStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 1 > giveRealStress_1d(const FloatArrayF< 1 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
void initializeFrom(InputRecord &ir) override
double give(CrossSectionProperty a, GaussPoint *gp) const override
int giveSlaveGPIndex(int ilayer, int igp) const
void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override
void giveCharMaterialStiffnessMatrix_dPdF(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
FloatArrayF< 9 > giveFirstPKStress_3d(const FloatArrayF< 9 > &reducedvF, GaussPoint *gp, TimeStep *tStep) const override
void setupLayerMidPlanes()
bool isCharacteristicMtrxSymmetric(MatResponseMode mode) const override
FloatArrayF< 5 > giveFirstPKStress_PlaneStrain(const FloatArrayF< 5 > &reducedvF, GaussPoint *gp, TimeStep *tStep) const override
int numberOfIntegrationPoints
number of integration points per layer (for 3D elements)
int giveLayerMaterial(int layer) const
FloatArrayF< 6 > giveRealStress_3d(const FloatArrayF< 6 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
FloatArray layerWidths
Width for each layer.
void giveInterfaceXiCoords(FloatArray &answer) const
int giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep) override
FloatMatrixF< 6, 6 > giveStiffnessMatrix_3d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 8, 8 > give3dShellStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 9, 9 > give3dShellRotStiffMtrx(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 6 > giveRealStress_3dDegeneratedShell(const FloatArrayF< 6 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const override
Material * giveMaterial(IntegrationPoint *ip) const override
hidden by virtual oofem::Material* TransportCrossSection::giveMaterial() const
GaussPoint * giveSlaveGaussPoint(GaussPoint *gp, int layer, int igp) const
FloatMatrixF< 1, 1 > giveStiffnessMatrix_dPdF_1d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
FloatArrayF< 4 > giveFirstPKStress_PlaneStress(const FloatArrayF< 4 > &reducedvF, GaussPoint *gp, TimeStep *tStep) const override
FloatArray layerMidZ
z-coord of the mid plane for each layer
LayeredIntegrationRule(int n, Element *e, int startIndx, int endIndx, bool dynamic=false)
IntArray upperInterfacePoints
IntArray lowerInterfacePoints
int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode) override
virtual std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const
virtual void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
virtual void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
virtual double give(int aProperty, GaussPoint *gp) const
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
virtual FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
virtual FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
virtual FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 5, 5 > givePlateLayerStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 2, 2 > give2dBeamLayerStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const
#define OOFEM_WARNING(...)
#define _IFT_LayeredCrossSection_midsurf
#define _IFT_LayeredCrossSection_thicks
#define _IFT_LayeredCrossSection_shearcoeff_xz
#define _IFT_LayeredCrossSection_layermaterials
#define _IFT_LayeredCrossSection_nintegrationpoints
#define _IFT_LayeredCrossSection_interfacematerials
#define _IFT_LayeredCrossSection_layerRotations
#define _IFT_LayeredCrossSection_widths
#define _IFT_LayeredCrossSection_nlayerintegrationpoints
#define _IFT_LayeredCrossSection_nlayers
CrossSectionProperty
List of properties possibly stored in a cross section.
@ CS_DrillingType
Type of artificially added drilling stiffness for drilling DOFs.
@ CS_DrillingStiffness
Penalty stiffness for drilling DOFs.
@ CS_BottomZCoord
Bottom z coordinate.
@ CS_RelDrillingStiffness
Relative penalty stiffness for drilling DOFs.
@ CS_NumLayers
Number of layers that makes up the cross section.
@ CS_TopZCoord
Top z coordinate.
double cbrt(double x)
Returns the cubic root of x.
FloatMatrixF< N, P > Tdot(const FloatMatrixF< M, N > &a, const FloatMatrixF< M, P > &b)
Computes .
GaussPoint IntegrationPoint
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
static FloatArray Vec6(const double &a, const double &b, const double &c, const double &d, const double &e, const double &f)
FloatArrayF< N > max(const FloatArrayF< N > &a, const FloatArrayF< N > &b)
InternalStateValueType
Determines the type of internal variable.
@ ISVT_TENSOR_S3E
symmetric 3x3 tensor, packed with off diagonal components multiplied by 2 (engineering strain vector,...
@ ISVT_TENSOR_S3
Symmetric 3x3 tensor.
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< M, M > unrotate(FloatMatrixF< N, N > &a, const FloatMatrixF< M, N > &r)
Computes .
@ LayeredCrossSectionInterfaceType
InternalStateValueType giveInternalStateValueType(InternalStateType type)
static FloatArray Vec3(const double &a, const double &b, const double &c)
#define _IFT_SimpleCrossSection_drillType
Type of artificially added stiffnes for drilling DOFs.
#define _IFT_SimpleCrossSection_relDrillStiffness
Relative penalty term for drilling stiffness.
#define _IFT_SimpleCrossSection_drillStiffness
Penalty term for drilling stiffness.