Of course getEta is inaccesible. It's inside the onStart(), while you're expecting the variable eta_start to access getEta(T_start), while the getEta(T_start) is inside the onStart().
And also, idk what's the point of the onStart() function. So, I simply make the getEta(T) function, into global scope.
// REMOVED: function onStart() {
// Function declaration
function getEta(T) {
const eta = -4.800122e-21 * Math.pow(T, 6) + 7.498400e-18 * Math.pow(T, 5) - 4.773811e-15 * Math.pow(T, 4) + 1.614263e-12 * Math.pow(T, 3) - 3.265875e-10 * Math.pow(T, 2) + 6.246720e-8 * T - 4.662013e-8;
return eta;
}
// Usage
const T_start = 50;
const T = T_start;
const eta_start = getEta(T_start); // This should be accesible.