Multiphysics modeling with open source software

University of Latvia

November, 2018

Hartmann flow is a classical magnetohydrodynamics (MHD) problem in which conductive fluid is pushed through a pipe with electrically conductive and/or insulated walls in presence of external magnetic field which is perpendicular to flow direction.

In this project, a solution is found using a bidirectionally coupled Elmer FEM and OpenFOAM software packages. Elmer FEM solves the electromagnetic part of the problem and communicates the Lorentz force to OpenFOAM. OpenFOAM computes fluid flow and sends flow velocity field back to Elmer. Results are compared against an analytical solution.

This project is part of the EOF-Library training course. EOF-Library is efficient, fully parallelized Elmer FEM and OpenFOAM coupler designed for coupled electromagnetic, fluid and heat transfer simulations.

Given

- A video tutorial for geometry and mesh generation in Salome-platform
- A video tutorial for setting up OpenFOAM and Elmer FEM
- Mesh in the OpenFOAM and Elmer FEM formats

Problem definition

Liquid properties | Galinstan |

External magnetic field | 1 T |

Inlet flow velocity | 1 m/s |

Tasks

Basic

- Get simulation running and produce meaningful results.
- Solve pipe flow without magnetic field first (only OpenFOAM).
- Create Elmer simulation case with homogeneous magnetic field distribution
- Solve pipe flow with all insulating walls and applied magnetic field (EOF-Library), find analytical solution for this problem and compare with simulation results.
- Solve with conducting walls perpendicular to magnetic field.

Advanced

- Attempt to make your own improvements - decrease computational time, while maintaining accuracy; modify parameters and settings to further explore the problem and Elmer FEM, OpenFOAM &EOF-Library functionality.

Hints

- A reference solution in Ansys CFX and access to computer with licensed software is available to students registered to the course. Ask tutors for more info.

- Study pimpleFoam tutorials “/tutorials/incompressible/pimpleFoam
- Before jumping into turbulence modelling, calculate Reynolds number.
- To find all Elmer test cases that are using electromagnetic A-V solver WhitneyAVSolver call from Elmer’s source directory:

grep -r -i -n "WhitneyAVSolver" fem/tests/

Useful links

Elmer

- http://nic.funet.fi/index/elmer/doc/ElmerOverview.pdf
- http://www.nic.funet.fi/index/elmer/doc/ElmerSolverManual.pdf
- http://www.nic.funet.fi/index/elmer/doc/ElmerModelsManual.pdf
- http://www.elmerfem.org/forum/

OpenFOAM