In this lab you will familiarize yourself with how to solve PDE's using modern Finite Element methods. We will revisit some of the problems solved in lectures and lab 2, but now instead of finite difference methods, solving them using FEM methods.
First consider Poisson's equation on a square:
To enter this problem, start ``pdetool'', Select the square tool
and draw a square. To more easily select the desired size,
use the options meny to set grid spacing, and then
``snap to grid''. To define the boundary conditions
switch to boundary mode by clicking the
button. Double click on each boundary in your figure to enter
values. Homogeneous Dirichlet is the default.
After having defined the boundary, you use the ``PDE'' button to enter the desired PDE. Poisson's is the default. Use the ``Solve'' menu to solve the PDE. Different ways to plot the resulting solution can be accessed by pressing the graph like button between ``='' and zoom. A contour plot is useful for quantitative evaluation, that e.g. symmetry is as expected. A 3D plot with color shading is useful for a quick qualitative view.
Also try to change the boundary conditions on one of the sides
to say 8. Set to see only the effect of the boundary
condition.
Next do a hollow square with outer boundary and
inner boundary
, see figure. Recall that a finite
difference version of this problem was solved in the lectures.
You may compare that solution with the finite element
one done here.
Draw two squares, and then
add formula SQ1-SQ2 on ``set formula box''. Switch to mesh mode
and you should have a mesh similar in resolution to in this
figure.
Set boundary conditions back to homogeneous.
Solve and study the contour plot of the solution.
Is the solution plausible? What are possible sources of errors?
Try ``refine mesh'', study the resulting mesh. What happened to
each triangle? Now solve the problem again on the refined mesh.
Is the result npow plausible? How many times can you refine, and still
have a reasonable (seconds) computation time?
In many practical situations it is important to reduce the size of the problem. We can reduce the domain by utilizing symmetry. Across symmetry boundaries the directional derivative is 0. Hence we can reduce the domain, and use Neumann boundary conditions on the edges that represent symmetry boundaries. Consider how to reduce the domain using symmetries to 1/2, 1/4 and 1/8. For the 1/8 case input this geometry, boundary conditions, and solve the problem. Verify that solution is identical to the full domain you just did. How much time is saved?
Use the cylindrical coordinate form
of the the Laplacian operator,
, to solve the heat equation:
For the FEM solution in our heat pump problem it is easier to model
the cold addition as a boundary condition for Bore hole temp .
Most heat pumps use a glycol or brine solution in the cold circuit,
and run a few degrees below freezing.
We consider a heat pump installation (see figure above) with one vertical ground loop bored 45m into the ground. For numerical solution, we need to discretize it on a finite domain. A reasonable choice is a domain significantly larger than 45m. We choose a domain extending 90m horizontally, and 100m vertically.
Note: Above quantities give
in Celcius/second. In the pde tool you have to give an predetermined time discretization.
(accessed under ``solve'' then parameters. Note that you have to switch the PDE type to parabolic first to get the right parameters.
A reasonable time step would be days or one week. To enter the time
varying boundary condition it is convenient to change the time (
) unit to
years and use round(t-floor(t)) as a way to change the boundary condition
from warm to cold.
You can rescale above
given quantities to get
in Celcius/year.