Skip to content

Commit

Permalink
Merge 66c8af6 into 8f9aad6
Browse files Browse the repository at this point in the history
  • Loading branch information
sofie-0 committed Apr 19, 2022
2 parents 8f9aad6 + 66c8af6 commit 1220ba1
Show file tree
Hide file tree
Showing 36 changed files with 1,509 additions and 186 deletions.
1 change: 1 addition & 0 deletions regression/automatic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
'scripts/test_input_output/test_xml_read_write.py',
'scripts/test_input_output/test_freemind_write.py',
'scripts/turboelectric_HTS_ducted_fan_network/turboelectric_HTS_ducted_fan_network.py',
'scripts/turboelectric_HTS_dynamo_ducted_fan_network/turboelectric_HTS_dynamo_ducted_fan_network.py',
'scripts/variable_cruise_distance/variable_cruise_distance.py',
'scripts/V_n_diagram/V_n_diagram_regression.py',
'scripts/VTOL/test_Multicopter.py',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Data, Units,
)
from SUAVE.Methods.Propulsion.ducted_fan_sizing import ducted_fan_sizing

### @ingroup Regression-scripts-turboelectric_HTS_ducted_fan_network
def main():

Expand All @@ -32,10 +32,9 @@ def main():

return


def energy_network():

# ------------------------------------------------------------------
# ------------------------------------------------------------------
# Evaluation Conditions
# ------------------------------------------------------------------

Expand Down Expand Up @@ -275,7 +274,6 @@ def energy_network():
efan.powersupply.mass_density = efan.powersupply.mass_properties.mass /efan.powersupply.volume

# ------------------------------------------------------------------
# Component 4 - Electronic Speed Controller (ESC)

efan.esc = SUAVE.Components.Energy.Distributors.HTS_DC_Supply() # Could make this where the ESC is defined as a Siemens SD104
efan.esc.tag = 'esc'
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion trunk/SUAVE/Attributes/Cryogens/Cryogen.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Attributes-Cryogens
# Cryogen.py
#
# Created: Feb 2020, K. Hamilton
# Created: Feb 2020, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004


# ----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion trunk/SUAVE/Attributes/Cryogens/Liquid_H2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Attributes-Cryogens
# Liquid H2
#
# Created: Feb 2020, K. Hamilton
# Created: Feb 2020, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004

# ----------------------------------------------------------------------
# Imports
Expand Down
5 changes: 3 additions & 2 deletions trunk/SUAVE/Attributes/Solids/Copper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Attributes-Solids
# Copper.py
#
# Created: Feb 2020, K. Hamilton
# Created: Feb 2020, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004
# Modified: Jan 2022, S. Claridge

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -62,6 +62,7 @@ def __defaults__(self):
self.density = 8960.0 # [kg/(m**3)]
self.conductivity_electrical = 58391886.09 # [mhos/m]
self.conductivity_thermal = 392.4 # [W/(m*K)]
self.interpolate = False

# Lookup table arrays. Temperature in K, thermal conductivity in W/(m*K)
temperatures = np.array([4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0, 160.0, 180.0, 200.0, 220.0, 240.0, 260.0, 280.0, 300.0])
Expand All @@ -79,7 +80,7 @@ def __defaults__(self):
self.c_electrical = interpolate.interp1d(temperatures, conductivities, kind = 'cubic', fill_value='extrapolate')



def thermal_conductivity(self, temperature):

# Create output variable
Expand Down
47 changes: 31 additions & 16 deletions trunk/SUAVE/Components/Energy/Converters/Motor_HTS_Rotor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Components-Energy-Converters
# Motor_HTS_Rotor.py
#
# Created: Feb 2020, K. Hamilton
# Created: Feb 2020, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004
# Modified: Nov 2021, S. Claridge

# ----------------------------------------------------------------------
Expand Down Expand Up @@ -49,17 +49,23 @@ def __defaults__(self):
Properties Used:
None
"""
self.temperature = 0.0 # Temperature inside of the rotor [K]
self.skin_temp = 300.0 # Temperature of the outside of the rotor [K]
self.current = 0.0 # HTS coil current. [A]
self.resistance = 0.0 # Resistance of the HTS oils. [ohm]
self.length = 0.0 # Physical size of rotor exterior [m]
self.diameter = 0.0 # Physical size of rotor exterior [m]
self.surface_area = 0.0 # Surface area of the rotor. [m2]
self.R_value = 125.0 # R_Value of the cryostat wall. [K.m2/W]
self.number_of_engines = 2.0 # Number of rotors on the vehicle
self.temperature = 0.0 # Temperature inside of the rotor [K]
self.skin_temp = 300.0 # Temperature of the outside of the rotor [K]
self.current = 0.0 # HTS coil current. [A]
self.resistance = 0.0 # Resistance of the HTS oils. [ohm]
self.length = 0.0 # Physical size of rotor exterior [m]
self.diameter = 0.0 # Physical size of rotor exterior [m]
self.surface_area = 0.0 # Surface area of the rotor. [m2]
self.R_value = 125.0 # R_Value of the cryostat wall. [K.m2/W]
self.number_of_engines = 2.0 # Number of rotors on the vehicle
self.inputs.hts_current = 0.0 #[A]
self.inputs.ambient_temp = 0.0 #[K]

self.outputs.coil_power = 0.0 #[W]
self.outputs.coil_voltage = 0.0
self.outputs.cryo_load = 0.0 #[W]

def power(self, current, ambient_temp):
def power(self, conditions):
""" Calculates the electrical power draw from the HTS coils, and the total heating load on the HTS rotor cryostat.
Assumptions:
Expand All @@ -71,26 +77,35 @@ def power(self, current, ambient_temp):
N/A
Inputs:
current [A]
ambient_temp [K]
self.inputs
current [A]
ambient_temp [K]
Outputs:
input_power [W]
cryogenic_load [W]
self.outputs
coil_power [W]
cryogenic_load [W]
coil_voltage [V]
Properties Used:
self.
temperature [K]
resistance [ohm]
surface_area [m2]
R_value [K.m2/W]
"""

# unpack
cryo_temp = self.temperature
coil_R = self.resistance
surface_area = self.surface_area
r_value = self.R_value

current = self.inputs.hts_current
ambient_temp = self.inputs.ambient_temp


# Calculate HTS coil power
# This is both the electrical power required to operate the coil, and the thermal load imparted by the coil into the cryostat.
coil_power = coil_R * current**2
Expand All @@ -108,4 +123,4 @@ def power(self, current, ambient_temp):
self.outputs.coil_voltage = coil_voltage
self.outputs.cryo_load = cryo_load

return coil_power
return coil_power
2 changes: 1 addition & 1 deletion trunk/SUAVE/Components/Energy/Converters/Turboelectric.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Components-Energy-Converters
# Turboelectric.py
#
# Created: Nov 2019, K. Hamilton
# Created: Nov 2019, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004
# Modified: Nov 2021, S. Claridge
# ----------------------------------------------------------------------
# Imports
Expand Down
27 changes: 19 additions & 8 deletions trunk/SUAVE/Components/Energy/Cooling/Cryocooler.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ class Cryocooler(Energy_Component):
def __defaults__(self):

# Initialise cryocooler properties as null values
self.cooler_type = ''
self.rated_power = 0.0
self.min_cryo_temp = 0.0
self.ambient_temp = 300.0
self.cooler_type = ''
self.rated_power = 0.0
self.min_cryo_temp = 0.0
self.ambient_temp = 300.0
self.inputs.cooling_power = 0.0
self.inputs.cryo_temp = 0.0
self.outputs.mass_properties.mass = 0.0
self.outputs.rated_power = 0.0

def energy_calc(self, cooling_power, cryo_temp, amb_temp):
def energy_calc(self, conditions):

""" Calculate the power required by the cryocooler based on the cryocooler type, the required cooling power, and the temperature conditions.
Expand Down Expand Up @@ -63,6 +67,12 @@ def energy_calc(self, cooling_power, cryo_temp, amb_temp):
Properties Used:
N/A
"""

amb_temp = conditions.freestream.temperature
cooling_power = self.inputs.cooling_power
cryo_temp = self.inputs.cryo_temp


# Prevent unrealistic temperature changes.
if np.amin(cryo_temp) < 1.:

Expand Down Expand Up @@ -135,10 +145,11 @@ def energy_calc(self, cooling_power, cryo_temp, amb_temp):

print("Warning: The required cryogenic temperature of " + str(cryo_temp) + " is not achievable using a " + self.cooler_type + " cryocooler at an ambient temperature of " + str(amb_temp) + ". The minimum temperature achievable is " + str(temp_min))

self.mass_properties.mass = mass
self.rated_power = input_power
self.outputs.mass_properties.mass = mass
self.outputs.rated_power = input_power


return [input_power, mass]

return [input_power, mass]


22 changes: 16 additions & 6 deletions trunk/SUAVE/Components/Energy/Cooling/Cryogenic_Heat_Exchanger.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## @ingroup Components-Energy-Cooling
# Cryogenic_Heat_Exchanger.py
#
# Created: Feb 2020, K. Hamilton
# Created: Feb 2020, K. Hamilton - Through New Zealand Ministry of Business Innovation and Employment Research Contract RTVU2004

# ----------------------------------------------------------------------
# Imports
Expand All @@ -14,7 +14,7 @@

from SUAVE.Core import Data
from SUAVE.Components.Energy.Energy_Component import Energy_Component
from SUAVE.Methods.Cooling.Cryogen.Consumption import Coolant_use
from SUAVE.Methods.Weights.Cooling.Cryogen.Consumption import Coolant_use

# ----------------------------------------------------------------------
# Cryogenic Heat Exchanger Component
Expand Down Expand Up @@ -57,8 +57,12 @@ def __defaults__(self):
self.cryogen_outlet_temperature = 300.0 # [K]
self.cryogen_pressure = 100000.0 # [Pa]
self.cryogen_is_fuel = 0.0 # Proportion of cryogen that is burned as fuel. Assumes the cryogen is the same as the fuel, e.g. that both are hydrogen.

def energy_calc(self,cooling_power, conditions):
self.inputs.cooling_power = 0.0 # [W]
self.outputs.mdot = 0.0 #[kg/s]

def energy_calc(self, conditions):


""" This calculates the mass of cryogen required to achieve the desired cooling power given the temperature of the cryogen supplied, and the desired temperature of the cryogenic equipment.
Assumptions:
Expand All @@ -73,8 +77,12 @@ def energy_calc(self,cooling_power, conditions):
cryogen_outlet_temperature [K]
cryogen_pressure [Pa]
self.inputs
cooling_power [W]
Outputs:
cryogen_mass_flow [kg/s]
self.outputs.
mdot [kg/s]
Properties Used:
Expand All @@ -84,13 +92,15 @@ def energy_calc(self,cooling_power, conditions):
temp_out = self.cryogen_outlet_temperature
pressure = self.cryogen_pressure
cryogen = self.cryogen
amb_pressure = conditions.freestream.pressure

cooling_power = self.inputs.cooling_power

# If the heat exchanger does not vent to ambient, set the system pressure.
vent_pressure = pressure

# calculate the cryogen mass flow
mdot = Coolant_use(cryogen,temp_in,temp_out,cooling_power,vent_pressure)
self.outputs.mdot = mdot

return mdot

Expand Down

0 comments on commit 1220ba1

Please sign in to comment.