Skip to content
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

Introduce folders in the tutorials sidebar and sort tutorials #368

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 59 additions & 47 deletions _data/sidebars/tutorial_sidebar.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting.

entries:
- title:
product:
version:
- title: sidebar
product: Tutorials

folders:

- title: Tutorials
- title: Introduction
output: web
folderitems:

- title: Introduction
- title: Overview
url: /tutorials.html
output: web

- title: Perpendicular flap
url: /tutorials-perpendicular-flap.html
- title: Visualization
url: /tutorials-visualization.html
output: web

- title: Basic cases
output: web
folderitems:

- title: Flow over heated plate
url: /tutorials-flow-over-heated-plate.html
output: web
Expand All @@ -26,20 +30,28 @@ entries:
url: /tutorials-partitioned-heat-conduction.html
output: web

- title: Turek-Hron FSI3
url: /tutorials-turek-hron-fsi3.html
- title: Perpendicular flap
url: /tutorials-perpendicular-flap.html
output: web

- title: Multiple perpendicular flaps
url: /tutorials-multiple-perpendicular-flaps.html
- title: Further cases
output: web
folderitems:

- title: ASTE turbine
url: /tutorials-aste-turbine.html
output: web

- title: Breaking dam with flexible pillar 2D
url: /tutorials-breaking-dam-2d.html
output: web

- title: Elastic tube 3D
url: /tutorials-elastic-tube-3d.html
- title: Channel transport
url: /tutorials-channel-transport.html
output: web

- title: Channel transport reaction
url: /tutorials-channel-transport-reaction.html
output: web

- title: Elastic tube 1D
Expand All @@ -50,6 +62,10 @@ entries:
url: /tutorials-flow-around-controlled-moving-cylinder.html
output: web

- title: Elastic tube 3D
url: /tutorials-elastic-tube-3d.html
output: web

- title: Flow over heated plate (nearest projection)
url: /tutorials-flow-over-heated-plate-nearest-projection.html
output: web
Expand All @@ -70,21 +86,41 @@ entries:
url: /tutorials-heat-exchanger-simplified.html
output: web

- title: Multiple perpendicular flaps
url: /tutorials-multiple-perpendicular-flaps.html
output: web

- title: Oscillator
url: /tutorials-oscillator.html
output: web

- title: Oscillator overlap
url: /tutorials-oscillator-overlap.html
output: web

- title: Partitioned elastic beam
url: /tutorials-partitioned-elastic-beam.html
output: web

- title: Partitioned flow over a b.f. step
url: /tutorials-partitioned-backwards-facing-step.html
output: web

- title: Partitioned flow over heated plate
url: /tutorials-flow-over-heated-plate-partitioned-flow.html
output: web

- title: Partitioned heat conduction complex
url: /tutorials-partitioned-heat-conduction-complex.html
output: web

- title: Partitioned heat conduction direct
url: /tutorials-partitioned-heat-conduction-direct.html
output: web

- title: Partitioned heat conduction overlap
url: /tutorials-partitioned-heat-conduction-overlap.html
output: web

- title: Partitioned elastic beam
url: /tutorials-partitioned-elastic-beam.html
output: web

- title: Partitioned pipe
url: /tutorials-partitioned-pipe.html
Expand All @@ -94,24 +130,12 @@ entries:
url: /tutorials-partitioned-pipe-two-phase.html
output: web

- title: Partitioned flow over a step
url: /tutorials-partitioned-backwards-facing-step.html
output: web

- title: Partitioned flow over heated plate
url: /tutorials-flow-over-heated-plate-partitioned-flow.html
output: web

- title: Oscillator
url: /tutorials-oscillator.html
output: web

- title: Oscillator overlap
url: /tutorials-oscillator-overlap.html
- title: Two-scale heat conduction
url: /tutorials-two-scale-heat-conduction.html
output: web

- title: ASTE turbine
url: /tutorials-aste-turbine.html
- title: Turek-Hron FSI3
url: /tutorials-turek-hron-fsi3.html
output: web

- title: Volume-coupled diffusion
Expand All @@ -121,15 +145,3 @@ entries:
- title: Volume-coupled flow
url: /tutorials-volume-coupled-flow.html
output: web

- title: Channel transport
url: /tutorials-channel-transport.html
output: web

- title: Channel transport reaction
url: /tutorials-channel-transport-reaction.html
output: web

- title: Two-scale heat conduction
url: /tutorials-two-scale-heat-conduction.html
output: web
31 changes: 31 additions & 0 deletions pages/tutorials/tutorials-visualization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Visualization hints for partitioned simulations
permalink: tutorials-visualization.html
keywords: tutorials, visualization
summary: A few hints on how to visualize result files generated by various solvers used in the preCICE tutorials.
---

## Synchronizing results

Most of the solvers support a format that [ParaView](https://www.paraview.org/) can read. However, the results may not always be synchronized, as some solvers include timestamps in the file names, while others only include a counter. You may want to use the [TemporalShiftScale](https://kitware.github.io/paraview-docs/v5.9.0/python/paraview.simple.TemporalShiftScale.html) filter of ParaView to map from a constant time step size to a time.

## Visualizing OpenFOAM results

To visualize OpenFOAM results, you can either use the bundled OpenFOAM file reader (open the empty `.foam` or `.OpenFOAM` file you can find at the case directory), or convert the results to VTK with `foamToVTK` and load these files in ParaView.

Some versions of OpenFOAM [produce additional empty result files](https://github.com/precice/openfoam-adapter/issues/26) when using the preCICE-OpenFOAM adapter, which may lead to a strange "flashing" effect in animations. To work around this, we are [deleting such files in the end of each simulation](https://github.com/precice/tutorials/blob/master/tools/openfoam-remove-empty-dirs.sh).

## Visualizing CalculiX results

CalculiX exports results in its own `.frd` format, which you can visualize in CalculiX CGX (`cgx flap.frd`). In the CGX window, you can click-and-hold to select different times and fields, or to animate the geometry.

If you prefer to work with VTK files, you can also use tools such as [ccx2paraview](https://github.com/calculix/ccx2paraview) or a converter included in the [calculix-adapter/tools](https://github.com/precice/calculix-adapter/tree/master/tools) directory. A more complete pre- and post-processing tool for CalculiX is [PrePoMax](https://prepomax.fs.um.si/) (open-source, only available for Windows).

Are you new to CalculiX? Watch this [contributed video tutorial](https://www.youtube.com/playlist?list=PLWHQIdms-YHT8Ybt9psE8lJpaWRyy3fNf) to find out more about pre- and post-processing CalculiX cases for preCICE.

## Visualizing results of other solvers

- Our FEniCS examples write `.pvd` files, which you can open in ParaView.
- Our deal.II examples write `.vtk` files.
- SU2 writes `.vtk` files.
- code_aster writes `.rmed` files, which you can open in [GMSH](https://gmsh.info/). [See an example](tutorials-flow-over-heated-plate-steady-state.html).
61 changes: 17 additions & 44 deletions pages/tutorials/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,47 @@ git clone --branch=master --depth 1 https://github.com/precice/tutorials.git

We recommend that you start from one of the following cases, which you can quickly run on your laptop:

- [Flow in a channel with an elastic perpendicular flap](tutorials-perpendicular-flap.html): A **fluid-structure interaction** scenario. Feel free to combine different solvers, among OpenFOAM, SU2, deal.II, FEniCS, Nutils, CalculiX, and DUNE.
- [Flow over a heated plate](tutorials-flow-over-heated-plate.html): A **conjugate heat transfer** scenario. Try OpenFOAM, FEniCS, or Nutils.
- [Partitioned heat conduction](tutorials-partitioned-heat-conduction.html): The mathematician's dream: split the **heat equation** in two and glue it again. Pick your Dirichlet and Neumann solvers among FEniCS, Nutils, and OpenFOAM.
- Flow in a channel with an elastic [perpendicular flap](tutorials-perpendicular-flap.html): A **fluid-structure interaction** scenario. Feel free to combine different solvers, among OpenFOAM, SU2, deal.II, FEniCS, Nutils, CalculiX, and DUNE.

<p style="text-align: center">
<a href="tutorials-perpendicular-flap.html" title="Tutorial: Perpendicular flap"><img src="images/tutorials-perpendicular-flap-physics.png" style="margin-left:3%; max-width:31%; max-height:100px;" alt="Flow with a perpendicular flap"></a>
<a href="tutorials-flow-over-heated-plate.html" title="Tutorial: Flow over heated plate"><img src="images/tutorials-flow-over-heated-plate-example.png" style="margin-left:3%; max-width:31%; max-height:100px;" alt="Flow over heated plate"></a>
<a href="tutorials-partitioned-heat-conduction.html" title="Tutorial: Partitioned heat conduction"><img src="images/tutorials-partitioned-heat-conduction-setup.png" style="max-width:31%; max-height:100px;" alt="Partitioned heat conduction"></a>
<a href="tutorials-perpendicular-flap.html" title="Tutorial: Perpendicular flap"><img src="images/tutorials-perpendicular-flap-physics.png" style="margin-left:3%; max-width:31%; max-height:100px;" alt="Flow with a perpendicular flap"></a>
</p>

## Further cases

In the following cases, you can explore different aspects of preCICE:

- [Turek-Hron FSI3](tutorials-turek-hron-fsi3.html): The well-known fluid-structure interaction benchmark, with OpenFOAM and deal.II.
- [Multiple perpendicular flaps](tutorials-multiple-perpendicular-flaps.html): A three-field fluid-structure interaction case (fully implicit coupling, transient).
- [ASTE turbine](tutorials-aste-turbine.html): An example case for ASTE to investigate different preCICE mappings using a turbine geometry.
- [Breaking dam with flexible pillar 2D](tutorials-breaking-dam-2d.html): A two-phase flow fluid-structure interaction problem, with OpenFOAM and CalculiX.
- [3D elastic tube](tutorials-elastic-tube-3d.html): A 3D fluid-structure interaction scenario, with OpenFOAM, CalculiX, and FEniCS.
- [1D elastic tube](tutorials-elastic-tube-1d.html): A 1D fluid-structure interaction scenario, with toy solvers in Python, C++ and Rust.
- [Channel transport](tutorials-channel-transport.html): A channel flow coupled to a transport (of, e.g., a chemistry species) in a uni-directional way, with Nutils.
- [Channel transport reaction](tutorials-channel-transport-reaction.html): A channel flow coupled to a transport of a chemical species with reaction in a uni-directional way, with FEniCS.
- [Elastic tube 1D](tutorials-elastic-tube-1d.html): A 1D fluid-structure interaction scenario, with toy solvers in Python, C++ and Rust.
- [Elastic tube 3D](tutorials-elastic-tube-3d.html): A 3D fluid-structure interaction scenario, with OpenFOAM, CalculiX, and FEniCS.
- [Flow around controlled moving cylinder](tutorials-flow-around-controlled-moving-cylinder.html): A flow around a rigid moving cylinder with an FMI-based controller to dampen out the oscillation.
- [Flow over a heated plate: nearest projection](tutorials-flow-over-heated-plate-nearest-projection.html): A nearest-projection mapping version, with two OpenFOAM solvers.
- [Flow over a heated plate: two meshes](tutorials-flow-over-heated-plate-two-meshes.html): A variant where the mesh used to transfer temperature is not the same as the one transferring heat fluxes. This allows us to use CalculiX as a solid solver.
- [Flow over a heated plate: steady-state](tutorials-flow-over-heated-plate-steady-state.html): A steady-state version, with OpenFOAM and code_aster.
- [Flow over a heated plate: two meshes](tutorials-flow-over-heated-plate-two-meshes.html): A variant where the mesh used to transfer temperature is not the same as the one transferring heat fluxes. This allows us to use CalculiX as a solid solver.
- [Heat exchanger](tutorials-heat-exchanger.html): A three-field conjugate heat transfer case (explicit coupling, steady state, Robin-Robin coupling), with OpenFOAM and CalculiX.
- [Heat exchanger: simplified](tutorials-heat-exchanger-simplified.html): A simplified version of the heat exchanger tutorial. Apart from a simpler geometry, that case is transient and using the implicit multi-coupling scheme, with Dirichlet-Neumann coupling..
- [Multiple perpendicular flaps](tutorials-multiple-perpendicular-flaps.html): A three-field fluid-structure interaction case (fully implicit coupling, transient).
- [Oscillator](tutorials-oscillator.html): A simple mass-spring oscillator with two masses, coupling two instances of a Python solver.
- [Oscillator overlap](tutorials-oscillator-overlap.html): An overlapping Schwartz method variant of the Oscillator tutorial, coupling two Dirichlet participants.
- [Partitioned elastic beam](tutorials-partitioned-elastic-beam.html): An experimental structure-structure coupling scenario, with two CalculiX solvers.
- [Partitioned flow over a backwards-facing step](tutorials-partitioned-backwards-facing-step.html): A fluid-fluid coupling scenario, demonstrating inlet-outlet boundary conditions in OpenFOAM.
- [Partitioned flow over a heated plate](tutorials-flow-over-heated-plate-partitioned-flow.html): A three-participant case, similar to the flow over a heated plate with OpenFOAM solvers, but with a partitioned channel flow.
- [Partitioned heat conduction: complex setup](tutorials-partitioned-heat-conduction-complex.html): A partitioned heat conduction case with FEniCS, showcasing advanced features and geometries.
- [Partitioned heat conduction: direct access](tutorials-partitioned-heat-conduction-direct.html): A partitioned heat conduction case with Nutils, showcasing the direct mesh access feature.
- [Partitioned heat conduction: overlapping Schwarz](tutorials-partitioned-heat-conduction-overlap.html): An overlapping Schwarz method of the partitioned heat conduction case, coupling two Dirichlet participants.
- [Partitioned elastic beam](tutorials-partitioned-elastic-beam.html): An experimental structure-structure coupling scenario, with two CalculiX solvers.
- [Partitioned pipe](tutorials-partitioned-pipe.html): A fluid-fluid coupling scenario, with two OpenFOAM solvers.
- [Partitioned pipe two-phae](tutorials-partitioned-pipe-two-phase.html): A two-phase variant of the partitioned pipe tutorial.
- [Partitioned flow over a backwards-facing step](tutorials-partitioned-backwards-facing-step.html): A fluid-fluid coupling scenario, demonstrating inlet-outlet boundary conditions in OpenFOAM.
- [Partitioned flow over a heated plate](tutorials-flow-over-heated-plate-partitioned-flow.html): A three-participant case, similar to the flow over a heated plate with OpenFOAM solvers, but with a partitioned channel flow.
- [Oscillator](tutorials-oscillator.html): A simple mass-spring oscillator with two masses, coupling two instances of a Python solver.
- [Oscillator overlap](tutorials-oscillator-overlap.html): An overlapping Schwartz method variant of the Oscillator tutorial, coupling two Dirichlet participants.
- [Two-scale heat conduction](tutorials-two-scale-heat-conduction.html): A heat conduction scenario with an underlying micro-structure which is resolved to get the constitutive properties on the macro scale.
- [Turek-Hron FSI3](tutorials-turek-hron-fsi3.html): The well-known fluid-structure interaction benchmark, with OpenFOAM and deal.II.
- [Volume-coupled diffusion](tutorials-volume-coupled-diffusion.html): An experimental volume coupling scenario, with two FEniCS solvers.
- [Volume-coupled flow](tutorials-volume-coupled-flow.html): An experimental volume coupling scenario, coupling a source term coded in Nutils with a flow in OpenFOAM.
- [ASTE turbine](tutorials-aste-turbine.html): An example case for ASTE to investigate different preCICE mappings using a turbine geometry.
- [Channel transport](tutorials-channel-transport.html): A channel flow coupled to a transport (of, e.g., a chemistry species) in a uni-directional way, with Nutils.
- [Channel transport reaction](tutorials-channel-transport-reaction.html): A channel flow coupled to a transport of a chemical species with reaction in a uni-directional way, with FEniCS.
- [Two-scale heat conduction](tutorials-two-scale-heat-conduction.html): A heat conduction scenario with an underlying micro-structure which is resolved to get the constitutive properties on the macro scale.

## Community projects

Expand All @@ -73,31 +73,4 @@ You can start any tutorial by opening multiple terminals, navigating to each par

Before running a case again, cleanup previous results with the included cleaning scripts.

### Visualization

When visualizing partitioned simulation results, there are a few hints you may want to consider.

#### Synchronizing results

Most of the solvers support a format that [ParaView](https://www.paraview.org/) can read. However, the results may not always be synchronized, as some solvers include timestamps in the file names, while others only include a counter. You may want to use the [TemporalShiftScale](https://kitware.github.io/paraview-docs/v5.9.0/python/paraview.simple.TemporalShiftScale.html) filter of ParaView to map from a constant time step size to a time.

#### Visualizing OpenFOAM results

To visualize OpenFOAM results, you can either use the bundled OpenFOAM file reader (open the empty `.foam` or `.OpenFOAM` file you can find at the case directory), or convert the results to VTK with `foamToVTK` and load these files in ParaView.

Some versions of OpenFOAM [produce additional empty result files](https://github.com/precice/openfoam-adapter/issues/26) when using the preCICE-OpenFOAM adapter, which may lead to a strange "flashing" effect in animations. To work around this, we are [deleting such files in the end of each simulation](https://github.com/precice/tutorials/blob/master/tools/openfoam-remove-empty-dirs.sh).

#### Visualizing CalculiX results

CalculiX exports results in its own `.frd` format, which you can visualize in CalculiX CGX (`cgx flap.frd`). In the CGX window, you can click-and-hold to select different times and fields, or to animate the geometry.

If you prefer to work with VTK files, you can also use tools such as [ccx2paraview](https://github.com/calculix/ccx2paraview) or a converter included in the [calculix-adapter/tools](https://github.com/precice/calculix-adapter/tree/master/tools) directory. A more complete pre- and post-processing tool for CalculiX is [PrePoMax](https://prepomax.fs.um.si/) (open-source, only available for Windows).

Are you new to CalculiX? Watch this [contributed video tutorial](https://www.youtube.com/playlist?list=PLWHQIdms-YHT8Ybt9psE8lJpaWRyy3fNf) to find out more about pre- and post-processing CalculiX cases for preCICE.

#### Visualizing results of other solvers

- Our FEniCS examples write `.pvd` files, which you can open in ParaView.
- Our deal.II examples write `.vtk` files.
- SU2 writes `.vtk` files.
- code_aster writes `.rmed` files, which you can open in [GMSH](https://gmsh.info/). [See an example](tutorials-flow-over-heated-plate-steady-state.html).
Are you wondering how to visualize the various results generated? Have a look in our [visualization hints](tutorials-visualization.html).
Loading