Since this also turned out to be a bug, we want to prioritize this issue.
In libcadet/model/GeneralRateModel.hpp line 461, the outlet concentrations are determined from the last axial cell of the column. However, we should only return the last axial cell if the velocity is greater than zero and the first axial cell if the velocity is lower than zero.
- How to treat velocity == 0
=> Proposal: Only change cell if sign of velocity changes
- How to treat ports in 2D-GRM, if some of the ports are positive and others negative
The inlet concentration is determined from the first axial cell in libcadet/model/GeneralRateModel.hpp line 455. Instead, to return the concentration of the inlet stream, we should use a similar approach to GeneralRateModel-LinearSolver.cpp, line 182.
Progress can be checked here.
Next: Changes need to be made in CADET/include/common/SolutionRecorderImpl.hpp; Probably have to read from the model to get the current state for a unit operation using
At this point, we also had another discussion about where to set default values.
In this particular case, the default values are set directly in the ParameterProvider. In contrast, for other cases (see Set default adsorption model to ‘NONE’), they are only added much later in the process (i.e. the implementation of the unit operation model).
It might make sense to extend the functionality of the ParamamterProvider to provide default values for all parameters. This way, there is only one central point for configuration. It does require some effort but should make configuration more robust. Maybe this might also be a good opportunity when we overhaul the API since we need to provide some functions anyway.
Moreover, we should provide more reasonable default values for other parameters where we can. @w.heymann will compile a list of parameters.
This could be a good idea as a student project or for everyone who wants to get to better know the internal structure of CADET.
After some introduction to branches, forks, and pull requests,
Description of problem, or feature request with corresponding requirements.
Implementation of a solution to an issue. There can be multiple PRs to solve/close an issue, using different approaches. However, generally only one is accepted.
Next: @j.rao will check whether Pull Requests can also be made from feature branches of the CADET repository. This would also be the preferred workflow.
Edit: can confirm that this indeed works!