Skip to content

Commit

Permalink
Merge branch 'develop' into integration
Browse files Browse the repository at this point in the history
  • Loading branch information
perrotcap committed Aug 29, 2024
2 parents 0895f46 + dd9c514 commit b05d638
Show file tree
Hide file tree
Showing 31 changed files with 137 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The distribution of investments is made according to the investments level mix dataframe in input. Each coefficient for each energy/technology over the years is normalized by the sum of coefficients for one year and multiplied by the total investments level :

$$ energy\_investment = total\_investment * \frac{energy\_mix\_coefficient}{\sum energy\_mix\_coefficient}$$
$$energy\_investment = total\_investment * \frac{energy\_mix\_coefficient}{\sum energy\_mix\_coefficient}$$

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The distribution of global investments into CCS and energy conversion is made following a percentage of CCS investment compared to global investment.

$$ ccs\_investment = global\_investment * \frac{ccs\_mix\_percentage}{100}$$
$$ccs\_investment = global\_investment * \frac{ccs\_mix\_percentage}{100}$$

$$ energy\_conversion\_investment = global\_investment *(1.0- \frac{ccs\_mix\_percentage}{100})$$
$$energy\_conversion\_investment = global\_investment *(1.0- \frac{ccs\_mix\_percentage}{100})$$

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The distribution of investments is made according to the investments coming from the design space. A constraint is computed in order to obtain a sum of investments lower than the investment dedicated for energy production coming from the macroeconomics model.

$$ investment\_constraint = energy\_investment > \sum technos\_investments$$
$$investment\_constraint = energy\_investment > \sum technos\_investments$$

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The distribution of investments is made according to the investments level mix dataframe in input. Each coefficient for each energy/technology over the years is normalized by the sum of coefficients for one year and multiplied by the total investments level :

$$ energy\_investment = total\_investment * \frac{energy\_mix\_coefficient}{\sum energy\_mix\_coefficient}$$
$$energy\_investment = total\_investment * \frac{energy\_mix\_coefficient}{\sum energy\_mix\_coefficient}$$

4 changes: 2 additions & 2 deletions energy_models/core/techno_type/techno_disc.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def compute_sos_jacobian(self):
if 'all_resource_ratio_usable_demand' in inputs_dict.keys():
if ratio_name in inputs_dict[
'all_resource_ratio_usable_demand'].columns and ratio_name != GlossaryEnergy.Years:
production_woratio = self.techno_model.production_woratio[column]
production_woratio = self.techno_model.production_woratio[column].values
self.dprod_column_dratio[column][ratio_name] = self.techno_model.compute_dprod_dratio(
production_woratio,
ratio_name=ratio_name,
Expand Down Expand Up @@ -592,7 +592,7 @@ def compute_sos_jacobian(self):
self.techno_model.construction_resource_list]:
pass
else:
consumption_woratio = self.techno_model.consumption_woratio[column]
consumption_woratio = self.techno_model.consumption_woratio[column].values
dprod_dratio = self.techno_model.compute_dprod_dratio(
consumption_woratio,
ratio_name=ratio_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

The CO2 mineralization process is proposed by carbfix [^1] amongst others. The process consists of the dissolution of CO2 into water and inject the CO2- heavy water to react with basalt rocks. The CO2-heavy water reacts with Calcium (Ca) and Magnesium (Mg) contained in basalt for long term storage.

$$ CaO + CO_2 --> CaCO_3$$
$$ MgO + CO_2 --> MgCO_3$$
$$CaO + CO_2 --> CaCO_3$$
$$MgO + CO_2 --> MgCO_3$$

![](Geologic_Mineralization.PNG)[^1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PEM electrolysers need expensive noble metals (platinum, iridium) which makes th
PEM electrolysers are not yet fully developped but Buttler [^6] reported around 6MW of PEM electrolysers nominal power around the world in 2017. With new project emerging, the nominal power of PEM is around 50MW in 2021 (a new 10MW hydrogen electrolysis plant, the largest of its kind in Europe operates in 2020[^7] and another 20 MW, the largest of its kind in the world, will start operating in 2021 in Quebec (Canada) [^10] ) leading to a global hydrogen production of 0.4TWh per year.
Public investment in Europe for electrolysers is handled by the Fuel Cell and Hydrogen Joint Undertaking (FCH-JU) organism [^8].In 2019, european investments was around 156 MEUR or around 190 MDollars. We assume half of it is dedicated tor PEM. Around 36% of PEM electrolysers is financed by European union worldwide [^9]. Consequently the hypothesis investment in 2019 for PEM is around :

$$\frac{190*100}{2*36}= 263.88 \ MDollars$$
$$\frac{190*100}{2*36}= 263.88 \ MDollars$$

## Heat
In Electrolysis, heat production assumed the net difference between total electricity consumption and total hydrogen production.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $$A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]+ [Carbon\_dem

       if Carbon\_storage > Carbon\_storage\_max :

$$ A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$

#### energy_prices:

Expand All @@ -114,7 +114,7 @@ $$A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]+ [Carbon\_dem
$$\dfrac {\partial X}{\partial invest} =\dfrac {[ \dfrac {\partial H2\_prod}{\partial invest} * H2\_price * A ]}{[H2\_revenue + A ]^2}$$

with:
$$ A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
\
\
\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@

## FORMULA

$$H2_{price}= PC_{cost} * Margin * X $$
$$H2_{price}= PC_{cost} * Margin * X$$

### Gradients to compute:

$$\dfrac {\partial H2_{price}}{\partial invest}= Margin * X * \dfrac {\partial PC_{cost}}{\partial invest}
+ PC_{cost} * Margin * \dfrac {\partial X}{\partial invest} $$
$$\dfrac {\partial H2_{price}}{\partial invest}= Margin * X * \dfrac {\partial PC_{cost}}{\partial invest}
+ PC_{cost} * Margin * \dfrac {\partial X}{\partial invest}$$

$$\dfrac {\partial H2_{price}}{\partial energy\_prices}= Margin * X * \dfrac {\partial PC_{cost}}{\partial energy\_prices}
+ PC_{cost} * Margin * \dfrac {\partial X}{\partial energy\_prices} $$
$$\dfrac {\partial H2_{price}}{\partial energy\_prices}= Margin * X * \dfrac {\partial PC_{cost}}{\partial energy\_prices}
+ PC_{cost} * Margin * \dfrac {\partial X}{\partial energy\_prices}$$

$$\dfrac {\partial H2_{price}}{\partial energy\_CO2\_emission}= Margin * X * \dfrac {\partial PC_{cost}}{\partial energy\_CO2\_emission}
+ 0 $$

### X computation:
$$ X = \dfrac {H2\_revenue}{H2\_revenue
+ A

$$X = \dfrac {H2\_revenue}{H2\_revenue
+ A
}$$

with:

if Carbon\_prod < Carbon\_demand :
$$ A = Carbon\_sold\_revenue$$
if Carbon\_prod < Carbon\_demand :
$$A = Carbon\_sold\_revenue$$
if Carbon\_prod > Carbon\_demand :
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Carbon\_storage = Carbon\_prod - Carbon\_demand
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$ A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
+ [Carbon\_demand * (Carbon\_price
- \dfrac {Carbon\_mol * CO2\_credit}{CO2\_mol})]$$

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage > Carbon\_storage\_max :

$$ A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
\
\
### Gradient computation:

#### energy_prices:

$$ \dfrac {\partial X}{\partial energy\_prices} =
$$\dfrac {\partial X}{\partial energy\_prices} =
\dfrac {
\dfrac {\partial H2\_price}{\partial energy\_prices} * H2\_prod *
A
Expand All @@ -50,24 +51,25 @@ $$

with:

if Carbon\_prod < Carbon\_demand :
$$ A = Carbon\_sold\_revenue$$
if Carbon\_prod < Carbon\_demand :
$$A = Carbon\_sold\_revenue$$
if Carbon\_prod > Carbon\_demand :

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Carbon\_storage = Carbon\_prod - Carbon\_demand

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$ A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
+ [Carbon\_demand * (Carbon\_price
- \dfrac {Carbon\_mol * CO2\_credit}{CO2\_mol})]$$
\
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage > Carbon\_storage\_max :
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage > Carbon\_storage\_max :

$$ A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
\
\
#### invest:
$$ \dfrac {\partial X}{\partial invest} =

$$\dfrac {\partial X}{\partial invest} =
\dfrac {
[ \dfrac {\partial H2\_prod}{\partial invest} * H2\_price * A ]
-
Expand All @@ -79,23 +81,23 @@ $$

with:

if Carbon\_prod < Carbon\_demand :
$$ A = Carbon\_sold\_revenue$$
$$ B = Carbon\_price $$
if Carbon\_prod < Carbon\_demand :
$$A = Carbon\_sold\_revenue$$
$$B = Carbon\_price$$

if Carbon\_prod > Carbon\_demand :

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Carbon\_storage = Carbon\_prod - Carbon\_demand

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$ A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage < Carbon\_storage\_max :
$$A = [\dfrac {Carbon\_prod* Carbon\_mol * CO2\_credit}{CO2\_mol}]
+ [Carbon\_demand * (Carbon\_price
- \dfrac {Carbon\_mol * CO2\_credit}{CO2\_mol})]$$
$$ B = \dfrac {Carbon\_mol * CO2\_credit}{CO2\_mol} $$
$$B = \dfrac {Carbon\_mol * CO2\_credit}{CO2\_mol}$$

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage > Carbon\_storage\_max :
$$ A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$ B = 0 $$
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Carbon\_storage > Carbon\_storage\_max :
$$A = [Carbon\_demand * Carbon\_price]+ [\dfrac {(Carbon\_storage\_max)* Carbon\_mol * CO2\_credit}{CO2\_mol}]$$
$$B = 0$$
\
\
\
Expand All @@ -105,11 +107,11 @@ $$
* $$\dfrac {\partial Carbon\_prod}{\partial invest} = computed\_value2
$$

* $$\dfrac {\partial PC_{cost}}{\partial invest} = already\_computed\_value 1$$
* $$\dfrac {\partial PC_{cost}}{\partial invest} = already\_computed\_value 1$$

* $$\dfrac {\partial PC_{cost}}{\partial energy\_prices} = already\_computed\_value 2$$
* $$\dfrac {\partial PC_{cost}}{\partial energy\_prices} = already\_computed\_value 2$$

* $$\dfrac {\partial PC_{cost}}{\partial energy\_CO2\_emission} = already\_computed\_value 3$$
* $$\dfrac {\partial PC_{cost}}{\partial energy\_CO2\_emission} = already\_computed\_value 3$$

finally, the only gradient to compute is:

Expand Down
Loading

0 comments on commit b05d638

Please sign in to comment.