Printing Solution for particle (how much adsorbed on the particle)

Hi Cadet users,

I want to print an array showing how much is bound across the column length. I used these lines of code to return data that I want to print

# Return data
model.root.input['return'].split_components_data = 1
model.root.input['return'].split_ports_data = 0
model.root.input['return'].unit_000.write_solution_bulk = 1
model.root.input['return'].unit_000.write_solution_inlet = 0
model.root.input['return'].unit_000.write_solution_outlet = 1
model.root.input['return'].unit_001.write_solution_bulk = 1
model.root.input['return'].unit_001.write_solution_outlet = 1
model.root.input['return'].unit_001.write_solution_solid=1
model.root.input['return'].unit_001.write_solution_particle=1

print("unit_001 solution keys:", model.root.output.solution.unit_001.keys())

I am not sure why I cant see all the solution when I print solution keys

print("unit_001 solution keys:", model.root.output.solution.unit_001.keys())


Can I get assistance in this subject?

Hello Kauthar,

Thanks for your post!

The issue you are describing is not a CADET issue, but rather a question on how to use standard dictionaries in Python. If you are not familiar with how dictionaries work, I am happy to give you some pointers on what websites you can check out.

Additionally, please also check the CADET-Python Introduction, which gives an example on how to access solutions as well.

[1] Python Dictionaries - General Info on Dicts
[2] Python Dictionary keys() Method - What the keys() method does
[3] Output Group — CADET - How the Output Group is structured

All the best,
Hannah

1 Like

Thanks Hannah, I will check them out

1 Like