Set start temperature for simulation using sim_t_env in config.

This commit is contained in:
James Kirikland Garner 2022-12-30 12:53:06 -08:00
parent 3c515761e8
commit 37f2a53aec
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ stop_integral_windup = True
# #
# Simulation parameters # Simulation parameters
simulate = True simulate = True
sim_t_env = 60.0 # deg C sim_t_env = 255 # deg C
sim_c_heat = 500.0 # J/K heat capacity of heat element sim_c_heat = 500.0 # J/K heat capacity of heat element
sim_c_oven = 5000.0 # J/K heat capacity of oven sim_c_oven = 5000.0 # J/K heat capacity of oven
sim_p_heat = 5450.0 # W heating power of oven sim_p_heat = 5450.0 # W heating power of oven

View File

@ -103,7 +103,7 @@ class TempSensorSimulated(TempSensor):
'''Simulates a temperature sensor ''' '''Simulates a temperature sensor '''
def __init__(self): def __init__(self):
TempSensor.__init__(self) TempSensor.__init__(self)
self.simulated_temperature = 255 self.simulated_temperature = config.sim_t_env
def temperature(self): def temperature(self):
return self.simulated_temperature return self.simulated_temperature
@ -526,7 +526,7 @@ class SimulatedOven(Oven):
self.R_ho = self.R_ho_noair self.R_ho = self.R_ho_noair
# set temps to the temp of the surrounding environment # set temps to the temp of the surrounding environment
self.t = 255 # self.t_env # deg C temp of oven self.t = config.sim_t_env # deg C or F temp of oven
self.t_h = self.t_env #deg C temp of heating element self.t_h = self.t_env #deg C temp of heating element
super().__init__() super().__init__()