thermferm/simulator.c

changeset 595
d7342a8e7f4d
parent 571
6f8eda55ec2c
child 646
e3edc783006b
equal deleted inserted replaced
594:1904badedf8f 595:d7342a8e7f4d
24 #include "simulator.h" 24 #include "simulator.h"
25 25
26 #ifdef USE_SIMULATOR 26 #ifdef USE_SIMULATOR
27 27
28 extern int my_shutdown; 28 extern int my_shutdown;
29 extern int debug;
30 extern sys_config Config; 29 extern sys_config Config;
31 30
32 int SIMcooling = 0; 31 int SIMcooling = 0;
33 int SIMheating = 0; 32 int SIMheating = 0;
34 int SIMfan = 0; 33 int SIMfan = 0;
123 */ 122 */
124 // Cheap trick, just follow slowly the air temp. 123 // Cheap trick, just follow slowly the air temp.
125 simulator->beer_temperature += ((simulator->air_temperature - simulator->beer_temperature) / 500.0); 124 simulator->beer_temperature += ((simulator->air_temperature - simulator->beer_temperature) / 500.0);
126 simulator->air_temperature += ((simulator->beer_temperature - simulator->air_temperature) / 2500.0); 125 simulator->air_temperature += ((simulator->beer_temperature - simulator->air_temperature) / 2500.0);
127 simulator->chiller_temperature = simulator->cooler_temp; // Libk these 126 simulator->chiller_temperature = simulator->cooler_temp; // Libk these
128
129 // if ((seconds % 15) == 0)
130 // syslog(LOG_NOTICE, "air=%.3f beer=%.3f heater=%.3f cooler=%.3f", simulator->air_temperature, simulator->beer_temperature,
131 // simulator->s_heat_temp, simulator->s_cool_temp);
132
133 // if (debug)
134 // fprintf(stdout, "sqm_room_air=%f air=%f air_heat_transfer=%f air_change=%f beer=%f\n",
135 // sqm_room_air, simulator->air_temperature, air_heat_transfer, air_change, simulator->beer_temperature);
136 } 127 }
137 usleep(100000); 128 usleep(100000);
138 } 129 }
139 usleep(50000); 130 usleep(50000);
140 } 131 }

mercurial