How to couple multiple datas into FEniCS?

Hello all,

I’m working on a Fluid-Structure-Thermal interaction(FSTI) problem using OpenFOAM-FEniCS. I tried to solve by combining Flow in a channel with an elastic perpendicular flap and Flow over heated plate.

After I completed the OpenFOAM and FEniCS solver code separately, I’m having trouble coupling them together:

According to the tutorial on fenics-adapter, I can couple a single variable, temperature or force. It seems like an adapter created in FEniCS can only transfer one variable.

# Adapter definition and initialization
precice = Adapter(adapter_config_filename="precice-adapter-config.json")
precice_dt = precice.initialize(coupling_boundary, read_function_space=V, write_object=V_flux_y)

How can I couple two or more variables in FEniCS? Such as (temperature and force), (heat flux and displacement).

Thanks.

Hello @Yuyang_Wu

The fenics-adapter is indeed limited in the sense of reading and writing multiple quantities in one simulation. Currently the adapter only works with reading and writing one quantity from FEniCS. This restriction is also documented in an issue: Support multiple read/write fields · Issue #65 · precice/fenics-adapter · GitHub

I can implement a prototype version of the adapter with multiple read and write fields in the coming weeks and then you can try it out. Would that work for you? In any case this is a feature we want to have in the adapter in the near future.

Thank you so much for your kind help! I will try to use it and give you feedback.