Save coke history and state, simulate service period

This commit is contained in:
Yeongdo Park 2022-12-14 09:01:04 +09:00
parent b06155a7cf
commit 44cfbd8c49

View file

@ -557,3 +557,27 @@ if __name__ == "__main__":
with open('wall.history', 'wb') as wall_history_file: with open('wall.history', 'wb') as wall_history_file:
pickle.dump(bat3A.wall_t_history, wall_history_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")