[petsc-users] Extracting solution at a boundary in a DMPlex/PetscFV paradigm

Thibault Bridel-Bertomeu thibault.bridelbertomeu at gmail.com
Thu Apr 22 07:31:00 CDT 2021


Dear all,

I am working with multi-D DMPlex's coupled with PetscFV and a TS to solve
hyperbolic systems of equations. To add boundaries, I use the
PetscDSAddBoundary as shown in some examples throughout the documentation.
I do CFD, meaning I often have an object around which I want to simulate
the flow. And I would like to know how some variables (pressure for
instance) behave at the wall (literally _at_ the wall, and not only in the
first fluid cell above the wall).

After going through the documentation and the PETSc source code, I think
the way to go is to use something like what ex23.c (of plex/tests) does :
mark boundary faces that match the _wall_ boundary condition, create a
submesh with them and somehow project the PetscFV/TS solution onto those
facets based on the order of the spatial discretization (like if it's order
1 then just use the value in the first fluid cell above the boundary
condition, if it's order 2 use the gradient and the value to get something
at the facet, etc...).

But I cannot figure out two things :

1/ how to mark the right boundary faces ? I tried using the
DMPlexMarkBoundaryFaces with (what I thought was) the ID of the wall
boundary condition (I mean, I DMView'd the DMPlex and I picked the right id
in the Face Sets group), but then when I use the label thus created with
DMPlexCreateSubmesh, it just returns ... nothing. The "submesh" is empty
when I DMView it.

2/ how to project on the facets in a PetscFV paradigm ?

Thank you very much in advance for any advice/pointers you could give me !

Take care and have a good day,

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


More information about the petsc-users mailing list