You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* OpenFOAM. Running this tutorial with OpenFOAM is a bit of a challenge and requires some special considerations. First of all, OpenFOAM does not provide a Laplace solver with a non-zero right-hand side. Therefore, we provide a modified Laplace solver together with the tutorial, which needs to be compiled before running the tutorial. The solver can be compiled by executing `wmake` in the solver directory `./openfoam-neumann/solver`. Afterwards, the custom solver `heatTransfer` can be started from the respective OpenFOAM case directory, as usual. The second challenge is given by the time- and space-dependent Dirichlet boundary conditions required for domain boundaries belonging not to the interface. For this purpose, a valid installation of `groovyBC` (part of `swak4Foam`) is required. Having the solver and an evaluator for the boundaries, the tutorial is ready to run. However, if you want to modify the tutorial the space-dependent initial condition of this tutorial state the third challenge. We let `funkySetFields`, which is installed along with OpenFOAM by default, evaluate the initial condition. You can simply execute the script `setInitialField.sh` in order to evaluate and store the required initial condition in the `0` directory. Note that `funkySetFields` overrides unintentionally the boundary conditions as well, so that you might need to restore them after you executed it.
30
+
* OpenFOAM. Running this tutorial with OpenFOAM is a bit of a challenge and requires some special considerations. First of all, OpenFOAM does not provide a Laplace solver with a non-zero right-hand side. Therefore, we provide a modified Laplace solver together with the tutorial, which needs to be compiled before running the tutorial. The solver can be compiled by executing `wmake` in the solver directory `./openfoam-solver/`. Afterwards, the custom solver `heatTransfer` can be started from the respective OpenFOAM case directory by copying it into the OpenFOAM solver directory or copying it directly into the case directory. The second challenge is given by the time- and space-dependent Dirichlet boundary conditions required for domain boundaries belonging not to the interface. For this purpose, a valid installation of `groovyBC` (part of `swak4Foam`) is required. Having the solver and an evaluator for the boundaries, the tutorial is ready to run. However, if you want to modify the tutorial the space-dependent initial condition of this tutorial state the third challenge. We let `funkySetFields`, which is installed along with OpenFOAM by default, evaluate the initial condition. You can simply execute the script `setInitialField.sh` in order to evaluate and store the required initial condition in the `0` directory. Note that `funkySetFields` overrides unintentionally the boundary conditions as well, so that you might need to restore them after you executed it.
31
31
32
32
## Running the simulation
33
33
34
-
This tutorial is for FEniCS and Nutils. You can find the corresponding `run.sh` script in the folders `fenics` and `nutils`.
34
+
You can find the corresponding `run.sh` script in each participant solver.
35
35
36
-
For choosing whether you want to run the Dirichlet-kind and a Neumann-kind participant, please provide the following commandline input:
36
+
In case of `fenics` and `nutils`the Dirichlet-kind and a Neumann-kind participant are currently merged into a single participant directory. Therefore, please provide the following command line input argument:
37
37
38
38
*`-d` flag will enforce Dirichlet boundary conditions on the coupling interface.
39
39
*`-n` flag will enforce Neumann boundary conditions on the coupling interface.
40
40
41
-
For running the case, open two terminals run:
41
+
For running the case, a Dirichlet and a Neumann participant need to be executed, e.g., `./run.sh -d` and `./run.sh. -n`
42
42
43
-
```bash
44
-
cd fenics
45
-
./run.sh -d
46
-
```
47
-
48
-
and
49
-
50
-
```bash
51
-
cd fenics
52
-
./run.sh -n
53
-
```
54
-
55
-
If you want to use Nutils for one or both sides of the setup, just `cd nutils`. The FEniCS case also supports parallel runs. Here, you cannot use the `run.sh` script, but must simply execute
43
+
The FEniCS case also supports parallel runs. Here, you cannot use the `run.sh` script, but must simply execute
56
44
57
45
```bash
58
46
mpirun -n <N_PROC> python3 heat.py -d
59
47
```
60
48
49
+
OpenFOAM supports parallel runs as usual. However, you need to execute the command manually by running: `mpirun -np <N_PROC> ./heatTransfer`.
50
+
61
51
### Note on the combination of Nutils & FEniCS
62
52
63
-
You can mix the Nutils and FEniCS solver, if you like. Note that the error for a pure FEniCS simulation is lower than for a mixed one. We did not yet study the origin of this error, but assume that this is due to the fact that Nutils uses Gauss points as coupling mesh and therefore entails extrapolation in the data mapping at the top and bottom corners.
53
+
You can mix the Nutils and FEniCS solver, if you like. Note that the error for a pure FEniCS simulation is lower than for a mixed one, because the FEniCS participants use the same coupling mesh, i.e., the mapping error becomes significantly smaller.
Copy file name to clipboardExpand all lines: partitioned-heat-conduction/openfoam-dirichlet/run.sh
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ touch openfoam-dirichlet.foam
7
7
iftest -f "heatTransfer";then
8
8
./"heatTransfer"
9
9
else
10
-
echo"Unable to find the executable 'heatTransfer'. Please compile the solver for this tutorial using the command 'wmake' in the solver directory and copy the executable into this directory to run this tutorial."
10
+
echo"Unable to find the executable 'heatTransfer'. Please compile the solver for this tutorial using the command 'wmake' in the solver directory (../openfoam-solver/) and copy the executable into this directory to run this tutorial."
Copy file name to clipboardExpand all lines: partitioned-heat-conduction/openfoam-neumann/run.sh
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ touch openfoam-dirichlet.foam
7
7
iftest -f "heatTransfer";then
8
8
./"heatTransfer"
9
9
else
10
-
echo"Unable to find the executable 'heatTransfer'. Please compile the solver for this tutorial using the command 'wmake' in the solver directory and copy the executable into this directory to run this tutorial."
10
+
echo"Unable to find the executable 'heatTransfer'. Please compile the solver for this tutorial using the command 'wmake' in the solver (../openfoam-solver/) directory and copy the executable into this directory to run this tutorial."
0 commit comments