Accessing solution at boundary surface

Hello,

I’m trying to get the solution on a boundary surface, but when I try to view it (together with the extracted mesh) there are “holes” between elements. I guess that I’m only getting the spts projected onto the surface but I’m missing the interface points.

The code is basically the one from the fluidforce plugin

for etype, fidx in self._m0:
            # Get the interpolation operator
            m0 = self._m0[etype, fidx]
            nfpts, nupts = m0.shape

            # Extract the relevant elements from the solution
            uupts = solns[etype][..., self._eidxs[etype, fidx]]

            # Interpolate to the face
            ufpts = m0 @ uupts.reshape(nupts, -1)
            ufpts = ufpts.reshape(nfpts, nvars, -1)
            ufpts = ufpts.swapaxes(0, 1)

And the resultant extracted surface is attached below

Any idea on how to solve this?

Best regards

There is some functionality in the recently merged SurfaceMixin that you might like to look at, as it does most of what you want. https://github.com/PyFR/PyFR/blob/f922692c82fcdfcd9fc16e0310e46209a2fdf3c5/pyfr/plugins/base.py#L180

To fix the panel gaps, you might like to set the points you are interpolating to be either gauss-legendre-lobatto for quads/hexs, or alpha-opt for tris/tests.

Thank you @WillT I’ll update you as soon as I can

@WillT It works as expected, I really forgot that I was using GL points instead of GLL…!
One last thing I need: say that my solver order is 4, hence a quad has 25 spts. How can I change the qdeg to be such that my number of points on the surface maches the number of spts?

Best regards

1 Like

This is not something that the current code does by default, as it can only be done if the flux points are a subset of the solution points. But you might be able to modify the code to pull out the solution points on a face.

1 Like