Git Product home page Git Product logo

dongweiye / rom-with-geometry-informed-snapshots Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 406 KB

Non-intrusive reduced-order modeling with geometry-informed snapshots. Current based registration is applied to compute the diffeomorphism between snapshots.

License: MIT License

Python 100.00%
machinelearning reduced-order-modeling geometry-informed-snapshots data-driven-model hemodynamics

rom-with-geometry-informed-snapshots's Introduction

Non-intrusive reduced-order modelling with geometry-informed snapshots

DOI

This repository is associated to the publication of "Data-driven reduced-order modelling for blood flow simulations with geometry-informed snapshots".

This repository presents the implementation of two synthetic hemodynamics examples, stenosis and bifurcation in 2D. The implementation of the finite element simulation is based on open source FreeFEM and the surface registration is achieved by shape analysis software deformatrica. The non-intrusive reduced order models are constructed with proper orthogonal decomposition (POD) with radial basis function (RBF) interpolation.

The repository contains all the necessary information/data to reproduce the results. The detailed instructions are listed in the following section. The best environment would be Python 3.7 because that is the latest supported version of deformetrica and you may need manually drop out the unnecessary .decode('utf-8') in /your-directory-to-package/python3.7/site-packages/deformetrica/core/estimators/scipy_optimize.py.

Perform ROM with geometry-informed snapshots

Each example consists of three main procedures: preprocessing, finite element simulations and reduced-order modelling. Each step corresponds to a .py/.edp file:

  • preprocess.py contains the following functions (Example 2 is slightly different, check the comments in the corresponding file for details):

    • Generate samples for geometry variety
    • Shape and mesh generation based on samples (use file: MeshGeneration.edp & ReferMeshGeneration.edp)
    • Fetch boundary vertice of meshes
    • Surface registration (use folder: deformetrica_script, implemented via deformatrica)
    • Compute the mapping using RBF interpolation and save the data for FEM simulation
    • Parametrize the geometry and compute reduced parameters of geometry
  • We provide three .edp here:

    • ReferNS_steady_parallel.edp is designed for performing finite-element simulations (steady) with various shapes of domains on a reference domain (parallelized with PETSc). This step generates the geometry-informed snapshots for ROM (recommend to use). Implement with ff-mpirun -np 16 ReferNS_steady_parallel.edp -v 0 where 16 stands for the number of cores for mpi.
    • ReferNS_transient_parallel.edp is the transient version. It takes much more time to generate a steady solution, but can be used for time-dependent problems.
    • StandardNS.edp is the standard finite-element simulation for the flow on its original domain. It is used for validation of the solution achieved on the reference domain
  • ROM.py collects the snapshots data and constructs the ROM based on POD+RBF interpolation. The script also shows the prediction error on the validation and test dataset. The visualization results are saved in data/error directory in the form of .vtk.

Note that surface registration and finite elements are computationally expensive. It might take a long time

rom-with-geometry-informed-snapshots's People

Contributors

dongweiye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

whucsu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.