-
Notifications
You must be signed in to change notification settings - Fork 0
Add Sphinx-based Documentation #4
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b1e69f0
Add Sphinx-based documentation, update README.md, update LICENSE, upd…
domgz 1fb2324
Simplify use with Docker
domgz f088eb5
Add graph pattern
domgz 11a1c36
Add some indications to compile the solver
AndreaQuerio 7ae5429
Correct Dockerfile
AndreaQuerio 68a940a
Update setup.py
domgz 783795a
Merge branch 'master' into documentation
AndreaQuerio da4f122
Change README.md file
AndreaQuerio 7583c4b
Merge branch 'documentation' of github.com:simphony/simdome_wet_synth…
AndreaQuerio ea41861
Update README.md
domgz 60d17c6
Modify diagram
AndreaQuerio d8c6140
Merge branch 'documentation' of github.com:simphony/simdome_wet_synth…
AndreaQuerio 7cfee4c
Merge branch 'master' into documentation
domgz 8e6ec7c
Minor change in graph pattern (do not cover arrows with text)
domgz 44a4e72
Undo controlDict and installation changes as they will be merged in P…
domgz 7cdb7d1
Merge branch 'master' into documentation
domgz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,67 +1,88 @@ | ||
| # Wet Synthesis | ||
| A collection of wrappers around solvers to simulate the wet-synthesis of Ni-Mn-Co Hydroxides | ||
|
|
||
| *Contact*: [Mohsen Shiea](mailto:mohsen.shiea@polito.it), | ||
| <!---introduction-start-c0e9f6f2--> | ||
|
|
||
| A collection of [SimPhoNy](https://github.com/simphony/simphony-osp) | ||
| [wrappers](https://simphony.readthedocs.io/en/v3.9.0/overview.html#fetch-data-from-a-database-run-a-simulation-and-immediately-store-the-results) | ||
| around a CFD-PBE solver to simulate the wet-synthesis of Ni-Mn-Co Hydroxides. | ||
|
|
||
| - CFD-PBE Wrapper: This wrapper prepares a simulation case folder based on the | ||
| user inputs and executes a solver for Computational Fluid Dynamics-Population | ||
| Balance Equation (CFD-PBE) simulation of NMC hydroxide precipitation. | ||
|
|
||
| - Compartment Wrapper: This wrapper is aimed at simulating the NMC hydroxide | ||
| precipitation in a pilot CSTR reactor, by using the compartment model. | ||
| Currently, it can be used only to divide the reactor into the compartments. | ||
|
|
||
| *Contact*: [Andrea Querio](mailto:andrea.querio@polito.it), | ||
| [Daniele Marchisio](mailto:daniele.marchisio@polito.it), | ||
| [Antonio Buffo](mailto:antonio.buffo@polito.it) and | ||
| [Gianluca Boccardo](mailto:gianluca.boccardo@polito.it) from the | ||
| Multiphase Systems and Chemical Engineering research group, Politecnico di Torino. | ||
| [Multiphase Systems and Chemical Engineering research group](https://www.disat.polito.it/research/research_groups/musychen), | ||
| [Politecnico di Torino](https://www.polito.it/). | ||
|
|
||
| **Index** | ||
| - [Wet Synthesis](#Wet-Synthesis) | ||
| - [CFD-PBE Wrapper](#CFD-PBE-Wrapper) | ||
| - [Compartment Wrapper](#Compartment-Wrapper) | ||
| - [Compatibility](#Compatibility) | ||
| - [Requirements](#Requirements) | ||
| - [Installation](#Installation) | ||
| - [Docker Container](#Docker-Container) | ||
| - [Usage](#Usage) | ||
| <!---introduction-end-c0e9f6f2--> | ||
|
|
||
| ## CFD-PBE Wrapper | ||
| This wrapper prepares a simulation case folder based on the user inputs and executes a solver for Computational Fluid Dynamics-Population Balance Equation (CFD-PBE) simulation of NMC hydroxide precipitation. | ||
| ## Compartment Wrapper | ||
| This wrapper is aimed at simulating the NMC hydroxide precipitation in a pilot CSTR reactor, by using the compartment model. Currently, it can be used only to divide the reactor into the compartments. | ||
| ## Installation | ||
|
|
||
| ## Requirements | ||
| - [OSP core](https://github.com/simphony/osp-core) | ||
| - [OpenFOAM](https://openfoam.org/) | ||
| - [Ansys Fluent](https://www.ansys.com/products/fluids/ansys-fluent) | ||
| - [7-zip](https://www.7-zip.org/) | ||
| <!---installation-start-880c326a--> | ||
|
|
||
| ## Compatibility | ||
| The wet synthesis wrappers require a working installation of | ||
| [OpenFOAM 8](https://openfoam.org/version/8/), | ||
| [SUNDIALS](https://github.com/LLNL/sundials) | ||
| ([v6.1.1](https://github.com/LLNL/sundials/releases/tag/v6.1.1) is known to | ||
| work) and [7-zip](https://www.7-zip.org/). Follow the links to find | ||
| installation instructions for each tool. | ||
|
|
||
| The following table describes the version compatibility between the [OSP core](https://github.com/simphony/osp-core) package and documentation presented in this project. | ||
| Once the requirements have been installed, clone the Wet Synthesis Wrappers | ||
| repository and install them. | ||
|
|
||
| | __Wrapper development__ | __OSP core__ | | ||
| |:-----------------------:|:------------:| | ||
| | 1.0.0 | 3.4.x | | ||
| ```shell | ||
| git clone https://github.com/simphony/simdome_wet_synthesis.git | ||
| pip install ./simdome_wet_synthesis | ||
| ``` | ||
|
|
||
| The releases of OSP core are available [here](https://github.com/simphony/osp-core). | ||
| Then install the required ontology. | ||
|
|
||
| ## Installation | ||
| ### ontology: | ||
| ```sh | ||
| pico install ontology.wet_synthesis.yml | ||
| ```shell | ||
| pico install simdome_wet_synthesis/ontology.wet_synthesis.yml | ||
|
|
||
| # If you have issues using pico directly, you can use | ||
| python -m osp.core.pico install ontology.wet_synthesis.yml | ||
| # python -m osp.core.pico install simdome_wet_synthesis/ontology.wet_synthesis.yml | ||
| ``` | ||
| ### wrappers: | ||
| ```sh | ||
| python3 setup.py install | ||
| apt-get install graphviz | ||
|
|
||
| <!---installation-end-880c326a--> | ||
|
|
||
| <!---installation-start-f7fde43d--> | ||
|
|
||
| ### Docker | ||
|
|
||
| Alternatively, it is possible to execute the wrapper in a Docker container. | ||
| Clone the repository and enter the newly created directory | ||
|
|
||
| ```shell | ||
| git clone https://github.com/simphony/simdome_wet_synthesis.git | ||
| cd simdome_wet_synthesis | ||
| ``` | ||
| More information can be found in the documentation for [installation of OSP core](https://simphony.readthedocs.io/en/latest/installation.html) | ||
|
|
||
| ## Docker Container | ||
| ### Image creation: | ||
| and then run | ||
|
|
||
| ```sh | ||
| ./docker_install.sh | ||
| docker build -t simdome/wet_synthesis . | ||
| ``` | ||
| ### Launch container: | ||
|
|
||
| to create the docker image. After that, run | ||
|
|
||
| ```sh | ||
| ./run_container.sh | ||
| ``` | ||
|
|
||
| ## Usage | ||
| Two scripts are provided in the folder "examples" for the usage of the wrappers. It should be noted that the user is responsible for providing the OpenFOAM solver or Ansys Fluent executables. Moreover, the user should place the template case folders and mesh files in the corresponding folders found in the address "osp/wrappers/wet_synthesis_wrappers/cases/precNMC". | ||
| to get access to a shell inside a container based on the image that has just | ||
| been built. | ||
|
|
||
| <!---installation-end-f7fde43d--> | ||
|
|
||
| ## Documentation | ||
|
|
||
| Visit [the documentation](https://simdomewetsynthesis.readthedocs.io) | ||
| to learn how to use the wrappers. | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| """Configuration file for the Sphinx documentation builder.""" | ||
|
|
||
| # --- Project information --- # | ||
|
|
||
| project = "Wet Synthesis" | ||
| copyright = ( | ||
| "2023, Multiphase Systems and Chemical Engineering research group," | ||
| "Politecnico di Torino" | ||
| ) | ||
| author = ( | ||
| "Multiphase Systems and Chemical Engineering research group," | ||
| "Politecnico di Torino" | ||
| ) | ||
|
|
||
| # --- General configuration --- # | ||
|
|
||
| extensions = [ | ||
| "myst_parser", # Markdown support | ||
| "sphinx.ext.autodoc", # API reference | ||
| "sphinx.ext.napoleon", # Google and NumPy style docstrings support | ||
| "sphinx.ext.viewcode", # Link to source in API reference | ||
| "sphinx_copybutton", # Copy button for code blocks | ||
| "nbsphinx", # Jupyter notebook support | ||
| "IPython.sphinxext.ipython_console_highlighting", # Syntax highlighting | ||
| "sphinx.ext.autosectionlabel", # Auto-generate section labels. | ||
| "sphinx_panels", # Show panels in a grid layout or as drop-downs | ||
| ] | ||
|
|
||
| master_doc = "index" | ||
|
|
||
| myst_heading_anchors = 5 | ||
|
|
||
| suppress_warnings = ["autosectionlabel.*"] | ||
| exclude_patterns = ["**.ipynb_checkpoints"] | ||
| nbsphinx_allow_errors = False | ||
|
|
||
|
|
||
| # --- HTML output options --- # | ||
| html_theme = "sphinx_book_theme" | ||
| html_favicon = "static/favicon.png" # Noto Sans open book emoji | ||
| html_logo = "static/logo.png" | ||
| html_theme_options = { | ||
| "github_url": "https://github.com/simphony/simdome_wet_synthesis", | ||
| "repository_url": "https://github.com/simphony/simdome_wet_synthesis", | ||
| "use_repository_button": True, | ||
| "repository_branch": "main", | ||
| "path_to_docs": "docs", | ||
| "logo_only": True, | ||
| "show_navbar_depth": 1, | ||
| } | ||
|
|
||
|
|
||
| html_static_path = ["static"] | ||
| html_css_files = ["custom.css"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Wet Synthesis | ||
|
|
||
| ```{include} ../README.md | ||
| :start-after: <!---introduction-start-c0e9f6f2--> | ||
| :end-before: <!---introduction-end-c0e9f6f2--> | ||
| ``` | ||
|
|
||
| ```{toctree} | ||
| :hidden: true | ||
| :maxdepth: 2 | ||
|
|
||
| installation | ||
| usage | ||
| Licence <https://github.com/simphony/simdome_wet_synthesis/blob/master/LICENSE> | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Installation | ||
|
|
||
| ```{include} ../README.md | ||
| :start-after: <!---installation-start-880c326a--> | ||
| :end-before: <!---installation-end-880c326a--> | ||
| ``` | ||
|
|
||
| ```{note} | ||
| OpenFOAM uses a collection of files packed together in a so-called | ||
| "case folder" as input. The Wet Synthesis Wrappers include templates for those | ||
| case folders, that are modified before running each simulation according to the | ||
| parameters passed from SimPhoNy in the form of | ||
| [CUDS objects](https://simphony.readthedocs.io/en/v3.9.0/jupyter/cuds_api.html) | ||
| (see the [usage section](./usage.md)). | ||
|
|
||
| Such templates are included in the Python package, in the folder | ||
| `osp/wrappers/wet_synthesis_wrappers/cases`. If you wish OpenFOAM to behave | ||
| in a way that is not covered by the parameters that are passed from SimPhoNy, | ||
| then you will have to modify the case folder templates before installing the | ||
| package. | ||
| ``` | ||
|
|
||
| ```{include} ../README.md | ||
| :start-after: <!---installation-start-f7fde43d--> | ||
| :end-before: <!---installation-end-f7fde43d--> | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| jinja2 >= 3.0.3, < 4 | ||
| jupyter >= 1.0.0, < 2 | ||
| markupsafe >= 2.1.1, < 3 | ||
| myst-parser >= 0.18.0, < 0.19 | ||
| nbsphinx >= 0.8.9, < 0.9 | ||
| sphinx >= 4.4.0, < 5 | ||
| sphinx-autobuild==2021.3.14 | ||
| sphinx_book_theme >= 0.3.2, < 0.4 | ||
| sphinx-copybutton >= 0.5.0, < 0.6 | ||
| sphinx-panels >= 0.6.0, < 0.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| .caption-text, | ||
| h1, | ||
| h2, | ||
| h3, | ||
| h4 { | ||
| color: #6580a1 !important; | ||
| } | ||
|
|
||
| .btn-outline-primary { | ||
| border-color: #6580a1 !important; | ||
| } | ||
|
|
||
| .btn-outline-primary:hover { | ||
| background-color: #6580a1 !important; | ||
| color: azure !important; | ||
| } | ||
|
|
||
| @media (min-width: 1200px) { | ||
| .container-xl { | ||
| max-width: 1550px; | ||
| } | ||
| #site-navigation { | ||
| max-width: 20%; | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@AndreaQuerio This documentation assumes that only OpenFOAM is compatible, although theoretically, it looks like things shouldm work with Ansys Fluent too, but I cannot test this, so I left it out. If things work with Fluent, please modify the documentation yourself. Be careful, this is not the only place were you would have to mentiont Fluent.