fixed column buckling hopefully

hello everynyan
i hope this fixed the issues, i am worried there might be issues with the RF calculation for the column buckling due to what I got on the feedback, but ill see tomorrow (I am hoping its just a fluke rn)
This commit is contained in:
Sasha 2025-07-02 20:30:17 +01:00
parent c1cec3cf6f
commit 0b84e1024c

View file

@ -79,56 +79,50 @@ def GetCombAvgStressofStringer(stringerNo, Loadcase):
rightPStress = GetAvgStressofPanel(rightPID, Loadcase, 'XX')
return((leftPStress * 0.5 * pThickness[stringerNo - 1] * pWidth + rightPStress * 0.5 * pThickness[stringerNo]*pWidth + avgStringerStress * areaStringer) / (areaStringer + 0.5*pThickness[stringerNo-1] * pWidth + 0.5 * pThickness[stringerNo]*pWidth))
def GetAlpha(x):
if(0.4 <= x <= 1.095):
alpha = 1.4 - 0.628 * x
elif(1.095 < x <= 1.633):
alpha = 0.78/x
elif(x > 1.633):
alpha = 0.69/(x**0.75)
else:
alpha = 0
return(alpha)
def GetSigCrip(stringerNo, Loadcase): ## unfinished, need to understand x claulcation still a bit
x = (dim1/dim2)*math.sqrt(sYield/(3.60*Ebasis))
#use b1 and b2 for calc
#E_c = Ebasis
#no alpha = 1 it is none -> what do then? -> ignore that element in averaging
#averaging only with elements that cripple
#if nothing cripples, use yield strength
b1 = dim1 - dim2
b2 = dim3 - dim2
if(0.4 <= x <= 1.095):
alpha = 1.4 - 0.628 * x
elif(1.095 < x <= 1.633):
alpha = 0.78/x
elif(x > 1.633):
alpha = 0.69/(x**0.75)
x1 = (b1/dim2)*math.sqrt(sYield/(3.60*Ebasis))
alpha1 = GetAlpha(x1)
#print("x12: " + str(x))
sigCrip1 = alpha1 * sYield
x2 = (b2/dim2)*math.sqrt(sYield/(3.60*Ebasis))
alpha2 = GetAlpha(x2)
sigCrip2 = alpha2 * sYield
if(alpha1 != 0 and alpha2 != 0):
sigCripAVG = (sigCrip1 * b1 * dim2 + sigCrip2 * b2 * dim2 * 2)/(b1 * dim2 + b2 * dim2 * 2)
elif(alpha1 != 0):
sigCripAVG = (sigCrip1 * b1 * dim2)/(b1 * dim2)
elif(alpha2 != 0):
sigCripAVG = (sigCrip2 * b2 * dim2)/(b2 * dim2)
else:
alpha = 1
sigCripAVG = sYield
sigCrip12 = alpha * sYield
x = (dim4/dim2)*math.sqrt(sYield/(3.60*Ebasis))
if(0.4 <= x <= 1.095):
alpha = 1.4 - 0.628 * x
elif(1.095 < x <= 1.633):
alpha = 0.78/x
elif(x > 1.633):
alpha = 0.69/(x**0.75)
else:
alpha = 1
sigCrip24 = alpha * sYield
x = (dim3/dim2)*math.sqrt(sYield/(3.60*Ebasis))
if(0.4 <= x <= 1.095):
alpha = 1.4 - 0.628 * x
elif(1.095 < x <= 1.633):
alpha = 0.78/x
elif(x > 1.633):
alpha = 0.69/(x**0.75)
else:
alpha = 1
sigCrip23 = alpha * sYield
# i know this is inefficient and shittily as hell!! its quick and dirty tho
# TODO: FIX!!
sigCripAVG = (sigCrip12 * dim1 * dim2 + sigCrip23 * dim2 * dim3 + sigCrip24 * dim2 * dim4)/(dim1 * dim2 + dim2 * dim3 + dim2 * dim4)
if(sigCripAVG < sYield):
return sigCripAVG
else:
return sYield
# average only over what can buckle!!! F/A, A = sumOf(bi*ti)
return min(sigCripAVG, sYield)
def kBiax(panelNo,Loadcase):