brewco/simulator.c

changeset 473
fdd30e935079
parent 459
1f88be70f253
child 478
fe8bf61cde06
equal deleted inserted replaced
472:55bcbf92ecab 473:fdd30e935079
79 */ 79 */
80 Config.simulator->hlt_heater_state = SIM_hlt_value; 80 Config.simulator->hlt_heater_state = SIM_hlt_value;
81 if (SIM_hlt_value) { 81 if (SIM_hlt_value) {
82 Config.simulator->hlt_heater_temp += (250 - Config.simulator->hlt_heater_temp) / 2000; 82 Config.simulator->hlt_heater_temp += (250 - Config.simulator->hlt_heater_temp) / 2000;
83 } else { 83 } else {
84 Config.simulator->hlt_heater_temp -= (Config.simulator->hlt_heater_temp - Config.simulator->hlt_temperature) / 500; 84 Config.simulator->hlt_heater_temp -= (Config.simulator->hlt_heater_temp - Config.simulator->hlt_temperature) / 250;
85 } 85 }
86 Config.simulator->mlt_heater_state = SIM_mlt_value; 86 Config.simulator->mlt_heater_state = SIM_mlt_value;
87 if (SIM_mlt_value) { 87 if (SIM_mlt_value) {
88 Config.simulator->mlt_heater_temp += (250 - Config.simulator->mlt_heater_temp) / 2000; 88 Config.simulator->mlt_heater_temp += (250 - Config.simulator->mlt_heater_temp) / 2000;
89 } else { 89 } else {
90 Config.simulator->mlt_heater_temp -= (Config.simulator->mlt_heater_temp - Config.simulator->mlt_temperature) / 500; 90 Config.simulator->mlt_heater_temp -= (Config.simulator->mlt_heater_temp - Config.simulator->mlt_temperature) / 250;
91 } 91 }
92 92
93 /* 93 /*
94 * If cooling, bring down the MLT temperature. Assume 14 degrees coolwater. 94 * If cooling, bring down the MLT temperature. Assume 14 degrees coolwater.
95 */ 95 */
96 if (SIM_cooler) { 96 if (SIM_cooler) {
97 Config.simulator->mlt_temperature -= (Config.simulator->mlt_temperature - 14) / (250 * Config.simulator->hlt_heater_volume); 97 Config.simulator->mlt_temperature -= (Config.simulator->mlt_temperature - 14) / (175 * Config.simulator->hlt_heater_volume);
98 } 98 }
99 99
100 /* 100 /*
101 * Shift the liquid temperature towards the heating elements temperature, 101 * Shift the liquid temperature towards the heating elements temperature,
102 * but never higher then 100 degrees celcius. 102 * but never higher then 100 degrees celcius.

mercurial