Skip to content

Commit

Permalink
Update values
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jan 19, 2025
1 parent 8ad8b51 commit 66c7c8a
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 64 deletions.
15 changes: 9 additions & 6 deletions examples/mach_tutorial_wing/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
panelLengthScale = 1.0

# Stiffener pitch
stiffenerPitch = dtype(0.2) # m
stiffenerPitch = dtype(0.15) # m
stiffenerPitchMax = 0.5 # m
stiffenerPitchMin = 0.05 # m
stiffenerPitchScale = 1.0

# Panel thickness
panelThickness = dtype(0.02) # m
panelThicknessMax = 0.1 # m
panelThicknessMax = 0.0065 # m
panelThicknessMin = 0.002 # m
panelThicknessScale = 100.0

Expand All @@ -86,7 +86,7 @@
stiffenerHeightScale = 10.0

# Stiffener thickness
stiffenerThickness = dtype(0.02) # m
stiffenerThickness = dtype(0.006) # m
stiffenerThicknessMax = 0.1 # m
stiffenerThicknessMin = 0.002 # m
stiffenerThicknessScale = 100.0
Expand All @@ -107,6 +107,7 @@
bdfFile = os.path.join(os.path.dirname(__file__), "wingbox-L2-Order2.bdf")
FEAAssembler = pyTACS(bdfFile, options=structOptions, comm=comm)


# ==============================================================================
# Element callback function
# ==============================================================================
Expand All @@ -133,7 +134,9 @@ def elemCallBack(dvNum, compID, compDescript, elemDescripts, specialDVs, **kwarg
# The panel length values I set here are approximate, to get the real values, you'd
# need to run an optimization with panel length design variables and constraints.
if "SKIN" in compDescript:
isInboard = any([name in compDescript for name in ["SKIN.000", "SKIN.001", "SKIN.002"]])
isInboard = any(
[name in compDescript for name in ["SKIN.000", "SKIN.001", "SKIN.002"]]
)
if isInboard:
refAxis = SpanwiseDirection
panelLength = 0.37475
Expand Down Expand Up @@ -277,8 +280,8 @@ def elemCallBack(dvNum, compID, compDescript, elemDescripts, specialDVs, **kwarg
thickDiffMax = (
2.5e-3 # 2.5mm, Max allowable thickness difference between skin and stiffener
)
stiffAspectMax = 10.0 # Maximum allowable stiffener aspect ratio (height/thickness)
stiffAspectMin = 2.0 # Minimum allowable stiffener aspect ratio (height/thickness)
stiffAspectMax = 30.0 # Maximum allowable stiffener aspect ratio (height/thickness)
stiffAspectMin = 5.0 # Minimum allowable stiffener aspect ratio (height/thickness)

compIDs = {}
for group in ["SPAR", "U_SKIN", "L_SKIN", "RIB"]:
Expand Down
116 changes: 58 additions & 58 deletions examples/mach_tutorial_wing/benchmark/benchmark_mach_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

# Reference values for eval functions
FUNC_REF = {
"StructAnalysis_compliance": 155444.88138037617,
"StructAnalysis_l_skin_ksFailure": 0.6688752934181855,
"StructAnalysis_l_skin_mass": 1056.704174594214,
"StructAnalysis_mass": 3196.8719514874,
"StructAnalysis_rib_ksFailure": 0.25350306610310425,
"StructAnalysis_rib_mass": 686.2303380471093,
"StructAnalysis_spar_ksFailure": 0.6336086764052882,
"StructAnalysis_spar_mass": 400.06656937882445,
"StructAnalysis_u_skin_ksFailure": 0.4650470864089127,
"StructAnalysis_u_skin_mass": 1053.8708694672512,
"StructAnalysis_compliance": 181654.50493884285,
"StructAnalysis_l_skin_ksFailure": 0.6725899627597012,
"StructAnalysis_l_skin_mass": 845.363339675365,
"StructAnalysis_mass": 2557.4975611899276,
"StructAnalysis_rib_ksFailure": 0.25239263216123975,
"StructAnalysis_rib_mass": 548.9842704376754,
"StructAnalysis_spar_ksFailure": 0.6259609697539693,
"StructAnalysis_spar_mass": 320.05325550306407,
"StructAnalysis_u_skin_ksFailure": 1.9721825626648475,
"StructAnalysis_u_skin_mass": 843.0966955738023,
"AdjCon_L_SKIN_panelThicknessAdj": np.zeros(21),
"AdjCon_L_SKIN_stiffenerHeightAdj": np.zeros(21),
"AdjCon_L_SKIN_stiffenerPitchAdj": np.zeros(21),
Expand All @@ -35,10 +35,10 @@
"AdjCon_U_SKIN_stiffenerHeightAdj": np.zeros(21),
"AdjCon_U_SKIN_stiffenerPitchAdj": np.zeros(21),
"AdjCon_U_SKIN_stiffenerThicknessAdj": np.zeros(21),
"DVCon_stiffSpacingMin": 0.08 * np.ones(111),
"DVCon_stiffenerAspectMax": -0.15 * np.ones(111),
"DVCon_stiffenerAspectMin": 0.01 * np.ones(111),
"DVCon_thickDiffLimit": np.zeros(111),
"DVCon_flangeThicknessMax": -0.294 * np.ones(111),
"DVCon_stiffSpacingMin": 0.03 * np.ones(111),
"DVCon_stiffenerAspectMax": -0.13 * np.ones(111),
"DVCon_stiffenerAspectMin": 0.02 * np.ones(111),
"PanelLengthCon_PanelLength": np.array(
[
2.06290983e-01,
Expand Down Expand Up @@ -108,50 +108,50 @@
-1.94006675e-01,
-2.07710608e-01,
-2.21414538e-01,
-1.16529874e-01,
-1.16796551e-01,
-1.16293732e-01,
-1.16638202e-01,
-1.15940931e-01,
-1.16308447e-01,
5.22872841e-02,
5.21318043e-02,
5.22872765e-02,
5.21318003e-02,
5.22872662e-02,
5.21317938e-02,
5.22872561e-02,
5.21317878e-02,
5.22872452e-02,
5.21317814e-02,
5.22872344e-02,
5.21317755e-02,
5.22872203e-02,
5.21317668e-02,
5.22872061e-02,
5.21317584e-02,
5.22871905e-02,
5.21317492e-02,
5.22871741e-02,
5.21317400e-02,
5.22871538e-02,
5.21317276e-02,
5.22871321e-02,
5.21317148e-02,
5.22871098e-02,
5.21317025e-02,
5.22870747e-02,
5.21316787e-02,
5.22870535e-02,
5.21316706e-02,
5.22870060e-02,
5.21316382e-02,
5.22869736e-02,
5.21316234e-02,
5.22869117e-02,
5.21315825e-02,
5.22868606e-02,
5.21315567e-02,
-2.35228248e-01,
-2.35294003e-01,
-2.35033747e-01,
-2.35263347e-01,
-2.34708238e-01,
-2.35050844e-01,
-3.27127159e-02,
-3.28681957e-02,
-3.27127235e-02,
-3.28681997e-02,
-3.27127338e-02,
-3.28682062e-02,
-3.27127439e-02,
-3.28682122e-02,
-3.27127548e-02,
-3.28682186e-02,
-3.27127656e-02,
-3.28682245e-02,
-3.27127797e-02,
-3.28682332e-02,
-3.27127939e-02,
-3.28682416e-02,
-3.27128095e-02,
-3.28682508e-02,
-3.27128259e-02,
-3.28682600e-02,
-3.27128462e-02,
-3.28682724e-02,
-3.27128679e-02,
-3.28682852e-02,
-3.27128902e-02,
-3.28682975e-02,
-3.27129253e-02,
-3.28683213e-02,
-3.27129465e-02,
-3.28683294e-02,
-3.27129940e-02,
-3.28683618e-02,
-3.27130264e-02,
-3.28683766e-02,
-3.27130883e-02,
-3.28684175e-02,
-3.27131394e-02,
-3.28684433e-02,
]
),
}
Expand Down

0 comments on commit 66c7c8a

Please sign in to comment.