Skip to content

Commit

Permalink
Merge branch 'develop' into feature-wake_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rachealerhard committed Jul 13, 2022
2 parents 83b6ed1 + ce6baa6 commit 7a016ea
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 59 deletions.
67 changes: 67 additions & 0 deletions trunk/SUAVE/Attributes/Solids/Magnesium.py
@@ -0,0 +1,67 @@
## @ingroup Attributes-Solids

# Magnesium.py
#
# Created: Jul, 2022, J. Smart
# Modified:

# -------------------------------------------------------------------------------
# Imports
# -------------------------------------------------------------------------------

from .Solid import Solid
from SUAVE.Core import Units


# -------------------------------------------------------------------------------
# Aluminum 6061-T6 Solid Class
# -------------------------------------------------------------------------------

## @ingroup Attributes-Solid
class Magnesium(Solid):
""" Physical Constants Specific to RZ5 Magnesium Alloy per BS 2L.128
Assumptions:
None
Source:
MatWeb
https://www.matweb.com/search/datasheet.aspx?matguid=f473a6bbcabe4fd49199c2cef7205664
Inputs:
N/A
Outputs:
N/A
Properties Used:
None
"""

def __defaults__(self):
"""Sets material properties at instantiation.
Assumptions:
None
Source:
N/A
Inputs:
N/A
Outputs:
N/A
Properties Used:
None
"""

self.ultimate_tensile_strength = 200e6 * Units.Pa
self.ultimate_shear_strength = 138e6 * Units.Pa
self.ultimate_bearing_strength = 330e6 * Units.Pa
self.yield_tensile_strength = 135e6 * Units.Pa
self.yield_shear_strength = 138e6 * Units.Pa
self.yield_bearing_strength = 130e6 * Units.Pa
self.minimum_gage_thickness = 0.0 * Units.m
self.density = 1840. * Units['kg/(m**3)']
67 changes: 67 additions & 0 deletions trunk/SUAVE/Attributes/Solids/Titanium.py
@@ -0,0 +1,67 @@
## @ingroup Attributes-Solids

# Titanum.py
#
# Created: Jul, 2022, J. Smart
# Modified:

# -------------------------------------------------------------------------------
# Imports
# -------------------------------------------------------------------------------

from .Solid import Solid
from SUAVE.Core import Units


# -------------------------------------------------------------------------------
# Aluminum 6061-T6 Solid Class
# -------------------------------------------------------------------------------

## @ingroup Attributes-Solid
class Titanium(Solid):
""" Physical Constants Specific to Grade 5 Ti-6AL-4V Alloy, Annealed
Assumptions:
None
Source:
ASM, Inc.
https://asm.matweb.com/search/SpecificMaterial.asp?bassnum=mtp641
Inputs:
N/A
Outputs:
N/A
Properties Used:
None
"""

def __defaults__(self):
"""Sets material properties at instantiation.
Assumptions:
None
Source:
N/A
Inputs:
N/A
Outputs:
N/A
Properties Used:
None
"""

self.ultimate_tensile_strength = 950e6 * Units.Pa
self.ultimate_shear_strength = 550e6 * Units.Pa
self.ultimate_bearing_strength = 1860e6 * Units.Pa
self.yield_tensile_strength = 880e6 * Units.Pa
self.yield_shear_strength = 550e6 * Units.Pa
self.yield_bearing_strength = 1480e6 * Units.Pa
self.minimum_gage_thickness = 0.0 * Units.m
self.density = 4430. * Units['kg/(m**3)']
2 changes: 2 additions & 0 deletions trunk/SUAVE/Attributes/Solids/__init__.py
Expand Up @@ -11,3 +11,5 @@
from .Acrylic import Acrylic
from .Steel import Steel
from .Nickel import Nickel
from .Titanium import Titanium
from .Magnesium import Magnesium
91 changes: 32 additions & 59 deletions trunk/SUAVE/Methods/Weights/Buildups/eVTOL/empty.py
Expand Up @@ -14,7 +14,7 @@
from SUAVE.Methods.Weights.Buildups.Common.prop import prop
from SUAVE.Methods.Weights.Buildups.Common.wiring import wiring
from SUAVE.Methods.Weights.Buildups.Common.wing import wing

from SUAVE.Components.Energy.Converters import Propeller, Lift_Rotor
from SUAVE.Components.Energy.Networks import Battery_Propeller
from SUAVE.Components.Energy.Networks import Lift_Cruise

Expand Down Expand Up @@ -229,35 +229,42 @@ def empty(config,
rots = network.lift_rotors
prop_motors = network.propeller_motors
rot_motors = network.lift_rotor_motors

nProps = int(nLiftRotors + nThrustProps)

elif isinstance(network, Battery_Propeller):
# Total number of rotors and propellers
nProps = network.number_of_propeller_engines
props = network.propellers
prop_motors = network.propeller_motors

nThrustProps = nProps
nLiftRotors = 0

elif isinstance(network, Battery_Propeller):
props = network.propellers
prop_motors = network.propeller_motors
nThrustProps = 0
nLiftRotors = 0
nProps = 0
for rot_idx in range(len(props.keys())):
if type(props[list(props.keys())[rot_idx]]) == Propeller:
props = network.propellers
nThrustProps +=1

elif type(props[list(props.keys())[rot_idx]]) == Lift_Rotor:
nLiftRotors +=1

if (nThrustProps == 0) and (nLiftRotors != 0):
network.lift_rotors = network.propellers
rot_motors = network.propeller_motors
network.identical_lift_rotors = network.number_of_propeller_engines
else:
raise NotImplementedError("""eVTOL weight buildup only supports the Battery Propeller and Lift Cruise energy networks.\n
Weight buildup will not return information on propulsion system.""",RuntimeWarning)


nProps = int(nLiftRotors + nThrustProps)
if nProps > 1:
prop_BRS_weight = 16. * Units.kg
else:
prop_BRS_weight = 0. * Units.kg

prop_servo_weight = 0.0

if nThrustProps > 0:
if network.identical_propellers:
# Get reference properties for sizing from first propeller (assumes identical)
proprotor = props[list(props.keys())[0]]
propmotor = prop_motors[list(prop_motors.keys())[0]]
if nThrustProps > 0:
for idx, propeller in enumerate(network.propellers):
proprotor = propeller
propmotor = prop_motors[list(prop_motors.keys())[idx]]
rTip_ref = proprotor.tip_radius
bladeSol_ref = proprotor.blade_solidity

Expand All @@ -266,32 +273,15 @@ def empty(config,

# Compute and add propeller weights
propeller_mass = prop(proprotor, maxLift/5.) * Units.kg
output.propellers += nThrustProps * propeller_mass
output.propeller_motors += nThrustProps * propmotor.mass_properties.mass
output.propellers += propeller_mass
output.propeller_motors += propmotor.mass_properties.mass
proprotor.mass_properties.mass = propeller_mass + prop_hub_weight + prop_servo_weight

else:
for idx, propeller in enumerate(network.propellers):
proprotor = propeller
propmotor = prop_motors[list(prop_motors.keys())[idx]]
rTip_ref = proprotor.tip_radius
bladeSol_ref = proprotor.blade_solidity

if proprotor.variable_pitch:
prop_servo_weight = 5.2 * Units.kg

# Compute and add propeller weights
propeller_mass = prop(proprotor, maxLift/5.) * Units.kg
output.propellers += propeller_mass
output.propeller_motors += propmotor.mass_properties.mass
proprotor.mass_properties.mass = propeller_mass + prop_hub_weight + prop_servo_weight

lift_rotor_servo_weight = 0.0
if nLiftRotors > 0:
if network.identical_lift_rotors:
# Get reference properties for sizing from first lift_rotor (assumes identical)
liftrotor = rots[list(rots.keys())[0]]
liftmotor = rot_motors[list(rot_motors.keys())[0]]
if nLiftRotors > 0:
for idx, lift_rotor in enumerate(network.lift_rotors):
liftrotor = lift_rotor
liftmotor = rot_motors[list(rot_motors.keys())[idx]]
rTip_ref = liftrotor.tip_radius
bladeSol_ref = liftrotor.blade_solidity

Expand All @@ -301,27 +291,10 @@ def empty(config,

# Compute and add lift_rotor weights
lift_rotor_mass = prop(liftrotor, maxLift / max(nLiftRotors - 1, 1)) * Units.kg
output.lift_rotors += nLiftRotors * lift_rotor_mass
output.lift_rotor_motors += nLiftRotors * liftmotor.mass_properties.mass
output.lift_rotors += lift_rotor_mass
output.lift_rotor_motors += liftmotor.mass_properties.mass
liftrotor.mass_properties.mass = lift_rotor_mass + lift_rotor_hub_weight + lift_rotor_servo_weight

else:
for idx, lift_rotor in enumerate(network.lift_rotors):
liftrotor = lift_rotor
liftmotor = rot_motors[list(rot_motors.keys())[idx]]
rTip_ref = liftrotor.tip_radius
bladeSol_ref = liftrotor.blade_solidity


if liftrotor.variable_pitch:
lift_rotor_servo_weight = 0.65 * Units.kg

# Compute and add lift_rotor weights
lift_rotor_mass = prop(liftrotor, maxLift / max(nLiftRotors - 1, 1)) * Units.kg
output.lift_rotors += lift_rotor_mass
output.lift_rotor_motors += liftmotor.mass_properties.mass
liftrotor.mass_properties.mass = lift_rotor_mass + lift_rotor_hub_weight + lift_rotor_servo_weight

# Add associated weights
output.servos += (nLiftRotors * lift_rotor_servo_weight + nThrustProps * prop_servo_weight)
output.hubs += (nLiftRotors * lift_rotor_hub_weight + nThrustProps * prop_hub_weight)
Expand Down

0 comments on commit 7a016ea

Please sign in to comment.