Conversation
…ture-general_aviation_weights Conflicts: trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/__init__.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/empty.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/fuselage.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/landing_gear.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/payload.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/systems.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/tail_horizontal.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/tail_vertical.py trunk/SUAVE/Methods/Weights/Correlations/General_Aviation/wing_main.py
planes
left a comment
There was a problem hiding this comment.
Looks pretty good. See the comments I have. Should be quick fixes. Fix those and Tim will take a look as well.
| num_pax = vehicle.passengers | ||
| wt_cargo = vehicle.mass_properties.cargo | ||
| num_seats = vehicle.fuselages['fuselage'].number_coach_seats | ||
| #ctrl_type = vehicle.systems.control |
There was a problem hiding this comment.
Either delete this or uncomment out.
| V_fuel = m_fuel/fuel.density #total fuel | ||
| fuel.mass_properties.volume = V_fuel | ||
| S_gross_w = vehicle.reference_area | ||
| #S_gross_w = vehicle.wings['main_wing'].Areas.reference |
| avionics = vehicle.avionics | ||
| W_uav = avionics.mass_properties.uninstalled | ||
|
|
||
| has_air_conditioner = vehicle.has_air_conditioner |
There was a problem hiding this comment.
This is weird to have a key in the vehicle of has_air_conditioner
| output.systems = output_2.wt_systems | ||
| output.systems_breakdown = Data() | ||
| output.systems_breakdown.control_systems = output_2.wt_flt_ctrl | ||
| #output.systems_breakdown.apu = output_2.wt_apu |
| vehicle.hydraulics = hydraulics | ||
| vehicle.landing_gear = landing_gear_component | ||
|
|
||
| #note; air conditioner optional, and weight is added to the air_conditioner object directly |
There was a problem hiding this comment.
I think it's okay to make it optional, just change the key dependence.
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| def fuselage(S_fus, Nult, TOW, w_fus, h_fus, l_fus, l_ht, q_c, V_fuse, diff_p_fus): | ||
| """ | ||
| Calculate the weight of a fuselage for a GA aircraft |
There was a problem hiding this comment.
Add a source, see above comment for ordering of comments.
There was a problem hiding this comment.
I think when possible we should start adding sources by page etc. These weight correlations are on page 590 in the fifth edition.
There was a problem hiding this comment.
Done. I used the 4th edition though
| from SUAVE.Core import Data,Units | ||
| import numpy as np | ||
|
|
||
|
|
| # Landing Gear | ||
| # ---------------------------------------------------------------------- | ||
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| def landing_gear(landing_weight, Nult, strut_length_main, strut_length_nose): |
| wt_pax = wt_passenger * num_pax | ||
| wt_bag = wt_baggage * num_pax | ||
| wt_payload = wt_pax + wt_bag + wt_cargo | ||
| #wt_fuel = TOW - wt_payload - empty |
| output.payload = wt_payload | ||
| output.pax = wt_pax | ||
| output.bag = wt_bag | ||
| #output.fuel = wt_fuel |
timdmacdo
left a comment
There was a problem hiding this comment.
Some more simple comments here
| print 'Relative Errors' | ||
| print error | ||
|
|
||
| for k,v in error.items(): |
There was a problem hiding this comment.
Use 1e-6 unless there's a reason not to.
| @@ -0,0 +1,20 @@ | |||
| ## @defgroup Methods-Weights-Correlations-General_Aviation Generational | |||
| # Provides structural and component weight correlations for general aviation aircraft | |||
| """ SUAVE.Methods.Weights.Correlations.General_Aviation | |||
There was a problem hiding this comment.
Remove these extra comments and add in @InGroup tag
|
|
||
| # thrust_sls should be sea level static thrust. Using design thrust results in wrong propulsor | ||
| # weight estimation. Engine sizing should return this value. | ||
| # for now, using thrust_sls = design_thrust / 0.20, just for optimization evaluations |
There was a problem hiding this comment.
This comment doesn't seem accurate?
| avionics = vehicle.avionics | ||
| W_uav = avionics.mass_properties.uninstalled | ||
|
|
||
| has_air_conditioner = vehicle.has_air_conditioner |
| furnishings.mass_properties.mass = output.systems_breakdown.furnish | ||
| avionics.mass_properties.mass = output.systems_breakdown.avionics | ||
|
|
||
| #fuel.mass_properties.mass = output.fuel |
| # packup outputs | ||
| output = Data() | ||
| output.wt_flt_ctrl = flt_ctrl_wt | ||
| #output.wt_apu = apu_wt |
| Aircraft Design: A Conceptual Approach by Raymer | ||
| """ | ||
| # unpack inputs | ||
| W_0 = TOW / Units.lb # Convert kg to lbs |
| # unpack inputs | ||
| W_0 = TOW / Units.lb # Convert kg to lbs | ||
| S_vt = S_v/ Units.ft**2 # Convert from meters squared to ft squared | ||
| q = q_c /(Units.force_pound / Units.ft**2.) |
| W_0 = TOW / Units.lb # Convert kg to lbs | ||
| S_w = S_wing/ (Units.ft**2) # Convert from meters squared to ft squared | ||
| W_fw = m_fuel/Units.lbs #convert from kg to lbs | ||
| q = q_c /(Units.lbs/(Units.ft**2.)) |
| @@ -0,0 +1,36 @@ | |||
| # integrated_propulsion_general_aviation.py | |||
There was a problem hiding this comment.
Doxygen tags are missing
…ture-general_aviation_weights
| vehicle.has_air_conditioner = 0 | ||
| vehicle.reference_area = 16.2 * Units.meter**2 # Wing gross area in square meters | ||
| vehicle.design_dynamics_pressure =( .5 *freestream0.density*(cruise_speed**2))[0][0] | ||
| vehicle.design_dynamic_pressure =( .5 *freestream0.density*(cruise_speed**2))[0][0] |
There was a problem hiding this comment.
should this be cruise_speed*cruise_speed?
| fuselage.mass_properties.volume = .4*fuselage.lengths.total*(np.pi/4.)*(fuselage.heights.maximum**2.) #try this as approximation | ||
| fuselage.internal_volume = .3*fuselage.lengths.total*(np.pi/4.)*(fuselage.heights.maximum**2.) | ||
| fuselage.areas.wetted = fuselage.lengths.total*(np.pi/4.)*(fuselage.heights.maximum **2) | ||
| fuselage.differential_pressure = 8*Units.psi # Maximum differential pressure |
| fuselage.differential_pressure = 8*Units.psi # Maximum differential pressure | ||
| fuselage.width = 40. * Units.inches # Width of the fuselage | ||
| fuselage.heights.maximum = 75. * Units.inches # Height of the fuselage | ||
| fuselage.lengths.total = (27+2./12.) * Units.feet # Length of the fuselage |
| fuselage.width = 40. * Units.inches # Width of the fuselage | ||
| fuselage.heights.maximum = 75. * Units.inches # Height of the fuselage | ||
| fuselage.lengths.total = (27+2./12.) * Units.feet # Length of the fuselage | ||
| fuselage.lengths.empennage = 9 * Units.feet |
| fuselage.lengths.total = (27+2./12.) * Units.feet # Length of the fuselage | ||
| fuselage.lengths.empennage = 9 * Units.feet | ||
| fuselage.lengths.structure = fuselage.lengths.total-fuselage.lengths.empennage | ||
| fuselage.lengths.cabin = 140 *Units.inches |
| fuselage.lengths.structure = fuselage.lengths.total-fuselage.lengths.empennage | ||
| fuselage.lengths.cabin = 140 *Units.inches | ||
| fuselage.mass_properties.volume = .4*fuselage.lengths.total*(np.pi/4.)*(fuselage.heights.maximum**2.) #try this as approximation | ||
| fuselage.mass_properties.internal_volume = .3*fuselage.lengths.total*(np.pi/4.)*(fuselage.heights.maximum**2.) |
| propulsors = SUAVE.Components.Propulsors.Propulsor() #use weights for the IC engine | ||
| propulsors.tag = 'internal_combustion' | ||
| propulsors.rated_power = 110 *Units.kW # engine correlation is really off | ||
| #propulsors.rated_power = 100 *Units.kW |
There was a problem hiding this comment.
Delete this line. Also what's the issue with the engine correlation?
There was a problem hiding this comment.
It doesn't really match the weight breakdown from Roskam, which is where I got some detailed weight statements. There are a number of possible reasons why, one of which might be different ways of bookkeeping things
There was a problem hiding this comment.
Okay that's fine. If you could just write something like that in the comment I think it would be great.
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| def empty(vehicle): | ||
| """ output = SUAVE.Methods.Weights.Correlations.Tube_Wing.empty(engine,wing,aircraft,fuselage,horizontal,vertical) | ||
| This is for a standard Tube and Wing aircraft configuration. |
There was a problem hiding this comment.
This docstring needs to be updated.
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| def fuselage(S_fus, Nult, TOW, w_fus, h_fus, l_fus, l_ht, q_c, V_fuse, diff_p_fus): | ||
| """ | ||
| Calculate the weight of a fuselage for a GA aircraft |
There was a problem hiding this comment.
I think when possible we should start adding sources by page etc. These weight correlations are on page 590 in the fifth edition.
| # ---------------------------------------------------------------------- | ||
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| def tail_horizontal(S_h, AR_h, sweep_h, q_c, taper_h, t_c_h,Nult,TOW): | ||
| """ weight = SUAVE.Methods.Weights.Correlations.Tube_Wing.tail_horizontal(b_h,sweep_h,Nult,S_h,TOW,mac_w,mac_h,l_w2h,t_c_h) |
There was a problem hiding this comment.
This still lists Tube_Wing. I don't think this is accurate?
There was a problem hiding this comment.
Weird. It looks like git might be having some issues but I repushed it
| # payload.py | ||
| # | ||
| # Created: Jan 2014, A. Wendorff | ||
| # Modified: Feb 2014, A. Wendorff |
| l_fus = l_fuselage / Units.ft # Convert meters to ft | ||
| b_wing = span/Units.ft | ||
|
|
||
|
|
There was a problem hiding this comment.
Lots of white space that can be cleaned up here
| """ | ||
| # unpack inputs | ||
|
|
||
|
|
| propulsors.number_of_engines = 1. | ||
| vehicle.append_component(propulsors) | ||
|
|
||
| #Build an dsize the turbofan to get sls sthrust |
| # Created: Feb 2017, M. Vegh (modified from data originally in cmalpha/cmalpha.py) | ||
| # Modified: | ||
|
|
||
| """ setup file for the Beech 99 aircraft, current values only used to test stability cmalpha |
| config.tag = 'landing' | ||
|
|
||
| config.wings['main_wing'].flaps_angle = 30. * Units.deg | ||
| config.wings['main_wing'].slats_angle = 25. * Units.deg |
|
|
||
|
|
||
| # done! | ||
| return configs No newline at end of file |
There was a problem hiding this comment.
Ask me about the C-172 Carlos and I made.
| actual.systems = 101.412216023 | ||
|
|
||
|
|
||
| #empty weight =1354 * Units.lbs |
| ## @ingroup Methods-Weights-Correlations-General_Aviation | ||
| # empty.py | ||
| # | ||
| # Created: Jan 2014, A. Wendorff |
There was a problem hiding this comment.
Nope. Just missed the author strings. Updated now
| Inputs: | ||
| engine - a data dictionary with the fields: | ||
| thrust_sls - sea level static thrust of a single engine [Newtons] | ||
|
|
| t_c_h = vehicle.wings['horizontal_stabilizer'].thickness_to_chord | ||
| h_tail_exposed = vehicle.wings['horizontal_stabilizer'].areas.exposed / vehicle.wings['horizontal_stabilizer'].areas.wetted | ||
| l_w2h = vehicle.wings['horizontal_stabilizer'].origin[0] + vehicle.wings['horizontal_stabilizer'].aerodynamic_center[0] - vehicle.wings['main_wing'].origin[0] - vehicle.wings['main_wing'].aerodynamic_center[0] #Need to check this is the length of the horizontal tail moment arm | ||
| wt_tail_horizontal = tail_horizontal(S_h, AR_h, sweep_h, q_c, taper_h, t_c_h,Nult,TOW) |
| mac_h = vehicle.wings['horizontal_stabilizer'].chords.mean_aerodynamic | ||
| t_c_h = vehicle.wings['horizontal_stabilizer'].thickness_to_chord | ||
| h_tail_exposed = vehicle.wings['horizontal_stabilizer'].areas.exposed / vehicle.wings['horizontal_stabilizer'].areas.wetted | ||
| l_w2h = vehicle.wings['horizontal_stabilizer'].origin[0] + vehicle.wings['horizontal_stabilizer'].aerodynamic_center[0] - vehicle.wings['main_wing'].origin[0] - vehicle.wings['main_wing'].aerodynamic_center[0] #Need to check this is the length of the horizontal tail moment arm |
| t_tail = vehicle.wings['vertical_stabilizer'].t_tail | ||
| output_3 = tail_vertical(S_v, AR_v, sweep_v, q_c, taper_v, t_c_v, Nult,TOW,t_tail) | ||
| vehicle.wings['vertical_stabilizer'].mass_properties.mass = output_3.wt_tail_vertical | ||
|
|
…ture-general_aviation_weights
…ture-general_aviation_weights Conflicts: regression/scripts/Vehicles/Cessna_172.py regression/scripts/weights/weights.py
| vehicle = SUAVE.Vehicle() | ||
| vehicle.tag = 'Cessna_172_SP' | ||
| GTOW = 2550. * Units.pounds | ||
| vehicle.mass_properties.max_takeoff = GTOW #from Wikipedia |
There was a problem hiding this comment.
Take this comment from wikipedia out.
| actual.fuel_systems = 15.6859717453 | ||
| actual.systems = 108.096549345 | ||
|
|
||
| error = Data() |
added weights correlations for general aviation-type aircraft