From 44cfbd8c49e92e51ee2fb5e5fe520b587e990003 Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Wed, 14 Dec 2022 09:01:04 +0900 Subject: [PATCH] Save coke history and state, simulate service period --- Battery.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Battery.py b/Battery.py index e7b5812..4ba7d6e 100644 --- a/Battery.py +++ b/Battery.py @@ -556,4 +556,28 @@ if __name__ == "__main__": pickle.dump(bat3A.gas_t_history, gas_history_file) with open('wall.history', 'wb') as wall_history_file: - pickle.dump(bat3A.wall_t_history, wall_history_file) \ No newline at end of file + pickle.dump(bat3A.wall_t_history, wall_history_file) + + with open('coke.history', 'wb') as wall_history_file: + pickle.dump(bat3A.product, wall_history_file) + + with open('oven.state', 'wb') as wall_history_file: + pickle.dump(bat3A.processing, wall_history_file) + + dt = 5. * 1./60. # 5 min + for it in range (int(60/dt)): # 시뮬레이션 시간 도메인 = 60시간 + bat3A.update(dt) + + with open('gas.history2', 'wb') as gas_history_file: + pickle.dump(bat3A.gas_t_history, gas_history_file) + + with open('wall.history2', 'wb') as wall_history_file: + pickle.dump(bat3A.wall_t_history, wall_history_file) + + with open('coke.history2', 'wb') as wall_history_file: + pickle.dump(bat3A.product, wall_history_file) + + with open('oven.state2', 'wb') as wall_history_file: + pickle.dump(bat3A.processing, wall_history_file) + + print("Done")