Skip to content

Conversation

se-schmitt
Copy link
Contributor

  • ControlVolume as basic building block containing energy and mass balances
  • MaterialStream as basic (homogeneous) connector
  • MaterialSource struct + Reaction struct
  • Fluid handling components: port (inlet/outlet), simple heat exchanger and compressor
  • CSTR implementation based on ControlVolume
  • Tests for base components (ports, heat exchanger, compressor; comparison to analytical solution) and CSTR (only qualitative agreement with reference)

@viniviena viniviena merged commit 95e763f into SciML:main Oct 27, 2024
1 of 2 checks passed
@se-schmitt se-schmitt deleted the Basic-building-blocks-and-CSTR branch October 27, 2024 21:44
p(t), [description="pressure"] #, unit=u"Pa"]
h(t), [description="molar enthalpy", output=true] #, unit=u"J mol^-1"]
xᵢ(t)[1:ms.N_c], [description="mole fractions", output=true] #, unit=u"mol mol^-1"]
n(t), [description="total molar flow", connect=Flow] #, unit=u"mol s^-1"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you have 2 reactors connected into a tank, are mole fractions handled appropriately by the connect equations? I see from the commits that this went from Stream to output=true. Is output=true similar to Stream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, Stream connectors would be the better choice here, but their equations were missing as reported here. The output=true is only used to prevent warnings when creating the system.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also encountered a very similar bug (singly-connected system works when I use an Across connector, fails when I use a Stream connector). We should open an MTK issue.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that the stream equations are missing in my case too. Haven't tried to get rid of the subsystem. I'll do an MWE on Friday if no one beats me to it.

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.

3 participants