Hi
Would like to know if anyone has input on how to do the following in a better way, since it seems unnecessarily complicated as I am approaching it.
I’m trying to plot the internal profiles inside the SMB. I managed to do it in a very explicit way by setting:
column = LumpedRateModelWithoutPores(component_system, name='column')
# ...
column.solution_recorder.write_solution_bulk = True
and then grabbing the data from each column, e.g. simulation_results.solution.column_0.bulk.solution
, simulation_results.solution.column_1.bulk.solution
, …
This works and I managed to create the plot I want.
Problem is, this is specific for a certain number of columns, since I’m getting the data manually. What would the best option be for creating a function that builds the internal profiles independently of the number of columns or SMB configuration? I’m sure there is a better way that I am missing.
What comes to mind is:
- going through
simulation_results.solution
keys - find all
column_X
keys while ignoring others - make the plot from there
This works but does not look like the best approach.