Hi, I was trying to use the Mobile Phase Modulator binding model in CADET-Process with component 1 being modulator and component 2 and 3 being some proteins.
I have 2 questions:
-
The process does not converge when the initial c for the modulator component is set to 0 or a very low number like 1e-8, it does not matter that I provide a non-zero concentration through the inlets. If the initial c is set to 0 or any number 1e-8 or lower, it is not converging.
-
Specifically for ion_exchange_characteristic: If I have let’s say 3 events. Load, wash and elute. If I have a non-zero concentration for modulator in wash event, the process does not converge for non-zero value of ion_exchange_characteristic. If I put 0 for ion_exchange_characteristic for all 3 components and some non-zero values for hydrophobicity, it works fine.
Here is my code (Commented out the trouble lines):
import numpy as np
from CADETProcess.processModel import ComponentSystem
from CADETProcess.processModel import MobilePhaseModulator
from CADETProcess.processModel import Inlet, GeneralRateModel, Outlet
from CADETProcess.processModel import FlowSheet
from CADETProcess.processModel import Process
component_system = ComponentSystem()
component_system.add_component('Elution Modulator')
component_system.add_component('Protein 1')
component_system.add_component('Protein 2')
binding_model = MobilePhaseModulator(component_system, name='Lang')
binding_model.is_kinetic = True
binding_model.adsorption_rate = [0, 2.6, 3]
binding_model.desorption_rate = [0, 0.005, 0.010]
binding_model.capacity = [1, 1, 1]
binding_model.ion_exchange_characteristic = [0, 0.2, 0.4] #[0,0,0] #
binding_model.hydrophobicity = [0, 1e-1, 2e-1] #[0,0,0] #
inlet = Inlet(component_system, name='inlet')
inlet.flow_rate = 2.88e-8
column = GeneralRateModel(component_system, name='column')
column.binding_model = binding_model
column.length = 0.65
column.diameter = 0.011286
column.bed_porosity = 0.37
column.particle_radius = 4.5e-5
column.particle_porosity = 0.33
column.axial_dispersion = 2.0e-7
column.film_diffusion = [2.0e-7, 2.0e-7, 2.0e-7]
column.pore_diffusion = [1e-7, 1e-7, 1e-7]
column.surface_diffusion = [0.0, 0.0, 0.0]
outlet = Outlet(component_system, name='outlet')
# Flow Sheet
flow_sheet = FlowSheet(component_system)
flow_sheet.add_unit(inlet)
flow_sheet.add_unit(column)
flow_sheet.add_unit(outlet)
flow_sheet.add_connection(inlet, column)
flow_sheet.add_connection(column, outlet)
# Process
process = Process(flow_sheet, 'lwe')
process.cycle_time = 500000
## Create Events and Durations
wash_start = 400
elute_start = 12000
_ = process.add_event('load', 'flow_sheet.inlet.c', [0.1, 0.1, 0.1])
_ = process.add_event('wash', 'flow_sheet.inlet.c', [0.1, 0.0, 0.0], wash_start)
# Trouble number 2: Not allowing 0 c during wash if non-zero ion_exchange_characteristic
# Non-zero hydrophobicity with 0 ion_exchange_characteristic converges
# _ = process.add_event('wash', 'flow_sheet.inlet.c', [0.0, 0.0, 0.0], wash_start)
_ = process.add_event('elute', 'flow_sheet.inlet.c', [70, 0.0, 0.0], elute_start)
column.c = [1, 0, 0]
# Trouble number 1: initial column c value for modulator component doesn't converge if 1e-8 or lower or 0
# column.c = [1e-8, 0, 0]
# column.c = [0, 0, 0]
column.q = [0, 0, 0]
# %%
if __name__ == '__main__':
from CADETProcess.simulator import Cadet
process_simulator = Cadet(install_path="/Users/name/CADET/install")
simulation_results = process_simulator.simulate(process)
simulation_results.solution.column.outlet.plot()