Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

Fix state constructor for obscure specification#26

Merged
prehner merged 3 commits intomainfrom
fix_state_constructor
Feb 11, 2022
Merged

Fix state constructor for obscure specification#26
prehner merged 3 commits intomainfrom
fix_state_constructor

Conversation

@prehner
Copy link
Contributor

@prehner prehner commented Feb 11, 2022

In this example, the moles of the state are now correctly obtained in a density iteration instead of default values.

T = 25*CELSIUS
V = (100*ANGSTROM)**3
p = BAR
z = 3e-4
State(func, T, pressure=p, molefracs=np.array([1-z,z]), volume=V).pressure()
>>> 100 kPa

closes #25

To facilitate testing, this PR also adds a Python constructor for PengRobinsonRecord.

@prehner prehner requested a review from g-bauer February 11, 2022 13:29
@prehner prehner merged commit 2ed2d5c into main Feb 11, 2022
@prehner prehner deleted the fix_state_constructor branch February 11, 2022 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

State construction branches incorrectly for unorthodoxly specified states

2 participants