diff --git a/src/constitutive/TACSBladeStiffenedShellConstitutive.h b/src/constitutive/TACSBladeStiffenedShellConstitutive.h index 43f00702..b9503e14 100644 --- a/src/constitutive/TACSBladeStiffenedShellConstitutive.h +++ b/src/constitutive/TACSBladeStiffenedShellConstitutive.h @@ -1397,8 +1397,8 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { std::function evalLocalPanelBucklingStrainSens; std::function evalGlobalPanelBucklingStrainSens; std::function evalStiffenerCripplingStrainSens; - std::function addLocalPanelBucklingDVSens; - std::function addGlobalPanelBucklingDVSens; + std::function addLocalPanelBucklingDVSens; + std::function addGlobalPanelBucklingDVSens; std::function addStiffenerCripplingDVSens; static const char* const constName; ///< Constitutive model name diff --git a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp index e2653df3..5ea989e3 100644 --- a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp +++ b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp @@ -210,10 +210,7 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalGlobalPanelBuckling(const TacsScalar N12CritGlobal = computeCriticalGlobalShearLoad( D11Global, D22p, b, rho0Global, xiGlobal, gamma, zetaPanel - ); - - printf("N1CritGLobal = %.8e\n", N1CritGlobal); - printf("N12CritGlobal = %.8e\n", N12CritGlobal); + ); // compute the combined loading buckling failure index return this->bucklingEnvelope(-panelStress[0], N1CritGlobal, @@ -1439,7 +1436,7 @@ TACSGPBladeStiffenedShellConstitutive::computeStiffenerStiffnessRatioSens( // backpropagate to intermediate quantities As, Is, zs, zn TacsScalar AsSens = IstotSens * (zn - zs) * (zn - zs); TacsScalar IsSens = IstotSens; - TacsScalar zsSens = IstotSens * As * 2.0 * (zs - zn); + TacsScalar zsSens = -1.0 * IstotSens * As * 2.0 * (zs - zn); *znSens += IstotSens * As * 2.0 * (zn - zs); // backpropgate from intermediate quantities to DVs or material, etc. diff --git a/tacs/constitutive.pyx b/tacs/constitutive.pyx index 50247e79..f1f54893 100644 --- a/tacs/constitutive.pyx +++ b/tacs/constitutive.pyx @@ -1433,6 +1433,7 @@ cdef class GPBladeStiffenedShellConstitutive(ShellConstitutive): int stiffenerThickNum = -1, np.ndarray[int, ndim=1, mode='c'] stiffenerPlyFracNums = None, int panelWidthNum = -1, + bool CPTstiffenerCrippling = False, PanelGPs panelGPs = None, ): @@ -1489,6 +1490,7 @@ cdef class GPBladeStiffenedShellConstitutive(ShellConstitutive): panelWidth, panelWidthNum, flangeFraction, + CPTstiffenerCrippling, panel_gp_ptr, ) # copy pointers to all superclasses diff --git a/tacs/cpp_headers/constitutive.pxd b/tacs/cpp_headers/constitutive.pxd index f879ed76..4f6caf9f 100644 --- a/tacs/cpp_headers/constitutive.pxd +++ b/tacs/cpp_headers/constitutive.pxd @@ -252,6 +252,7 @@ cdef extern from "TACSGPBladeStiffenedShellConstitutive.h": TacsScalar, # panelWidth int, # panelWidthNum TacsScalar, # flangeFraction, + bool, # CPTstiffenerCrippling TACSPanelGPs*, # panelGPs object container ) TacsScalar nondimCriticalGlobalAxialLoad(TacsScalar rho_0, TacsScalar xi, TacsScalar gamma, TacsScalar zeta) diff --git a/tests/constitutive_tests/test_gp_blade_shell_constitutive.py b/tests/constitutive_tests/test_gp_blade_shell_constitutive.py index 5f6f24d6..a32b39b8 100644 --- a/tests/constitutive_tests/test_gp_blade_shell_constitutive.py +++ b/tests/constitutive_tests/test_gp_blade_shell_constitutive.py @@ -205,7 +205,7 @@ def get_con(self, ply): self.stiffenerThicknessNum, self.stiffenerPlyFracNums, self.panelWidthNum, - self.panelGPs, + panelGPs=self.panelGPs, ) # Set the KS weight really low so that all failure modes make a # significant contribution to the failure function derivatives