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
Split partitioned-heat-conduction case into complex and simple one (#148)
* Strip case of everything besides simple heat conduction setup.
* Adds precice-config.xml supporting parallel runs.
* Add documentation and nutils case.
* Add complex case. Based on ae77ae5.
* Cleanup and Update to newest version of python bindings.
* Use scalar-valued flux.
* Apply new structure to complex case.
* Remove subcycling.
* Simplify heat nutils to one mesh, make config consistent
* Fix names.
* BCs working.
* Minor restructuring
* Fix initial condition and output.
* Mark nutils case as under construction. See #152.
* Add link to Nutils
* Update partitioned-heat-conduction-complex/precice-config.xml
Co-authored-by: Benjamin Uekermann <[email protected]>
* Update partitioned-heat-conduction-complex/precice-config.xml
Co-authored-by: Benjamin Uekermann <[email protected]>
* Update partitioned-heat-conduction-complex/precice-config.xml
Co-authored-by: Benjamin Uekermann <[email protected]>
* Update partitioned-heat-conduction-complex/precice-config.xml
Co-authored-by: Benjamin Uekermann <[email protected]>
* Add note for website.
* Provide more details and use x_c = 1
* Cleanup for consistency with non-complex case.
* Fix formatting
* Cleanup w.r.t visualization
* Add summary.
* Remove FEniCS from setup.
Co-authored-by: uekerman <[email protected]>
summary: This tutorial is the advanced version of the `partitioned-heat-conduction` tutorial. More advanced features and geometries may be used.
6
+
---
7
+
8
+
{% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %}
9
+
10
+
## Setup
11
+
12
+
This case is an advanced version of `partitioned-heat-conduction`. Some advanced features offered by this case:
13
+
14
+
* Geometries may be chosen arbitrarily. One possibility is to use a circle and a rectangular plate with a hole, but you can also provide your own geometry, if you want.
15
+
* You may combine arbitrary mesh resolutions at the coupling interface.
16
+
* Nearest projection mapping is used.
17
+
* The Dirichlet and Neumann participants may be swapped arbitrarily.
18
+
* The exchanged temperature is still scalar valued, but the heat flux is vector valued.
19
+
* You can decide to use a time dependent heat flux and right-hand side to make the problem more challenging.
20
+
21
+
## Available solvers and dependencies
22
+
23
+
See `partitioned-heat-conduction`, only `fenics` is provided as a solver.
24
+
25
+
## Running the simulation
26
+
27
+
See `partitioned-heat-conduction`. The additional featured mentioned above can be activated via command line arguments. Please run `python3 fenics/heat.py --help` for a full list of provided arguments.
@@ -152,7 +135,8 @@ def determine_gradient(V_g, u, flux):
152
135
# modify Neumann boundary condition on coupling interface, modify weak form correspondingly
153
136
ifnotboundary_marker: # there is only 1 Neumann-BC which is at the coupling boundary -> integration over whole boundary
154
137
ifcoupling_expression.is_scalar_valued():
155
-
F+=v*coupling_expression*dolfin.ds# this term has to be added to weak form to add a Neumann BC (see e.g. p. 83ff Langtangen, Hans Petter, and Anders Logg. "Solving PDEs in Python The FEniCS Tutorial Volume I." (2016).)
138
+
# this term has to be added to weak form to add a Neumann BC (see e.g. p. 83ff Langtangen, Hans Petter, and Anders Logg. "Solving PDEs in Python The FEniCS Tutorial Volume I." (2016).)
139
+
F+=v*coupling_expression*dolfin.ds
156
140
elifcoupling_expression.is_vector_valued():
157
141
normal=FacetNormal(mesh)
158
142
F+=-v*dot(normal, coupling_expression) *dolfin.ds
@@ -199,15 +183,17 @@ def determine_gradient(V_g, u, flux):
199
183
error_out<<error_pointwise
200
184
201
185
# set t_1 = t_0 + dt, this gives u_D^1
202
-
u_D.t=t+dt(0) # call dt(0) to evaluate FEniCS Constant. Todo: is there a better way?
186
+
# call dt(0) to evaluate FEniCS Constant. Todo: is there a better way?
0 commit comments