Skip to content

Commit abcf637

Browse files
committed
added mass matrix to link elements
1 parent 5342e48 commit abcf637

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

src/sm/Elements/LatticeElements/latticelink3d.C

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ namespace oofem {
143143
return;
144144
}
145145

146+
void
147+
LatticeLink3d::computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
148+
// Returns the lumped mass matrix of the receiver. This expression is
149+
// valid in both local and global axes.
150+
{
151+
GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
152+
double density = static_cast < LatticeCrossSection * > ( this->giveCrossSection() )->give('d', gp);
153+
double halfMass = density * computeVolumeAround(gp) / 2.;
154+
answer.resize(12, 12);
155+
answer.zero();
156+
answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = halfMass;
157+
answer.at(7, 7) = answer.at(8, 8) = answer.at(9, 9) = halfMass;
158+
159+
}
146160

147161
void
148162
LatticeLink3d::computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode,
@@ -328,9 +342,14 @@ namespace oofem {
328342
FloatArray normal(3), s(3), t(3);
329343

330344
//Calculate normal vector
345+
if(this->directionVector.computeNorm() < 1e-12) {
346+
OOFEM_ERROR("LatticeLink3d: directionVector is zero. Check input or link setup.");
347+
}
331348
normal = this->directionVector;
332349
normal.normalize();
333350

351+
352+
334353
//Construct two perpendicular axis so that n is normal to the plane which they create
335354
//Check, if one of the components of the normal-direction is zero
336355
if ( normal.at(1) == 0 ) {

src/sm/Elements/LatticeElements/latticelink3d.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ class LatticeLink3d : public LatticeStructuralElement
8989
virtual void giveGPCoordinates(FloatArray &coords);
9090

9191
virtual void computeGeometryProperties();
92+
void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep) override;
93+
void computeMassMatrix(FloatMatrix &answer, TimeStep *tStep) override
94+
{ this->computeLumpedMassMatrix(answer, tStep); }
9295

9396
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord = 0) override;
9497

src/sm/Materials/LatticeMaterials/latticeslip.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ namespace oofem {
117117
//evaluate tempKappa (no elastic strain in axial direction)
118118
double tempKappa = status->giveKappa() + fabs(totalStrain.at(1) - oldStrain.at(1) );
119119

120-
120+
double deltaSlip = totalStrain.at(1) - oldStrain.at(1);
121121

122122
/*First component is the slip one for which the stress should be limited using plasiticity (frictional slip between fibre and matrix). The other components are kept elastic. */
123123
FloatArrayF < 6 > stress;
@@ -129,7 +129,7 @@ namespace oofem {
129129

130130
if ( f > 0 ) {//plastic response.
131131
//Reduced stress by increasing plastic strain.
132-
stress.at(1) = sgn(stress.at(1) ) * bondStress;
132+
stress.at(1) = sgn(stress.at(1)) * bondStress;
133133
status->setTempCrackFlag(1);
134134
}
135135

0 commit comments

Comments
 (0)