MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / computeBdrilling

Function computeBdrilling

SRC/element/shell/ASDShellQ4.cpp:422–494  ·  view source on GitHub ↗

computes only the drilling B matrix

Source from the content-addressed store, hash-verified

420
421 // computes only the drilling B matrix
422 void computeBdrilling(
423 const ASDShellQ4LocalCoordinateSystem& LCS,
424 double xi, double eta,
425 const JacobianOperator& Jac,
426 const AGQIParams& agq,
427 const Vector& N,
428 const Matrix& dN,
429 Vector& Bd,
430 bool use_eas
431 )
432 {
433 // cartesian derivatives of standard shape function
434 auto& dNdX = ASDShellQ4Globals::instance().dNdX;
435 dNdX.addMatrixProduct(0.0, dN, Jac.invJ, 1.0);
436
437 // initialize
438 Bd.Zero();
439
440 // AGQI proc ***********************************************************************************************
441
442 if (use_eas) {
443
444 // area coordinates of the gauss point (Eq 7)
445 std::array<double, 4> L;
446 L[0] = 0.25 * (1.0 - xi) * (agq.g[1] * (1.0 - eta) + agq.g[2] * (1.0 + eta));
447 L[1] = 0.25 * (1.0 - eta) * (agq.g[3] * (1.0 - xi) + agq.g[2] * (1.0 + xi));
448 L[2] = 0.25 * (1.0 + xi) * (agq.g[0] * (1.0 - eta) + agq.g[3] * (1.0 + eta));
449 L[3] = 0.25 * (1.0 + eta) * (agq.g[0] * (1.0 - xi) + agq.g[1] * (1.0 + xi));
450
451 // computed modified shape function gradients for the strain matrix for external dofs
452 // using the area coordinate method as written in the reference paper of the AGQI element
453 static constexpr std::array<double, 4> NXI = { -1.0, 1.0, 1.0, -1.0 };
454 static constexpr std::array<double, 4> NETA = { -1.0, -1.0, 1.0, 1.0 };
455 for (int i = 0; i < 4; i++)
456 {
457 int j = i + 1; if (j > 3) j = 0;
458 int k = j + 1; if (k > 3) k = 0;
459 double SX = 0.0;
460 double SY = 0.0;
461 for (int ii = 0; ii < 4; ii++)
462 {
463 int jj = ii + 1; if (jj > 3) jj = 0;
464 int kk = jj + 1; if (kk > 3) kk = 0;
465 int mm = kk + 1; if (mm > 3) mm = 0;
466 SX = SX + agq.b[ii] * NXI[ii] * NETA[ii] * (3.0 * (L[jj] - L[mm]) + (agq.g[jj] - agq.g[kk]));
467 SY = SY + agq.c[ii] * NXI[ii] * NETA[ii] * (3.0 * (L[jj] - L[mm]) + (agq.g[jj] - agq.g[kk]));
468 }
469 dNdX(i, 0) = (agq.b[i] + agq.b[j]) / agq.A / 2.0 +
470 NXI[i] * NETA[i] * agq.g[k] * SX / 2.0 / agq.A / (1.0 + agq.g[0] * agq.g[2] + agq.g[1] * agq.g[3]);
471 dNdX(i, 1) = (agq.c[i] + agq.c[j]) / agq.A / 2.0 +
472 NXI[i] * NETA[i] * agq.g[k] * SY / 2.0 / agq.A / (1.0 + agq.g[0] * agq.g[2] + agq.g[1] * agq.g[3]);
473 }
474 }
475
476 // We use the drilling penalty as defined by hughes and brezzi,
477 // where we link the independent rotation to the skew symmetric part of the in-plane displacement field.
478
479 Bd(0) = -0.5 * dNdX(0, 1);

Callers 1

calculateAllMethod · 0.70

Calls 2

addMatrixProductMethod · 0.45
ZeroMethod · 0.45

Tested by

no test coverage detected