Skip to content

Commit

Permalink
Doc execute tuto_simul_cbox.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Oct 21, 2022
1 parent f077607 commit 2f72afb
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 19 deletions.
25 changes: 24 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def root(module):
".rst": "restructuredtext",
".ipynb": "myst-nb",
".myst": "myst-nb",
".md": "myst-nb",
}

# Execute Doxygen
Expand Down Expand Up @@ -189,7 +190,12 @@ def root(module):
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "examples/snek5000-*/README.md"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"examples/snek5000-*/README.md",
]

# -- Options for HTML output -------------------------------------------------

Expand Down Expand Up @@ -282,3 +288,20 @@ def autodoc_skip_member(app, what, name, obj, skip, options):

def setup(app):
app.connect("autodoc-skip-member", autodoc_skip_member)


myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"fieldlist",
"html_admonition",
"html_image",
"linkify",
"replacements",
"smartquotes",
"strikethrough",
"substitution",
"tasklist",
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from .solver import Simul
from .output import Output

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from snek5000.info import InfoSolverMake
from snek5000.solvers.base import SimulNek

# To use KTH Framework import SimulKTH instead
# from snek5000.solvers.kth import SimulKTH

Expand Down
1 change: 0 additions & 1 deletion docs/examples/snek5000-tgv/src/snek5000_tgv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from .solver import Simul
from .output import Output

Expand Down
1 change: 1 addition & 0 deletions docs/examples/snek5000-tgv/src/snek5000_tgv/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ def post_init(self):
self.write_size(size)
self.write_makefile_usr(makefile_usr)


Output = OutputTGV
22 changes: 8 additions & 14 deletions docs/tuto_simul_cbox.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
jupyter:
jupytext:
text_representation:
extension: .md
format_name: markdown
format_version: '1.3'
jupytext_version: 1.14.1
kernelspec:
display_name: Python 3.9.13 ('env-snek')
language: python
name: python3
jupytext:
text_representation:
format_name: myst
kernelspec:
display_name: Python 3
name: python3
---

<!-- #region tags=[] -->
Expand All @@ -19,10 +14,9 @@ jupyter:

## Initialize and setup simulation parameters

This example is based on [this study](https://www.cambridge.org/core/journals/journal-of-fluid-mechanics/article/abs/from-onset-of-unsteadiness-to-chaos-in-a-differentially-heated-square-cavity/617F4CB2C23DD74C3D0CB872AE7C0045). The configuration is a square cavity. The control parameters are Prandtl $= 0.71$ and Rayleigh $= 1.86 \times 10^{8}$. The mesh size is $64 \times 64$. We want to have $25$ probes (history points) to record the variable signals. We will use these probe signals in monitoring and postprocessing of the simulation. See [this example](https://github.com/snek5000/snek5000-cbox/blob/gh-actions/doc/examples/run_side_short.py) for the implementation. The simulation was executed as follows:

This example is based on [this study](https://www.cambridge.org/core/journals/journal-of-fluid-mechanics/article/abs/from-onset-of-unsteadiness-to-chaos-in-a-differentially-heated-square-cavity/617F4CB2C23DD74C3D0CB872AE7C0045). The configuration is a square cavity. The contol parameters are Prandtl $= 0.71$ and Rayleigh $= 1.86 \times 10^{8}$. The mesh size is $64 \times 64$. We want to have $25$ probes (history points) to record the variable signals. We will use these probe signals in monitoring and postprocessing of the simulation. See [this example](https://github.com/snek5000/snek5000-cbox/blob/gh-actions/doc/examples/run_side_short.py) for the implementation. The simulation was executed as follows:

```py
```{code-cell}
import numpy as np
from snek5000_cbox.solver import Simul
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Tutorials
ipynb/executed/tuto_load_print_stdout

.. toctree::
:caption: Packaging
:caption: Create your own Snek5000 solver

packaging
packaging
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ docs =
nbdime
# https://github.com/sphinx-doc/sphinx/issues/8198
pygments >= 2.4.1
linkify-it-py

tests =
pytest
Expand Down

0 comments on commit 2f72afb

Please sign in to comment.