CADET-Match Simulation with a three-component system failed

Hello,

I am attempting to run CADET-Match to fit the parameters of a three-component system. However, I am running into several issues that made my simulation failed. One problem is about the definition of adsorption parameters of each component, and I have also tried to use index instead of component and bound as suggested in another post (Cadet-MATCH SMA simulation Not Converging). Another problem is about how we can set the experiments. The simulation output includes the outlet concentration of three components, and I defined experiment1.isotherm as a vector. [’/output/solution/unit_002/SOLUTION_OUTLET_COMP_000’, ‘/output/solution/unit_002/SOLUTION_OUTLET_COMP_001’, ‘/output/solution/unit_002/SOLUTION_OUTLET_COMP_002’]
The matching process failed, and there are issues with the index. What’s more, the matching process seems only to match with the first component. The JSON, CSV, hdf5, ipynb, and main log files are attached to https://drive.google.com/drive/folders/1H-UH8SpIxXji3QoUHb85NHPHCjTAqbdf?usp=sharing the Google Driver folder with the relevant files. Any advice/tips to resolve this issue would be greatly appreciated. Thank in advance

  • Chaoying

The 3 indexes should be 0, 1 and 2 not 1,2,3 for the parameters

The code uses one CSV file per component and when you put in the code below all the components are just added together.

Create one CSV file per component and then modify the json file as shown below.

"parameters": [
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 0,
			"transform": "auto"
		},
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 1,
			"transform": "auto"
		},
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 2,
			"transform": "auto"
		}
	],
	"experiments": [
		{
			"name": "main",
			"csv": "Dispalcement_breakthrough_experiment_comp0.csv",
			"HDF5": "ds_cex_reference.h5",
			"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_000",
			"features": [
				{
					"name": "Pulse0",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp0.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_000"
				},
				{
					"name": "Pulse1",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp1.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_001"
				},
				{
					"name": "Pulse2",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp2.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_002"
				}
			]
		}
	],

Thanks so much, Heyman. I revised the code based on your suggestions and it works now.

Chaoying

Hi Heyman,

Thanks for your suggestions again. I have two follow-up questions:

  1. It seems that I cannot use indexes 0, 1, and 2 for the parameters ka/kd. Under this situation, I need to define ka1, ka2, ka3, kd1, kd2, and kd3 separately. Am I correct?
  2. For particle diffusion, this parameter can be different for different components. But in my case, this parameter is the same for different components. I set the component and bound of this parameter to be -1, but the simulation failed because of the index error. So I defined particle diffusion for each component and it worked. How can we add constraints to make sure that the three parameter values of particle diffusion are equal? Or how can I properly define this parameter?

Any suggestion would be much appreciated.
Chaoying

Sorry, this has taken a bit. You are correct there is a big with the keq transform where it doesn’t accept index. I have just fixed that in version 0.8.10 and I will put that version out on PyPi and conda later today. It is already up on GitHub now.

You can use the set_value transform to copy a value so you only have to estimate it once.

This is the configuration file I used to setup everything

"parameters": [
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 0,
			"transform": "auto"
		},
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 1,
			"transform": "auto"
		},
		{
			"location": "/input/model/unit_001/adsorption/MCL_QMAX",
			"min": 1,
			"max": 10,
			"index": 2,
			"transform": "auto"
		},
		{
			"transform": "auto_keq",
			"index": 0,
			"location": [
			  "/input/model/unit_001/adsorption/MCL_KA",
			  "/input/model/unit_001/adsorption/MCL_KD"
			],
			"minKA": 1e-3,
			"maxKA": 1e3,
			"minKEQ": 1e-3,
			"maxKEQ": 1e3
		  },
		  {
			"transform": "auto_keq",
			"index": 1,
			"location": [
			  "/input/model/unit_001/adsorption/MCL_KA",
			  "/input/model/unit_001/adsorption/MCL_KD"
			],
			"minKA": 1e-3,
			"maxKA": 1e3,
			"minKEQ": 1e-3,
			"maxKEQ": 1e3
		  },
		  {
			"transform": "auto_keq",
			"index": 2,
			"location": [
			  "/input/model/unit_001/adsorption/MCL_KA",
			  "/input/model/unit_001/adsorption/MCL_KD"
			],
			"minKA": 1e-3,
			"maxKA": 1e3,
			"minKEQ": 1e-3,
			"maxKEQ": 1e3
		  },
		  {
			"transform": "auto",
			"index": 0,
			"location": "/input/model/unit_001/PAR_DIFFUSION",
			"min": 1e-14,
			"max": 1e-6
		  },
		  {
			"transform": "set_value",
			"indexFrom": 0,
			"locationFrom": "/input/model/unit_001/PAR_DIFFUSION",
			"indexTo": 1,
			"locationTo": "/input/model/unit_001/PAR_DIFFUSION"
		  },
		  {
			"transform": "set_value",
			"indexFrom": 0,
			"locationFrom": "/input/model/unit_001/PAR_DIFFUSION",
			"indexTo": 2,
			"locationTo": "/input/model/unit_001/PAR_DIFFUSION"
		  }
	],
	"experiments": [
		{
			"name": "main",
			"csv": "Dispalcement_breakthrough_experiment_comp0.csv",
			"HDF5": "ds_cex_reference.h5",
			"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_000",
			"features": [
				{
					"name": "Pulse0",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp0.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_000"
				},
				{
					"name": "Pulse1",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp1.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_001"
				},
				{
					"name": "Pulse2",
					"type": "Shape",
					"csv": "Dispalcement_breakthrough_experiment_comp2.csv",
					"isotherm": "/output/solution/unit_002/SOLUTION_OUTLET_COMP_002"
				}
			]
		}
	],
1 Like

THANKS SO MUCH, Heymann!!! It works now.

Best,
Chaoying

Great, at least when I ran some tests the results look much better. You should definitely adjust the min and max values for those transforms. I have no idea what is actually reasonable for your problem.

A post was split to a new topic: Three questions on isotherms