Since the equations I'm trying to solve are conservations laws, I would like
to use a finite volume type of implementation. I know that deal.ii is a finite
element library. However, since I would like to use a fully implicit approach
and later hopefully octree refined grids, I think deal.ii offers the things
needed for this task as well as many functionalities and interfaces for future
tasks.
This is true, but before you get fully settled on FV methods, may I suggest
that you also think about the accuracy you get for the simplicity? If you use
piecewise constants (=finite volumes), the best you can hope for is O(h)
accuracy. That's quite inaccurate. By using finite element methods, you will
generally be able to obtain much better accuracy (not just in terms of the
convergence *rate*, but in *absolute errors*).
To start, I've summarized a simplified problem I would like to solve in the
appended .pdf file. It's a 1D Laplace equation using finite volumes.
I think I understand what you want to do, but you may want to see if you can
make your writing more precise. For example, in (4), you say you integrate
over S, but you're missing the normal vector that in your case is either +1 or
-1, but is necessary to ensure that the formula is correct. You can see that
in the transition between (5) and (6) where a minus sign magically appears in
front of the first term. Of course, (5) and (6) are also not exactly equal,
but only approximately.
Second, in (6) there magically appears a factor of h^2 for which I don't have
an explanation.
(No need to write back to these comments -- I just wanted to point it out, the
teacher in me can't just let it go ;-) )
I would like to build on the step-12 or step-12b tutorials because they use
discontinuous elements too. I don't call the beta function of the original
tutorials such that a 1D version should be possible.
The appended nik-step-12.cc file contains a hard-coded version of the three
assembly functions that results in the correct matrix and solution for a very
specific case described in the .pdf (section 3).
My questions would therefore be the following:
* How should I best write the three functions (cell, boundary and interior
face worker) for the matrix/RHS assembly with as less hard-coding as
possible for a finite volume scheme like equations (7-9) in the .pdf.
* Related - How can I access the elements of the solution vector (phi_i) of
the current cell and neighbor cell that are used for example in equation
(7) in the .pdf.
As already mentioned by Abbas, step-74 gives a good overview.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/16e937fe-4020-4eb7-828c-9b58e8799112%40colostate.edu.