Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(issue-73): besoin_fr use incorrect calculation and values #74

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/10_besoin_fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ const Cin = {

export function calc_besoin_fr_j(Sh, GV, inertie, aij_fr, asj_fr, nrefj, textmoy_clim_j, Tint) {
if (nrefj == 0) return 0;
const Rbth = (1000 * (aij_fr + asj_fr)) / (GV * (textmoy_clim_j - Tint) * nrefj);
const Rbth = (aij_fr + asj_fr) / (GV * (textmoy_clim_j - Tint) * nrefj);

if (Rbth < 1 / 2) return 0;

const t = (Cin[inertie] * Sh) / (3600 * GV);
const a = 1 + t / 15;
let futj;
if (Rbth == 1) futj = a / (a + 1);
if (Rbth === 1) futj = a / (a + 1);
else futj = (1 - Rbth ** -a) / (1 - Rbth ** (-a - 1));
const bfr = aij_fr + asj_fr - ((futj * GV) / 1000) * (Tint - textmoy_clim_j) * nrefj;
const bfr = (aij_fr + asj_fr) / 1000 - ((futj * GV) / 1000) * (Tint - textmoy_clim_j) * nrefj;
return bfr;
}

Expand Down
148 changes: 74 additions & 74 deletions src/tv.js
Original file line number Diff line number Diff line change
Expand Up @@ -64507,14 +64507,14 @@ export const tvs = {
nref26: {
'400-800m': {
Aout: {
h1a: 11.27,
h1b: 14.9,
h1c: 32.34,
h2a: 9.53,
h2b: 16.91,
h2c: 21.61,
h2d: 53.69,
h3: 65.44
h1a: 35.0,
h1b: 44.0,
h1c: 91.0,
h2a: 23.0,
h2b: 46.0,
h2c: 62.0,
h2d: 150.0,
h3: 167.0
},
Avril: {
h1a: 0.0,
Expand Down Expand Up @@ -64557,34 +64557,34 @@ export const tvs = {
h3: 0.0
},
Juillet: {
h1a: 9.54,
h1b: 30.73,
h1c: 25.12,
h2a: 13.71,
h2b: 9.01,
h2c: 25.47,
h2d: 67.5,
h3: 64.81
h1a: 33.0,
h1b: 90.0,
h1c: 88.0,
h2a: 42.0,
h2b: 27.0,
h2c: 92.0,
h2d: 238.0,
h3: 206.0
},
Juin: {
h1a: 5.98,
h1b: 12.04,
h1c: 11.8,
h2a: 5.25,
h2b: 6.92,
h2c: 12.01,
h2d: 43.81,
h3: 30.95
h1a: 19.0,
h1b: 39.0,
h1c: 46.0,
h2a: 19.0,
h2b: 24.0,
h2c: 43.0,
h2d: 160.0,
h3: 97.0
},
Mai: {
h1a: 0.0,
h1b: 1.77,
h1c: 3.08,
h1b: 5.0,
h1c: 8.0,
h2a: 0.0,
h2b: 2.2,
h2c: 2.03,
h2d: 2.56,
h3: 8.16
h2b: 6.0,
h2c: 6.0,
h2d: 9.0,
h3: 20.0
},
Mars: {
h1a: 0.0,
Expand All @@ -64611,20 +64611,20 @@ export const tvs = {
h1b: 0.0,
h1c: 0.0,
h2a: 0.0,
h2b: 4.48,
h2c: 5.75,
h2b: 8.0,
h2c: 11.0,
h2d: 0.0,
h3: 0.0
},
Septembre: {
h1a: 3.18,
h1b: 0.46,
h1c: 3.05,
h2a: 3.81,
h2b: 5.76,
h2c: 7.19,
h2d: 25.08,
h3: 15.66
h1a: 6.0,
h1b: 1.0,
h1c: 9.0,
h2a: 10.0,
h2b: 16.0,
h2c: 19.0,
h2d: 56.0,
h3: 30.0
}
},
'inférieur à 400m': {
Expand Down Expand Up @@ -64875,14 +64875,14 @@ export const tvs = {
nref28: {
'400-800m': {
Aout: {
h1a: 5.05,
h1b: 7.64,
h1c: 17.37,
h2a: 3.92,
h2b: 6.4,
h2c: 13.5,
h2d: 29.25,
h3: 28.13
h1a: 17.0,
h1b: 20.0,
h1c: 46.0,
h2a: 9.0,
h2b: 17.0,
h2c: 37.0,
h2d: 84.0,
h3: 64.0
},
Avril: {
h1a: 0.0,
Expand Down Expand Up @@ -64925,34 +64925,34 @@ export const tvs = {
h3: 0.0
},
Juillet: {
h1a: 4.4,
h1b: 13.34,
h1c: 14.28,
h2a: 5.12,
h2b: 5.02,
h2c: 12.37,
h2d: 54.43,
h3: 38.71
h1a: 14.0,
h1b: 37.0,
h1c: 46.0,
h2a: 14.0,
h2b: 17.0,
h2c: 46.0,
h2d: 170.0,
h3: 105.0
},
Juin: {
h1a: 1.14,
h1b: 5.09,
h1c: 4.61,
h2a: 1.8,
h2b: 4.23,
h2c: 4.72,
h2d: 28.55,
h3: 16.38
h1a: 4.0,
h1b: 15.0,
h1c: 19.0,
h2a: 6.0,
h2b: 14.0,
h2c: 14.0,
h2d: 101.0,
h3: 47.0
},
Mai: {
h1a: 0.0,
h1b: 0.0,
h1c: 0.0,
h1c: 5.0,
h2a: 0.0,
h2b: 0.0,
h2c: 0.72,
h2c: 2.0,
h2d: 0.0,
h3: 1.79
h3: 4.0
},
Mars: {
h1a: 0.0,
Expand All @@ -64979,20 +64979,20 @@ export const tvs = {
h1b: 0.0,
h1c: 0.0,
h2a: 0.0,
h2b: 0.0,
h2c: 2.9,
h2b: 8.0,
h2c: 11.0,
h2d: 0.0,
h3: 0.0
},
Septembre: {
h1a: 0.0,
h1b: 0.0,
h1c: 0.0,
h2a: 2.13,
h2b: 4.33,
h2c: 5.26,
h2d: 6.54,
h3: 1.27
h2a: 5.0,
h2b: 11.0,
h2c: 14.0,
h2d: 15.0,
h3: 2.0
}
},
'inférieur à 400m': {
Expand Down
3 changes: 2 additions & 1 deletion test/corpus.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@
"2387E2899635W",
"2387E0576340J",
"2387E2058698D",
"2387E2603968B"
"2387E2603968B",
"2432E0658897O"
]
Loading