[petsc-dev] gradients in DMPlexTS Riemann function

Jed Brown jed at jedbrown.org
Mon Jun 16 10:06:46 CDT 2014


Adrian Croucher <a.croucher at auckland.ac.nz> writes:

> hi
>
> How would one go about implementing a Riemann function in DMPlexTS that 
> included a term based on the gradient of the solution?

Elliptic fluxes are fundamentally not Riemann problems.  On orthogonal
meshes with isotropic coefficients, you can use a "two-point" flux, but
this is inconsistent for non-orthogonal meshes or general tensor
coefficients.  There are many choices for the more general case, none of
which are "simple" and deeply satisfying.  I explained some of the
alternatives and provide pointers to the literature in these answers:

  http://scicomp.stackexchange.com/a/6712/119
  http://scicomp.stackexchange.com/a/4962/119

> Simple example: extending TS ex11 to include a diffusion term.
>
> Would that be done by subtracting a gradient term from the flux in 
> PhysicsRiemann_Advect()- e.g. a constant diffusion coefficient 
> multiplied by the gradient of the solution across the interface, 
> calculated simply by the difference between the solution values at the 
> two cells, divided by the distance between their centroids?
>
> It seems to me you would need to pass the face index into the Riemann 
> function, to get access to the cells supporting the face and their 
> centroid positions- but the way the Riemann function interface is 
> currently set up doesn't appear to allow for that.
>
> Or have I got the wrong idea about how one would go about implementing this?

That generalization would only support the simple two-point flux, which
has limited applicability.  Adding diffusion to this example in a
principled way would require that some discretization choices be made.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140616/b0f0470a/attachment.sig>


More information about the petsc-dev mailing list