Nick, You can look at step 74. It has EXACTLY what you need.
On Wednesday, June 19, 2024 at 10:33:18 PM UTC+2 [email protected] wrote: > Dear all, > > I'm new to deal.ii and I would like to use it to gradually build a > simulator for charge/mass transport inside batteries. > > 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. > > 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 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. > > Thank you very much in advance for your help or inputs. > > Best, > Nik > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/356b0a48-8ccb-4c50-bb01-6ee6bcff8a22n%40googlegroups.com.
