-
Notifications
You must be signed in to change notification settings - Fork 1
Add new Mocca API #19
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
base: main
Are you sure you want to change the base?
Conversation
| state0 = Jutul.setup_state(model, | ||
| Pressure = p_init, | ||
| y = y_init', | ||
| function setup_process_state(model; kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to call this setup_initial_state or setup_initial_process_state? This is an open question!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namings are basically a direct mapping from that of JutulDarcy.jl. I think the word setup gives some hint of "initial-ness", but it doesn't hurt to chuck in an initial into the naming, e.g., setup_initial_process_state as you suggest.
| return dcb_forces | ||
| end | ||
|
|
||
| function setup_cyclic_forces(model, stage_times; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to abstract this away quite so much. A cyclic adsorption system could have "any" combination of process steps in "any" order (within reason). I have some logic for setting this up using a dictionary of named process steps in the simple_api branch I started working on. I will look at trying to incorporate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This was a quick fix for getting very specific implementation details out of the example scripts, so something in between sounds good.
This PR adds an API to Mocca.jl that abstracts away much of the internals from the user.