jvencels / EOF-Library

Efficient two-way coupling between Elmer FEM and OpenFOAM
https://eof-library.com/
GNU General Public License v3.0
70 stars 25 forks source link

EOF-Library

Libraries for coupling Elmer FEM and OpenFOAM + test cases. For detailed information how this software works check our article.

If you use EOF-Library, please cite: Juris Vencels, Peter Råback, Vadims Geža, EOF-Library: Open-source Elmer FEM and OpenFOAM coupler for electromagnetics and fluid dynamics, SoftwareX, Volume 9, 2019, Pages 68-72, ISSN 2352-7110, https://doi.org/10.1016/j.softx.2019.01.007.

About

This software is maintained by Juris Vencels from EOF Consulting LLC in cooperation with CSC - IT Center for Science Ltd. (Finland).

Introduction

EOF-Library couples internal fields between Elmer FEM and OpenFOAM. Applications are

Requirements

How to

There are two options to install and use this software:

  1. Docker install (best for beginners and running on clouds) - Linux, Windows, MacOS
  2. Complete install (best for developers and advanced users) - Linux

Performance-wise these two options are comparable. Docker installation comes with OpenFOAM and Elmer installed, and environment is set. This is preferred option for most users and for running simulations on multiple computers or cloud.

On the other hand complete installation gives users more flexibility, it is preferred option for developers who want to work on their own solvers or have full control over software and its source code.

1. Docker

First, you will need to install docker on your OS:

  1. Ubuntu/Linux (preferred) - https://docs.docker.com/install/linux/docker-ce/ubuntu/
  2. Windows - https://docs.docker.com/docker-for-windows/install/ https://docs.docker.com/docker-for-windows/install/
  3. MacOS - https://docs.docker.com/docker-for-mac/install/

Then, follow commands below to install the software & run demo simulation.

2. Manual installation

git clone https://github.com/jvencels/EOF-Library
eofCompile
cd ../..
mkdir runs
cd runs
cp -r ../tests/levitation2D .
cd levitation2D
setFields
decomposePar
ElmerGrid 2 2 meshElmer -metis 2
mpirun -np 2 mhdInterFoam -parallel : -np 2 ElmerSolver_mpi