Skip to content

Instantly share code, notes, and snippets.

@marharyta
Created November 29, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marharyta/82446f93317d83d21dd42519ce7be2d9 to your computer and use it in GitHub Desktop.
Save marharyta/82446f93317d83d21dd42519ce7be2d9 to your computer and use it in GitHub Desktop.
// S = M - (R+C) - E
// S = 0
// M = M((1-n) - 0.0173*(5.87 - pa) -0.0014(34-ta));
// R + C = h(tsk - ta) / (1 + 0.155 * h * I);
// E = (16.7 * hc * (psk - pa) * (1+0.344*hc*I) ) * (0.06 + 0.94 * Wrsw);
const pa = 1.7;
const ta = 25;
const n = 0.2;
const h = 8;
const hc = 3.3;
const tsk = 34;
const I = 0.65; // 0.65
const psk = 5.6;
let Wrsw = 0;
if (ta < 25 ){
Wrsw = 0;
} else {
Wrsw = 0.2;
}
console.log(Wrsw);
const met = 100;
// const Fcl = 0.5;
// const Fpcl = 1;
// const Fcl = 0.554;
const Fpcl = 0.50;
const Fcl = 0.554;
// const Fpcl = 0.575;
const M = met * ( (1-n) - (0.0173*(5.87 - pa)) - (0.0014*(34-ta)) );
console.log('M', M);
const RC = (h*(tsk - ta)) / (1 + 0.155 * h * I);
console.log('RC', RC);
const E = (16.7 * hc * (psk - pa) * (1/(1+0.344*hc*I)) ) * (0.06 + 0.94 * Wrsw);
console.log('E', E);
const S = (M - RC - E) - 1; // -0.9 because of calculation error
console.log('S', S);
// Icl = ( (h * (tsk - ta))/(M-E) - 1 )/(0.155*h)
const M2 = met * ( (1-n) - (0.0173*(5.87 - pa)) - (0.0014*(34-ta)) );
console.log('M2', M2);
const E2 = (16.7 * hc * (psk - pa) * Fpcl ) * (0.06 + 0.94 * Wrsw);
const Icl = ( (h * (tsk - ta))/(M-E2) - 1 )/(0.155*h);
console.log('Icl', Icl);
// const K = 6.45; // const
// const As = 1.8;
// const H = 100;
// const Iclt = (K * As * ( tsk - ta) ) / H;
// console.log('Iclt', Iclt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment