|
|
|
|
@ -6884,23 +6884,39 @@
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"Tref = 0\n",
|
|
|
|
|
"Cp = 4190 #J/kgK\n",
|
|
|
|
|
"MWtoJs = 1000_000\n",
|
|
|
|
|
"# Tref = 0\n",
|
|
|
|
|
"# Cp = 4190 #J/kgK\n",
|
|
|
|
|
"# MWtoJs = 1000_000\n",
|
|
|
|
|
"power_unit_input = 0.6 \n",
|
|
|
|
|
"COP = 2.5\n",
|
|
|
|
|
"charging_speed = 6 #h/day\n",
|
|
|
|
|
"dischaging_speed = 3 #h/day\n",
|
|
|
|
|
"def heat_pump_output(power_unit_input, COP)):\n",
|
|
|
|
|
" return power_unit_input * COP\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def power_to_mass_flow(power_MW, Tsink, Tref, Cp):\n",
|
|
|
|
|
" return power_MW * MWtoJs /(Cp*(Tsink - Tref))\n",
|
|
|
|
|
"def energy_to_storage(hp_heat_output_MW, process_demand_MW):\n",
|
|
|
|
|
" return hp_heat_output_MW - process_demand_MW #MW\n",
|
|
|
|
|
"#I need to add a logic later in order to charge and discharge the storage. Check the hp_storage_opt_enginge later.\n",
|
|
|
|
|
"if heat_pump_output > process_demand_MW:\n",
|
|
|
|
|
" to_storage_vdg__MW = heat_pump_output - process_demand_MW\n",
|
|
|
|
|
" used_heat = process_demand_MW\n",
|
|
|
|
|
"else:\n",
|
|
|
|
|
" to_storage_vdg__MW = 0\n",
|
|
|
|
|
" used_heat = heat_pump_output\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"def Tsource_calculation(Tstorage, discharge_power, Tsource, process_mass_flow): \n",
|
|
|
|
|
" discharge_mass_flow = power_to_mass_flow(discharge_power, Tstorage, Tref, Cp)\n",
|
|
|
|
|
"def storage_capacity (charging_speed, to_storage_vdg__MW)\n",
|
|
|
|
|
" return charging_speed * to_storage_vdg__MW\n",
|
|
|
|
|
"def from_storage_vdg_MW (storage_capacity, discharging_speed)\n",
|
|
|
|
|
" return storage_capacity/discharging_speed\n",
|
|
|
|
|
"# def energy_to_storage(hp_heat_output_MW, process_demand_MW):\n",
|
|
|
|
|
"# return hp_heat_output_MW - process_demand_MW #MW\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"# def Tsource_calculation(Tstorage, discharge_power, Tsource, process_mass_flow): \n",
|
|
|
|
|
"# discharge_mass_flow = power_to_mass_flow(discharge_power, Tstorage, Tref, Cp)\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" combined_mass_flow = (discharge_mass_flow + process_mass_flow)\n",
|
|
|
|
|
" if combined_mass_flow == 0:\n",
|
|
|
|
|
" return Tsource\n",
|
|
|
|
|
" else: \n",
|
|
|
|
|
" return (Tstorage * discharge_mass_flow + Tsource * process_mass_flow) / combined_mass_flow"
|
|
|
|
|
"# combined_mass_flow = (discharge_mass_flow + process_mass_flow)\n",
|
|
|
|
|
"# if combined_mass_flow == 0:\n",
|
|
|
|
|
"# return Tsource\n",
|
|
|
|
|
"# else: \n",
|
|
|
|
|
"# return (Tstorage * discharge_mass_flow + Tsource * process_mass_flow) / combined_mass_flow"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
|