In this assignment you will follow the usual FE modeling
steps to find a FE approximation a model (stationary) heat conduction
problem $-\nabla \cdot (k \nabla u)=f$ on Omega=[-1,1]x[-1,1] with
Dirichlet boundary conditions. Here $k$ is the heat conductivity
coefficient.
The steps include: writing the variational formulation,
gridding the domain, and coding the appropriate functions for the
functions f, k, and u_d.
- Please share with me a file in CANVAS with the final report.
- Your files should be called
MTH-655-LAB5_Person1_Person2_.....REPORT.pdf
and
MTH-655-LAB5_Person1_Person2_.....JOURNAL
(Journal is not mandatory)
- Solve Parts 2 and 3. Or, solve Parts 3 and 4.
- Group size can be up to 6 for this assignment, as long as you
solve the extra parts (For smaller groups, please discuss with me how
much exactly you are expected to do). A large group should have a
manager who will do most of the delegating and reporting, rather than
experiments or coding. In your report please describe the
roles/contributions of each group member. Make sure that everyone
understands each part of the solution.
- I can help you to move forward by communication through CANVAS.
I will respond by making notes in the journal.
- If you choose to use FE model other than the triangular grid in
ACF, my templates will likely not be directly useable. As part of your
solution, please provide an explanation what you had to do to complete
the assignment.
- THE REPORT IS DUE BY MONDAY 3/6
PART 1 (Do not turn this in. You can report on your
progress in a journal on CANVAS, especially if you need help).
Recall exercises from Assignment 3 lab. Prepare a triangular mesh over
the region Omega, to be used with Dirichlet conditions on
the boundary. Here k(x,y)=1.
- Manufacture f and u_d for ACF so that the true solution is
u(x,y)=1-x2 +e3y.
Code the true solution in a function exact.m (You can use it of course
also for u_d).
Hint:Your solution can be coded like this (adapted from f.m)
function uexact = exact(x)
%UEXACT
uexact = x(:,1)+3*exp(x(:,2));
Run the code and plot both the true solution and the numerical
solution to check for obvious mistakes.
- Now calculate the actual H1 and L2 errors for the problem
(a). You may use the provided functions
basisfun.m, solerr.m, and
tri_quadcofs.m. Follow the template of error calculations and
instructions in solerr.m.
PART 2.
Report on the convergence of the solutions to Part 1 using a
sequence of meshes with different h
PART 3.
Consider now the stationary heat conduction problem with a true
solution as in Part 1, but with the coefficient
k(x,y)=x+y+A.
Choose A so that the problem is coercive on your region.
- Make the appropriate changes to the ACF code to solve this
problem. (Show me only the parts that you modified). Report on
convergence as in Part 2.
- Extra: make the coefficient discontinuous so it is equal
1 everywhere except in the circles as in lab 3, where it equals 10. Of
course now you do not know the true solution.
- Extra: Experiment with A for which there is no
coercivity. What happens?
PART 4.
The code described below provides an estimate on local H1 error of
the solution, and thus it can be used to adapt the grid.
Use the provided code esterr.m for H1 error estimation.
[uest] = esterr(elements3,coordinates,full(u));
[v,j]=max(sqrt(uest));
%%%% Display the local error by assigning it to the nodes
%%%% (display the estimated error)
uloc = zeros(size(coordinates,1),1);
for j = 1:size(elements3,1)
uloc (elements3(j,:)) = uloc(elements3(j,:)) + (uest(j))/3;
end
show(elements3,elements4,coordinates,uloc(:));
In practice one marks the elements which need
refinement rather than the nodes. We choose the latter option here to not
complicate things too much.
- Apply your estimator to the problem in Part 1a, or Part 3a, or
Part 3b, or to all for extra credit.
- Extra: If you know your true solution, you can check how
well the local estimator marks the regions that need the
refinement. You can also calculate the local H01 error and compare to
that provided by the estimator.
- Extra: Refine the grid where the indicator tells you and
check if the error has decreased.
|