Coder Social home page Coder Social logo

hendrik240298 / incremental_pod Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 3.5 MB

A straightforward prototype implementation of the incremental POD to demonstrate its use in reduced order modeling.

License: MIT License

Python 5.84% Jupyter Notebook 94.16%
proper-orthogonal-decomposition reduced-basis reduced-order-models

incremental_pod's Introduction

Incremental Proper Orthogonal Decomposition (iPOD) and its application to reduced order modeling (ROM)

Hendrik Fischer & Julian Roth (2023)

This repository contains a straightforward prototype implementation of the incremental POD to demonstrate its use in reduced order modeling.

The incremental POD algorithm

The implementation of the iPOD is based on our MORe DWR paper, which is mainly influenced by the work of Kühl et al. An excerpt of the algorithm is depicted below.

iPOD_algorithm

iPOD for reduced basis generation

The general idea of the incremental basis enrichment is to update the reduced basis whenever a new solution snapshot is available. Thus, we do not need to store all snapshots to build a basis, but can to it gradually with only the latest snapshot available. Leveraging this, we additionally introduce adaptive basis size determination and bunch updates. The latter bundles multiple snapshots for one update to improve performance. For further information, we refer to our work Fischer et al. and to Kühl et al.. Especially for an in-depth discussion of the algorithm and its parallelization, we refer to the latter.

We demonstrate the capability of the iPOD for on-the-fly reduced basis generation on the example of the Navier-Stokes equations. We borrow the full-order model from the FEniCS Project's incompressible NSE tutorial.

Executing the code

The easiest way to run this Jupyter Notebook is to use Google Colab. To open the notebook in Google Colab you can click on "iPOD_RB_generation.ipynb" and replace the word 'github' in the url with 'githubtocolab' or you can click on this link.

Results

navier-stokes

iPOD for reduced order modeling

For our incremental reduced order model we consider the heat equation problem from Section 5.2 from the MORe DWR paper. We have the domain $\Omega = (0,1) \times (0,1)$, homogeneous Dirichlet boundary conditions and initial conditions

$$ \begin{aligned} u(0,x) &= 0 \qquad \forall x \in \Omega, \\ u(t,x) &= 0 \qquad \forall x \in \partial \Omega, \end{aligned} $$

and the right hand side function

$$ f(t, x) := \begin{cases} \sin(4 \pi t) & \text{if } (x_1 - p_1)^2 + (x_2 - p_2)^2 < r^2,\\ 0 & \text{else}, \end{cases} $$

with $x = (x_1, x_2)$, midpoint $p = (p_1, p_2) = (\frac{1}{2}+\frac{1}{4} \cos(2 \pi t), \frac{1}{2}+\frac{1}{4} \sin(2 \pi t))$ and radius of the trajectory $r=0.125$.

Executing the code

The easiest way to run this Jupyter Notebook is to use Google Colab. To open the notebook in Google Colab you can click on "iPOD_ROM.ipynb" and replace the word 'github' in the url with 'githubtocolab' or you can click on this link.

Results

We run this code from $t = 0 s$ until $t = 5 s$ and we note that the first revolution of the heat source is completed after 1 second. Therefore, we see in the temporal evolution of the POD basis size that the reduced basis only grows in the first second and then remains constant.

heat_reduced_basis

We then see in the following video that our incremental reduced order solution is almost indistinguishable from the full order solution and the error is a few magnitudes smaller.

heat

Citation

@article{kuhl2024incremental,
    title = {An {I}ncremental {S}ingular {V}alue {D}ecomposition {A}pproach for {L}arge-{S}cale {S}patially {P}arallel \& {D}istributed but {T}emporally {S}erial {D}ata--{A}pplied to {T}echnical {F}lows},
    journal = {Comput. Phys. Commun.},
    volume = {296},
    pages = {109022},
    year = {2024},
    issn = {0010-4655},
    doi = {https://doi.org/10.1016/j.cpc.2023.109022},
    author = {Niklas K{\"u}hl and Hendrik Fischer and Michael Hinze and Thomas Rung},    
}

@article{FiRoWiChaFau2024,
    title = {{MORe} {DWR}: {Space}-time goal-oriented error control for incremental {POD}-based {ROM} for time-averaged goal functionals},
    journal = {J. Comput. Phys.},
    volume = {504},
    pages = {112863},
    year = {2024},
    issn = {0021-9991},
    doi = {https://doi.org/10.1016/j.jcp.2024.112863},
    author = {Hendrik Fischer and Julian Roth and Thomas Wick and Ludovic Chamoin and Amelie Fau},
}

Contact

Should you have any questions do not hesitate to send us an email at

Acknowledgements

This work arises from the Scientific Computing Group headed by Professor Thomas Wick at the Institute of Applied Mathematics at the Leibniz University Hannover. In addition to internal support and resources, we acknowledge the funding of the German Research Foundation (DFG) within the framework of the International Research Training Group on Computational Mechanics Techniques in High Dimensions GRK 2657 under Grant Number 433082294. In addition, Hendrik Fischer acknowledges the collaboration with the Institute for Fluid Dynamics and Ship Theory at the Hamburg University of Technology (TUHH).

incremental_pod's People

Contributors

hendrik240298 avatar mathmerizing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mathmerizing

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.