Skip to content

Conversation

@andreas-brostrom
Copy link
Collaborator

This PR adds an API to Mocca.jl that abstracts away much of the internals from the user.

state0 = Jutul.setup_state(model,
Pressure = p_init,
y = y_init',
function setup_process_state(model; kwargs...)
Copy link
Contributor

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!

Copy link
Collaborator Author

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;
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@FrancescaWatson FrancescaWatson mentioned this pull request Jan 5, 2026
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