added emb co2 for battery, added efficiency to sim

This commit is contained in:
aj 2020-12-01 13:14:49 +00:00
parent 5bc129fc06
commit 8584a85871
2 changed files with 12 additions and 3 deletions

View File

@ -28,6 +28,9 @@ cell_height = 65; % mm
cell_price = 6; % £ cell_price = 6; % £
cell_emb_c = 117.5; % kgCO2eq/kWh
cell_rec_emb_c = 15; % kgCO2eq/kWh
%%%%%%% P IN %%%%%%% P IN
%V_IN = 450; % V %V_IN = 450; % V
@ -101,7 +104,7 @@ end
max_power_out = voltage_out * current_out; % W max_power_out = voltage_out * current_out; % W
total_capacity = parallel_length * cell_capacity; % Ah total_capacity = parallel_length * cell_capacity; % Ah
total_capacity_Wh = total_capacity * voltage_out; % Ah total_capacity_Wh = total_capacity * voltage_out; % Wh
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Physical Space %% Physical Space
@ -125,3 +128,6 @@ fprintf('%.2f V, %.2f A for %.2f MW\n', voltage_out, current_out, max_power_out
if P_OUT_INCLUDES_P_IN if P_OUT_INCLUDES_P_IN
fprintf('Totals to %.2f MW including %.2f MW of coupled input power\n', P_OUT / 1e6, P_IN / 1e6); fprintf('Totals to %.2f MW including %.2f MW of coupled input power\n', P_OUT / 1e6, P_IN / 1e6);
end end
fprintf('%.2ft (CO2e)\n', ((total_capacity_Wh / 1e3) * cell_emb_c) / 1e3);
fprintf('%.2ft (CO2e) for recycling\n', ((total_capacity_Wh / 1e3) * cell_rec_emb_c) / 1e3);

View File

@ -8,6 +8,9 @@ function [power_in,battery_level,power_out,unused_energy,unavailable_energy, bat
CELL_TOTAL = 159201; % from battery script CELL_TOTAL = 159201; % from battery script
CHARGE_EFF = 0.8;
DISCHARGE_EFF = 0.8;
P_IN_INTERVAL = ( 200e3/(5*60) ) * 0.75; % W amount that gen power increases when required P_IN_INTERVAL = ( 200e3/(5*60) ) * 0.75; % W amount that gen power increases when required
P_OUT_INTERVAL = 1e4; % W amount that load can varies by randomly P_OUT_INTERVAL = 1e4; % W amount that load can varies by randomly
@ -82,7 +85,7 @@ for SECOND=1:sim_seconds
% CHARGING % CHARGING
if battery_net > 0 if battery_net > 0
curr_battery = battery_last + min(battery_net, batt_charge_p); curr_battery = battery_last + min(battery_net, batt_charge_p) * CHARGE_EFF;
% TOO MUCH FOR BATTERY CAPACITY % TOO MUCH FOR BATTERY CAPACITY
if batt_capacity < curr_battery if batt_capacity < curr_battery
@ -97,7 +100,7 @@ for SECOND=1:sim_seconds
% DISCHARGING % DISCHARGING
else else
discharge_p = min(abs(battery_net), batt_dis_p); discharge_p = min(abs(battery_net), batt_dis_p);
curr_battery = battery_last - discharge_p; curr_battery = battery_last - discharge_p / DISCHARGE_EFF;
% BATTERY EMPTY % BATTERY EMPTY
if curr_battery < 0 if curr_battery < 0