Multiphysics coupling: co-simultation via API

Introduction

This section deals with the multiphysics co-simulation carried out with a programming interface (Application Programming Interface or API).

The developer in C can access Flux functionalities to create a dedicated program via the multiphysics API.

Presentation / reminder

The multiphysics coupling between different software programs (or different Flux applications) requires, on the one hand, an exchange of information between software programs, on the other hand, the synchronization of the exchanges and the solving processes.

To perform the multiphysics co-simulation, two operations are available as presented in the table below.

In this paragraph we are interested in the multiphysics coupling via API.

Multiphysics co-simulation via Flux menu

Multiphysics co-simulation via an API interface

The two software function in parallel

One of the software is integrated within the other (dll)

Exchanges by file

Manual synchronization

or by command file

Possibility of fast integration of commercial products

Communication and synchronization by means of a specialized interface (API)

Necessity to access to source codes or to have an incorporated application

Operation

The main operational characteristics of a multiphysics co-simulation via API are the following:

  • Flux is incorporated within another software: dll (Dynamic Link Library)

  • communication and synchronization are carried out by means of a specialized interface: API (Application Program Interface)

Important

This operation is addressed to developers.

The language is the C language (VisualC6 / Intel C9 / Intel C10).

Information

Information on the programming interface (API) for the multiphysics is placed in the Flux installation directory:

C:\Program Files\Altair\2018.0\api (standard installation by default)

There is the follwing information in the directory:

  • a documentation on the multiphysics API (description of functions)
  • an example (use of available functions)

Process

The various steps are presented in the table below

Preliminary conditions / what must be installed:

  • C compiler: VisualC6 / Intel C9 / Intel C10
  • Flux
Step Action (standard) Action (Example)*
1 Write the source code Edit/modify the file Flux_mp.c
2 Compile and link

Execute the file

Make_flux_mp_xx_xx.bat

3 Run the executable

Execute the file

Flux_mpxx.bat

Note: * The actions in this column are those to be carried out to make the example run (see previous block).