I want to load an .h5 file and modify the inlet using CADET-Process’ add_concentration_profile function.
How do I do that as smoothly as possible, without recreating the whole model line by line from the h5 to the CADET-Process format? Below is a MWE and the .h5 file is attached for a simple batch case. Im trying to load the solution in the .h5 file to use as inlet. model1.h5 (85.6 KB)
from CADETProcess.processModel import Process
from CADETProcess.simulator import Cadet
simulator = Cadet()
modelbatch = Cadet.load_from_h5(simulator, r'model1.h5')
inlet_c = modelbatch.root.output.solution.unit_001.solution_outlet
times = modelbatch.root.output.solution.solution_times
Process.add_concentration_profile(modelbatch,modelbatch.root.input.model.unit_000,times,inlet_c,components = -1)
At least when I try this, it says
AttributeError: 'Cadet' object has no attribute 'flow_sheet'.