|
| 1 | +--- |
| 2 | +title: 3D partitioned heat conduction |
| 3 | +permalink: tutorials-partitioned-heat-conduction-3d.html |
| 4 | +keywords: FEniCSx, Heat conduction |
| 5 | +summary: We solve a simple heat equation on a 3D domain. The domain is partitioned and the coupling is established in a Dirichlet-Neumann fashion. |
| 6 | +--- |
| 7 | + |
| 8 | +{% note %} |
| 9 | +Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/develop/partitioned-heat-conduction-3d), as continuously rendered here, or see the [latest released version](https://github.com/precice/tutorials/tree/master/partitioned-heat-conduction-3d) (if there is already one). Read how in the [tutorials introduction](https://precice.org/tutorials.html). |
| 10 | +{% endnote %} |
| 11 | + |
| 12 | +## Setup |
| 13 | + |
| 14 | +We solve a partitioned heat equation. For information on the two dimensional non-partitioned case, please refer to [1, p.37ff]. In this tutorial the computational domain is partitioned and coupled via preCICE. The coupling roughly follows the approach described in [2]. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +The computational domain can be seen in the picture above. To get a better overview of the domain, the domains of the participants are translated. |
| 19 | +The domain of the Neumann participant is the small box, and the Dirichlet participant's domain is the rest. In the simulation, the small box is fully contained in the Dirichlet domain. This means, the coupling interface consists of five sides of the box. |
| 20 | + |
| 21 | +## Configuration |
| 22 | + |
| 23 | +preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +## Available solvers and dependencies |
| 28 | + |
| 29 | +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. |
| 30 | + |
| 31 | +* FEniCSx. Install [FEniCS](https://fenicsproject.org/download/) and the [FEniCSx-adapter](https://github.com/precice/fenicsx-adapter). The code is adapted from the existing [fenics-tutorial](https://github.com/hplgit/fenics-tutorial/blob/master/pub/python/vol1/ft03_heat.py) from [1]. |
| 32 | + |
| 33 | +## Running the simulation |
| 34 | + |
| 35 | +You can find the corresponding `run.sh` script for running the case in the folders corresponding to the participant you want to use: |
| 36 | + |
| 37 | +```bash |
| 38 | +cd dirichlet-fenicsx |
| 39 | +./run.sh |
| 40 | +``` |
| 41 | + |
| 42 | +and |
| 43 | + |
| 44 | +```bash |
| 45 | +cd neumann-fenicsx |
| 46 | +./run.sh |
| 47 | +``` |
| 48 | + |
| 49 | +## Visualization |
| 50 | + |
| 51 | +Output is written into the folders of the FEniCSx solvers (`neumann-fenicsx/output-neumann.bp` and `dirichlet-fenicsx/output-dirichlet.bp`). |
| 52 | + |
| 53 | +It is sufficient to import the folders to ParaView to get the visualization of the simulation. |
| 54 | + |
| 55 | +## References |
| 56 | + |
| 57 | +[1] Hans Petter Langtangen and Anders Logg. "Solving PDEs in Minutes-The FEniCS Tutorial Volume I." (2016). [pdf](https://fenicsproject.org/pub/tutorial/pdf/fenics-tutorial-vol1.pdf) |
0 commit comments