Skip to content

jontateixeira/3rdParty-Stokes_LEoPart

 
 

Repository files navigation

LEoPart -- FEniCS functionality for scattered particle advection and projection

LEoPart integrates particle functionality into the open-source finite element library FEniCS. LEoPart is so much as to say Lagrangian-Eulerian on Particles, and might remind you of the animal with particles imprinted on its skin.

Main purpose of this library is to advect and project scattered particle data onto a mesh in an accurate and -optionally- (locally) conservative manner. By blending a finite element mesh and Lagrangian particles, the library enables to solve hyperbolic conservation laws in an accurate and conservative manner, yet free of numerical diffusion. Alternatively, LEoPart might come in handy if you just need to trace large numbers of particles on a fixed or moving mesh polygonal or polyhedral mesh.

As a bonus, this library shows how static condensation principles can be implemented in a rather efficient way in FEniCS.

For a detailed mathematical background of LEoPart reference is made to a series of papers. We would be grateful if you cite one of these references when using LEoPart:

[2] Maljaars et al., Conservative, high-order particle-mesh scheme with applications to advection-dominated flows, CMAME (2019), preprint available at arXiv

[1] Maljaars et al., A hybridized discontinuous Galerkin framework for high-order particle–mesh operator splitting of the incompressible Navier–Stokes equations, Journal of Computational Physics 358 (2018) 150-172


Dependencies

Requires FEniCS 2018.1.0 <www.fenicsproject.org>

Python 3


Package contents

The package source can be found in the directory ./source. The directory ./unit_tests contains unit tests for checking essential parts of the code. Various numerical examples, covering linear scalar advection and incompressible Navier-Stokes equations are included in the ./tests directory.


Documentation

Coming soon.


Old version

This repo serves as a better, cleaner and faster replacement of the purely Python based library, which is now hosted at https://bitbucket.org/jakob_maljaars/leopart_python

Automated testing

Circle CI is used to perform automated testing. Test status is:

CircleCI

Installation and executing the code

  1. Clone the repo via

    git clone git clone https://jakob_maljaars@bitbucket.org/jakob_maljaars/dolfinparticles.git
    

    Using Docker? See Step 2, otherwise go to Step 3

  2. If you want to use FEniCS in Docker, run

    [sudo] docker run -ti -v $(pwd):/home/fenics/shared quay.io/fenicsproject/stable:[2018.1.0.r1]
    

    from the directory where the clone is located.

  3. Compile the python wrapper:

    cd ./source/cpp
    cmake .
    make
    cd ../..
    
  4. Add library to your PYTHONPATH

    python3 setup.py install --prefix=[YOUR PYTHONPATH]
    

The code runs in parallel and test found in unit_tests/tests directory can be executed as

mpirun -np [N] python3 [YOUR_TEST].py

Application examples

Passive and active particle tracer modeling on fixed and moving meshes

Alt text

Mass and momentum conservative density tracking in multi-fluid flows:

Alt text

Users are encouraged to apply the code to suit their particular problem.


Contact

Any questions or suggestions? Feel free to contact the developers: j.m.maljaars at tudelft.nl / jakobmaljaars at gmail.com chris at bpi.cam.ac.uk

License

Copyright (C) 2018 Maljaars et al.

This software can be redistributed and/or modified under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (http://www.gnu.org/licenses/).

The software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

About

A mirror of LEoPart from https://bitbucket.org/jakob_maljaars/leopart/src/master/

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.8%
  • C++ 47.0%
  • CMake 0.2%