Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MixerSplitter UnitOperation #46

Closed
wants to merge 3 commits into from

Conversation

schmoelder
Copy link
Contributor

This is my first try at anything C++. Please be gentle! ;-)

As mentioned in #40, the goal is to implement a Unit that has zero volume but can be used to mix and reconnect streams between UnitOperations.

I took the OutletModel as a template and

  • enabled outlets
  • added setFlowRates() function from StirredTankModel

What works

  • It compiles!
  • Simulations work if there is only one ingoing stream active at the time.
  • The stream can (dynamically) be separated into different outgoing streams (also with fractional flow rates)

What does not work

  • Having more than one active input at a time leads to a TimeOut.

I guess I forgot to implement something related to the flow rates.

Johannes Schmölder and others added 2 commits May 16, 2021 20:37
@sleweke
Copy link
Member

sleweke commented May 17, 2021

Unfortunately, this unit operation is not going to work in the current simulator. There's a shortcut for consistent initialization of the underlying DAE system. This shortcut is based on the assumption that the outlet concentration of a unit operation does not change (immediately) if its inlet concentration is changed. Or, more mathematically, the outlet port is a differential state variable. This assumption is true for all models implemented so far.

The proposed mixer/splitter unit breaks this assumption since the signale at the inlet is immediately propagated to the outlet (outlet ports are algebraic states). Thus, consistent initialization is not going to work and the system will not simulate.

@schmoelder
Copy link
Contributor Author

I understand. Could this alternatively somehow be added in the ModelSystem?

@schmoelder
Copy link
Contributor Author

FYI, I pushed some other changes for completeness sake that I still had not published. Due to the mentioned underlying problem explained by @sleweke, it obviously still does not run correctly...

@schmoelder
Copy link
Contributor Author

Closing since this approach is not working with the current architecture of CADET. Must be implemented on switch level.

@schmoelder schmoelder closed this Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Mixer/Splitter unit operation
2 participants