-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
Description
Simulation with inlet->CSTR or inlet->CSTR->outlet does not terminate. Same setup works on CADET v4.4.0
MRE:
from CADETProcess.processModel import ComponentSystem
component_system = ComponentSystem(2)
from CADETProcess.processModel import Linear
binding_model = Linear(component_system, name='linear')
binding_model.is_kinetic = False
binding_model.adsorption_rate = [0.5, 2]
binding_model.desorption_rate = [1, 1]
from CADETProcess.processModel import Inlet, Cstr, Outlet
inlet = Inlet(component_system, name='inlet')
inlet.c = [[0, 1, 0, 0], [0, 1, 0, 0]]
inlet.flow_rate = 1e-3
outlet = Outlet(component_system, "outlet")
reactor = Cstr(component_system, name='reactor')
reactor.binding_model = binding_model
reactor.init_liquid_volume = 5e-4
reactor.const_solid_volume = 5e-4
reactor.c = [0.0, 0.0]
reactor.q = [0.0, 0.0] # optional
reactor.solution_recorder.write_solution_bulk = True
reactor.solution_recorder.write_solution_solid = True
from CADETProcess.processModel import FlowSheet
flow_sheet = FlowSheet(component_system)
flow_sheet.add_unit(inlet)
flow_sheet.add_unit(reactor)
flow_sheet.add_unit(outlet)
flow_sheet.add_connection(inlet, reactor)
flow_sheet.add_connection( reactor, outlet)
from CADETProcess.processModel import Process
process = Process(flow_sheet, 'process')
process.cycle_time = 10
from CADETProcess.simulator import Cadet
simulator = Cadet()
sim_results = simulator.run(process, file_path="cstr_bug.h5")
Specifications
- Version: 5
- Platform: Windows
- Subsystem:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done