Using preCICE with commercial (non-open-source) software

Hello,

Is it possible to use precice to couple a commercial software without access to its source code?

For example, say I want to use su2 as a flow solver and couple it with the nonlinear sol400 of msc nastran, would this be even possible with precice architecture?

I did see that there is some work done about adapters to commercial s/w (ansys fluent and lsdyna), but couldn’t quite understand what are the implications of using this sort of s/w…

Thanks in advance,
L

Hi @lior.pop,

there are two aspects: the licensing aspect, and the technical aspect.

Licensing aspect

preCICE is licensed under the LGPLv3 license, which does allow linking from closed-source codes, in contrast to the full GPLv3.

Technical aspect

You generally need to call preCICE from the solver code.

In some cases, this is possible via hooks for additional, user code (e.g., Fluent UDF files).

In other cases, this is possible via a Python interface. We did that to interact with the DLR TAU in this project.

In extreme cases, you can even write a (very inefficient) script that acts as an intermediary, starting and stopping the closed-source code with modified output and reading the result files. This makes sense in very computationally cheap codes. We did that to interact with CAMRAD II in the same project.

Are you the code maintainer?

Sometimes, even if you have license to see the code, you may not have permission to change it. But if you develop/maintain the code (e.g., in-house codes), you can probably do anything you like.

In that case, the best is to modify the code to call preCICE, e.g., as an optional feature. We generally prefer if solver developers maintain their own adapters, instead of us publishing additional components.

How to proceed

What features does this solver provide you to interact with it?

1 Like