From d71c8ee8f8c28f973da33dbbb9172d683e22957a Mon Sep 17 00:00:00 2001 From: Sean Engelstad Date: Tue, 8 Oct 2024 15:53:05 -0400 Subject: [PATCH] working functors --- .../mlb_plate_compare_highAR.py | 61 +++++++++---------- .../TACSBladeStiffenedShellConstitutive.cpp | 51 +++++++++++++--- .../TACSBladeStiffenedShellConstitutive.h | 30 ++++++--- .../TACSGPBladeStiffenedShellConstitutive.cpp | 57 +++++++++++++---- .../TACSGPBladeStiffenedShellConstitutive.h | 18 +++--- 5 files changed, 146 insertions(+), 71 deletions(-) diff --git a/examples/gp_stiffened_plate/mlb_plate_compare_highAR.py b/examples/gp_stiffened_plate/mlb_plate_compare_highAR.py index 23a2935be..2701b94c4 100644 --- a/examples/gp_stiffened_plate/mlb_plate_compare_highAR.py +++ b/examples/gp_stiffened_plate/mlb_plate_compare_highAR.py @@ -92,16 +92,16 @@ class uses T stiffeners. # Overall plate dimensions -width = 0.422 -length = 1.0 +width = 1.0 +length = 6.25773 # Material properties (UD tape properties from textbook case) rho = 1609.0 E1 = 138e9 -E2 = 9.177e9 -nu12 = 0.326 -G12 = 4.957e9 -G13 = 4.957e9 +E2 = 138e9 +nu12 = 0.3 +G12 = E1 / 2.0 / (1+nu12) +G13 = E1 / 2.0 / (1+nu12) Xt = 2068e6 Xc = 1723e6 Yt = 96.5e6 @@ -112,7 +112,7 @@ class uses T stiffeners. panelLength = length panelWidth = width -stiffenerPitch = 0.111 +stiffenerPitch = 0.5 stiffenerPitchMin = 0.1 stiffenerPitchMax = 0.7 @@ -120,21 +120,21 @@ class uses T stiffeners. panelThicknessMin = 0.6e-3 panelThicknessMax = 0.1 -stiffenerHeight = 27.4e-3 -stiffenerHeightMin = 25e-3 +stiffenerHeight = 76.633e-3 +stiffenerHeightMin = 10e-3 stiffenerHeightMax = 0.15 -stiffenerThickness = 5.49e-3 +stiffenerThickness = 3.8316e-3 stiffenerThicknessMin = 0.6e-3 stiffenerThicknessMax = 0.1 # Ply angles/initial ply fractions -ply_angles = np.deg2rad([0.0, 45.0]) -skin_ply_fractions = np.array([0.7, 0.3]) -stiffener_ply_fractions = np.array([0.7, 0.3]) +ply_angles = np.deg2rad([0.0]) +skin_ply_fractions = np.array([1.0]) +stiffener_ply_fractions = np.array([1.0]) # Shear and compressive traction loads -Ny = 30209 # N/m +Ny = 121167 # N/m Nxy = 0.0 # N/m @@ -177,11 +177,10 @@ def element_callback( skin_ply_fraction_dv_nums = np.array( [ currentDVNum, - currentDVNum + 1, ], dtype=np.intc, ) - currentDVNum += 2 + currentDVNum += 1 stiffenerHeightNum = currentDVNum currentDVNum = currentDVNum + 1 @@ -194,11 +193,10 @@ def element_callback( stiffener_ply_fraction_dv_nums = np.array( [ currentDVNum, - currentDVNum + 1, ], dtype=np.intc, ) - currentDVNum += 2 + currentDVNum += 1 else: skin_ply_fraction_dv_nums = -np.ones(len(ply_angles), dtype=np.intc) stiffener_ply_fraction_dv_nums = -np.ones( @@ -231,17 +229,17 @@ def element_callback( panelWidthNum=panelWidthNum, flangeFraction=0.0, ) - # con.setStiffenerPitchBounds(stiffenerPitchMin, stiffenerPitchMax) - # con.setPanelThicknessBounds(panelThicknessMin, panelThicknessMax) - # con.setStiffenerThicknessBounds( - # stiffenerThicknessMin, stiffenerThicknessMax - # ) - # con.setPanelPlyFractionBounds( - # np.array([1.0]), np.array([1.0]) - # ) - # con.setStiffenerPlyFractionBounds( - # np.array([1.0]), np.array([1.0]) - # ) + con.setStiffenerPitchBounds(stiffenerPitchMin, stiffenerPitchMax) + con.setPanelThicknessBounds(panelThicknessMin, panelThicknessMax) + con.setStiffenerThicknessBounds( + stiffenerThicknessMin, stiffenerThicknessMax + ) + con.setPanelPlyFractionBounds( + np.array([0.0]), np.array([1.0]) + ) + con.setStiffenerPlyFractionBounds( + np.array([0.0]), np.array([1.0]) + ) # We need to enforce that stiffenerHeight <= stiffenerPitch, if we are not # using a stiffener pitch DV we can simply enforce this as an upper bound @@ -278,10 +276,10 @@ def element_callback( DVScales.append(stiffPitchScale) DVScales.append(panelThicknessScale) if args.usePlyFracDV: - DVScales += [1.0] * 4 + DVScales += [1.0] * 1 DVScales += [stiffenerHeightScale, stiffenerThicknessScale] if args.usePlyFracDV: - DVScales += [1.0] * 4 + DVScales += [1.0] * 1 return elem, DVScales @@ -583,6 +581,7 @@ def configure(self): prob.setup(mode="rev") prob.run_model() +print("done", flush=True) exit() # Output N2 representation of OpenMDAO model diff --git a/src/constitutive/TACSBladeStiffenedShellConstitutive.cpp b/src/constitutive/TACSBladeStiffenedShellConstitutive.cpp index 556f06327..699611695 100644 --- a/src/constitutive/TACSBladeStiffenedShellConstitutive.cpp +++ b/src/constitutive/TACSBladeStiffenedShellConstitutive.cpp @@ -215,6 +215,39 @@ TACSBladeStiffenedShellConstitutive::TACSBladeStiffenedShellConstitutive( // Arrays for storing ply failure sensitivities this->panelPlyFailSens = new TacsScalar[2 * this->numPanelPlies]; this->stiffenerPlyFailSens = new TacsScalar[2 * this->numStiffenerPlies]; + + // initialize the functions using the base class + // these function pointers are overwritten in the derived class for GP/ML buckling + evalLocalPanelBuckling = [this](const TacsScalar e[]) { + return this->_evalLocalPanelBuckling(e); + }; + evalGlobalPanelBuckling = [this](const TacsScalar e[]) { + return this->_evalGlobalPanelBuckling(e); + }; + evalStiffenerCrippling = [this](const TacsScalar stiffenerStrain[]) { + return this->_evalStiffenerCrippling(stiffenerStrain); + }; + evalLocalPanelBucklingStrainSens = [this](const TacsScalar e[], TacsScalar localBucklingSens[]) { + return this->_evalLocalPanelBucklingStrainSens(e, localBucklingSens); + }; + evalGlobalPanelBucklingStrainSens = [this](const TacsScalar e[], TacsScalar globalBucklingSens[]) { + return this->_evalGlobalPanelBucklingStrainSens(e, globalBucklingSens); + }; + evalStiffenerCripplingStrainSens = [this](const TacsScalar stiffenerStrain[], TacsScalar stiffenerStrainSens[]) { + return this->_evalStiffenerCripplingStrainSens(stiffenerStrain, stiffenerStrainSens); + }; + addLocalPanelBucklingDVSens = [this](int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], + const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { + return this->_addLocalPanelBucklingDVSens(elemIndex, scale, pt, X, strain, dvLen, dfdx); + }; + addGlobalPanelBucklingDVSens = [this](int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], + const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { + return this->_addGlobalPanelBucklingDVSens(elemIndex, scale, pt, X, strain, dvLen, dfdx); + }; + addStiffenerCripplingDVSens = [this](const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]) { + return this->_addStiffenerCripplingDVSens(scale, stiffenerStrain, dfdx); + }; + } // ============================================================================== @@ -2031,7 +2064,7 @@ void TACSBladeStiffenedShellConstitutive::computeStiffenerMOISens( // Buckling functions // ============================================================================== -TacsScalar TACSBladeStiffenedShellConstitutive::evalGlobalPanelBuckling( +TacsScalar TACSBladeStiffenedShellConstitutive::_evalGlobalPanelBuckling( const TacsScalar e[]) { TacsScalar stress[TACSShellConstitutive::NUM_STRESSES]; TacsScalar D1, D2, D3; @@ -2102,7 +2135,7 @@ void TACSBladeStiffenedShellConstitutive:: } TacsScalar -TACSBladeStiffenedShellConstitutive::evalGlobalPanelBucklingStrainSens( +TACSBladeStiffenedShellConstitutive::_evalGlobalPanelBucklingStrainSens( const TacsScalar e[], TacsScalar sens[]) { TacsScalar stiffness[NUM_TANGENT_STIFFNESS_ENTRIES], stress[NUM_STRESSES]; this->computeStiffness(stiffness); @@ -2131,7 +2164,7 @@ TACSBladeStiffenedShellConstitutive::evalGlobalPanelBucklingStrainSens( return strengthRatio; } -void TACSBladeStiffenedShellConstitutive::addGlobalPanelBucklingDVSens( +void TACSBladeStiffenedShellConstitutive::_addGlobalPanelBucklingDVSens( int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { TacsScalar stress[NUM_STRESSES]; @@ -2675,7 +2708,7 @@ void TACSBladeStiffenedShellConstitutive::testGlobalBucklingStiffnessSens() { delete[] DVPert; } -TacsScalar TACSBladeStiffenedShellConstitutive::evalLocalPanelBuckling( +TacsScalar TACSBladeStiffenedShellConstitutive::_evalLocalPanelBuckling( const TacsScalar e[]) { // Compute panel stiffness matrix and loads TacsScalar panelStiffness[NUM_TANGENT_STIFFNESS_ENTRIES], @@ -2722,7 +2755,7 @@ TacsScalar TACSBladeStiffenedShellConstitutive::computeCriticalShearLoad( } TacsScalar -TACSBladeStiffenedShellConstitutive::evalLocalPanelBucklingStrainSens( +TACSBladeStiffenedShellConstitutive::_evalLocalPanelBucklingStrainSens( const TacsScalar e[], TacsScalar sens[]) { // Compute panel stiffness matrix and loads TacsScalar panelStiffness[NUM_TANGENT_STIFFNESS_ENTRIES], @@ -2757,7 +2790,7 @@ TACSBladeStiffenedShellConstitutive::evalLocalPanelBucklingStrainSens( return strengthRatio; } -void TACSBladeStiffenedShellConstitutive::addLocalPanelBucklingDVSens( +void TACSBladeStiffenedShellConstitutive::_addLocalPanelBucklingDVSens( int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { // Compute panel stiffness matrix and loads @@ -3316,7 +3349,7 @@ void TACSBladeStiffenedShellConstitutive::computeStiffenerCripplingValues( } } -TacsScalar TACSBladeStiffenedShellConstitutive::evalStiffenerCrippling( +TacsScalar TACSBladeStiffenedShellConstitutive::_evalStiffenerCrippling( const TacsScalar stiffenerStrain[]) { const int numPlies = this->numStiffenerPlies; this->computeStiffenerCripplingValues(stiffenerStrain, @@ -3328,7 +3361,7 @@ TacsScalar TACSBladeStiffenedShellConstitutive::evalStiffenerCrippling( } TacsScalar -TACSBladeStiffenedShellConstitutive::evalStiffenerCripplingStrainSens( +TACSBladeStiffenedShellConstitutive::_evalStiffenerCripplingStrainSens( const TacsScalar stiffenerStrain[], TacsScalar sens[]) { const int numPlies = this->numStiffenerPlies; const int numStrain = TACSBeamConstitutive::NUM_STRESSES; @@ -3452,7 +3485,7 @@ TACSBladeStiffenedShellConstitutive::evalStiffenerCripplingStrainSens( return fail; } -void TACSBladeStiffenedShellConstitutive::addStiffenerCripplingDVSens( +void TACSBladeStiffenedShellConstitutive::_addStiffenerCripplingDVSens( const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]) { TACSOrthotropicPly* ply = this->stiffenerPly; diff --git a/src/constitutive/TACSBladeStiffenedShellConstitutive.h b/src/constitutive/TACSBladeStiffenedShellConstitutive.h index 606440952..43f007020 100644 --- a/src/constitutive/TACSBladeStiffenedShellConstitutive.h +++ b/src/constitutive/TACSBladeStiffenedShellConstitutive.h @@ -22,6 +22,7 @@ bladeFSDT model from previous versions of TACS developed by Graeme Kennedy. #include "TACSMaterialProperties.h" #include "TACSShellConstitutive.h" #include "TacsUtilities.h" +#include void printStiffnessMatrix(const TacsScalar* const C); @@ -885,7 +886,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { * @param e Shell strains * @return TacsScalar Strength ratio */ - TacsScalar evalGlobalPanelBuckling(const TacsScalar e[]); + TacsScalar _evalGlobalPanelBuckling(const TacsScalar e[]); /** * @brief Compute the panel + stiffener stiffness values used to compute the @@ -907,7 +908,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { * @param sens Sensitivity of the output w.r.t the shell strains * @return TacsScalar Strength Ratio */ - TacsScalar evalGlobalPanelBucklingStrainSens(const TacsScalar e[], + TacsScalar _evalGlobalPanelBucklingStrainSens(const TacsScalar e[], TacsScalar sens[]); /** @@ -922,7 +923,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { @param dvLen The length of the design vector (not used) @param dfdx The DV sensitivity array to add to */ - void addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, + void _addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]); @@ -973,7 +974,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { * @param e Shell strains * @return TacsScalar Strength ratio */ - TacsScalar evalLocalPanelBuckling(const TacsScalar e[]); + TacsScalar _evalLocalPanelBuckling(const TacsScalar e[]); /** * @brief Compute the critical axial load for local buckling of the panel @@ -1000,7 +1001,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { * @param sens Sensitivity of the output w.r.t the shell strains * @return TacsScalar Strength Ratio */ - TacsScalar evalLocalPanelBucklingStrainSens(const TacsScalar e[], + TacsScalar _evalLocalPanelBucklingStrainSens(const TacsScalar e[], TacsScalar sens[]); /** @@ -1015,7 +1016,7 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { @param dvLen The length of the design vector (not used) @param dfdx The DV sensitivity array to add to */ - void addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, + void _addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]); @@ -1281,14 +1282,14 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { * @param stiffenerStrain Stiffener centroid beam strains * @return TacsScalar Strength ratio */ - TacsScalar evalStiffenerCrippling(const TacsScalar stiffenerStrain[]); + TacsScalar _evalStiffenerCrippling(const TacsScalar stiffenerStrain[]); void computeStiffenerCripplingValues(const TacsScalar stiffenerStrain[], TacsScalar plyFailValues[]); - TacsScalar evalStiffenerCripplingStrainSens( + TacsScalar _evalStiffenerCripplingStrainSens( const TacsScalar stiffenerStrain[], TacsScalar sens[]); - void addStiffenerCripplingDVSens(const TacsScalar scale, + void _addStiffenerCripplingDVSens(const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]); @@ -1389,6 +1390,17 @@ class TACSBladeStiffenedShellConstitutive : public TACSShellConstitutive { TacsScalar* panelPlyFailSens; TacsScalar* stiffenerPlyFailSens; + // function pointers for overridden buckling loads for ML/GP buckling subclass + std::function evalLocalPanelBuckling; + std::function evalGlobalPanelBuckling; + std::function evalStiffenerCrippling; + std::function evalLocalPanelBucklingStrainSens; + std::function evalGlobalPanelBucklingStrainSens; + std::function evalStiffenerCripplingStrainSens; + std::function addLocalPanelBucklingDVSens; + std::function addGlobalPanelBucklingDVSens; + std::function addStiffenerCripplingDVSens; + static const char* const constName; ///< Constitutive model name static const int NUM_Q_ENTRIES = 6; ///< Number of entries in the Q matrix static const int NUM_ABAR_ENTRIES = diff --git a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp index 899dbfad2..e2653df3e 100644 --- a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp +++ b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.cpp @@ -74,7 +74,38 @@ TACSGPBladeStiffenedShellConstitutive::TACSGPBladeStiffenedShellConstitutive( } // default value of ksWeight - this->setKSWeight(80.0); + this->setKSWeight(100.0); + + // initialize the functions using the subclass (and this overwrides the buckling load predictions of the superclass) + evalLocalPanelBuckling = [this](const TacsScalar e[]) { + return this->_evalLocalPanelBuckling(e); + }; + evalGlobalPanelBuckling = [this](const TacsScalar e[]) { + return this->_evalGlobalPanelBuckling(e); + }; + evalStiffenerCrippling = [this](const TacsScalar stiffenerStrain[]) { + return this->_evalStiffenerCrippling(stiffenerStrain); + }; + evalLocalPanelBucklingStrainSens = [this](const TacsScalar e[], TacsScalar localBucklingSens[]) { + return this->_evalLocalPanelBucklingStrainSens(e, localBucklingSens); + }; + evalGlobalPanelBucklingStrainSens = [this](const TacsScalar e[], TacsScalar globalBucklingSens[]) { + return this->_evalGlobalPanelBucklingStrainSens(e, globalBucklingSens); + }; + evalStiffenerCripplingStrainSens = [this](const TacsScalar stiffenerStrain[], TacsScalar stiffenerStrainSens[]) { + return this->_evalStiffenerCripplingStrainSens(stiffenerStrain, stiffenerStrainSens); + }; + addLocalPanelBucklingDVSens = [this](int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], + const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { + return this->_addLocalPanelBucklingDVSens(elemIndex, scale, pt, X, strain, dvLen, dfdx); + }; + addGlobalPanelBucklingDVSens = [this](int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], + const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { + return this->_addGlobalPanelBucklingDVSens(elemIndex, scale, pt, X, strain, dvLen, dfdx); + }; + addStiffenerCripplingDVSens = [this](const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]) { + return this->_addStiffenerCripplingDVSens(scale, stiffenerStrain, dfdx); + }; } // ============================================================================== @@ -95,7 +126,7 @@ TACSGPBladeStiffenedShellConstitutive:: // Override Failure constraint and sensitivities // ============================================================================== -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalLocalPanelBuckling(const TacsScalar e[]) { +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalLocalPanelBuckling(const TacsScalar e[]) { // this routine computes N11,cr for the local panel section with size a x s_p (in between stiffeners) // compute panel stiffness matrix @@ -134,7 +165,7 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalLocalPanelBuckling(const T panelStress[2], N12CritLocal); } -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalGlobalPanelBuckling(const TacsScalar e[]) { +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalGlobalPanelBuckling(const TacsScalar e[]) { // this routine computes N11,cr for the global panel with the stiffeners applied // compute panel stiffness matrix @@ -189,7 +220,7 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalGlobalPanelBuckling(const panelStress[2], N12CritGlobal); } -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalStiffenerCrippling(const TacsScalar stiffenerStrain[]) { +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalStiffenerCrippling(const TacsScalar stiffenerStrain[]) { if (CPTstiffenerCrippling) {// use predictions for Sean's paper // compute D matrix of the stiffener (treating it like a panel for crippling) TacsScalar stiffenerCripplingStiffness[NUM_TANGENT_STIFFNESS_ENTRIES]; @@ -223,11 +254,11 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalStiffenerCrippling(const T } else { // CPTstiffenerCrippling = false // the DOD experimental stiffener crippling solution from Ali's superclass - return TACSBladeStiffenedShellConstitutive::evalStiffenerCrippling(stiffenerStrain); + return TACSBladeStiffenedShellConstitutive::_evalStiffenerCrippling(stiffenerStrain); } } -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalLocalPanelBucklingStrainSens( +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalLocalPanelBucklingStrainSens( const TacsScalar e[], TacsScalar sens[]) { // this routine computes N11,cr for the local panel section with size a x s_p (in between stiffeners) @@ -278,7 +309,7 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalLocalPanelBucklingStrainSe return strengthRatio; } -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalGlobalPanelBucklingStrainSens( +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalGlobalPanelBucklingStrainSens( const TacsScalar e[], TacsScalar sens[]) { // this routine computes N11,cr for the global panel with the stiffeners applied @@ -344,7 +375,7 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalGlobalPanelBucklingStrainS } -TacsScalar TACSGPBladeStiffenedShellConstitutive::evalStiffenerCripplingStrainSens( +TacsScalar TACSGPBladeStiffenedShellConstitutive::_evalStiffenerCripplingStrainSens( const TacsScalar stiffenerStrain[], TacsScalar sens[]) { if (CPTstiffenerCrippling) {// use predictions for Sean's paper @@ -388,11 +419,11 @@ TacsScalar TACSGPBladeStiffenedShellConstitutive::evalStiffenerCripplingStrainSe } else { // CPTstiffenerCrippling = false // the DOD experimental stiffener crippling solution from Ali's superclass - return TACSBladeStiffenedShellConstitutive::evalStiffenerCripplingStrainSens(stiffenerStrain, sens); + return TACSBladeStiffenedShellConstitutive::_evalStiffenerCripplingStrainSens(stiffenerStrain, sens); } } -void TACSGPBladeStiffenedShellConstitutive::addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, +void TACSGPBladeStiffenedShellConstitutive::_addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { @@ -553,7 +584,7 @@ void TACSGPBladeStiffenedShellConstitutive::addLocalPanelBucklingDVSens(int elem delete[] NDsens; } -void TACSGPBladeStiffenedShellConstitutive::addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, +void TACSGPBladeStiffenedShellConstitutive::_addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]) { @@ -779,7 +810,7 @@ void TACSGPBladeStiffenedShellConstitutive::addGlobalPanelBucklingDVSens(int ele delete zn_bar; } -void TACSGPBladeStiffenedShellConstitutive::addStiffenerCripplingDVSens( +void TACSGPBladeStiffenedShellConstitutive::_addStiffenerCripplingDVSens( const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]) { @@ -930,7 +961,7 @@ void TACSGPBladeStiffenedShellConstitutive::addStiffenerCripplingDVSens( } else { // CPTstiffenerCrippling = false // the DOD experimental stiffener crippling solution from Ali's superclass - return TACSBladeStiffenedShellConstitutive::addStiffenerCripplingDVSens(scale, stiffenerStrain, dfdx); + return TACSBladeStiffenedShellConstitutive::_addStiffenerCripplingDVSens(scale, stiffenerStrain, dfdx); } } diff --git a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.h b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.h index 86a7b3c4e..0e19d8193 100644 --- a/src/constitutive/TACSGPBladeStiffenedShellConstitutive.h +++ b/src/constitutive/TACSGPBladeStiffenedShellConstitutive.h @@ -339,7 +339,7 @@ class TACSGPBladeStiffenedShellConstitutive * @param e Shell strains * @return TacsScalar Strength ratio */ - TacsScalar evalLocalPanelBuckling(const TacsScalar e[]); + TacsScalar _evalLocalPanelBuckling(const TacsScalar e[]); /** * @brief Compute the strength ratio for the global buckling of the panel @@ -347,7 +347,7 @@ class TACSGPBladeStiffenedShellConstitutive * @param e Shell strains * @return TacsScalar Strength ratio */ - TacsScalar evalGlobalPanelBuckling(const TacsScalar e[]); + TacsScalar _evalGlobalPanelBuckling(const TacsScalar e[]); /** * @brief Compute the strength ratio with respect to stiffener crippling @@ -361,7 +361,7 @@ class TACSGPBladeStiffenedShellConstitutive * @param stiffenerStrain Stiffener centroid beam strains * @return TacsScalar Strength ratio */ - TacsScalar evalStiffenerCrippling(const TacsScalar stiffenerStrain[]); + TacsScalar _evalStiffenerCrippling(const TacsScalar stiffenerStrain[]); /** * @brief Compute the sensitivity of the local panel buckling strength ratio @@ -370,7 +370,7 @@ class TACSGPBladeStiffenedShellConstitutive * @param sens Sensitivity of the output w.r.t the shell strains * @return TacsScalar Strength Ratio */ - TacsScalar evalLocalPanelBucklingStrainSens(const TacsScalar e[], + TacsScalar _evalLocalPanelBucklingStrainSens(const TacsScalar e[], TacsScalar sens[]); /** @@ -381,10 +381,10 @@ class TACSGPBladeStiffenedShellConstitutive * @param sens Sensitivity of the output w.r.t the shell strains * @return TacsScalar Strength Ratio */ - TacsScalar evalGlobalPanelBucklingStrainSens(const TacsScalar e[], + TacsScalar _evalGlobalPanelBucklingStrainSens(const TacsScalar e[], TacsScalar sens[]); - TacsScalar evalStiffenerCripplingStrainSens( + TacsScalar _evalStiffenerCripplingStrainSens( const TacsScalar stiffenerStrain[], TacsScalar sens[]); /** @@ -399,7 +399,7 @@ class TACSGPBladeStiffenedShellConstitutive @param dvLen The length of the design vector (not used) @param dfdx The DV sensitivity array to add to */ - void addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, + void _addLocalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]); @@ -416,12 +416,12 @@ class TACSGPBladeStiffenedShellConstitutive @param dvLen The length of the design vector (not used) @param dfdx The DV sensitivity array to add to */ - void addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, + void _addGlobalPanelBucklingDVSens(int elemIndex, TacsScalar scale, const double pt[], const TacsScalar X[], const TacsScalar strain[], int dvLen, TacsScalar dfdx[]); - void addStiffenerCripplingDVSens(const TacsScalar scale, + void _addStiffenerCripplingDVSens(const TacsScalar scale, const TacsScalar stiffenerStrain[], TacsScalar dfdx[]);