本文整理汇总了Python中SUAVE.Structure.Data.fuel方法的典型用法代码示例。如果您正苦于以下问题:Python Data.fuel方法的具体用法?Python Data.fuel怎么用?Python Data.fuel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SUAVE.Structure.Data
的用法示例。
在下文中一共展示了Data.fuel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_results
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def check_results(new_results):
# check segment values
truth = Data()
truth.dist = [6426122.4935872 , 5848398.49923247 ,7044468.46851841]
truth.fuel = [ 14771. , 12695. , 12695.]
error = Data()
error.dist = np.max(np.abs(new_results.dist-truth.dist))
error.fuel = np.max(np.abs(new_results.fuel-truth.fuel))
for k,v in error.items():
assert(np.abs(v)<0.001)
示例2: check_results
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def check_results(new_results):
# check segment values
truth = Data()
truth.fuel = [ 14246. , 12234. , 12162.]
truth.tow = [ 53855. , 49919. , 39989.]
error = Data()
error.fuel = np.max(np.abs(new_results.fuel-truth.fuel))
error.tow = np.max(np.abs(new_results.tow-truth.tow))
for k,v in error.items():
assert(np.abs(v)<0.5)
示例3: evaluate_range_from_short_field
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def evaluate_range_from_short_field(vehicle,mission,results):
# unpack
airport_short_field = mission.airport_short_field
tofl = airport_short_field.field_lenght
takeoff_config = vehicle.configs.takeoff
from SUAVE.Methods.Performance import find_takeoff_weight_given_tofl
# evaluate maximum allowable takeoff weight from a short field
tow_short_field = find_takeoff_weight_given_tofl(vehicle,takeoff_config,airport_short_field,tofl)
# determine maximum range based in tow short_field
from SUAVE.Methods.Performance import size_mission_range_given_weights
# unpack
cruise_segment_tag = 'Cruise'
mission_payload = vehicle.mass_properties.payload
# call function
distance,fuel = size_mission_range_given_weights(vehicle,mission,cruise_segment_tag,mission_payload,tow_short_field)
# pack
short_field = Data()
short_field.tag = 'short_field'
short_field.takeoff_weight = tow_short_field
short_field.range = distance
short_field.fuel = fuel
results.short_field = short_field
return results
示例4: main
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def main():
# define the problem
vehicle, mission = full_setup()
# run the problem
# defining inputs of the module
cruise_segment_tag = 'Cruise'
mission_payload = [11792. , 9868. , 0. ]
takeoff_weight = [54480. , 50480. , 40612. ]
# call module
distance,fuel = size_mission_range_given_weights(vehicle,mission,cruise_segment_tag,mission_payload,takeoff_weight)
# check the results
results = Data()
results.dist = distance
results.fuel = fuel
check_results(results)
return
示例5: payload
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def payload(TOW, empty, num_pax, wt_cargo, wt_passenger = 195.,wt_baggage = 30.):
""" output = SUAVE.Methods.Weights.Correlations.Tube_Wing.payload(TOW, empty, num_pax, wt_cargo)
Calculate the weight of the payload and the resulting fuel mass
Inputs:
TOW - [kilograms]
wt_empty - Operating empty weight of the aircraft [kilograms]
num_pax - number of passengers on the aircraft [dimensionless]
wt_cargo - weight of cargo being carried on the aircraft [kilogram]
wt_passenger - weight of each passenger on the aircraft [dimensionless]
wt_baggage - weight of the baggage for each passenger [dimensionless]
Outputs:
output - a data dictionary with fields:
payload - weight of the passengers plus baggage and paid cargo [kilograms]
pax - weight of all the passengers [kilogram]
bag - weight of all the baggage [kilogram]
fuel - weight of the fuel carried[kilogram]
empty - operating empty weight of the aircraft [kilograms]
Assumptions:
based on FAA guidelines for weight of passengers
"""
# process
wt_pax = wt_passenger * num_pax * Units.lb
wt_bag = wt_baggage * num_pax *Units.lb
wt_payload = wt_pax + wt_bag + wt_cargo
wt_fuel = TOW - wt_payload - empty
# packup outputs
output = Data()
output.payload = wt_payload
output.pax = wt_pax
output.bag = wt_bag
output.fuel = wt_fuel
output.empty = empty
return output
示例6: main
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def main():
# define the problem
vehicle, mission = full_setup()
# run the problem
# defining inputs of the module
cruise_segment_tag = 'Cruise'
mission_payload = [11792. , 9868. , 10. ]
target_range = np.multiply ( [ 3470. , 3158. , 3804. ] , 1. * Units.nautical_mile )
# call module
distance,fuel,tow = size_weights_given_mission_range(vehicle,mission,cruise_segment_tag,mission_payload,target_range)
# check the results
results = Data()
results.dist = distance
results.fuel = fuel
results.tow = tow
check_results(results)
return
示例7: main
# 需要导入模块: from SUAVE.Structure import Data [as 别名]
# 或者: from SUAVE.Structure.Data import fuel [as 别名]
def main():
vehicle = SUAVE.Vehicle()# Create the vehicle for testing
# Parameters Required
vehicle.envelope.ultimate_load = 3.5 # Ultimate load
vehicle.mass_properties.max_takeoff = 79015.8 * Units.kilograms # Maximum takeoff weight in kilograms
vehicle.mass_properties.max_zero_fuel = 79015.8 * 0.9 * Units.kilograms # Maximum zero fuel weight in kilograms
vehicle.envelope.limit_load = 1.5 # Limit Load
turbofan = SUAVE.Components.Propulsors.TurboFanPASS()
turbofan.tag = 'Turbo Fan'
turbofan.number_of_engines = 2. # Number of engines on the aircraft
turbofan.thrust.design = 1000. * Units.newton # Define Thrust in Newtons
vehicle.append_component(turbofan)
vehicle.passengers = 170. # Number of passengers
vehicle.mass_properties.cargo = 0. * Units.kilogram # Mass of cargo
vehicle.systems.control = "fully powered" # Specify fully powered, partially powered or anything else is fully aerodynamic
vehicle.systems.accessories = "medium-range" # Specify what type of aircraft you have
vehicle.reference_area = 124.862 * Units.meter**2 # Wing gross area in square meters
wing = SUAVE.Components.Wings.Wing()
wing.tag = 'Main Wing'
wing.spans.projected = 50. * Units.meter # Span in meters
wing.taper = 0.2 # Taper ratio
wing.thickness_to_chord = 0.08 # Thickness-to-chord ratio
wing.sweep = .4363323 * Units.rad # sweep angle in degrees
wing.chords.root = 15. * Units.meter # Wing root chord length
wing.chords.mean_aerodynamic = 10. * Units.meters # Length of the mean aerodynamic chord of the wing
wing.position = [20,0,0] * Units.meters # Location of main wing from origin of the vehicle
wing.aerodynamic_center = [3,0,0] * Units.meters # Location of aerodynamic center from origin of the main wing
vehicle.append_component(wing)
fuselage = SUAVE.Components.Fuselages.Fuselage()
fuselage.tag = 'Fuselage'
fuselage.areas.wetted = 688.64 * Units.meter**2 # Fuselage wetted area
fuselage.differential_pressure = 55960.5 * Units.pascal # Maximum differential pressure
fuselage.width = 4. * Units.meter # Width of the fuselage
fuselage.heights.maximum = 4. * Units.meter # Height of the fuselage
fuselage.lengths.total = 58.4 * Units.meter # Length of the fuselage
fuselage.number_coach_seats = 200.
vehicle.append_component(fuselage)
wing = SUAVE.Components.Wings.Wing()
wing.tag = 'Horizontal Stabilizer'
wing.areas.reference = 75. * Units.meters**2 # Area of the horizontal tail
wing.spans.projected = 15. * Units.meters # Span of the horizontal tail
wing.sweep = 38. * Units.deg # Sweep of the horizontal tail
wing.chords.mean_aerodynamic = 5. * Units.meters # Length of the mean aerodynamic chord of the horizontal tail
wing.thickness_to_chord = 0.07 # Thickness-to-chord ratio of the horizontal tail
wing.areas.exposed = 199.7792 # Exposed area of the horizontal tail
wing.areas.wetted = 249.724 # Wetted area of the horizontal tail
wing.position = [45,0,0] # Location of horizontal tail from origin of the vehicle
wing.aerodynamic_center = [3,0,0] # Location of aerodynamic center from origin of the horizontal tail
vehicle.append_component(wing)
wing = SUAVE.Components.Wings.Wing()
wing.tag = 'Vertical Stabilizer'
wing.areas.reference = 60. * Units.meters**2 # Area of the vertical tail
wing.spans.projected = 15. * Units.meters # Span of the vertical tail
wing.thickness_to_chord = 0.07 # Thickness-to-chord ratio of the vertical tail
wing.sweep = 40. * Units.deg # Sweep of the vertical tail
wing.t_tail = "false" # Set to "yes" for a T-tail
vehicle.append_component(wing)
weight = Tube_Wing.empty(vehicle)
actual = Data()
actual.payload = 17349.9081525
actual.pax = 15036.5870655
actual.bag = 2313.321087
actual.fuel = -6993.89102491
actual.empty = 68659.7828724
actual.wing = 27694.192985
actual.fuselage = 11504.5186408
actual.propulsion = 88.3696093424
actual.landing_gear = 3160.632
actual.systems = 16655.7076511
actual.wt_furnish = 7466.1304102
actual.horizontal_tail = 2191.30720639
actual.vertical_tail = 5260.75341411
actual.rudder = 2104.30136565
error = Data()
error.payload = (actual.payload - weight.payload)/actual.payload
error.pax = (actual.pax - weight.pax)/actual.pax
error.bag = (actual.bag - weight.bag)/actual.bag
error.fuel = (actual.fuel - weight.fuel)/actual.fuel
error.empty = (actual.empty - weight.empty)/actual.empty
error.wing = (actual.wing - weight.wing)/actual.wing
error.fuselage = (actual.fuselage - weight.fuselage)/actual.fuselage
error.propulsion = (actual.propulsion - weight.propulsion)/actual.propulsion
error.landing_gear = (actual.landing_gear - weight.landing_gear)/actual.landing_gear
error.systems = (actual.systems - weight.systems)/actual.systems
error.wt_furnish = (actual.wt_furnish - weight.wt_furnish)/actual.wt_furnish
error.horizontal_tail = (actual.horizontal_tail - weight.horizontal_tail)/actual.horizontal_tail
error.vertical_tail = (actual.vertical_tail - weight.vertical_tail)/actual.vertical_tail
error.rudder = (actual.rudder - weight.rudder)/actual.rudder
for k,v in error.items():
#.........这里部分代码省略.........