Skip to content

Conversation

@FrancescaWatson
Copy link
Contributor

@FrancescaWatson FrancescaWatson commented Jan 5, 2026

This PR introduces the following new features:

  • Input and model setup from JSON and Julia dict.
  • Simplified model setup interface with increased flexibility (cyclic and DCB models follow the same setup, the number of cycles and stages is specified in the setup)
  • Simplified functions to plot results
  • Output of results to CSV with simple checking to avoid overwriting files with the same name.
  • Updated tests which are intended to be setup to run using CI (not currently implemented)

This PR incorporates and supersedes #19

FrancescaWatson and others added 30 commits October 7, 2025 21:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a simplified API for Mocca.jl with the following key objectives:

  • Input and model setup from JSON and Julia dictionaries
  • Unified interface for cyclic and DCB models with flexible cycle/stage specification
  • Simplified functions for plotting results
  • CSV output with file overwrite protection

Reviewed changes

Copilot reviewed 34 out of 39 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/state_initialization.jl Updated to use new setup_process_state, setup_process_model, and setup_process_parameters functions
test/jutul_integration.jl Refactored to use simplified model setup API
test/data_input.jl New test file for JSON/dict input parsing functionality
test/runtests.jl Added test suite for input parsing
src/input_output/parse_input.jl New file implementing JSON/dict parsing with support for both detailed and simple formats
src/input_output/setup_mocca_case.jl New function to create complete simulation cases from parsed input
src/input_output/export_cell_results.jl New CSV export function with overwrite protection
src/input_output/plot_outlet.jl New simplified plotting function for outlet cell
src/init/init_adsorption_column.jl Refactored with new setup_process_* functions and force setup
src/init/constants.jl Added new adsorptionConstants and processInfo structs
src/utils.jl Added simulate_process and setup_process_simulator functions
src/systems/TwoComponentAdsorption.jl Added constructor accepting constants struct
src/core_types/core_types.jl New file defining core abstract types
src/Mocca.jl Updated exports and includes for new API
models/json/*.json New JSON input files for DCB and cyclic simulations
models/julia/model_library.jl New Julia dict-based input definitions
examples/*.jl Updated examples to use new simplified API
docs/make.jl Added notebook generation
Project.toml Added JSON/JSON3 dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FrancescaWatson
Copy link
Contributor Author

Checks failed because I forgot to update the history_matching.jl example. I will fix this!

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