forked from FernFCT/Model
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b301ef
commit 0384523
Showing
5 changed files
with
305 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
# Estimate direct operating costs per flight including: acquisition cost, | ||
# insurance cost, operating facility cost, energy cost, and maintenance. | ||
# | ||
# Inputs: | ||
# rProp - Propeller or rotor radius [m] | ||
# cruiseSpeed - Cruise Speed [m/s] | ||
# avgDist - Nominal trip distance [m] | ||
# shaftPower - [kW] | ||
# mass - Maximum takeoff mass [kg] | ||
# structure w/ mass.structural, mass.battery, mass.motors | ||
# instead use: massStruct, massBatt, massMotor | ||
# cruiseOutput - Structure containing cruise performance outputs | ||
# structure w/ span = .bRef, chord = .cRef | ||
# instead use: bRef, cRef | ||
# powerToWeight- power to weight ratio [kW / kg] | ||
# Functions Called | ||
# costBuildup - calculate tooling cost | ||
# Outputs: | ||
# C - Operating cost per flight [$] | ||
# Data to check: | ||
# cost of material/kg | ||
# cost of battery ($/kW-hr) | ||
# cost of motor ($1500 for 10 kg motor) (check data here) | ||
# cost of servo ($800 each) | ||
# avionics cost = $30,000 | ||
# energy cost [$ per kW-hr], check for in LA | ||
# 2000 battery life cycles | ||
# 6000 motor life hours | ||
# 6000 servo life hours | ||
# Assumed inputs | ||
# 600 flight hours per year (w/ flight time, calc flights per year) | ||
# 10 vehicle life years | ||
# 200 vehicles per facility | ||
|
||
# From PDR: | ||
# rProp = 1m, cruiseSpeed = 102.82 m/s, avgDist = 193121 m, | ||
# shaftPower = 156, mass.structural = 819, mass.battery = 627.66, mass.motors = 635.8 | ||
# cruiseOutput.bRef = 13.21 m, cruiseOutput.cRef = 1 m, powerToWeight = 0.22 kW/kg | ||
# mass.structural = 819; mass.battery = 627.66; mass.motors = 635.8; | ||
# cruiseOutput.bRef = 13.21; cruiseOutput.cRef = 1; | ||
# [C] = operatingCost(1,102.82,193121,156,mass,cruiseOutput,0.22); | ||
|
||
#def operatingCost2( r_prop, cruise_speed, avg_dist, shaft_power, mass_struct, mass_batt, mass_motor, b_ref, cRef, power_to_weight ): | ||
# function inputs | ||
r_prop = 1 | ||
cruise_speed = 102.82 | ||
avg_dist = 193121 | ||
shaft_power = 156 | ||
mass_struct = 180 | ||
mass_batt = 627.66 | ||
mass_motor = 635.8 | ||
b_ref = 13.21 | ||
c_ref = 1 | ||
power_to_weight = 0.22 | ||
|
||
from costanalysis.CostBuildup import CostBuildup | ||
|
||
# Assumptions | ||
flight_hours_per_year = 600 | ||
flight_time = avg_dist/cruise_speed | ||
flights_per_year = flight_hours_per_year / (flight_time / 3600) | ||
vehicle_life_years = 10 | ||
n_vehicles_per_facility = 200 | ||
|
||
|
||
# def CostBuildup( r_prop,c_ref, b_ref ): | ||
# # Inputs | ||
# fuselage_width = 1 | ||
# fuselage_length = 5 | ||
# toc = 0.15 # Wing / canard thickness | ||
# prop_radius = r_prop | ||
# prop_chord = 0.15 * prop_radius | ||
# x_hinge = 0.8 | ||
# winglet = 0.2 | ||
|
||
# parts_per_tool = 1000 | ||
|
||
# fuselage_height = 1.3 # Guess | ||
# span = b_ref | ||
# chord = c_ref | ||
|
||
# tool_cost_per_vechile = 100 | ||
|
||
# return tool_cost_per_vechile | ||
|
||
# Tooling Cost | ||
tool_cost_per_vehicle = CostBuildup(r_prop,b_ref, c_ref) | ||
|
||
# Material Cost | ||
material_cost_per_kg = 220 | ||
material_cost = material_cost_per_kg * mass_struct | ||
# Battery Cost | ||
power_to_weight_hr = power_to_weight * flight_time / 3600 | ||
battery_cost_per_kg = 700 * power_to_weight_hr # Roughly $700/kW-hr * P/W [kW-hr /kg] | ||
battery_cost = battery_cost_per_kg * mass_batt | ||
# Motor Cost | ||
motor_cost_per_kg = 150 # Approx $1500 for 10 kg motor + controller ? | ||
motor_cost = motor_cost_per_kg * mass_motor | ||
|
||
# Servo cost | ||
n_servo = 14 # 8 props, 4 surfaces, 2 tilt | ||
servo_cost = n_servo * 800 # Estimate $800 per servo in large quantities | ||
|
||
# Avionics cost | ||
avionics_cost = 30000 | ||
|
||
# BRS (Ballistics Recovery System) cost | ||
BRS_cost = 5200 | ||
|
||
# Total acquisition cost | ||
acquisition_cost = battery_cost + motor_cost + servo_cost + avionics_cost + BRS_cost + material_cost + tool_cost_per_vehicle | ||
acquisition_cost_per_flight = acquisition_cost/(flights_per_year * vehicle_life_years) | ||
|
||
# Insurance Cost | ||
# Follow R22 for estimate of 6.5# of acquisition cost | ||
insurance_cost_per_year = acquisition_cost * 0.065 | ||
insurance_cost_per_flight = insurance_cost_per_year/flights_per_year | ||
|
||
# Facility rental cost | ||
vehicle_footprint = 1.2 * (8 * r_prop + 1) * (4 * r_prop + 3); # m^2, 20# for movement around aircraft for maintenance, etc. | ||
area_cost = 10.7639 * 2 * 12; # $/m^2, $2/ft^2 per month assumed | ||
|
||
# Facility Cost = Vehicle footprint + 10x footprint for operations | ||
# averaged over # of vehicles at each facility | ||
facility_cost_per_year = (vehicle_footprint + 10*vehicle_footprint/n_vehicles_per_facility) * area_cost | ||
facility_cost_per_flight_hour = facility_cost_per_year/flight_hours_per_year | ||
facility_cost_per_flight = facility_cost_per_flight_hour * flight_time / 3600 | ||
|
||
# Electricity Cost | ||
# E * $/kWhr including 90# charging efficiency | ||
# Average US electricity cost is $0.12 per kW-hr, up to $0.20 per kW-hr in CA | ||
E = shaft_power * flight_time / 3600 | ||
energy_cost_per_flight = 0.12 * E / 0.9 | ||
|
||
# Battery Replacement Cost | ||
batt_life_cycles = 2000 | ||
battery_repl_cost_per_flight = battery_cost/batt_life_cycles | ||
|
||
# Motor Replacement Cost | ||
motor_life_hrs = 6000 | ||
motor_repl_cost_per_flight = flight_time / 3600 / motor_life_hrs * motor_cost | ||
|
||
# Servo Replacement Cost | ||
servo_life_hrs = 6000 | ||
servo_repl_cost_per_flight = flight_time / 3600 / servo_life_hrs * servo_cost | ||
|
||
# Maintenace Cost | ||
human_cost_per_hour = 60 | ||
man_hr_per_flight_hour = 0.10 # periodic maintenance estimate | ||
man_hr_per_flight = 0.2 # Inspection, battery swap estimate | ||
labor_cost_per_flight = (man_hr_per_flight_hour * flight_time / 3600 + man_hr_per_flight) * human_cost_per_hour | ||
|
||
# Cost Per Flight | ||
cost_per_flight = acquisition_cost_per_flight + insurance_cost_per_flight + facility_cost_per_flight + \ | ||
energy_cost_per_flight + battery_repl_cost_per_flight + motor_repl_cost_per_flight + \ | ||
servo_repl_cost_per_flight + labor_cost_per_flight | ||
|
||
print('Cost Per Flight: $', cost_per_flight*1000) | ||
# return [C] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Estimate tooling cost of a vehicle by summing tooling costs for all major | ||
# components | ||
# | ||
# Inputs: | ||
# rProp - Prop/rotor radius [m] | ||
# cruiseOutput - Structure with cruise performance data | ||
# | ||
# Outputs: | ||
# toolCostPerVehicle - Estimate of tool cost per vehicle [$] | ||
# | ||
# Functions Called: | ||
# toolingCost.m | ||
|
||
#function toolCostPerVehicle = costBuildup(rProp,cruiseOutput) | ||
import numpy as np | ||
from .ToolingCost import ToolingCost | ||
|
||
def CostBuildup(r_prop,c_ref, b_ref): | ||
# Inputs | ||
fuselage_width = 1 | ||
fuselage_length = 5 | ||
toc = 0.15 # Wing / canard thickness | ||
prop_radius = r_prop | ||
prop_chord = 0.15 * prop_radius | ||
x_hinge = 0.8 | ||
winglet = 0.2 | ||
|
||
parts_per_tool = 1000 | ||
|
||
fuselage_height = 1.3 # Guess | ||
span = b_ref | ||
chord = c_ref | ||
|
||
# tool_cost_per_vechile = 100 # used as test value | ||
|
||
# Wing Tooling | ||
wing_tool_cost = np.array([0, 0, 0, 0]) | ||
wing_tool_cost[0] = ToolingCost((span - fuselage_width)/2, toc*chord, chord*0.2) # Leading Edge | ||
wing_tool_cost[1] = ToolingCost((span - fuselage_width)/2, toc*chord*0.7, chord*0.2) # Aft spar | ||
wing_tool_cost[2] = ToolingCost((span - fuselage_width)/2, chord*0.75, 0.02)*2 # Upper/Lower skin | ||
wing_tool_cost[3] = ToolingCost(span, toc*chord, chord*.20) # Forward spar | ||
wing_tool_cost = 2*(2*sum(wing_tool_cost[0:3])+wing_tool_cost[3]) # Total wing tooling cost (matched tooling) | ||
|
||
# Winglet Tooling | ||
winglet_tool_cost = np.array([0, 0, 0, 0]) | ||
winglet_tool_cost[0] = ToolingCost(winglet*span/2, toc*chord, chord*.2) # Leading edge | ||
winglet_tool_cost[1] = ToolingCost(winglet*span/2,toc*chord*0.7,chord*.2) # Aft spar | ||
winglet_tool_cost[2] = ToolingCost(winglet*span/2,chord*0.75,0.02)*2 # Upper/Lower skin | ||
winglet_tool_cost[3] = ToolingCost(winglet*span/2,toc*chord,chord*.20) # Forward spar | ||
winglet_tool_cost = 4*sum(winglet_tool_cost) # Total winglet tooling cost (matched tooling) | ||
|
||
# Canard Tooling | ||
canard_tool_cost = wing_tool_cost # Total canard tooling cost | ||
|
||
# Fuselage Tooling | ||
fuselage_tool_cost = np.array([0, 0, 0, 0]) | ||
fuselage_tool_cost[0] = ToolingCost(fuselage_length*.8,fuselage_height,fuselage_width/2)*2 # Right/Left skin | ||
fuselage_tool_cost[1] = ToolingCost(fuselage_length*.8,fuselage_width/2,fuselage_height/4) # Keel | ||
fuselage_tool_cost[2] = ToolingCost(fuselage_width,fuselage_height,0.02)*2 # Fwd/Aft Bulkhead | ||
fuselage_tool_cost[3] = ToolingCost(fuselage_length*.1,fuselage_width,fuselage_height/3) # Nose/Tail cone | ||
fuselage_tool_cost = 2*sum(fuselage_tool_cost) # Total fuselage tooling cost (matched tooling) | ||
|
||
# Prop Tooling | ||
prop_tool_cost = np.array([0, 0]) | ||
prop_tool_cost[0] = ToolingCost(prop_radius,prop_chord,prop_chord*toc/2)*2 # Skin | ||
prop_tool_cost[1] = ToolingCost(prop_radius,prop_chord*toc,prop_chord/4)*2 # Spar tool | ||
prop_tool_cost = 4*sum(prop_tool_cost) # Total propeller tooling cost (left/right hand) (matched tooling) | ||
|
||
# Control Surface (2 tools) | ||
control_tool_cost = np.array([0, 0]) | ||
control_tool_cost[0] = ToolingCost((span-fuselage_width)/2,(1-x_hinge)*chord,chord*toc/4) # Skin | ||
control_tool_cost[1] = ToolingCost((span-fuselage_width)/2,(1-x_hinge)*chord,chord*toc/4) # Skin | ||
control_tool_cost = 8*sum(control_tool_cost) # Total wing tooling (matched tooling) | ||
|
||
# Total tool cost | ||
total_tool_cost = wing_tool_cost + canard_tool_cost + fuselage_tool_cost + prop_tool_cost + control_tool_cost + winglet_tool_cost | ||
|
||
tool_cost_per_vechile = total_tool_cost / parts_per_tool | ||
|
||
return tool_cost_per_vechile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Estimates tooling cost based on part dimensions including material, rough | ||
# machining, and finishing machining | ||
# | ||
# Inputs: | ||
# length - part length [m] | ||
# width - part width [m] | ||
# depth - part depth [m] | ||
# | ||
# Output: | ||
# cost - Tool cost [$] | ||
# | ||
import math | ||
|
||
def ToolingCost(length, width, depth): | ||
# Material | ||
tool_side_offset = 0.09 # Offset on each side of tool | ||
tool_depth_offset = 0.03 # Offset at bottom of tool | ||
tool_cost = 10000 # Cost be m^3 of tooling material [$/m^3] | ||
|
||
tool_volume = (length + 2 * tool_side_offset) * (width + 2 * tool_side_offset) * (depth + tool_depth_offset) | ||
material_cost = tool_cost * tool_volume # Tooling material costs | ||
|
||
# Machining (Rough Pass) | ||
rough_SFM = 200 # Roughing surface feet per minute | ||
rough_FPT = 0.003 # Roughing feed per tooth [in] | ||
rough_cost_rate = 150/3600 # Cost to rough [$/s] | ||
rough_bit_diam = 0.05 # Rougher diameter [m] | ||
|
||
rough_bit_depth = rough_bit_diam/4 # Rougher cut depth [m] | ||
rough_RPM = 3.82 * rough_SFM / (39.37 * rough_bit_diam) # Roughing RPM | ||
rough_feed = rough_FPT * rough_RPM * 2 * 0.00042 # Roughing Feed [m/s] | ||
rough_bit_step = 0.8 * rough_bit_diam # Rougher step size | ||
|
||
cut_volume = length * math.pi * depth * width / 4 # Amount of material to rough out | ||
rough_time = cut_volume / (rough_feed * rough_bit_step * rough_bit_depth) # Time for roughing | ||
rough_cost = rough_time * rough_cost_rate # Roughing cost | ||
|
||
# Machining (Finish Pass) | ||
finish_SFM = 400 # Roughing surface feet per minute | ||
finish_FPT = 0.004 # Roughing feed per tooth [in] | ||
finish_cost_rate = 175/3600 # Cost to finish [$/s] | ||
finish_bit_diam = 0.006 # Finish diameter [m] | ||
finish_passes = 5 # Number of surface passes | ||
|
||
finish_RPM = 3.82 * finish_SFM / (39.37 * finish_bit_diam) # Roughing RPM | ||
finish_feed = finish_FPT * finish_RPM * 2 * 0.00042 # Roughing Feed [m/s] | ||
|
||
def EllipsePerimeter(a, b): | ||
h = (a - b)**2 / (a + b)**2 | ||
p = math.pi*(a+b)*(1+3*h/(10+(4-3*h)**0.5)) | ||
return p | ||
|
||
finish_bit_step = 0.8 * finish_bit_diam # Rougher step size | ||
cut_area = length * EllipsePerimeter(width/2,depth)/2; # Amount of material to rough out | ||
finish_time = cut_area / (finish_feed * finish_bit_step) * finish_passes; # Time for roughing | ||
finish_cost = finish_time * finish_cost_rate; # Roughing cost | ||
|
||
# Total Cost | ||
cost = material_cost + rough_cost + finish_cost | ||
|
||
return cost | ||
|
Binary file added
BIN
+1.53 KB
Model/costanalysis/costanalysis/__pycache__/CostBuildup.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.41 KB
Model/costanalysis/costanalysis/__pycache__/ToolingCost.cpython-36.pyc
Binary file not shown.