Skip to content

Commit

Permalink
MED-ABS Model update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoran29 committed Jan 18, 2022
1 parent 3dfe685 commit 555944b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ SAM_flatJSON/results/VAGMD_simulation_output.json
SAM_flatJSON/results/*
SAM_flatJSON/parametric_results/*
!SAM_flatJSON/parametric_results/README.txt
SAM_flatJSON/CSV parametric_results/*
SAM_flatJSON/CSV results/*
.ipynb_checkpoints/Untitled-checkpoint.ipynb
*.xml
*.ini
Expand Down
19 changes: 12 additions & 7 deletions DesalinationModels/ABS_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def __init__(self,
solar_coh = '',
sam_coh = 0.02, # Unit cost of heat from SAM ($/kWh)
cost_storage = 26 , # Cost of thermal storage ($/kWh)
storage_cap = 0 # Capacity of thermal storage (kWh)

storage_cap = 0, # Capacity of thermal storage (kWh)
pump_type = 1
):

self.operation_hour = 24 #* (1-downtime) # Average daily operation hour (h/day)
Expand Down Expand Up @@ -63,17 +63,22 @@ def __init__(self,
self.int_rate = int_rate
self.cost_storage = cost_storage
self.storage_cap = storage_cap

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)

if self.P_req < 400:
self.cost_AHP = (241.425 - 0.03766 * self.P_req) * 1.2 # $/kW
if self.pump_type == 1:
self.cost_AHP = 0.9168 * self.Capacity**(-0.255)
else:
self.cost_AHP = (101.1432 - 0.0025885 * self.P_req) * 1.2
self.cost_AHP = 1.5602 * self.Capacity**(-0.255)

# if self.P_req < 400:
# self.cost_AHP = (241.425 - 0.03766 * self.P_req) * 1.2 # $/kW
# else:
# self.cost_AHP = (101.1432 - 0.0025885 * self.P_req) * 1.2

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



Expand Down
4 changes: 2 additions & 2 deletions DesalinationModels/VAGMD_PSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VAGMD_PSA(object):

def __init__(self,
# Design parameters
module = 1, # '0' for AS7C1.5L module and '1' for AS24C5L module
module = 1, # '0' for AS7C1.5L module and '1' for AS26C7.2L module
TEI_r = 80, # Evaporator channel inlet temperature (ºC)
TCI_r = 25, # Condenser channel inlet temperature (ºC)
FFR_r = 582.7, # Feed flow rate (l/h)
Expand Down Expand Up @@ -152,7 +152,7 @@ def design(self):

# TEI_c: Evaporator channel inlet temperature (ºC)

self.PFlux = a0 + a1 * self.TEI_c + a2 * self.FFR_c + a4 * self.FeedC_c + a5 * self.TEI_c * self.FFR_c + a6 * self.TCI_c * self.FFR_c + a7 * self.FFR_c**2
self.PFlux = a0 + a1 * self.TEI_c + a2 * self.FFR_c + a3 * self.TCI_c + a4 * self.FeedC_c + a5 * self.TEI_c * self.FFR_c + a6 * self.TCI_c * self.FFR_c + a7 * self.FFR_c**2

# TCO (oC)
a0 = 66.3418043159458
Expand Down
2 changes: 1 addition & 1 deletion SAM_flatJSON/SamBaseClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def cost(self, desal):
elif desal == 'ABS':
from DesalinationModels.ABS_cost import ABS_cost
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,
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'],
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)
Expand Down

0 comments on commit 555944b

Please sign in to comment.