From 8584a85871875236417c28a2f8261ec2ff28c959 Mon Sep 17 00:00:00 2001 From: aj Date: Tue, 1 Dec 2020 13:14:49 +0000 Subject: [PATCH] added emb co2 for battery, added efficiency to sim --- maths/battery.m | 8 +++++++- maths/power_sim.m | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/maths/battery.m b/maths/battery.m index 7ee86da..b2c8fb9 100644 --- a/maths/battery.m +++ b/maths/battery.m @@ -28,6 +28,9 @@ cell_height = 65; % mm cell_price = 6; % £ +cell_emb_c = 117.5; % kgCO2eq/kWh +cell_rec_emb_c = 15; % kgCO2eq/kWh + %%%%%%% P IN %V_IN = 450; % V @@ -101,7 +104,7 @@ end max_power_out = voltage_out * current_out; % W 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 @@ -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 fprintf('Totals to %.2f MW including %.2f MW of coupled input power\n', P_OUT / 1e6, P_IN / 1e6); 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); diff --git a/maths/power_sim.m b/maths/power_sim.m index 5179995..13ab8b9 100644 --- a/maths/power_sim.m +++ b/maths/power_sim.m @@ -8,6 +8,9 @@ function [power_in,battery_level,power_out,unused_energy,unavailable_energy, bat 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_OUT_INTERVAL = 1e4; % W amount that load can varies by randomly @@ -82,7 +85,7 @@ for SECOND=1:sim_seconds % CHARGING 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 if batt_capacity < curr_battery @@ -97,7 +100,7 @@ for SECOND=1:sim_seconds % DISCHARGING else 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 if curr_battery < 0