Solids4foam-openfoam FSI coupling: can't use stress as the exchange data

Hello everyone! I am using solids4foam and OpenFOAM to simulate an FSI problem. I want to use Stress as the exchange date instead of Force. However, solids4foam displayed error messages as:

[31mError (deferred - will exit later) in the preCICE adapter: e[0m Reading forces is not supported.

The following are my config files:
precice-config.xml (3.0 KB)
preciceDict-fluid.txt (1.1 KB)
preciceDict-solid.txt (1.0 KB)
Could you please help me check them for errors?
The following are the log files after running:
fluid.log (30.5 KB)
slurm-solid.out (4.8 KB)
solid.log (13.8 KB)

:blush:

Reading forces is supported since v1.2.0 of the adapter, and you do run v1.2.1 (which is good).

Have a look at our tutorial case with solids4foam:

The error message is indeed confusing and we should refine it with suggestions:

It is also a bit strange that this is triggered (I need to look deeper into it). The right code should be:

Could you tell me how to reproduce the issue starting from the tutorial?

However, your configs (preciceDict) show stresses, not forces. Could you please check again?

There is a limitation that only solid participants can read Force and Stress, and it is important to use the exact words (or start with them).

Sorry for being late to reply!
I used a tutorial case of “perpendicular-flap” to reproduce the issue. I changed the Force to Stress in the config files. The error also displayed as “Reading forces is not supported.”
The following are the config files:
precice-config.xml (2.8 KB)
preciceDict-fluid.txt (661 Bytes)
preciceDict-solid.txt (942 Bytes)
The following are the output log files:
fluid.log (6.4 KB)
solid.log (5.0 KB)
The following is the modfiled perpendicular-flap case:
flap-stress.zip (113.0 KB)
Could you please check where they are set incorrectly? Thank you very much!

Now I see what you mean and what the issue is. Yes, reading stresses is not yet supported, but should be easy to add:

See the list of supported read/write fields:

The error is indeed misleading, as you are asking for stresses, but get an error about forces. Assume “stresses” in the error message (I fixed the error message in Fix error message for reading stresses by MakisH · Pull Request #379 · precice/openfoam-adapter · GitHub).

Thank you for your reply!
I am wondering if solids4foam can only write the date “displacement” and read data “Force”? So far, it doesn’t support exchanging other types of dates, such as reading “stress”, writing “displacementDelta”, or writing “velocity”, right?

Could I ask some more questions about exchanging data in an FSI simulation? Question 1:OpenFOAM fluid simulation requires ‘velocity’ data on the interface boundary, but solids4faom solid simulation can only provide ‘displacement’. Does Precice have the function to calculate point velocity using the displacement on the interface boundary and then provide the velocity to OpenFOAM?
Question 2:Furthermore, as I understand it, fluid velocity should equal solid velocity at the interface boundary. In the tutorial, many cases only exchange displacement data. Why can velocity be ignored? Could you share your thoughts on this?
Question 3:Also, Precice exchanges displacement and force, which is the Dirichlet–Neumann boundary condition. How is the Robin-Neumann boundary condition used, where fluid takes a combination of kinematic and dynamic interface conditions as the boundary condition? How can this be achieved?
I would be very grateful if you could clear up my confusion! :folded_hands: :blush:

No, the adapter does not handle this explicitly.

Since the velocity depends directly on the displacement (derivative), we don’t impose it. One could extend the adapter to exchange the velocity of the interface as well (in fact, we had this in first implementations), but so far we had several successful applications exchanging only displacement and force/stress.

We don’t support such coupling for FSI in the OpenFOAM adapter at the moment, but one could extend it. In terms of preCICE, this is possible, and we already have examples of Robin coupling in CHT applications (see heat exchanger).

Thank you very much for your response, which solves my question. :blush:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.