-
-
Notifications
You must be signed in to change notification settings - Fork 13
Build your own adapter
The dealii-adapter provides a minimal example of a deal.II code, which has been coupled using preCICE. Since most of the users will probably have their own code for a preCICE coupling, this section should give an explanation and overview for the preCICE related code changes. A more general adapter example with a step-by-step tutorial for own adapter buildings is also available in the preCICE wiki
preCICE uses a black-box coupling approach, which means the solver only need to provide a minimal set of information. In the most simple case, this includes configuration information e.g. name of the participant and the coordinates of the data you want to exchange e.g. the mesh vertices. If you want to use a nearest-projection mapping, you need to specify additionally mesh connectivity between the coordinates, which is currently not included in this adapter example.
For every multi-physical coupling, proper coupling data needs to be exchanged between all participants. In our example case, the Fluid
participant calculates forces (per cell face), which are passed to the Solid
participant. Using the forces for the structural calculations, the Solid
participant calculates displacements, which are then passed back to the Fluid
participant. As outlined above, preCICE needs coordinates of the data points you want to exchange. Since the forces live on the cell faces and the displacements live on the cell vertices, we define two coupling meshes in this example: A face based mesh for the forces: Fluid -> Solid and a vertex based mesh for the displacements: Solid -> Fluid. This is not necessarily the case and depends on your spatial discretization method and the coupling data. If both data sets live on the same mesh element, defining one mesh would be sufficient.
More information on precice.org. Subscribe to the preCICE mailing list.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Please use "precice.org" for the attribution.