TotalForces = [] Totaltes = [] TotalStrain = [] Break = False for i in range(0, 10000): if Break: break F = F + 1 Force = [[F], [0.], [0.], [0.], [0.], [0.]] StrengthVector = calc.LayupStrengthForceInput( layup=Layers, materials=MaterialProperties, Force=Force, Diameter=0., DamagedLayers=DamagedLayers, a=a, b=b, angleofweakness=angleofweakness, d=d, ThickWalled=False) if float(StrengthVector['StrainVector'][0]) > 0.01: Break = True break TotalForce = (Width - a) * F te = (TotalForce / 9.81) / 1000. TotalForces.append(TotalForce) Totaltes.append(te)
Miner = MinerSum = np.matrix(np.zeros((len(Layers), 2))) TotalCycles = 0. ResidualBurstVector = [] for i in range(0, increments): if i > 0: IntactLayers = DegreadedLayup Miner = [] #---------------------------- Initiated iterative process ------------------------------ StrengthVector = calc.LayupStrength(layup=IntactLayers, materials=Materials, Pressure=Pressure, Diameter=Diameter, DamagedLayers=DamagedLayers, a=a, b=b, angleofweakness=angleofweakness, d=d) FeTsaiWuVector = StrengthVector['FeTsaiWuVector'] FeMaxStressVector = StrengthVector['FeMaxStressVector'] #FeMaxStressFailModeVector = StrengthVector['FeMaxStressFailModeVector'] ResidualBurstVector = StrengthVector['ResidualBurstVector'] FatigueLayers = StrengthVector['CyclesUntilFailureVector'] #---------------------------- Established Strength and Fatigue for one layup ------------------------------ MinCycles = np.matrix(FatigueLayers).min() InvertedMiner = np.divide(FatigueLayers, MinCycles)
Miner = MinerSum = np.matrix(np.zeros((len(Layers), 2))) TotalCycles = 0. ResidualBurstVector = [] for i in range(0, 30): if i > 0: IntactLayers = DegreadedLayup Miner = [] #---------------------------- Initiated iterative process ------------------------------ StrengthVector = calc.LayupStrength( layup=IntactLayers, materials=Materials, Pressure=Pressure, Diameter=Diameter, DamagedLayers=DamagedLayers, a=a, b=b, angleofweakness=angleofweakness, d=d, ThickWalled=Thickwalled, PuckConstants=PuckConstants) #--------------------------- Ran the Strength function --------------------------------- FeTsaiWuVector = StrengthVector['FeTsaiWuVector'] FeMaxStressVector = StrengthVector['FeMaxStressVector'] FeHashinVector = StrengthVector['FeHashinVector'] #---------------------------- Established Strength and Fatigue Vectors from output of Strength function ------------------------------ FatigueLayers = StrengthVector['CyclesUntilFailureVector']
Pressure = Pressure + 0.1 for i in range(0, 10000): #i is iterations to find a converged solution. if i > 0: #After first iteration, set the layup to the degreaded layup and reset the Miner for that layup. Miner = [] #---------------------------- Initiated iterative process ------------------------------ if i == 0: StrengthVector = calc.LayupStrength( layup=Layup, materials=Materials, Pressure=Pressure, Diameter=Diameter, DamagedLayers=DamagedLayers, a=a, b=b, angleofweakness=angleofweakness, d=d, ThickWalled=Thickwalled) else: StrengthVector = StrengthVectorpost #--------------------------- Established Strength which outputs --------------------------------- #{'FeTsaiWuVector','FeMaxStressVector','FeMaxStressFailModeVector','ResidualBurstVector','CyclesUntilFailureVector','ForceVector','StrainVector','FeHashinVector','ResidualBurstVectorHashin'} #--------------------------- The strength function outputs all the strength parameters of the layup------------ if ProgressiveFailureCriteria == 'Puck': FailureCriteriaVector = StrengthVector['FeHashinVector'] ResidualBurstVector = StrengthVector[