Energy conservation through two independent consistent mappings

Dear developers,

I’m using preCICE for coupling an (aero)acoustics code with a structural solver, currently with the conventional serial staggered algorithm (serial-explicit). I’m mapping pressures consistently in one direction and velocities consistently in the other direction. In thesis of Bernhard Gatzhammer, section 4.2.3, an energy-conservative algorithm is described based on two independent consistent mappings of pressure and displacements (which is also an option for me). Is this still available in the code?
If I’m not mistaken, the other way to obtain energy-conservative mapping is to map forces conservatively from fluid to structure and map consistently the displacements (or perhaps velocities work as well) in the other direction, as is explained in section 2.4.2 in the thesis of Bernhard Gatzhammer’s thesis?

Some extra info:
I have on the fluid side a discontinuous Galerkin implementation and the mesh I communicate to preCICE contains the vertex/edge doubles you get due to the discontinuous formulation. Therefore it is easy for me to map pressures consistently to the structural mesh and it would require an intermediate ‘continuous’ mesh if I would want to map forces conservatively to the structural mesh. It is a bit like the issue that Benjamin Uekermann raises in his thesis in section 4.3.1, concerning the mapping methods for distributed data.

On a side note:
Could it be that the RBF method also has convergence issues due to the double vertices in my ‘discontinuous’ mesh? I received that error when I tried it once and I thought it was due to the fact it was trying to meet the two different values at the same coordinate, which raised a convergence issue.

Thank you for your answers!

Kind regards,
Jurgen Kersschot

Hi @JurgenKersschot

The algorithm Bernhard describes in section 4.2.3 is currently not directly available in preCICE, but I had it on my list since longer already. I open an issue: https://github.com/precice/precice/issues/770

I guess that one could imitate this mapping with a Python action, but a proper implementation in preCICE should be the way to go long-term.

Exactly.

Yes, the discontinuous input function is a problem. I would recommend to use a nearest projection mapping. Should be more robust concerning the discontinuity, but still you might observe artifacts from this. Mapping to an intermediate “continuous mesh” would be good, of course. Do you have such an option? How would you do that?
I guess by “doubles”, you mean duplicated, correct?

Exactly. When you define duplicated vertices with different input values, an RBF interpolant cannot be constructed. NP should do a better job, but you need to be careful to define the edges correctly, so always pick the “left vertex for the left edge” and the “right vertex for the right edge”. Understandable?

Thank you for the answer!

With ‘doubles’ I indeed mean the duplicates of the face vertices (and face edges in 3D). I thought of using preCICE for a mapping within the acoustic solver itself, from the discontinuous mesh to a continuous mesh, before mapping it to the structural solver. This holds however the open question of what I will do with the nodal values from my higher-order shape functions.

Currently I’m keeping them in my consistent NP mapping approach by defining my elements for NP (edges and faces) only on the structural side and doing the ‘read’ and ‘write’ on the acoustic solver side (defined in the .xml). Let me shortly go through a 2D example (see figure in attachment), to check if I understood the NP mapping well:

On the top of the figure you can see the acoustic discontinuous mesh and on the bottom the continuous structural mesh. The vertices/higher-order nodes of the finer acoustic mesh first look for the nearest edge on the coarser structural mesh by orthogonal distance and are then orthogonally projected on this element.
–>In the write direction, the pressure values from the fine mesh are taken over by their projected image. The vertex values of the coarse mesh are then determined by linear interpolation between 2 neighboring projected images (and these 2 neighboring projected images don’t belong to the same ‘edge’, otherwise I would call it extrapolation instead of interpolation). If a projected image already coincides with the coarse mesh vertex, as is the case in this figure, the value can just be copied. If there is another projected image coinciding with the coarse mesh vertex, one of the two values is taken, but difficult to know which one.
–>In the read direction, the projected images get their value from linear interpolation between the 2 neighboring coarse mesh vertices. If a projected image already coincides with the coarse mesh vertex, as is the case in this figure, the value can just be copied. The finer mesh vertices/nodes copy then the value of their projected image.

Is this more or less clear? This works for me and I get accurate results, but as I’m writing something about it now, I wanted to check.

Thank you again for your time!

Jurgen Kersschot

The read direction is correct (and it is a consistent mapping).
The write not quite. What you describe is pretty much how a conservative mapping would work. But then values are summed up. But that’s not what you want. You want a consistent mapping here as well. Then, you need connectivity at the input mesh. You project from output to input, interpolate the input values, and copy the interpolated value to the output mesh.

General advice about DG meshes.

  • Writing values, you can just define an auxiliary equidistant write mesh and sample your DG polynomials at the write locations.
  • For reading you define a separate mesh with your GPs.
  • If you map consistently you need to define connectivity in the write mesh, so the equidistant mesh (and in your structure mesh)

OK?

Ok great! This clears some things up, thank you a lot!

Kind regards,
Jurgen Kersschot