Bug in the surface force extraction for triangular elements?

Hi All,

I’ve been performing simple 2D cylinder simulations and run into a strange behaviour of the surface force plugin when changing the boundary layer elements from quadrilaterals to triangles. The plugin works perfectly for quads, but seems to produces incorrect y-directional force values for triangles. I calculated the force manually in Paraview and the correct zero lift force is retained in the solution files, which suggests that the problem must be in the plugin.

Could someone look into this?

Thanks,
Niki

Hi Niki,

Could you post an example case?

Cheers

Peter

Hi Niki,

Jin Seok also has some code in the sandbox for computing boundary
forces. Would you be able to run this and see if it gives the same
answer as the real-time code in PyFR? (Although I think that there
was a bug in it at one point, so check with Jin Seok if he has fixed
it or not.)

Regards, Freddie.

Hi Niki,

I have pushed a fix for this plugin on my develop branch.

I have checked this for a few initial step and the result seems a
reasonable value.

If possible, could you please test it?

We will make a pull request after checking this.

Regards,

Jin Seok

Hi Jin Seok,

I have pushed a fix for this plugin on my develop branch.

I have checked this for a few initial step and the result seems a
reasonable value.

If possible, could you please test it?

I see the fix although note that this is not something that we do when
surface anti-aliasing. I was under the impression that this factor
should be baked into |J| for the face in question (which we pick up on
through mag_norm_pnorm).

Could there also be a bug in the surface anti-aliasing code then?

<https://github.com/FreddieWitherden/PyFR/blob/develop/pyfr/shapes.py#L1
04>

Regards, Freddie.

Hi All,

The plugin seems to be working, based on the first few time steps! I will run my case over night to verify this.

Thanks,
Niki

Hi Freddie,

I think surface anti-aliaisng is fine because we integrated and convert
back for each surface.

However, when we integrate force, we add all face integration and we
need to consider the area of face. I think |J| does not have this
information. When we use a straight triangle, |J| is the same for every
solution/flux points but length of edge is different. I think it is
similar situation when we compute gbasis_coeff.

Regards,

Jin Seok

I think surface anti-aliaisng is fine because we integrated and
convert back for each surface.

That fits with my testing. (I have run quite a few triangular cases
w/surface-aa and they've always worked.)

However, when we integrate force, we add all face integration and
we need to consider the area of face. I think |J| does not have
this information. When we use a straight triangle, |J| is the same
for every solution/flux points but length of edge is different. I
think it is similar situation when we compute gbasis_coeff.

I'm sold. Submit a pull request to the release/v1.0.0 branch, I'll
review, and we can get this resolved.

Regards, Freddie.