Two couplings to one interface (mixed dimensional coupling)

Hi,

Is there support for several mappings to one interface and vice versa? I have a mixed dimensional situation that looks a bit like this:

Solver A: = (2D)
Solver B: x (1D)

Domain:
===========
=xxxxxxxxx=
===========

The domain of Solver B is completely embedded in the domain of Solver A as it is formulated as a problem in a lower dimension. Solver B has a 1D domain/mesh and solver A a 2D domain/mesh. What I tried to do was:

  • define two interfaces (interfaceATop and interfaceABottom) for Solver A (interface above and below Solver 2)
  • define one interface (interfaceB) for Solver B

I defined four mappings

  1. interfaceATopinterfaceB
  2. interfaceABottominterfaceB
  3. interfaceBinterfaceATop
  4. interfaceBinterfaceABottom

However, preCICE complained that I cannot have several mappings to the same interface. I guess that is caused by interfaceB showing up everywhere.

Question
Is this a conceptual issue or did I do something wrong when setting up my coupling? I understand that having two times the same mapping would not make sense, but I map to pairwise different interfaces.

Current solution
I solved this at the moment by defining two interfaces interfaceBTop and interfaceBBottom which works as intended, but I have a bit more of administration to do myself. I did not save my first preCICE-configuration thus I cannot attach it here.

Thanks in advance!
Alex

There is indeed a technical limitation of preCICE and your current solution is the recommended way to go. There are also some conceptual questions however.

The last two make a lot of sense, but the first two are not well-defined. Which values do want on interfaceB, should the one write mapping overwrite the other one or do you want the sum? The latter makes probably sense if you have two conservative mappings, but what should happen for two consistent mappings or if a consistent and a conservative mapping are mixed?
In your case which behavior would you want?

I was first thinking I could define two sets of data PressureTop and PressureBottom. Then PressureTop would be written according to the mapping interfaceATop -> interfaceB (similar for PressureBottom). Afterwards in Solver B I would read (from interfaceB) with the data ids pressureTopId and pressureBottomId. I don’t want anything to be overwritten or summed up. I want to have to sets of data I can read from on interfaceB.

I thought that the definition of the mapping in combination with the data (or dataID) would be unique and would make sense. This would represent the actual situation of my simulation better as I can identify only one mesh for Solver B while I can identify two meshes (top and bottom surface) for Solver A.

OK, I think I better understand your situation now. When you define two fields PressureTop and PressureBottom on one mesh interfaceB though, both data fields would live on the complete mesh, also on the “wrong” side. So what you would want is indeed a summation and a reset to 0 everywhere in every iteration. Correct?

I think we will get an elegant solution for this case with https://github.com/precice/precice/issues/374.

I would not favor a different “smaller” solution. Simply removing the current restriction of preCICE would open many error-prone edge cases. Please object if you have a different opinion.

Thanks for the reply! This feature request looks nice, but I am also fine with the current solution. I am not as unhappy with it as I may have sounded. :grinning:

I have to think about it a bit more in order to properly conclude whether I need to object or not.