Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding element offsets to shell and beam elements #250

Merged
merged 35 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
83cb64f
Adding thickness offset option to iso shell constitutive
timryanb Aug 3, 2023
3d86864
Adding thickness offset option to composite shell constitutive
timryanb Aug 3, 2023
08ee3e7
Fixing problem in generateBDFCard
timryanb Aug 3, 2023
af2360e
Fixing problem in generateBDFCard
timryanb Aug 3, 2023
05a243a
Adding thickness offset to smeared composite class
timryanb Aug 4, 2023
007832f
Adding thickness offset to smeared rectangular beam class
timryanb Aug 21, 2023
5ada47c
Fixing broken test
timryanb Aug 21, 2023
496ccd2
test debug
timryanb Aug 21, 2023
97d4409
reducing real tolerance for failing test
timryanb Aug 21, 2023
d03daa2
Merge branch 'master' into elem_offset
timryanb Sep 2, 2023
816c65f
Adding offset terms to shell inertia
timryanb Sep 8, 2023
fd59199
clang format
timryanb Sep 8, 2023
eaf7f00
Initialization bug fix
timryanb Sep 11, 2023
c43586f
Minor comment edit
timryanb Sep 11, 2023
c6c0d53
Adding offset terms to beam inertia
timryanb Sep 15, 2023
d0f783e
Adding beam offset integration test
timryanb Sep 15, 2023
ae4c845
Moving beam transform to separate header file
timryanb Sep 18, 2023
ae3b2c9
Updating test docstring
timryanb Sep 18, 2023
426d911
Adding plate offset integration test
timryanb Sep 18, 2023
f650b3e
Adding additional docstrings to offset parameters
timryanb Sep 18, 2023
0a382a9
Updating include statement in cython file to reflect new beam transfe…
timryanb Sep 18, 2023
72a28d7
Minor comment edit
timryanb Sep 18, 2023
20f2ebd
Fixing index in smeared composite mass moment
timryanb Sep 19, 2023
fb95403
Fixing bugs in offset routine for smeared composite
timryanb Sep 19, 2023
438a848
Fixing bugs in dv sens for shell moment of inertia
timryanb Sep 19, 2023
b569fdc
Adding more offset tests
timryanb Sep 19, 2023
42cbf69
clang format
timryanb Sep 19, 2023
49bce25
Fixing sign issue on shell moment term
timryanb Sep 19, 2023
c88b959
Fixing sign issue on beam mass moment terms
timryanb Sep 20, 2023
cb89dc7
clang format
timryanb Sep 20, 2023
e86f970
switching from cte to alpha kwargs
timryanb Sep 21, 2023
044fdcb
Adding missing quadrature weight to beam inertial force
timryanb Sep 21, 2023
9e6376a
clang format
timryanb Sep 21, 2023
e10c4a8
Adding mass moment to centrifugal force
timryanb Sep 22, 2023
a65eb28
Adding centrifugal offset test to shell integration test
timryanb Sep 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/constitutive/TACSBasicBeamConstitutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ TACSBasicBeamConstitutive::TACSBasicBeamConstitutive(
C[0] = E * A;
C[6] = G * J;
C[11] = E * Iz;
C[12] = E * Iyz;
C[12] = -E * Iyz;
C[15] = E * Iy;
C[18] = ky * G * A;
C[20] = kz * G * A;
Expand All @@ -131,9 +131,9 @@ TACSBasicBeamConstitutive::TACSBasicBeamConstitutive(
rho[0] = density * A;
rho[1] = 0.0;
rho[2] = 0.0;
rho[3] = density * Iy;
rho[4] = density * Iz;
rho[5] = density * Iyz;
rho[3] = density * Iz;
rho[4] = density * Iy;
rho[5] = -density * Iyz;
}

TACSBasicBeamConstitutive::~TACSBasicBeamConstitutive() {
Expand Down
20 changes: 14 additions & 6 deletions src/constitutive/TACSCompositeShellConstitutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const char *TACSCompositeShellConstitutive::constName =
TACSCompositeShellConstitutive::TACSCompositeShellConstitutive(
int _num_plies, TACSOrthotropicPly **_ply_props,
const TacsScalar *_ply_thickness, const TacsScalar *_ply_angles,
TacsScalar _kcorr) {
TacsScalar _kcorr, TacsScalar _tOffset) {
num_plies = _num_plies;
ply_thickness = new TacsScalar[num_plies];
ply_angles = new TacsScalar[num_plies];
Expand All @@ -42,6 +42,7 @@ TACSCompositeShellConstitutive::TACSCompositeShellConstitutive(
}

kcorr = _kcorr;
tOffset = _tOffset;
}

TACSCompositeShellConstitutive::~TACSCompositeShellConstitutive() {
Expand Down Expand Up @@ -83,7 +84,7 @@ void TACSCompositeShellConstitutive::evalMassMoments(int elemIndex,
}

// Compute the contribution to the mass moment from each layer
TacsScalar t0 = -0.5 * t;
TacsScalar t0 = -(0.5 + tOffset) * t;
for (int i = 0; i < num_plies; i++) {
TacsScalar rho_ply = ply_props[i]->getDensity();
TacsScalar t1 = t0 + ply_thickness[i];
Expand Down Expand Up @@ -131,7 +132,7 @@ void TACSCompositeShellConstitutive::evalStress(int elemIndex,
}

// Compute the contribution to the stiffness from each layer
TacsScalar t0 = -0.5 * t;
TacsScalar t0 = -(0.5 + tOffset) * t;
for (int k = 0; k < num_plies; k++) {
TacsScalar Qbar[6], Abar[3];
ply_props[k]->calculateQbar(ply_angles[k], Qbar);
Expand Down Expand Up @@ -174,7 +175,7 @@ TacsScalar TACSCompositeShellConstitutive::evalFailure(
for (int i = 0; i < num_plies; i++) {
t += ply_thickness[i];
}
TacsScalar t0 = -0.5 * t;
TacsScalar t0 = -(0.5 + tOffset) * t;

// Keep track of the maximum failure criterion
TacsScalar max = 0.0;
Expand Down Expand Up @@ -207,7 +208,7 @@ TacsScalar TACSCompositeShellConstitutive::evalFailureStrainSens(
for (int i = 0; i < num_plies; i++) {
t += ply_thickness[i];
}
TacsScalar t0 = -0.5 * t;
TacsScalar t0 = -(0.5 + tOffset) * t;

// Keep track of the maximum failure criterion
TacsScalar max = 0.0;
Expand Down Expand Up @@ -270,7 +271,7 @@ void TACSCompositeShellConstitutive::evalTangentStiffness(int elemIndex,
}

// Compute the contribution to the stiffness from each layer
TacsScalar t0 = -0.5 * t;
TacsScalar t0 = -(0.5 + tOffset) * t;
for (int k = 0; k < num_plies; k++) {
TacsScalar Qbar[6], Abar[3];
ply_props[k]->calculateQbar(ply_angles[k], Qbar);
Expand Down Expand Up @@ -353,3 +354,10 @@ void TACSCompositeShellConstitutive::getPlyAngles(TacsScalar *_ply_angles) {
_ply_angles[i] = ply_angles[i];
}
}

/*
Get thickness offset
*/
TacsScalar TACSCompositeShellConstitutive::getThicknessOffset() {
return tOffset;
}
6 changes: 4 additions & 2 deletions src/constitutive/TACSCompositeShellConstitutive.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class TACSCompositeShellConstitutive : public TACSShellConstitutive {
TACSOrthotropicPly **_ply_props,
const TacsScalar *_ply_thickness,
const TacsScalar *_ply_angles,
TacsScalar _kcorr = 5.0 / 6.0);
TacsScalar _kcorr = 5.0 / 6.0,
TacsScalar _tOffset = 0.0);
~TACSCompositeShellConstitutive();

// Evaluate the material density
Expand Down Expand Up @@ -78,13 +79,14 @@ class TACSCompositeShellConstitutive : public TACSShellConstitutive {
// Get ply angles and thicknesses
void getPlyThicknesses(TacsScalar *_ply_thickness);
void getPlyAngles(TacsScalar *_ply_angles);
TacsScalar getThicknessOffset();

private:
// Store information about the design variable
int num_plies;
TACSOrthotropicPly **ply_props;
TacsScalar *ply_thickness, *ply_angles;
TacsScalar kcorr;
TacsScalar kcorr, tOffset;

// The object name
static const char *constName;
Expand Down
Loading