Error message with LangmuirLDF in CADET-Process

Hi everyone,

I recently started to use the LumpedRateModelwithPores and instead of a normal ‘Langmuir’ I want to implement a ‘LangmuirLDF’ binding model.
This is the parameter set I defined for the binding model:


Although I think that I defined all necessary parameters, I receive this error message:



Is anyone familiar with this problem? How can I use the LangmuirLDF in my model?

Thank you in advance and happy holidays to everyone in Germany :blush:

Hi Nils,

instead of a screenshot, could you please post a copy of the code s.t. we can easily debug it? Thanks! :nerd_face:

Hi Johannes,

yeah sure:

# Import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from cadet import Cadet
Cadet.cadet_path = '/Users/nils.gehrmann/Anaconda3/bin'
from pathlib import Path
file = Path("C://Users") / "iam" / "Desktop" / "CADET" / "Raw data" / "binding conditions" / "data binding.xlsx"

# Import raw data
data = pd.read_excel(str(file))
time_experiment = data.iloc[:, 0]
c_experiment = data.iloc[:, 1]

# Import CADET libraries
from CADETProcess.processModel import ComponentSystem
from CADETProcess.processModel import Inlet
from CADETProcess.processModel import LumpedRateModelWithPores
from CADETProcess.processModel import LangmuirLDF
from CADETProcess.processModel import Outlet
from CADETProcess.processModel import Cstr
from CADETProcess.processModel import TubularReactor
from CADETProcess.processModel import FlowSheet
from CADETProcess.processModel import Process
from CADETProcess.processModel import GRMDiscretizationFV

# Component System
component_system = ComponentSystem(['lysozyme'])

# Binding Model
binding_model = LangmuirLDF(component_system)
binding_model.is_kinetic = 0
binding_model.equilibrium_constant = [1000]
binding_model.driving_force_coefficient = [1e-6]
binding_model.capacity = [1000]

Is there something that I am missing?

Thank you in advance

Hi Nils,

that code runs fine on my machine. What version of CADET-Process are you using? And which OS are you on?

Hi Ron,

currently I am using CADET-Process 0.7.3 on Windows 10 Education N 22H2. I tried to use 0.9.1 but I got some other errors so I had to switch back. The code runs fine for me until the equilibrium constant.


Hi Nils,

that might be the problem. What was the error in version 0.9.1? There have been many performance, feature and stability improvements since 7.3. so if at all possible I’d suggest to upgrade.

Yes, I would like to but when I did, I received this one for every simulation I ran:


Although I didn’t change the code at all. Is there something that changed the structure of the code?


I can reproduce that error.

The problem is in this code section:

where you set the cadet_path using the cadet interface, and not the CADETProcess interface. Back in Version 0.7.3, CADETProcess just overwrote that setting and auto-detected the cadet_path itself. Now, it respects settings made to the cadet interface and crashes, because it tries to execute a directory.

You have two choices:


Don’t set the cadet_path yourself. Just let CADETProcess figure it out itself. This will work well, as long as you don’t compile CADET core yourself because you need custom models.


If you compiled CADET core yourself because you need custom models: set the cadet_path within the CADETProcess interface up until the cadet-cli.exe, like so:

from CADETProcess.simulator import Cadet

simulator = Cadet(install_path='/Users/nils.gehrmann/Anaconda3/bin/cadet-cli.exe')
1 Like