Commit cf3ce1d7 authored by Marie Haghebaert's avatar Marie Haghebaert
Browse files

Initial commit

parents
# Implementation notice of the deterministic model numeric resolution proposed by L. Darrigade and al (2021)
This project propose the resolution of the deterministic model and its sensitivity analysis (SA).
We propose different Notebooks that will generate figures presented in the article and some complements.
More information such as equation and reminders of the article are provide in the notebooks.
## Installation
We assume that virtualenv is installed in your python environment. If it is not the case, execute the command in your shell
```sh
pip install virtualenv
```
To install the packages needed for the code execution, we will install a new python virtual environment
```sh
virtualenv -p python3 JOMB
```
Then, activate the virual environment
```sh
source JOMB/bin/activate
```
and install the required packages
```sh
pip install -r requirements.txt
```
You are now ready to open the jupyter notebooks
```sh
jupyter notebook
```
Select in the list one of the two jupyter notebooks (either main_resolution_model.ipynb or main_sensitivity_analysis.ipynb)
## Git folder composition
This git folder is composed of 2 Notebooks :
- main_resolution_model
- main_sensitivity_analysis
4 python files :
- util.py
- module_resolution.py
- module_SA.py
- module_kinetic_scheme.py
3 folders
- TEX
- SIMUS
- backup_SA
Installation requirements :
- requirements.txt
## Results backup
Backups are present in the 3 different folders which allows the user to replicate the figures in the article without running the resolution and/or SA codes.
In TEX you will find tex and png files of figures. Options are set to overwrite these backups (see Notebooks).
backup_SA is a folder containing results oh the sensitivity analysis perform for the article, this folder dialogues with main_sensitivity_analysis.
And finaly SIMUS folder is used to dialogue with the notebook main_experiment_parameters and to store stochastic simulation results used to compare the two models.
## Warnings
The SAFE library used in main_sensitivity_analysis notebook is open source however you need to ask for permission fist and download the library see : https://www.safetoolbox.info/.
Whitout permission user won't be able to use the previous notebook.
Moreover, different parallelization parts parts are present in the code (main_experiment_parameters & main_sensitivity_analysis), we advice users to be carefull when running cells specially for SA.
Indeed results presented in the article used 90 CPU during about 24 hours (!). An example is proposed when performing a simplier SA (2 parameters).
File added
\documentclass[convert]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\DeclareUnicodeCharacter{2212}{}
\usepgfplotslibrary{groupplots,dateplot}
\usetikzlibrary{patterns,shapes.arrows}
\pgfplotsset{compat=newest}
\begin{document}
% This file was created by tikzplotlib v0.9.8.
\begin{tikzpicture}
\definecolor{color0}{rgb}{0.97265625,0.25390625,0.265625}
\definecolor{color1}{rgb}{0.94921875,0.4453125,0.171875}
\definecolor{color2}{rgb}{0.96875,0.5859375,0.1171875}
\definecolor{color3}{rgb}{0.97265625,0.77734375,0.30859375}
\definecolor{color4}{rgb}{0.5625,0.7421875,0.42578125}
\definecolor{color5}{rgb}{0.26171875,0.6640625,0.54296875}
\definecolor{color6}{rgb}{0.33984375,0.45703125,0.5625}
\begin{axis}[
legend cell align={left},
legend style={
fill opacity=0.8,
draw opacity=1,
text opacity=1,
draw=white!80!black
},
tick align=outside,
tick pos=left,
x grid style={white!50.1960784313725!black},
xlabel={\(\displaystyle \mu m\)},
xmin=0, xmax=200,
xtick style={color=black},
y grid style={white!50.1960784313725!black},
ylabel={Density},
ymin=0, ymax=0.6,
ytick style={color=black}
]
\addplot [very thick, color0]
table {%
0 0.044617772102356
0.5 0.0453062057495117
2 0.0490971803665161
2.5 0.0508097410202026
3 0.0513119697570801
4 0.0545111894607544
6 0.0607260465621948
7 0.0641037225723267
7.5 0.065302848815918
8 0.0654640197753906
8.5 0.0645538568496704
9 0.0625795125961304
9.5 0.0596058368682861
10 0.055712103843689
10.5 0.0510038137435913
11 0.0457860231399536
13 0.0225753784179688
13.5 0.017393946647644
14 0.0127723217010498
14.5 0.00881040096282959
15 0.00557124614715576
15.5 0.0030827522277832
16 0.0013430118560791
16.5 0.000328183174133301
17 0
200 0
};
\addlegendentry{Div sc : 0.036 ($h^{-1}$)}
\addplot [very thick, color1]
table {%
0 0
7 0
7.5 0.00138998031616211
8 0.00549685955047607
8.5 0.0121710300445557
9 0.0211749076843262
9.5 0.0321798324584961
10 0.0447510480880737
10.5 0.0583359003067017
11 0.0725228786468506
11.5 0.0861691236495972
12 0.0992522239685059
12.5 0.111079573631287
13 0.121219873428345
13.5 0.129345655441284
14 0.135241508483887
14.5 0.138806223869324
15 0.140050411224365
15.5 0.139084696769714
16 0.13606059551239
16.5 0.131171822547913
17 0.124639391899109
17.5 0.117558121681213
18 0.110881924629211
18.5 0.104601383209229
19 0.0986788272857666
19.5 0.0930783748626709
20 0.0877903699874878
20.5 0.0828198194503784
21 0.0781267881393433
21.5 0.0736908912658691
22 0.069522500038147
23 0.0619138479232788
24 0.0551116466522217
25 0.0490574836730957
26 0.0436810255050659
27 0.038896918296814
28 0.0346381664276123
29 0.0308469533920288
30 0.027471661567688
31 0.0244663953781128
32.5 0.0205646753311157
34 0.0172861814498901
35.5 0.0145310163497925
37 0.0122153759002686
39 0.00969207286834717
41 0.00769031047821045
43.5 0.00575935840606689
46 0.00431346893310547
49 0.00304925441741943
53 0.00192034244537354
58 0.00107741355895996
65 0.000479698181152344
76 0.000134587287902832
100.5 7.86781311035156e-06
200 0
};
\addlegendentry{Diff sc / pc : 0.096 ($h^{-1}$)}
\addplot [very thick, color2]
table {%
0 0
7.5 4.80413436889648e-05
8 0.00026404857635498
8.5 0.000803470611572266
9 0.0019843578338623
9.5 0.00376427173614502
10 0.00675845146179199
10.5 0.0105944871902466
11 0.0157909393310547
11.5 0.0224654674530029
12 0.0304766893386841
12.5 0.039975643157959
13 0.0509849786758423
13.5 0.0635020732879639
14 0.0775043964385986
14.5 0.0929563045501709
15 0.109822630882263
15.5 0.12809145450592
16 0.147799253463745
16.5 0.169057011604309
17 0.192053556442261
17.5 0.217022180557251
18 0.24409544467926
18.5 0.273166179656982
19 0.303853392601013
20 0.367385268211365
20.5 0.398574709892273
21 0.428284645080566
21.5 0.455578804016113
22 0.459293007850647
22.5 0.425924777984619
23 0.375916361808777
23.5 0.322755694389343
24 0.273337483406067
24.5 0.230394840240479
25 0.194481492042542
25.5 0.165154814720154
26 0.141550779342651
26.5 0.122712016105652
27 0.107663750648499
27.5 0.0956029891967773
28 0.0859441757202148
28.5 0.0783541202545166
29 0.0721955299377441
29.5 0.0672651529312134
30 0.0633155107498169
30.5 0.060059666633606
31 0.057325005531311
31.5 0.0549542903900146
32.5 0.0509788990020752
34.5 0.0435742139816284
35.5 0.0392636060714722
36.5 0.034372091293335
37.5 0.029000997543335
40 0.0152642726898193
41 0.01051926612854
42 0.00662493705749512
43 0.0037006139755249
44 0.00172305107116699
45 0.000571012496948242
46 7.16447830200195e-05
48 0
200 0
};
\addlegendentry{Div pc : 0.042 ($h^{-1}$)}
\addplot [very thick, color3]
table {%
0 0
25.5 0.000140190124511719
26 0.000562071800231934
26.5 0.00126433372497559
27 0.0022425651550293
27.5 0.00348937511444092
28.5 0.00674688816070557
29.5 0.0109320878982544
30.5 0.0159093141555786
31.5 0.021519660949707
33 0.0307201147079468
35.5 0.0464862585067749
36.5 0.0523600578308105
37.5 0.0577099323272705
38.5 0.0623815059661865
39.5 0.0662515163421631
40.5 0.0692328214645386
41.5 0.0712743997573853
42.5 0.0723637342453003
43.5 0.0725234746932983
44.5 0.0718075037002563
45.5 0.0702910423278809
46.5 0.0680661201477051
47.5 0.0652366876602173
48.5 0.0619121789932251
50 0.0562430620193481
52 0.0479835271835327
54.5 0.0375999212265015
56 0.0318694114685059
57 0.0285049676895142
58.5 0.0240863561630249
60 0.0203276872634888
61.5 0.0171356201171875
63 0.014428973197937
64.5 0.0121369361877441
66.5 0.00962197780609131
68.5 0.00761497020721436
71 0.00567090511322021
73.5 0.00421237945556641
76.5 0.00293850898742676
80.5 0.0018078088760376
85.5 0.000975847244262695
92 0.000430822372436523
102.5 0.000110507011413574
127.5 3.45706939697266e-06
200 0
};
\addlegendentry{Diff pc / gc : 0.017 ($h^{-1}$)}
\addplot [very thick, color4]
table {%
0 0
25 0
25.5 0.000420570373535156
26 0.00168609619140625
26.5 0.00379300117492676
27 0.00672781467437744
27.5 0.0104682445526123
28 0.0149850845336914
28.5 0.0202405452728271
29 0.0261939764022827
29.5 0.0327961444854736
30 0.0399930477142334
30.5 0.0477279424667358
31 0.0559386014938354
31.5 0.0645591020584106
32 0.0735154151916504
33 0.0921604633331299
35 0.130223870277405
35.5 0.139458775520325
36 0.148433923721313
36.5 0.157080173492432
37 0.165332317352295
37.5 0.173129677772522
38 0.180416822433472
38.5 0.18714439868927
39 0.19326913356781
39.5 0.198754668235779
40 0.203571796417236
40.5 0.207698345184326
41 0.211118221282959
41.5 0.213823080062866
42 0.215811491012573
42.5 0.21709132194519
43 0.217670798301697
43.5 0.217570543289185
44 0.216811656951904
44.5 0.215422630310059
45 0.21343207359314
45.5 0.210873246192932
46 0.207782387733459
46.5 0.204198360443115
47 0.20016074180603
47.5 0.195710182189941
48 0.190888047218323
48.5 0.185736536979675
49.5 0.174615144729614
50.5 0.162681102752686
52 0.143950462341309
54 0.118888139724731
55 0.106827259063721
55.5 0.101070284843445
56 0.0956082344055176
56.5 0.0904276371002197
57 0.085515022277832
58 0.0764429569244385
59 0.0682951211929321
60 0.0609831809997559
61 0.0544259548187256
62 0.0485495328903198
63 0.0432868003845215
64 0.0385764837265015
65 0.0343630313873291
66 0.0305962562561035
67 0.0272303819656372
68 0.0242245197296143
69.5 0.0203102827072144
71 0.0170127153396606
72.5 0.0142374038696289
74 0.0119040012359619
76 0.00936329364776611
78 0.00735294818878174
80.5 0.00542330741882324
83 0.0039898157119751
86 0.00275087356567383
90 0.00166559219360352
95 0.000880837440490723
102 0.00035405158996582
113.5 7.5221061706543e-05
145.5 7.15255737304688e-07
200 0
};
\addlegendentry{Diff pc / ent : 0.051 ($h^{-1}$)}
\addplot [very thick, color5]
table {%
0 0
175 0
175.5 0.000279426574707031
176 0.00110423564910889
176.5 0.00245320796966553
177 0.0043022632598877
177.5 0.00662505626678467
178 0.00939059257507324
178.5 0.0125643014907837
179 0.016110897064209
179.5 0.0199849605560303
180.5 0.0285289287567139
181.5 0.0377931594848633
183.5 0.0567072629928589
184.5 0.0654642581939697
185 0.0694856643676758
185.5 0.0732080936431885
186 0.0765918493270874
186.5 0.0796018838882446
187 0.0822092294692993
187.5 0.0843907594680786
188 0.0861302614212036
188.5 0.0874190330505371
189 0.0882611274719238
189.5 0.0886482000350952
190 0.0873687267303467
190.5 0.081915020942688
191 0.0740624666213989
192 0.0569262504577637
192.5 0.0491795539855957
193 0.0423613786697388
193.5 0.0364916324615479
194 0.0314987897872925
194.5 0.0272760391235352
195 0.0237101316452026
195.5 0.0206955671310425
196 0.0181400775909424
196.5 0.0159655809402466
197 0.0141067504882812
198 0.0111315250396729
199.5 0.00770366191864014
200 0.00782573223114014
};
\addlegendentry{Ext gc : 0.007 ($h^{-1}$)}
\addplot [very thick, color6]
table {%
0 0
175 0
175.5 0.000833511352539062
176 0.0032886266708374
176.5 0.00729238986968994
177 0.0127633810043335
177.5 0.0196107625961304
178 0.0277377367019653
178.5 0.037035346031189
179 0.0473846197128296
179.5 0.0586584806442261
180 0.070722222328186
180.5 0.0834343433380127
181 0.0966482162475586
182 0.123977780342102
183 0.151492595672607
183.5 0.16494345664978
184 0.17799699306488
184.5 0.190516114234924
185 0.202371835708618
185.5 0.213444948196411
186 0.223627090454102
186.5 0.232822060585022
187 0.240947604179382
187.5 0.247936606407166
188 0.253740310668945
188.5 0.25833523273468
189 0.261744022369385
189.5 0.264028787612915
190 0.261547327041626
190.5 0.246563673019409
191 0.224155902862549
192 0.174023509025574
192.5 0.15097975730896
193 0.130528092384338
193.5 0.11279821395874
194 0.0976289510726929
194.5 0.0847358703613281
195 0.0738030672073364
195.5 0.0645284652709961
196 0.0566427707672119
196.5 0.0499151945114136
197 0.0441520214080811
197.5 0.0391921997070312
198 0.0349036455154419
198.5 0.0311859846115112
199 0.0281808376312256
199.5 0.0242514610290527
200 0.0246355533599854
};
\addlegendentry{Ext ent : 0.007 ($h^{-1}$)}
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[convert]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\DeclareUnicodeCharacter{2212}{}
\usepgfplotslibrary{groupplots,dateplot}
\usetikzlibrary{patterns,shapes.arrows}
\pgfplotsset{compat=newest}
\begin{document}
% This file was created by tikzplotlib v0.9.8.
\begin{tikzpicture}
\definecolor{color0}{rgb}{0.390625,0.58203125,0.92578125}
\definecolor{color1}{rgb}{0.8359375,0.15234375,0.15625}
\definecolor{color2}{rgb}{0.4140625,0.3515625,0.80078125}
\definecolor{color3}{rgb}{0.171875,0.625,0.171875}
\begin{axis}[
legend cell align={left},
legend style={fill opacity=0.8, draw opacity=1, text opacity=1, draw=white!80!black},
tick align=outside,
tick pos=left,
x grid style={white!50.1960784313725!black},
xlabel={\(\displaystyle \mu m\)},
xmin=0, xmax=200,
xtick style={color=black},
y grid style={white!50.1960784313725!black},
ylabel={Density},
ymin=0, ymax=5,
ytick style={color=black}
]
\addplot [thick, black]
table {%
0 0.649999976158142
0.5 0.66003155708313
1.5 0.695132851600647
2 0.715278387069702
2.5 0.740239143371582
3 3.62757039070129
3.5 3.47205400466919
6 2.68488073348999
8.5 1.90550124645233
9.5 1.58756029605865
10 1.42800331115723
10.5 1.26578176021576
11 1.10582995414734
11.5 1.12133717536926
12 1.14001333713531
12.5 1.16079604625702
13 1.18470275402069
13.5 1.21274828910828
14 1.24591875076294
14.5 1.28516757488251
15 1.33147740364075
15.5 1.38594591617584
16 1.44969391822815
16.5 1.5241334438324
17 1.61102986335754
17.5 1.71211993694305
18 1.82839822769165
18.5 1.95961439609528
19 2.10392761230469
19.5 2.25814294815063
21 2.73764944076538
21.5 2.88725566864014
22 3.02270007133484
22.5 3.14010429382324
23 3.23957538604736
23.5 3.32246232032776
24 3.39111351966858
24.5 3.44787359237671
25 3.49475622177124
25.5 3.53339743614197
26 3.56516718864441
26.5 3.59120941162109
27 3.6125967502594
27.5 3.63018560409546
28 3.64457201957703
28.5 3.65599703788757
29.5 3.67266035079956
30.5 3.68283724784851
31.5 3.68910694122314
36.5 3.7105541229248
38 3.72551822662354
39 3.73902249336243
40.5 3.76430058479309
42 3.79428505897522
47.5 3.91059827804565
49 3.93570184707642
50.5 3.95567417144775
52 3.9705069065094
53.5 3.98076224327087
55.5 3.98904991149902
58 3.99421191215515
61.5 3.99644184112549
68.5 3.99518823623657
86 3.99171352386475
120.5 3.99101376533508
172 3.98906683921814
173.5 3.98589634895325
174.5 3.9812114238739
175.5 3.97192597389221
176 3.9641900062561
176.5 3.9535870552063
177 3.93958067893982
177.5 3.92174863815308
178 3.90003275871277
178.5 3.87391233444214
179 3.84320902824402
179.5 3.80747389793396
180 3.76660680770874
180.5 3.72055697441101
181 3.66929459571838
181.5 3.61284184455872
182 3.55127167701721
182.5 3.4847047328949
183 3.41330695152283
183.5 3.33728528022766
184 3.25688457489014
184.5 3.1723849773407
185 3.08409690856934
185.5 2.99235916137695
186 2.89753389358521
186.5 2.80000472068787
187.5 2.59846901893616
189 2.28723931312561
189.5 2.18371605873108
190 2.08293652534485
190.5 1.98806822299957