The Gitlab server is succesfully updated to version 14.4.0

Many users are receiving emails regarding excessive amounts of log-in attempts, which are brute-force attempts to crack your password. We are working on a 2FA solution, so no action is needed yet. If you receive emails regarding "sign-in from new location", please check the IP address and if unknown, notify frza@dtu.dk immediately.

Commit bdd975a5 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

renamed some variables

parent d99cb462
......@@ -13,9 +13,9 @@ from openmdao.lib.datatypes.api import Float, Array, Bool, Int
class SEAMBladeStructure(Component):
Nsections = Int(iotype='in', desc='number of sections')
Neq = Float(1.e7, iotype='in', desc='')
lifetime_cycles = Float(1.e7, iotype='in', desc='Equivalent lifetime cycles')
WohlerExpFlap = Float(iotype='in', desc='')
wohler_exponent_blade_flap = Float(iotype='in', desc='Wohler exponent')
PMtarget = Float(iotype='in', desc='')
rotor_diameter = Float(iotype='in', units='m', desc='Rotor diameter')
......@@ -23,26 +23,26 @@ class SEAMBladeStructure(Component):
# MaxChord = Float(iotype='in', units='m', desc='')
MaxChordrR = Float(iotype='in', units='m', desc='Spanwise position of maximum chord')
overallMaxFlap = Float(iotype='in', desc='Max blade root flap moment')
overallMaxEdge = Float(iotype='in', desc='Max blade root edge moment')
TIF_FLext = Float(iotype='in', desc='Technology improvement factor flap extreme')
TIF_EDext = Float(iotype='in', desc='Technology improvement factor edge extreme')
blade_root_flap_max = Float(iotype='in', units='kN*m', desc='Max blade root flap moment')
blade_root_edge_max = Float(iotype='in', units='kN*m', desc='Max blade root flap moment')
blade_root_flap_leq = Float(iotype='in', units='kN*m', desc='Blade root flap lifetime eq. moment')
blade_root_edge_leq = Float(iotype='in', units='kN*m', desc='Blade root flap lifetime eq. moment')
FlapLEQ = Float(iotype='in', desc='Blade root flap lifetime eq. moment')
EdgeLEQ = Float(iotype='in', desc='Blade root edge lifetime eq. moment')
TIF_FLfat = Float(iotype='in', desc='Technology improvement factor FlapLEQ')
tif_blade_root_flap_ext = Float(1., iotype='in', desc='Technology improvement factor flap extreme')
tif_blade_root_edge_ext = Float(1., iotype='in', desc='Technology improvement factor edge extreme')
tif_blade_root_flat_fat = Float(1., iotype='in', desc='Technology improvement factor flap LEQ')
sc_frac_flap = Float(iotype='in', desc='spar cap fraction of chord')
sc_frac_edge = Float(iotype='in', desc='spar cap fraction of thickness')
SF_blade = Float(iotype='in', desc='') #[factor]
SF_blade = Float(iotype='in', desc='')
Slim_ext_blade = Float(iotype='in', units='MPa', desc='')
Slim_fat_blade = Float(iotype='in', units='MPa', desc='')
AddWeightFactorBlade = Float(iotype='in', desc='Additional weight factor for blade shell')
BladeDens = Float(iotype='in', units='kg/m**3', desc='density of blades')
blade_material_density = Float(iotype='in', units='kg/m**3', desc='Average density of blade materials')
BladeWeight = Float(iotype = 'out', units = 'kg', desc = 'BladeMass' )
blade_mass = Float(iotype = 'out', units = 'kg', desc = 'Blade mass' )
RootChord = Float(iotype = 'out', units = 'm', desc = 'blade root chord') # 07/09/2015 added for HubSE model
def execute(self):
......@@ -92,23 +92,23 @@ class SEAMBladeStructure(Component):
self.chord = C
# Calculating load flapwise extreme
Mext_flap = (self.overallMaxFlap-1.75*self.overallMaxFlap*r/(self.rotor_diameter/2.) +\
0.75*self.overallMaxFlap*r/(self.rotor_diameter/2.) * r / \
(self.rotor_diameter/2.))*self.TIF_FLext
Mext_flap = (self.blade_root_flap_max-1.75*self.blade_root_flap_max*r/(self.rotor_diameter/2.) +\
0.75*self.blade_root_flap_max*r/(self.rotor_diameter/2.) * r / \
(self.rotor_diameter/2.))*self.tif_blade_root_flap_ext
# Calculating load edgewise extreme
Mext_edge = (self.overallMaxEdge-1.75*self.overallMaxEdge*r/(self.rotor_diameter/2.) + \
0.75*self.overallMaxEdge*r/(self.rotor_diameter/2.) * r / \
(self.rotor_diameter/2.))*self.TIF_EDext
Mext_edge = (self.blade_root_edge_max-1.75*self.blade_root_edge_max*r/(self.rotor_diameter/2.) + \
0.75*self.blade_root_edge_max*r/(self.rotor_diameter/2.) * r / \
(self.rotor_diameter/2.))*self.tif_blade_root_edge_ext
# Calculating load flapwise fatigue
Mfat_flap = (self.FlapLEQ-1.75*self.FlapLEQ*r/(self.rotor_diameter/2.) + \
0.75*self.FlapLEQ*r/(self.rotor_diameter/2.)*r / \
(self.rotor_diameter/2.))*self.TIF_FLfat
Mfat_flap = (self.blade_root_flap_leq-1.75*self.blade_root_flap_leq*r/(self.rotor_diameter/2.) + \
0.75*self.blade_root_flap_leq*r/(self.rotor_diameter/2.)*r / \
(self.rotor_diameter/2.))*self.tif_blade_root_flat_fat
# Calculating load edgewise fatigue
Mfat_edge = (self.EdgeLEQ-1.75*self.EdgeLEQ*r/(self.rotor_diameter/2.) + \
0.75*self.EdgeLEQ*r/(self.rotor_diameter/2.)*r/(self.rotor_diameter/2.))*self.TIF_EDext
Mfat_edge = (self.blade_root_edge_leq-1.75*self.blade_root_edge_leq*r/(self.rotor_diameter/2.) + \
0.75*self.blade_root_edge_leq*r/(self.rotor_diameter/2.)*r/(self.rotor_diameter/2.))*self.tif_blade_root_edge_ext
self.Mext_flap = Mext_flap
self.Mext_edge = Mext_edge
......@@ -135,15 +135,16 @@ class SEAMBladeStructure(Component):
# Calculating thickness flapwise fatigue
tfat_flap = np.zeros(self.Nsections)
for i in range(self.Nsections):
norm = self.solve_tfat_flap(0.01, C[i], thick[i], Mext_flap[i], 1.)
norm = self.solve_tfat_flap(0.01, C[i], thick[i], Mfat_flap[i], 1.)
res = minimize(self.solve_tfat_flap, 0.01, args = (C[i], thick[i], Mfat_flap[i], norm), bounds=[(1.e-6, 0.5)], method = 'SLSQP', tol = 1.e-8)
print 'norm', norm
tfat_flap[i] = res['x']
if not res['success']: print 'WARNING solve_tfat_flap', i, res
# Calculating thickness edgewise fatigue
tfat_edge = np.zeros(self.Nsections)
for i in range(self.Nsections):
norm = self.solve_tfat_edge(0.01, C[i], thick[i], Mext_flap[i], 1.)
norm = self.solve_tfat_edge(0.01, C[i], thick[i], Mfat_edge[i], 1.)
res = minimize(self.solve_tfat_edge, 0.01, args = (C[i], thick[i], Mfat_edge[i], norm), bounds=[(1.e-6, 0.5)], method = 'SLSQP', tol = 1.e-8)
tfat_edge[i] = res['x']
if not res['success']: print 'WARNING solve_tfat_edge', i,res
......@@ -163,15 +164,15 @@ class SEAMBladeStructure(Component):
self.volume = np.trapz(2 * (self.sc_frac_flap * C * tfinal_flap + \
self.sc_frac_edge * thick * tfinal_edge), r)
self.volume *= self.AddWeightFactorBlade
self.BladeWeight = self.BladeDens * self.volume
self.blade_mass = self.blade_material_density * self.volume
print 'BladeWeigth', self.BladeWeight
print 'BladeWeigth', self.blade_mass
#
# rotor = self.BladeWeight*self.BladeCostPerMass/1e6 # Meuro
# rotor = self.blade_mass*self.BladeCostPerMass/1e6 # Meuro
# print 'rotor', rotor
# # Scaling laws for hub, spinner, pitch
# HubMass = 0.954*self.BladeWeight+5680.3
# HubMass = 0.954*self.blade_mass+5680.3
# print 'HubMass', HubMass
#
# HubCost = HubMass*self.HubCostPerMass/1e6
......@@ -184,7 +185,7 @@ class SEAMBladeStructure(Component):
#
# SpinnerCost = SpinnerMass*self.SpinnerCostPerMass/1e6
# print 'SpinnerCost', SpinnerCost
#Rotor = 3*(self.BladeWeight*self.BladeCostPerMass/1e6)+HubCost+PitchCost+SpinnerCost
#Rotor = 3*(self.blade_mass*self.BladeCostPerMass/1e6)+HubCost+PitchCost+SpinnerCost
......@@ -211,7 +212,7 @@ class SEAMBladeStructure(Component):
Ine = (2/3.)*self.sc_frac_flap*C*t**3-self.sc_frac_flap*C*thick*t**2+self.sc_frac_flap*C*thick**2/2.*t
W = Ine/(thick/2.)
sfat = np.maximum(1.e-6, self.SF_blade*1.e3*Mfat_flap/ W / 1.e6)
PM = self.Neq/(pow(10, (self.Slim_fat_blade - self.WohlerExpFlap*np.log10(sfat))))
PM = self.lifetime_cycles/(pow(10, (self.Slim_fat_blade - self.wohler_exponent_blade_flap*np.log10(sfat))))
return abs(PM - self.PMtarget) / norm
# Solving for t in edge direction, fatigue
......@@ -219,7 +220,7 @@ class SEAMBladeStructure(Component):
Ine = (2/3.)*self.sc_frac_edge*thick*t**3-self.sc_frac_edge*thick*C*t**2+self.sc_frac_edge*thick*C**2/2.*t
W = Ine/(C/2.)
sfat = np.maximum(1.e-6, self.SF_blade*1.e3*Mfat_edge/W/1.e6)
PM = self.Neq/(pow(10, (self.Slim_fat_blade - self.WohlerExpFlap*np.log10(sfat))))
PM = self.lifetime_cycles/(pow(10, (self.Slim_fat_blade - self.wohler_exponent_blade_flap*np.log10(sfat))))
return abs(PM - self.PMtarget) / norm
def plot(self, fig):
......
......@@ -8,22 +8,22 @@ class SEAMRotorTestCase(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
# add some tests here...
#def test_SEAMRotor(self):
#pass
if __name__ == "__main__":
# unittest.main()
top = SEAMBladeStructure()
top.Nsections = 21.
top.Neq = 1e7
top.WohlerExpFlap = 10.0
top.Nsections = 21
top.lifetime_cycles = 1e7
top.wohler_exponent_blade_flap = 10.0
top.PMtarget = 1.0
top.rotor_diameter = 177. #[m]
......@@ -31,27 +31,20 @@ if __name__ == "__main__":
# top.MaxChord = 2.5 #[m]
top.MaxChordrR = 0.2 #[m]
top.OverallMaxFlap = 47225.
top.OverallMaxEdge = 26712.
top.TIF_FLext = 1. # Tech Impr Factor _ flap extreme
top.TIF_EDext = 1.
top.FlapLEQ = 26975.
top.EdgeLEQ = 24252.
top.TIF_FLfat = 1.
top.blade_root_flap_max = 47225.
top.blade_root_edge_max = 26712.
top.blade_root_flap_leq = 26975.
top.blade_root_edge_leq = 24252.
top.sc_frac_flap = 0.3 # sparcap fraction of chord flap
top.sc_frac_edge = 0.8 # sparcap fraction of thickness edge
top.SF_blade = 1.1 #[factor]
top.Slim_ext_blade = 200.0
top.Slim_fat_blade = 27
top.Slim_fat_blade = 27.
top.AddWeightFactorBlade = 1.2 # Additional weight factor for blade shell
top.BladeDens = 2100. # [kg / m^3]
top.BladeCostPerMass = 15.0 #[e/kg]
top.HubCostPerMass = 3.5 #[e/kg]
top.SpinnerCostPerMass = 4.5 #[e/kg]
top.blade_material_density = 2100. # [kg / m^3]
top.execute()
......@@ -94,6 +87,3 @@ if __name__ == "__main__":
plt.grid()
plt.show()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment