Modified multiple-perpendicular flap tutorial

Hi,

Been trying the preCICE adapters recently and was trying to modify the multiple-perpendicular-flaps tutorial such that the flaps are slightly at a different location (see attached image). The flaps are now centered at 0. As per the tutorial, I changed the coordinates (in the precice-config.xml) of the flaps to “-0.05;0.05”

 <watch-point mesh="Solid1-Mesh" name="Flap-Tip" coordinate="-0.05;0.05" />
.
.
.
 <watch-point mesh="Solid2-Mesh" name="Flap-Tip" coordinate="-0.05;0.05" />

The simulation runs fine. But after the simulation, only the flap at the bottom seems to be moving. I did not change anything else from the tutorial setup apart from the mesh (I even kept the same patch names). This was with OpenFoam and deal ii. Not sure whats going on. Appreciate any pointers. Thanks.

Hi,

did you change the boundary conditions, so that the ‘ceiling’ of the top flap is now clamped instead of the bottom? I guess you need to swap the bottom and the top in this if statement

as short_bottom is supposed to move now. Note that the executable is then different from the top flap, unless you use some logic to cover both configurations within one file.

I’m not sure i understand the proposed solution. I want both the flaps to move. Also, how do I understand which one corresponds to id_flap_short_top and id_flap_long_bottom?

The GridGenerator function uses deal.II’s colorization flag(The deal.II Library: GridGenerator Namespace Reference) in order to assign specific IDs to the boundary. The variants here are only named for readability dealii-adapter/linear_elasticity.cc at 5e62775495017b89ffc730133281f02d6227e1e8 · precice/dealii-adapter · GitHub

Hence, for your lower flap, you don’t need to change anything. For the clamped flap on top you probably want to clamp the id_flap_short_top in all directions, i.e.

    if (face->boundary_id() == id_flap_short_bottom ||
        face->boundary_id() == id_flap_long_bottom ||
        face->boundary_id() == id_flap_long_top)
      face->set_boundary_id(interface_boundary_id);
    // Boundaries clamped in all directions
    else if (face->boundary_id() == id_flap_short_top)
      face->set_boundary_id(clamped_mesh_id);

You need to distinguish then between the lower and upper flap in the code, i.e., have some sort of switching criterion.