Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

preCICE-adapter for the FEM code COMSOL Multi-Physics (currently unmaintained)

NotificationsYou must be signed in to change notification settings

precice/comsol-adapter

Repository files navigation

This folder contains files to use COMSOL as the structural solver in an FSI simulation.Since it was not possible to directly couple the C++ coded preCICE to the COMSOLAPI, we used FSI*ce as intermediate communication/data library. There are, hence,two important files:comsol_simulation.c, the interface with the COMSOL API, which usesFSI*ce to communicate the data to the intermediate (executable) componentComsolPrecice.c.ComsolPrecice uses FSI*ce to exchange data withcomsol_simulation, and preCICE for the actual coupling.

Only 2D simulations have been done so far. For 3D, several changes tocomsol_simulation.c and some toComsolPrecice.c have to be done.

How to compile the files?

The compilation is done by SCons, check the SConstruct script for detailedinformation on the build variables. There is a debug and a release mode.

comsol_simulation.c is compiled and linked into a shared object (.so). For that,it needs (among others) the pathes to the COMSOL installation, and the FSI*celibraries. These paths are hardcoded in the SConstruct file.

ComsolPrecice.c is compiled into an executable. For that, it needs (among others)the pathes to the FSI*ce libraries and the preCICE library.

How to run COMSOL for FSI simulations?

There are two executables to be run (in any order). The Comsol script needs to berun as follows

$ comsol script simulation

The keyword "simulation" tells the COMSOL script to run the simulation.m file in thecurrent directory. It can also be omitted and given in the scripting GUI. To runCOMSOL script without GUI, type

$ comsol script -term

Wait until comsol started, then type

$> flreport('off')$> simulation

To runComsolPrecice, type

./ComsolPrecice Comsol precice_config.xml

Where COMSOL gives the name of the participant to preCICE, and precice_config.xmltells preCICE where to find the coupling configuration.

HINT: Sometimes, after killing the COMSOL script, it happens that COMSOL starts, butdoesn't load the simulation.m file. It suffices to close and restart it.

About

preCICE-adapter for the FEM code COMSOL Multi-Physics (currently unmaintained)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp