[petsc-users] Jacobian matrix for dual porosity model

Adrian Croucher a.croucher at auckland.ac.nz
Thu Jun 15 18:37:55 CDT 2017


On 16/06/17 01:19, Matthew Knepley wrote:
>
>     Thanks for those ideas, very helpful.
>
>     If I try this approach (forming whole Jacobian matrix and using
>     PCFieldSplit Schur), I guess I will first need to set up a
>     modified DMPlex for the whole fracture + matrix mesh- so I can use
>     it to create vectors and the Jacobian matrix (with the right
>     sparsity pattern), and also to work out the coloring for finite
>     differencing.
>
>     Would that be straight-forward to do? Currently my DM just comes
>     from DMPlexCreateFromFile(). Presumably you can use
>     DMPlexInsertCone() or similar to add points into it?
>
>
> You can certainly modify the mesh. I need to get a better idea what 
> kind of modification, and then
> I can suggest a way to do it. What do you start with, and what exactly 
> do you want to add?
>
>
The way dual porosity is normally implemented in a finite volume context 
is to add an extra matrix rock cell 'inside' each of the original cells 
(which now represent the fractures, and have their volumes reduced 
accordingly), with a connection between the fracture cell and its 
corresponding matrix rock cell, so fluid can flow between them.

More generally there can be multiple matrix rock cells for each fracture 
cell, in which case further matrix rock cells are nested inside the 
first one, again with connections between them. There are formulae for 
computing the appropriate effective matrix rock cell volumes and 
connection areas, typically based on a 'fracture spacing' parameter 
which determines how fractured the rock is.

So in a DMPlex context it would mean somehow adding extra DAG points 
representing the internal cells and faces for each of the original 
cells. I'm not sure how that would be done.


Another approach, which might be easier, would be not to construct a DM 
for the whole dual-porosity mesh, but create the Jacobian matrix as a 
MatNest, with the fracture cell part created using DMCreateMatrix() as 
now, with the original DM, and the other parts of the Jacobian 
(representing fracture-matrix and matrix-matrix interactions) created 
'by hand'- because of the local one-dimensional nature of the matrix 
rock cell parts of the mesh, these would be just a bunch of block 
diagonal matrices anyway.

I've just been looking at SNES example ex70.c where something a bit like 
this is done.

I think once the Jacobian matrix is created, you can create a coloring 
for finite differencing on it just from the matrix itself, and don't 
actually need a corresponding DM. So this approach might work, without 
needing to construct a dual-porosity DM.

- Adrian

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170616/6520017f/attachment.html>


More information about the petsc-users mailing list