diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 0b740f25c..172ab06bf 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -12,7 +12,7 @@ jobs: check_style: runs-on: ubuntu-latest steps: - - name: Checkout preCICE + - name: Checkout the repository uses: actions/checkout@v4 - name: Setup python uses: actions/setup-python@v5 diff --git a/aste-turbine/README.md b/aste-turbine/README.md index 7814e6ceb..d875508bb 100644 --- a/aste-turbine/README.md +++ b/aste-turbine/README.md @@ -15,6 +15,12 @@ Our example consists of a wind turbine blade geometry, which was triangulated us ![Turbine setup](images/tutorials-aste-turbine-setup.png) +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-aste-turbine-precice-config.png) + ## Running the tutorial All necessary steps in order to run the mapping setup are summarized in the `run.sh` script. Have a look at the comments in the run script in order to understand what is happening. In particular, the script executes the following steps: diff --git a/aste-turbine/images/tutorials-aste-turbine-precice-config.png b/aste-turbine/images/tutorials-aste-turbine-precice-config.png new file mode 100644 index 000000000..7ca705790 Binary files /dev/null and b/aste-turbine/images/tutorials-aste-turbine-precice-config.png differ diff --git a/aste-turbine/precice-config.xml b/aste-turbine/precice-config.xml index 3eedfa6d1..a606215b7 100644 --- a/aste-turbine/precice-config.xml +++ b/aste-turbine/precice-config.xml @@ -19,8 +19,6 @@ - - @@ -40,6 +38,8 @@ --> + + diff --git a/breaking-dam-2d/README.md b/breaking-dam-2d/README.md index a302f44a1..1d5bc6f1a 100644 --- a/breaking-dam-2d/README.md +++ b/breaking-dam-2d/README.md @@ -17,6 +17,12 @@ The two-dimensional breaking dam case is a free surface problem. A large column A similar, but not identical, setup is used in [1]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-breaking-dam-2d-precice-config.png) + ## Available solvers Fluid participant: diff --git a/breaking-dam-2d/images/tutorials-breaking-dam-2d-precice-config.png b/breaking-dam-2d/images/tutorials-breaking-dam-2d-precice-config.png new file mode 100644 index 000000000..189bcd57d Binary files /dev/null and b/breaking-dam-2d/images/tutorials-breaking-dam-2d-precice-config.png differ diff --git a/channel-transport-reaction/README.md b/channel-transport-reaction/README.md index 7513cbf0e..91a46e654 100644 --- a/channel-transport-reaction/README.md +++ b/channel-transport-reaction/README.md @@ -19,6 +19,12 @@ The geometry is shown below: The simulation is split into two participants: a Fluid participant that computes the fluid flow and sends the velocity field to the Chemical participant which computes the reaction, diffusion and advection of all chemical species. The coupling is unidirectional (`serial-explicit` with only one data entity being transferred). +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-channel-transport-reaction-precice-config.png) + ## Available solvers and dependencies Both participants run on FEniCS. Install [FEniCS](https://fenicsproject.org/download/) and the [FEniCS-adapter](https://github.com/precice/fenics-adapter) to run this tutorial. diff --git a/channel-transport-reaction/images/tutorials-channel-transport-reaction-precice-config.png b/channel-transport-reaction/images/tutorials-channel-transport-reaction-precice-config.png new file mode 100644 index 000000000..e401822ac Binary files /dev/null and b/channel-transport-reaction/images/tutorials-channel-transport-reaction-precice-config.png differ diff --git a/channel-transport-reaction/precice-config.xml b/channel-transport-reaction/precice-config.xml index 3af57f8ad..8656c5006 100644 --- a/channel-transport-reaction/precice-config.xml +++ b/channel-transport-reaction/precice-config.xml @@ -19,7 +19,6 @@ - diff --git a/channel-transport/README.md b/channel-transport/README.md index 9a494d8c4..494f11229 100644 --- a/channel-transport/README.md +++ b/channel-transport/README.md @@ -21,7 +21,14 @@ The behavior of the blob over the full 200 timesteps looks as follows: Animation of blob over 200 timesteps. - + +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-channel-transport-precice-config.png +) + ## Available solvers Fluid participant: diff --git a/channel-transport/images/tutorials-channel-transport-precice-config.png b/channel-transport/images/tutorials-channel-transport-precice-config.png new file mode 100644 index 000000000..3fd022358 Binary files /dev/null and b/channel-transport/images/tutorials-channel-transport-precice-config.png differ diff --git a/elastic-tube-1d/README.md b/elastic-tube-1d/README.md index 26ac1ce14..54b2e8e98 100644 --- a/elastic-tube-1d/README.md +++ b/elastic-tube-1d/README.md @@ -29,6 +29,12 @@ The following parameters have been chosen: Additionally the solvers use the parameters `N = 100` (number of cells), `tau = 0.01` (dimensionless timestep size), `kappa = 100` (dimensionless structural stiffness) by default. These values can be modified directly in each solver. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-elastic-tube-1d-precice-config.png) + ## Available solvers Both fluid and solid participant are supported in: diff --git a/elastic-tube-1d/images/tutorials-elastic-tube-1d-precice-config.png b/elastic-tube-1d/images/tutorials-elastic-tube-1d-precice-config.png new file mode 100644 index 000000000..9e0994de7 Binary files /dev/null and b/elastic-tube-1d/images/tutorials-elastic-tube-1d-precice-config.png differ diff --git a/elastic-tube-3d/README.md b/elastic-tube-3d/README.md index 001324ae9..34377b7ab 100644 --- a/elastic-tube-3d/README.md +++ b/elastic-tube-3d/README.md @@ -15,6 +15,12 @@ The expanding tube test case involves a cylindrical fluid domain surrounded by a The expanding tube test case comes with the interface surface mesh connectivity of the solid domain. This allows the use of nearest-projection mapping of the displacements of the solid domain. In order to run the example with nearest projection mapping, the "node-mesh-with-connectivity" has been specified in the `solid-calculix/config.yml` file. More details can be found in the [CalculiX configuration description](https://www.precice.org/adapter-calculix-config.html#nearest-projection-mapping). +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-elastic-tube-3d-precice-config.png) + ## Available solvers Fluid participant: diff --git a/elastic-tube-3d/images/tutorials-elastic-tube-3d-precice-config.png b/elastic-tube-3d/images/tutorials-elastic-tube-3d-precice-config.png new file mode 100644 index 000000000..eca931670 Binary files /dev/null and b/elastic-tube-3d/images/tutorials-elastic-tube-3d-precice-config.png differ diff --git a/elastic-tube-3d/precice-config.xml b/elastic-tube-3d/precice-config.xml index 130798de0..05e5ed421 100644 --- a/elastic-tube-3d/precice-config.xml +++ b/elastic-tube-3d/precice-config.xml @@ -43,7 +43,6 @@ - diff --git a/flow-around-controlled-moving-cylinder/README.md b/flow-around-controlled-moving-cylinder/README.md index 01ff30a61..7b3ed5968 100644 --- a/flow-around-controlled-moving-cylinder/README.md +++ b/flow-around-controlled-moving-cylinder/README.md @@ -17,6 +17,12 @@ We simulate a 2D flow around a cylinder. The cylinder is not fixed, but mounted This case was contributed by Leonard Willeke et al. [1]. To reduce the overall runtime compared to the original contribution, this case uses a larger time step size 2.5e-3 (instead of 1e-3) and the controller switches on at t=2 (instead of t=40). Still, the scenario requires around an hour to complete. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-around-controlled-moving-cylinder-precice-config.png) + ## Available solvers OpenFOAM is used for the `Fluid` participant. The spring-damper system is solved in a separate Python `Solid` participant. Finally, the PID algorithm is calculated in an FMU as participant `Controller`. diff --git a/flow-around-controlled-moving-cylinder/images/tutorials-flow-around-controlled-moving-cylinder-precice-config.png b/flow-around-controlled-moving-cylinder/images/tutorials-flow-around-controlled-moving-cylinder-precice-config.png new file mode 100644 index 000000000..59d09d0ad Binary files /dev/null and b/flow-around-controlled-moving-cylinder/images/tutorials-flow-around-controlled-moving-cylinder-precice-config.png differ diff --git a/flow-over-heated-plate-nearest-projection/README.md b/flow-over-heated-plate-nearest-projection/README.md index e27be53a7..3be3b8b6d 100644 --- a/flow-over-heated-plate-nearest-projection/README.md +++ b/flow-over-heated-plate-nearest-projection/README.md @@ -25,6 +25,12 @@ Solid participant: The solvers are currently only OpenFOAM related. For information regarding the nearest-projection mapping, have a look in the [OpenFOAM configuration section](https://www.precice.org/adapter-openfoam-config.html). +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-over-heated-plate-nearest-projection-precice-config.png) + ## Running the Simulation Open two separate terminals and start each participant by calling the respective run script. diff --git a/flow-over-heated-plate-nearest-projection/images/tutorials-flow-over-heated-plate-nearest-projection-precice-config.png b/flow-over-heated-plate-nearest-projection/images/tutorials-flow-over-heated-plate-nearest-projection-precice-config.png new file mode 100644 index 000000000..0980acc94 Binary files /dev/null and b/flow-over-heated-plate-nearest-projection/images/tutorials-flow-over-heated-plate-nearest-projection-precice-config.png differ diff --git a/flow-over-heated-plate-partitioned-flow/README.md b/flow-over-heated-plate-partitioned-flow/README.md index 1b6391b8a..d0c4f0829 100644 --- a/flow-over-heated-plate-partitioned-flow/README.md +++ b/flow-over-heated-plate-partitioned-flow/README.md @@ -18,6 +18,12 @@ Note that it is usually recommended using the fully implicit parallel `coupling- The flow partitioning is done with the fluid-fluid module of the [preCICE OpenFOAM adapter](https://www.precice.org/adapter-openfoam-overview.html). Because we use buoyantPimpleFoam we have to tell the adapter that the coupled pressure has the name `p_rgh`. The temperature is coupled at the fluid-solid interface by exchanging *Temperature* and *Heat-Flux*, at the fluid-fluid interface it is *FlowTemperature* and *FlowTemperatureGradient*. Note the difference in naming: *Temperature* is used for conjugate heat transfer and *FlowTemperature* for fluid-fluid coupling. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-over-heated-plate-partitioned-flow-precice-config.png) + ## Available solvers The following participants are available: diff --git a/flow-over-heated-plate-partitioned-flow/images/tutorials-flow-over-heated-plate-partitioned-flow-precice-config.png b/flow-over-heated-plate-partitioned-flow/images/tutorials-flow-over-heated-plate-partitioned-flow-precice-config.png new file mode 100644 index 000000000..0b033158a Binary files /dev/null and b/flow-over-heated-plate-partitioned-flow/images/tutorials-flow-over-heated-plate-partitioned-flow-precice-config.png differ diff --git a/flow-over-heated-plate-steady-state/README.md b/flow-over-heated-plate-steady-state/README.md index 3b15f8d09..870aba719 100644 --- a/flow-over-heated-plate-steady-state/README.md +++ b/flow-over-heated-plate-steady-state/README.md @@ -17,6 +17,12 @@ The setup for this tutorial is similar to the [flow over a heated plate](https:/ This is a pseudo-2D case, but we still set a 3D `solver-interface` in `precice-config.xml`, because the code_aster case is set up like this at the moment. Contributions here are particularly welcome! {% endnote %} +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-over-heated-plate-steady-state-precice-config.png) + ## Available solvers Fluid participant: diff --git a/flow-over-heated-plate-steady-state/images/tutorials-flow-over-heated-plate-steady-state-precice-config.png b/flow-over-heated-plate-steady-state/images/tutorials-flow-over-heated-plate-steady-state-precice-config.png new file mode 100644 index 000000000..efc74f4c0 Binary files /dev/null and b/flow-over-heated-plate-steady-state/images/tutorials-flow-over-heated-plate-steady-state-precice-config.png differ diff --git a/flow-over-heated-plate-two-meshes/README.md b/flow-over-heated-plate-two-meshes/README.md index b7179d45c..8fe5fa1dc 100644 --- a/flow-over-heated-plate-two-meshes/README.md +++ b/flow-over-heated-plate-two-meshes/README.md @@ -14,6 +14,12 @@ Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/ The scenario is exactly the same as the one described in the [flow over heated plate tutorial](https://precice.org/tutorials-flow-over-heated-plate.html). However, this tutorial is specialized for the case when heat fluxes and temperatures live on different meshes. This is the case with CalculiX: heat fluxes are written on face centers, while temperatures are read on nodes. This requires updating the `precice-config.xml` file to take this into account. On the fluid side, a single mesh can still be used. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-over-heated-plate-two-meshes-precice-config.png) + ## Available solvers By default, the fluid participant reads heat-flux values and the solid participant reads temperature values for the coupled simulation. The following participants are available: diff --git a/flow-over-heated-plate-two-meshes/images/tutorials-flow-over-heated-plate-two-meshes-precice-config.png b/flow-over-heated-plate-two-meshes/images/tutorials-flow-over-heated-plate-two-meshes-precice-config.png new file mode 100644 index 000000000..e5ea5b185 Binary files /dev/null and b/flow-over-heated-plate-two-meshes/images/tutorials-flow-over-heated-plate-two-meshes-precice-config.png differ diff --git a/flow-over-heated-plate/README.md b/flow-over-heated-plate/README.md index 443647a81..15ab89ade 100644 --- a/flow-over-heated-plate/README.md +++ b/flow-over-heated-plate/README.md @@ -19,6 +19,12 @@ The test case is two-dimensional and a serial-implicit coupling with Aitken unde The inlet velocity is $$ u_{\infty} = 0.1 m/s $$, the inlet temperature is $$ T_{\infty} = 300K $$. The fluid and solid have the same thermal conductivities $$ k_S = k_F = 100 W/m/K $$. Further material properties of the fluid are its viscosity $$ \mu = 0.0002 kg/m/s $$ and specific heat capacity $$ c_p = 5000 J/kg/K $$. The Prandtl number $$ Pr = 0.01 $$ follows from thermal conductivity, viscosity and specific heat capacity. The solid has the thermal diffusivity $$ \alpha = 1 m^2/s $$. The gravitational acceleration is $$ g = 9.81 m/s^2 $$. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-flow-over-heated-plate-precice-config.png) + ## Available solvers By default, the fluid participant reads heat-flux values and the solid participant reads temperature values for the coupled simulation. The following participants are available: diff --git a/flow-over-heated-plate/images/tutorials-flow-over-heated-plate-precice-config.png b/flow-over-heated-plate/images/tutorials-flow-over-heated-plate-precice-config.png new file mode 100644 index 000000000..7c5570750 Binary files /dev/null and b/flow-over-heated-plate/images/tutorials-flow-over-heated-plate-precice-config.png differ diff --git a/heat-exchanger-simplified/README.md b/heat-exchanger-simplified/README.md index a7663fe6a..c05905632 100644 --- a/heat-exchanger-simplified/README.md +++ b/heat-exchanger-simplified/README.md @@ -16,6 +16,12 @@ This tutorial extends the [flow over heated plate: Two meshes](https://precice.o Contrary to the [heat exchanger](https://precice.org/tutorials-heat-exchanger.html) tutorial, which defines Robin-Robin coupling, this case defines a Dirichlet-Neumann coupling, exchanging temperature (from the fluids to the solid) and heat flux (from the solid to the fluids). Additionally, instead of composing two explicit coupling schemes, this tutorial uses a fully-implicit multi-coupling scheme and is transient. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-heat-exchanger-simplified-precice-config.png) + ## Available solvers Fluid participants: diff --git a/heat-exchanger-simplified/images/tutorials-heat-exchanger-simplified-precice-config.png b/heat-exchanger-simplified/images/tutorials-heat-exchanger-simplified-precice-config.png new file mode 100644 index 000000000..e6523caf6 Binary files /dev/null and b/heat-exchanger-simplified/images/tutorials-heat-exchanger-simplified-precice-config.png differ diff --git a/heat-exchanger/README.md b/heat-exchanger/README.md index ae7277c4a..5272d76b7 100644 --- a/heat-exchanger/README.md +++ b/heat-exchanger/README.md @@ -23,6 +23,12 @@ We define the participants `Inner-Fluid`, `Solid`, and `Outer-Fluid` and two int ![Heat exchanger: three participants](images/tutorials-heat-exchanger-participants.png) +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-heat-exchanger-precice-config.png) + ## Available solvers * OpenFOAM. `buoyantSimpleFoam` is used for fluid flow (both participants). This is a solver for steady-state, buoyant, turbulent flow of compressible fluids for ventilation and heat transfer. For more information, have a look at the [OpenFOAM adapter documentation](https://www.precice.org/adapter-openfoam-overview.html). diff --git a/heat-exchanger/images/tutorials-heat-exchanger-precice-config.png b/heat-exchanger/images/tutorials-heat-exchanger-precice-config.png new file mode 100644 index 000000000..2a3fcf1d1 Binary files /dev/null and b/heat-exchanger/images/tutorials-heat-exchanger-precice-config.png differ diff --git a/multiple-perpendicular-flaps/README.md b/multiple-perpendicular-flaps/README.md index 416cc7d84..00ed7f83f 100644 --- a/multiple-perpendicular-flaps/README.md +++ b/multiple-perpendicular-flaps/README.md @@ -25,6 +25,12 @@ The top, bottom and flap are walls with a `noslip` condition. For a case showing fluid-structure interaction only (no multi-coupling), take a look at the [single perpendicular flap tutorial](https://www.precice.org/tutorials-perpendicular-flap.html). +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-multiple-perpendicular-flaps-precice-config.png) + ## Why multi-coupling? This is a case with three participants: the fluid and each flap. In preCICE, there are two options to [couple more than two participants](https://www.precice.org/configuration-coupling-multi.html). The first option a composition of bi-coupling schemes, in which we must specify the exchange of data in a participant to participant manner. However, such a composition is not suited for combining multiple strong fluid-structure interactions [1]. Thus, in this case, we use the second option, fully-implicit multi-coupling. diff --git a/multiple-perpendicular-flaps/images/tutorials-multiple-perpendicular-flaps-precice-config.png b/multiple-perpendicular-flaps/images/tutorials-multiple-perpendicular-flaps-precice-config.png new file mode 100644 index 000000000..7d9dc634e Binary files /dev/null and b/multiple-perpendicular-flaps/images/tutorials-multiple-perpendicular-flaps-precice-config.png differ diff --git a/oscillator-overlap/README.md b/oscillator-overlap/README.md index 1897dae5a..eccf9137e 100644 --- a/oscillator-overlap/README.md +++ b/oscillator-overlap/README.md @@ -17,6 +17,12 @@ This tutorial solves the same problem as the [oscillator tutorial](https://preci Note that this case applies an overlapping Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. We will refer to the solver computing the trajectory of $m_1$ as `Mass-Left` and to the solver computing the trajectory of $m_2$ as `Mass-Right`. For more information, please refer to [1]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-oscillator-overlap-precice-config.png) + ## Available solvers This tutorial is only available in Python. You need to have preCICE and the Python bindings installed on your system. diff --git a/oscillator-overlap/images/tutorials-oscillator-overlap-precice-config.png b/oscillator-overlap/images/tutorials-oscillator-overlap-precice-config.png new file mode 100644 index 000000000..f68475192 Binary files /dev/null and b/oscillator-overlap/images/tutorials-oscillator-overlap-precice-config.png differ diff --git a/oscillator/README.md b/oscillator/README.md index aba9ee992..280cd1cc4 100644 --- a/oscillator/README.md +++ b/oscillator/README.md @@ -17,6 +17,12 @@ This tutorial solves a simple mass-spring oscillator with two masses and three s Note that this case applies a Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. We will refer to the solver computing the trajectory of $m_1$ as `Mass-Left` and to the solver computing the trajectory of $m_2$ as `Mass-Right`. For more information, please refer to [1]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-oscillator-precice-config.png) + ## Available solvers There are two different implementations: diff --git a/oscillator/images/tutorials-oscillator-precice-config.png b/oscillator/images/tutorials-oscillator-precice-config.png new file mode 100644 index 000000000..560d48796 Binary files /dev/null and b/oscillator/images/tutorials-oscillator-precice-config.png differ diff --git a/partitioned-backwards-facing-step/README.md b/partitioned-backwards-facing-step/README.md index 4ac053362..05e035732 100644 --- a/partitioned-backwards-facing-step/README.md +++ b/partitioned-backwards-facing-step/README.md @@ -16,6 +16,12 @@ This scenario consists of two incompressible fluid solvers in series. The case i The key point of this tutorial is the demonstration of custom inlet-outlet OpenFOAM boundary conditions for velocity and pressure. These can dynamically switch their behavior according to the underlying flow direction. The boundary conditions `coupledVelocity` and `coupledPressure` come with the preCICE OpenFOAM adapter and can be set in the corresponding start time dictionaries for velocity and pressure. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-backwards-facing-step-precice-config.png) + ## Available solvers * OpenFOAM (pimpleFoam) for both participants. For more information, have a look at the [OpenFOAM adapter documentation](https://www.precice.org/adapter-openfoam-overview.html). diff --git a/partitioned-backwards-facing-step/images/tutorials-partitioned-backwards-facing-step-precice-config.png b/partitioned-backwards-facing-step/images/tutorials-partitioned-backwards-facing-step-precice-config.png new file mode 100644 index 000000000..77b0ed616 Binary files /dev/null and b/partitioned-backwards-facing-step/images/tutorials-partitioned-backwards-facing-step-precice-config.png differ diff --git a/partitioned-elastic-beam/README.md b/partitioned-elastic-beam/README.md index aac724ada..8021abc53 100644 --- a/partitioned-elastic-beam/README.md +++ b/partitioned-elastic-beam/README.md @@ -15,6 +15,12 @@ We have a rectangular linear elastic beam of dimensions 1 x 1 x 8 m, divided in ![beam setup](images/tutorials-partitioned-elastic-beam-setup.png) +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-elastic-beam-precice-config.png) + ## Available solvers * CalculiX. CalculiX is used for both structural parts. For more information, have a look at the [CalculiX adapter documentation](https://www.precice.org/adapter-calculix-overview.html) for more. diff --git a/partitioned-elastic-beam/images/tutorials-partitioned-elastic-beam-precice-config.png b/partitioned-elastic-beam/images/tutorials-partitioned-elastic-beam-precice-config.png new file mode 100644 index 000000000..24c552332 Binary files /dev/null and b/partitioned-elastic-beam/images/tutorials-partitioned-elastic-beam-precice-config.png differ diff --git a/partitioned-heat-conduction-complex/README.md b/partitioned-heat-conduction-complex/README.md index ceea8ab78..919d79b72 100644 --- a/partitioned-heat-conduction-complex/README.md +++ b/partitioned-heat-conduction-complex/README.md @@ -20,6 +20,12 @@ This case is an advanced version of `partitioned-heat-conduction`. Some advanced * The exchanged temperature is still scalar valued, but the heat flux is vector valued. * You can decide to use a time dependent heat flux and right-hand side to make the problem more challenging. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-heat-conduction-complex-precice-config.png) + ## Available solvers and dependencies See `partitioned-heat-conduction`, only `fenics` is provided as a solver. diff --git a/partitioned-heat-conduction-complex/images/tutorials-partitioned-heat-conduction-complex-precice-config.png b/partitioned-heat-conduction-complex/images/tutorials-partitioned-heat-conduction-complex-precice-config.png new file mode 100644 index 000000000..183c80fe4 Binary files /dev/null and b/partitioned-heat-conduction-complex/images/tutorials-partitioned-heat-conduction-complex-precice-config.png differ diff --git a/partitioned-heat-conduction-direct/README.md b/partitioned-heat-conduction-direct/README.md index b8b10c5e1..88f9aecc2 100644 --- a/partitioned-heat-conduction-direct/README.md +++ b/partitioned-heat-conduction-direct/README.md @@ -17,6 +17,12 @@ Further minor modifications: - We use a parallel coupling scheme instead of a serial one to prevent running into the problem where we are trying to add a zero column to the quasi-Newton matrix. For serial coupling, this happens here because one data field converges much faster than the other. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-heat-conduction-direct-precice-config.png) + ## Available solvers Currently only `nutils` is provided as a solver. The data mapping is computed by directly sampling the FEM function representation at the inquired locations. diff --git a/partitioned-heat-conduction-direct/images/tutorials-partitioned-heat-conduction-direct-precice-config.png b/partitioned-heat-conduction-direct/images/tutorials-partitioned-heat-conduction-direct-precice-config.png new file mode 100644 index 000000000..e65640c71 Binary files /dev/null and b/partitioned-heat-conduction-direct/images/tutorials-partitioned-heat-conduction-direct-precice-config.png differ diff --git a/partitioned-heat-conduction-overlap/README.md b/partitioned-heat-conduction-overlap/README.md index be207add0..bca91a0a7 100644 --- a/partitioned-heat-conduction-overlap/README.md +++ b/partitioned-heat-conduction-overlap/README.md @@ -17,6 +17,12 @@ We solve a partitioned heat equation, but apply an overlapping Schwarz-type doma Note that this case applies an overlapping Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-heat-conduction-overlap-precice-config.png) + ## Running the simulation This tutorial is for FEniCS. diff --git a/partitioned-heat-conduction-overlap/images/tutorials-partitioned-heat-conduction-overlap-precice-config.png b/partitioned-heat-conduction-overlap/images/tutorials-partitioned-heat-conduction-overlap-precice-config.png new file mode 100644 index 000000000..8addcab64 Binary files /dev/null and b/partitioned-heat-conduction-overlap/images/tutorials-partitioned-heat-conduction-overlap-precice-config.png differ diff --git a/partitioned-heat-conduction/README.md b/partitioned-heat-conduction/README.md index e5a92e4d6..af5624fe5 100644 --- a/partitioned-heat-conduction/README.md +++ b/partitioned-heat-conduction/README.md @@ -21,6 +21,12 @@ The heat equation is solved on a rectangular domain `Omega = [0,2] x [0,1]` with This simple case allows us to compare the solution for the partitioned case to a known analytical solution (method of manufactures solutions, see [1, p.37ff]). For more usage examples and details, please refer to [3, sect. 4.1]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-heat-conduction-precice-config.png) + ## Available solvers and dependencies You can either couple a solver with itself or different solvers with each other. In any case you will need to have preCICE and the python bindings installed on your system. diff --git a/partitioned-heat-conduction/images/tutorials-partitioned-heat-conduction-precice-config.png b/partitioned-heat-conduction/images/tutorials-partitioned-heat-conduction-precice-config.png new file mode 100644 index 000000000..fc371839d Binary files /dev/null and b/partitioned-heat-conduction/images/tutorials-partitioned-heat-conduction-precice-config.png differ diff --git a/partitioned-pipe-two-phase/README.md b/partitioned-pipe-two-phase/README.md index 7eb084338..6e6fc0762 100644 --- a/partitioned-pipe-two-phase/README.md +++ b/partitioned-pipe-two-phase/README.md @@ -33,6 +33,12 @@ FF This is a very basic example case demonstrating the coupling of a two-phase flow. To keep it as simple as possible, gravity is set to $0$ to avoid any kind of turbulences/vortices. Read more in the accompanying conference paper [1]. {% endnote %} +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-pipe-two-phase-precice-config.png) + ## Available solvers Both Fluid1 and Fluid2 are simulated with OpenFOAM (interFoam). An incompressible multiphase solver for two immiscible fluids using the *Volume-of-fluid* method. For more information, have a look at the [OpenFOAM adapter documentation](https://www.precice.org/adapter-openfoam-overview.html). diff --git a/partitioned-pipe-two-phase/images/tutorials-partitioned-pipe-two-phase-precice-config.png b/partitioned-pipe-two-phase/images/tutorials-partitioned-pipe-two-phase-precice-config.png new file mode 100644 index 000000000..4df21ef55 Binary files /dev/null and b/partitioned-pipe-two-phase/images/tutorials-partitioned-pipe-two-phase-precice-config.png differ diff --git a/partitioned-pipe/README.md b/partitioned-pipe/README.md index 6b65b2b2b..926c34898 100644 --- a/partitioned-pipe/README.md +++ b/partitioned-pipe/README.md @@ -15,6 +15,12 @@ This scenario consists of two pipes connected in series, both simulated with Ope On the coupling interface, Fluid1 sends velocity to Fluid2 and receives pressure. Fluid2 uses the [fixedFluxExtrapolatedPressure](https://www.openfoam.com/documentation/guides/v2112/api/classFoam_1_1fixedFluxExtrapolatedPressureFvPatchScalarField.html) boundary condition, which allows a seamless flow continuity across the coupling interface [1]. Not all OpenFOAM solvers support this boundary condition. In such cases, it is recommended to use a fixed Gradient and additionally send the pressure gradient from Fluid1 to Fluid2 for better convergence[2]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-partitioned-pipe-precice-config.png) + ## Available solvers Both for Fluid1 and Fluid2, the following participants are available: diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-precice-config.png b/partitioned-pipe/images/tutorials-partitioned-pipe-precice-config.png new file mode 100644 index 000000000..e651795b0 Binary files /dev/null and b/partitioned-pipe/images/tutorials-partitioned-pipe-precice-config.png differ diff --git a/perpendicular-flap/README.md b/perpendicular-flap/README.md index a5480c441..0b1e8f0f6 100644 --- a/perpendicular-flap/README.md +++ b/perpendicular-flap/README.md @@ -17,6 +17,12 @@ We model a two-dimensional fluid flowing through a channel. A solid, elastic fla The simulated flow domain is 6 units long (x) and 4 units tall (y). The flap is located at the center of the bottom (x=0) and is 1 unit long (y) and 0.1 units thick (x). We set the fluid density $$ \rho_F= 1.0kg/m^{3} $$, the kinematic viscosity $$ \nu_f= 1.0m^{2}/s $$, the solid density $$ \rho_s= 3.0·10^{3}kg/m^{3} $$, the Young’s modulus to $$ E= 4.0·10^{6} kg/ms^{2} $$ and the Poisson ratio $$ \nu_s = 0.3 $$. On the left boundary a constant inflow profile in x-direction of 10m/s is prescribed. The right boundary is an outflow and the top and bottom of the channel as well as the surface of the flap are no-slip walls. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-perpendicular-flap-precice-config.png) + ## Available solvers Fluid participant: diff --git a/perpendicular-flap/images/tutorials-perpendicular-flap-precice-config.png b/perpendicular-flap/images/tutorials-perpendicular-flap-precice-config.png new file mode 100644 index 000000000..80439cdce Binary files /dev/null and b/perpendicular-flap/images/tutorials-perpendicular-flap-precice-config.png differ diff --git a/quickstart/README.md b/quickstart/README.md index 28ceb8a59..09051ba15 100644 --- a/quickstart/README.md +++ b/quickstart/README.md @@ -71,6 +71,12 @@ In order to gain more control over the rigid body oscillation, a rotational spri ![overview](images/quickstart-setup.png) +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/quickstart-precice-config.png) + ## Building the rigid body solver Before starting the coupled simulation, we need to build the rigid body solver. You can run the following commands from the `solid-cpp` directory to build the `rigid_body_solver.cpp`: diff --git a/quickstart/images/quickstart-precice-config.png b/quickstart/images/quickstart-precice-config.png new file mode 100644 index 000000000..454847f13 Binary files /dev/null and b/quickstart/images/quickstart-precice-config.png differ diff --git a/tools/visualize-configs.sh b/tools/visualize-configs.sh new file mode 100755 index 000000000..145e2042c --- /dev/null +++ b/tools/visualize-configs.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Run this script at the root of the repository to generate PNG files from each precice-config.xml + +set -e -u + +visualize_config(){ + ( + if [[ "$1" == quickstart ]]; then + outfile="images/quickstart-precice-config" + else + outfile="images/tutorials-$1-precice-config" + fi + + cd "$1" + if [ -f precice-config.xml ]; then + echo "Visualizing the configuration in $1" + mkdir -p images + precice-config-visualizer -o "$outfile.dot" precice-config.xml + + # Special case, to be removed once bug https://github.com/precice/config-visualizer/issues/22 + if [[ "$1" == partitioned-heat-conduction-direct ]]; then + sed 's/compound=True;//' --in-place "$outfile.dot" + fi + + dot -Tpng "$outfile.dot" > "$outfile.png" + rm "$outfile.dot" + fi + ) +} + +export -f visualize_config + +python3 -m venv .venv +. .venv/bin/activate +pip install precice-config-visualizer + +tutorials=$(find . -maxdepth 1 -type d -not -name ".*" | sed "s/^.\///") + +if command -v parallel &> /dev/null; then + parallel visualize_config ::: "$tutorials" +else + visualize_config ::: "$tutorials" +fi diff --git a/turek-hron-fsi3/README.md b/turek-hron-fsi3/README.md index 1c0eea0da..05240cc59 100644 --- a/turek-hron-fsi3/README.md +++ b/turek-hron-fsi3/README.md @@ -17,6 +17,12 @@ The setup is shown schematically here: For more information please refer to the original publication of the benchmark [1]. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-turek-hron-fsi3-precice-config.png) + ## Available solvers Fluid participant: diff --git a/turek-hron-fsi3/images/tutorials-turek-hron-fsi3-precice-config.png b/turek-hron-fsi3/images/tutorials-turek-hron-fsi3-precice-config.png new file mode 100644 index 000000000..e74878ef3 Binary files /dev/null and b/turek-hron-fsi3/images/tutorials-turek-hron-fsi3-precice-config.png differ diff --git a/two-scale-heat-conduction/README.md b/two-scale-heat-conduction/README.md index b9a20d602..ca96a3105 100644 --- a/two-scale-heat-conduction/README.md +++ b/two-scale-heat-conduction/README.md @@ -19,6 +19,12 @@ At each Gauss point of the macro domain there exists a micro simulation. The mac *Bastidas, Manuela & Bringedal, Carina & Pop, Iuliu Sorin (2021), A two-scale iterative scheme for a phase-field model for precipitation and dissolution in porous media. Applied Mathematics and Computation. 396. 125933. [10.1016/j.amc.2020.125933](https://doi.org/10.1016/j.amc.2020.125933)*. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-two-scale-heat-conduction-precice-config.png) + ## Available solvers and dependencies * Both the macro and micro simulations can be solved using the finite element library [Nutils](https://nutils.org/install.html) v7 or the simulation framework [DuMux](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/). diff --git a/two-scale-heat-conduction/images/tutorials-two-scale-heat-conduction-precice-config.png b/two-scale-heat-conduction/images/tutorials-two-scale-heat-conduction-precice-config.png new file mode 100644 index 000000000..c4d6bd152 Binary files /dev/null and b/two-scale-heat-conduction/images/tutorials-two-scale-heat-conduction-precice-config.png differ diff --git a/volume-coupled-diffusion/README.md b/volume-coupled-diffusion/README.md index 87adf2435..41d3ef6b4 100644 --- a/volume-coupled-diffusion/README.md +++ b/volume-coupled-diffusion/README.md @@ -13,6 +13,12 @@ This case illustrates how to implement volume coupling in a simple toy problem. ![Case setup of volume-coupled-diffusion case](images/tutorials-volume-coupled-diffusion-setup.png) +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-volume-coupled-diffusion-precice-config.png) + ## Available solvers and dependencies Both participants (Source and Drain): diff --git a/volume-coupled-diffusion/images/tutorials-volume-coupled-diffusion-precice-config.png b/volume-coupled-diffusion/images/tutorials-volume-coupled-diffusion-precice-config.png new file mode 100644 index 000000000..496bdd23f Binary files /dev/null and b/volume-coupled-diffusion/images/tutorials-volume-coupled-diffusion-precice-config.png differ diff --git a/volume-coupled-flow/README.md b/volume-coupled-flow/README.md index dd83f5fe9..54731ef67 100644 --- a/volume-coupled-flow/README.md +++ b/volume-coupled-flow/README.md @@ -19,6 +19,12 @@ The state of the $$ U.x() $$ of the fluid at $$ t = 0.5s $$ (the source region i This case is a convenient starting point for volume coupling where OpenFOAM is a reading participant. The writing Nutils participant (dummy source) can be replaced by a more complex solver according to the user's needs. +## Configuration + +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): + +![preCICE configuration visualization](images/tutorials-volume-coupled-flow-precice-config.png) + ## Available solvers Fluid participant: diff --git a/volume-coupled-flow/images/tutorials-volume-coupled-flow-precice-config.png b/volume-coupled-flow/images/tutorials-volume-coupled-flow-precice-config.png new file mode 100644 index 000000000..e97633408 Binary files /dev/null and b/volume-coupled-flow/images/tutorials-volume-coupled-flow-precice-config.png differ