本文整理汇总了Python中SUAVE.Core.Data.weight_empty方法的典型用法代码示例。如果您正苦于以下问题:Python Data.weight_empty方法的具体用法?Python Data.weight_empty怎么用?Python Data.weight_empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SUAVE.Core.Data
的用法示例。
在下文中一共展示了Data.weight_empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: summarize
# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import weight_empty [as 别名]
def summarize(interface):
# Unpack
inputs = interface.inputs
vehicle = interface.configs.base
results = interface.results
mission_profile = results.sizing_loop
# Weights
operating_empty = vehicle.mass_properties.operating_empty
payload = vehicle.mass_properties.payload
# pack
summary = SUAVE.Core.Results()
# TOFL for MTOW @ SL, ISA
summary.total_range =mission_profile.segments[-1].conditions.frames.inertial.position_vector[-1,0]
summary.GLW =mission_profile.segments[-1].conditions.weights.total_mass[-1,0]
summary.takeoff_field_length =results.field_length.takeoff
summary.landing_field_length =results.field_length.landing
summary.climb_alt_constr =inputs.climb_alt_fraction_1-inputs.climb_alt_fraction_2
# MZFW margin calculation
#summary.max_zero_fuel_margin = max_zero_fuel - (operating_empty + payload)
# fuel margin calculation
# Print outs
printme = Data()
printme.weight_empty = operating_empty
printme.total_range =summary.total_range/Units.nautical_miles
printme.GLW =summary.GLW
printme.tofl = summary.takeoff_field_length
printme.lfl = summary.landing_field_length
#printme.range_max = summary.range_max_nmi
#printme.max_zero_fuel_margin = summary.max_zero_fuel_margin
#printme.available_fuel_margin = summary.available_fuel_margin
print "RESULTS"
print printme
inputs = interface.inputs
import datetime
fid = open('Results.dat','a')
fid.write('{:18.10f} ; {:18.10f} ; {:18.10f} ; {:18.10f} ; {:18.10f} ; '.format( \
inputs.aspect_ratio,
inputs.reference_area,
#inputs.sweep,
inputs.wing_thickness,
#operating_empty ,
summary.takeoff_field_length ,
summary.landing_field_length
))
fid.write(datetime.datetime.now().strftime("%I:%M:%S"))
fid.write('\n')
## print interface.configs.takeoff.maximum_lift_coefficient
return summary