double BCAL_tavg_res(double geometric_mean, int ilayer) { double &x = geometric_mean; switch(ilayer){ case 1: return 0.0657315+(805054/(pow(x,3.45514)+1.64801e+06)); break; case 2: return 0.0597325+(430784/(pow(x,3.29435)+250621)); break; case 3: return 0.0501445+(1892/(pow(x,2.10711)-511.982)); break; case 4: return 0.0616846+(375395/(pow(x,3.22484)+908003)); break; case 5: return 0.405599; break; case 6: return 100.0; break; case 7: return 100.0; break; case 8: case 9: case 10: return 100.0; } return 1000.0; }