Hi everyone,
I am currently trying to simulate a reactive chromatographic process. In this a reaction should occur in the solid phase. For this I would like to fit parameters of the reaction system (k_fwd, k_bwd) to a set of experimental data.
The reaction system is of the type:
A + B <=> C + D
A + C <=> E + D
However, I have an issue when trying to add these variables to the optimization problem.
I receive an error stating the variable is “Not a valid Optimization variable”. Possibly my provided parameter path “flow_sheet.column.particle_reaction_model.k_fwd” is not correct? I am using cadet version 5.0.4.
Here I provide the reaction_system:
reaction_system = MassActionLaw(component_system)
reaction_system.add_reaction(
indices=[0, 1 , 2, 3, 4],
coefficients=[-1, -1, 1, 1, 0],
k_fwd=0.09,
k_bwd=0.05
)
reaction_system.add_reaction(
indices=[0, 1 , 2, 3, 4],
coefficients=[0, -1, -1, 1, 1],
k_fwd=0.01,
k_bwd=0.005
)
I use the particle reaction model:
column.particle_reaction_model = reaction_system
Providing the variable to the optimization problem:
optimization_problem.add_variable(
name='k_fwd',parameter_path= "flow_sheet.column.particle_reaction_model.k_fwd",
indices=(0,1),
lb=1e-9, ub=1e-6,
transform='auto'
)
The simulation itself works without trouble, also with the reaction. Also I don’t have an issue with providing other parameters like axial dispersion, which works just fine.
Thanks in advance!
Best regards,
Adrian