Skip to content

Commit

Permalink
update insurance input
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoran29 committed Apr 1, 2022
1 parent bb1ce25 commit 8c2b41b
Show file tree
Hide file tree
Showing 14 changed files with 189 additions and 26 deletions.
9 changes: 4 additions & 5 deletions DesalinationModels/ABS_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self,

self.operation_hour = 24 #* (1-downtime) # Average daily operation hour (h/day)
self.f_HEX = f_HEX
self.HEX_area = HEX_area*Capacity
self.HEX_area = HEX_area * 86.4 # from m2/m3/day to m3/kg/s
self.Capacity = Capacity
self.STEC = STEC
self.coe = coe
Expand All @@ -66,7 +66,7 @@ def __init__(self,
self.pump_type = pump_type
def lcow(self):

self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area/8841)**0.8)
self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area/302.01)**0.8)

if self.pump_type == 1:
self.cost_AHP = 0.9168 * self.Capacity**(-0.255)
Expand All @@ -83,8 +83,8 @@ def lcow(self):


self.OPEX = self.STEC * (self.fuel_usage * self.coh + (1-self.fuel_usage) * self.sam_coh) \
+ self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.CAPEX \
+ self.Miscellaneous + self.Discharge + self.Insurance/100*self.CAPEX
+ self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.cost_sys*self.Capacity/self.Prod \
+ self.Miscellaneous + self.Discharge + self.Insurance/100*self.cost_sys*self.Capacity/self.Prod

self.LCOW = self.CAPEX + self.OPEX

Expand All @@ -96,7 +96,6 @@ def lcow(self):
cost_output.append({'Name':'Levelized cost of heat (from solar field)','Value':self.sam_coh,'Unit':'$/m3'})
cost_output.append({'Name':'Energy cost','Value':self.STEC * (self.fuel_usage * self.coh + (1-self.fuel_usage) * self.sam_coh) + self.coe * self.SEEC,'Unit':'$/m3'})
cost_output.append({'Name':'Absorption heat pump capital cost','Value':self.cost_AHP,'Unit':'$/kW'})


return cost_output
#%%
Expand Down
13 changes: 7 additions & 6 deletions DesalinationModels/LTMED_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self,

self.operation_hour = 24 #* (1-downtime) # Average daily operation hour (h/day)
self.f_HEX = f_HEX
self.HEX_area = HEX_area*Capacity
self.HEX_area = HEX_area * 86.4 # from m2/m3/day to m3/kg/s
self.Capacity = Capacity
self.STEC = STEC
self.coe = coe
Expand All @@ -65,13 +65,14 @@ def __init__(self,

def lcow(self):

self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area / 8841)**0.8)
self.CAPEX = ((self.cost_sys*self.Capacity+ self.cost_storage * self.storage_cap)*self.int_rate*(1+self.int_rate)**self.yrs) / ((1+self.int_rate)**self.yrs-1) / self.Prod
self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area / 302.01)**0.8)


self.CAPEX = ((self.cost_sys*self.Capacity+ self.cost_storage * self.storage_cap)*self.int_rate*(1+self.int_rate)**self.yrs) / ((1+self.int_rate)**self.yrs-1) / self.Prod

self.OPEX = self.STEC * (self.fuel_usage * self.coh + (1-self.fuel_usage) * self.sam_coh) \
+ self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.CAPEX \
+ self.Miscellaneous + self.Discharge + self.Insurance/100*self.CAPEX
print(self.cost_sys)
+ self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.cost_sys*self.Capacity/self.Prod \
+ self.Miscellaneous + self.Discharge + self.Insurance/100*self.cost_sys*self.Capacity/self.Prod

self.LCOW = self.CAPEX + self.OPEX

Expand Down
15 changes: 9 additions & 6 deletions DesalinationModels/MEDTVC_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self,
Miscellaneous = 0.1, # Other direct/indirect cost ($/m3)
Discharge = 0.02, # Water discharge/disposal cost ($/m3)
Maintenance = 2, # Percentage to the capital cost (%)

Insurance = 0.5, # Percentage to the capital cost (%)
# GOR = 10.475, # Gained output ratio
# downtime = 0.1, # Yearly downtime of the plant (ratio)
yrs = 20, # Expected plant lifetime
Expand All @@ -40,7 +40,7 @@ def __init__(self,

self.operation_hour = 24 #* (1-downtime) # Average daily operation hour (h/day)
self.f_HEX = f_HEX
self.HEX_area = HEX_area*Capacity
self.HEX_area = HEX_area * 86.4 # from m2/m3/day to m3/kg/s
self.Capacity = Capacity
self.STEC = STEC
self.coe = coe
Expand All @@ -63,16 +63,19 @@ def __init__(self,
self.cost_storage = cost_storage
self.storage_cap = storage_cap
self.Nef = Nef
self.Insurance = Insurance
def lcow(self):

self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area/8841)**0.8)

self.cost_sys = 6291 * self.Capacity**(-0.135) * (1- self.f_HEX + self.f_HEX * (self.HEX_area/302.01)**0.8)
self.CAPEX = ((self.cost_sys*self.Capacity+ self.cost_storage * self.storage_cap)*self.int_rate*(1+self.int_rate)**self.yrs) / ((1+self.int_rate)**self.yrs-1) / self.Prod



self.OPEX = self.STEC * (self.fuel_usage * self.coh + (1-self.fuel_usage) * self.sam_coh) + self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.CAPEX + self.Miscellaneous + self.Discharge

self.OPEX = self.STEC * (self.fuel_usage * self.coh + (1-self.fuel_usage) * self.sam_coh) \
+ self.coe * self.SEEC + self.Chemicals + self.Labor + self.Maintenance/100*self.cost_sys*self.Capacity/self.Prod \
+ self.Miscellaneous + self.Discharge + self.Insurance/100*self.cost_sys*self.Capacity/self.Prod

self.LCOW = self.CAPEX + self.OPEX


Expand Down
9 changes: 6 additions & 3 deletions SAM_flatJSON/SamBaseClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ def cost(self, desal):
self.LCOW = LTMED_cost(f_HEX = self.cost_values_json['f_HEX'], downtime = self.cost_values_json['downtime'],
HEX_area = self.LTMED.sA,
Capacity = self.desal_values_json['Capacity'], Prod = self.simu_output[4]['Value'], fuel_usage = self.simu_output[7]['Value'], SEEC = self.cost_values_json['SEEC'], STEC = self.LTMED.STEC,
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'], Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'],
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'],
Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'], Insurance = self.cost_values_json['Insurance'],
yrs = self.cost_values_json['yrs'], int_rate = self.cost_values_json['int_rate'], coe = self.cost_values_json['coe'], solar_coh = self.cost_values_json['solar_coh'], coh = self.cost_values_json['coh'], sam_coh = self.lcoh, cost_storage = self.cost_values_json['cost_storage'], storage_cap = self.LTMED.storage_cap)
self.cost_output = self.LCOW.lcow()

Expand All @@ -844,7 +845,8 @@ def cost(self, desal):
self.LCOW = ABS_cost(f_HEX = self.cost_values_json['f_HEX'], P_req = self.P_req, downtime = self.cost_values_json['downtime'],
HEX_area = self.ABS.sA, pump_type = self.ABS.pump_type,
Capacity = self.desal_values_json['Capacity'], Prod = self.simu_output[4]['Value'], fuel_usage = self.simu_output[7]['Value'], SEEC = self.cost_values_json['SEEC'], STEC = self.ABS.STEC,
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'], Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'],
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'],
Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'], Insurance = self.cost_values_json['Insurance'],
yrs = self.cost_values_json['yrs'], int_rate = self.cost_values_json['int_rate'], coe = self.cost_values_json['coe'], solar_coh = self.cost_values_json['solar_coh'], coh = self.cost_values_json['coh'], sam_coh = self.lcoh, cost_storage = self.cost_values_json['cost_storage'], storage_cap = self.ABS.storage_cap)
self.cost_output = self.LCOW.lcow()

Expand All @@ -853,7 +855,8 @@ def cost(self, desal):
self.LCOW = MEDTVC_cost(f_HEX = self.cost_values_json['f_HEX'], downtime = self.cost_values_json['downtime'],
HEX_area = self.MEDTVC.sA,
Capacity = self.desal_values_json['Capacity'], Prod = self.simu_output[4]['Value'], fuel_usage = self.simu_output[7]['Value'], SEEC = self.cost_values_json['SEEC'], STEC = self.MEDTVC.STEC,
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'], Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'],
Chemicals = self.cost_values_json['Chemicals'], Labor = self.cost_values_json['Labor'], Discharge = self.cost_values_json['Discharge'],
Maintenance = self.cost_values_json['Maintenance'], Miscellaneous = self.cost_values_json['Miscellaneous'], Insurance = self.cost_values_json['Insurance'],
yrs = self.cost_values_json['yrs'], int_rate = self.cost_values_json['int_rate'], coe = self.cost_values_json['coe'], solar_coh = self.cost_values_json['solar_coh'], coh = self.cost_values_json['coh'], sam_coh = self.lcoh, cost_storage = self.cost_values_json['cost_storage'], storage_cap = self.MEDTVC.storage_cap)
self.cost_output = self.LCOW.lcow()

Expand Down
3 changes: 2 additions & 1 deletion SAM_flatJSON/defaults/ABS_cost.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"Miscellaneous": 0.1,
"Discharge": 0.02,
"Maintenance": 2,
"SEEC": 1.5
"SEEC": 1.5,
"Insurance": 0.5
}
3 changes: 2 additions & 1 deletion SAM_flatJSON/defaults/LTMED_cost.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"Miscellaneous": 0.1,
"Discharge": 0.02,
"Maintenance": 2,
"SEEC": 1.5
"SEEC": 1.5,
"Insurance": 0.5
}
2 changes: 1 addition & 1 deletion SAM_flatJSON/defaults/MEDTVC.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"rr" : 30,
"nef" : 14,
"tin" : 25,
"Capacity": 10000,
"Capacity": 2000,
"FeedC_r": 35,
"pm": 24,
"Fossil_f": 0,
Expand Down
3 changes: 2 additions & 1 deletion SAM_flatJSON/defaults/MEDTVC_cost.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"Miscellaneous": 0.1,
"Discharge": 0.02,
"Maintenance": 2,
"SEEC": 1.5
"SEEC": 1.5,
"Insurance": 0.5
}
9 changes: 9 additions & 0 deletions SAM_flatJSON/models/inputs/ABS_cost_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
},
{
"DataType": "SSC_NUMBER",
"Name": "Insurance",
"Label": "Insurance (percentage of CAPEX)",
"Units": "%",
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
}
]
}
9 changes: 9 additions & 0 deletions SAM_flatJSON/models/inputs/LTMED_cost_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
},
{
"DataType": "SSC_NUMBER",
"Name": "Insurance",
"Label": "Insurance (percentage of CAPEX)",
"Units": "%",
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
}
]
}
9 changes: 9 additions & 0 deletions SAM_flatJSON/models/inputs/MEDTVC_cost_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
},
{
"DataType": "SSC_NUMBER",
"Name": "Insurance",
"Label": "Insurance (percentage of CAPEX)",
"Units": "%",
"Require": "*",
"Constraint": "",
"Tab": "Desalination"
}
]
}
2 changes: 1 addition & 1 deletion app/app-data.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"solar": "SC_FPC", "desal": "RO_FO", "finance": "iph_to_lcoefcr", "parametric": false, "project_name": "Project_1", "timestamp": "2022-04-01_00-14-38", "solar_outfile": "SC_FPC2022-04-01_00-14-38_inputs.json", "desal_outfile": "RO_FO2022-04-01_00-14-38_inputs.json", "finance_outfile": "lcoh_calculator2022-04-01_00-14-38_inputs.json"}
{"solar": "SC_FPC", "desal": "MEDTVC", "finance": "iph_to_lcoefcr", "parametric": false, "project_name": "Project_1", "timestamp": "2022-04-01_01-21-59", "solar_outfile": "SC_FPC2022-04-01_01-21-59_inputs.json", "desal_outfile": "MEDTVC2022-04-01_01-21-59_inputs.json", "finance_outfile": "lcoh_calculator2022-04-01_01-21-59_inputs.json"}
2 changes: 1 addition & 1 deletion app/apps/analysis_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ def set_cost_analysis(x):
html.Div(f"Assumed cost of heat (LCOH, from other sources): {r['lcoh']:.3f} $/kWh"),
html.Div(f"Levelized cost of heat (LCOH, from solar field): {r['sam_lcoh']:.3f} $/kWh"),
html.Div(f"Levelized cost of electric energy (LCOE): {r['lcoe']:.2f} $/kWh"),
html.Div(f"Capital cost of heat pump: {r['AHP_cost']:.0f} $/kW"),
html.Div(f"Capital cost of heat pump: {r['AHP_cost']:.2f} $/kW"),
html.Div(f"Capital cost: {r['capital_cost']:.2f} $/m3"),
html.Div(f"Operational and Maintenance cost: {r['ops_cost']:.2f} $/m3"),
html.Div(f"Unit energy cost: {r['energy_cost']:.2f} $/m3",
Expand Down
Loading

0 comments on commit 8c2b41b

Please sign in to comment.