You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- an **Indirect Reconstruction** algorithm to reconstruct non-observable fields
42
+
-**Proper Orthogonal Decomposition** with Projection and Interpolation for the Online Phase -> [`pyforce.offline.POD`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/offline/pod.html#POD), [`pyforce.online.pod_projection`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/online/pod_projection.html#PODproject), [`pyforce.online.pod_interpolation`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/online/pod_interpolation.html#PODI)
43
+
-**Generalised Empirical Interpolation Method**, either regularised with Tikhonov or not -> [`pyforce.offline.geim`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/offline/geim.html#GEIM), [`pyforce.online.geim`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/online/geim.html#GEIM), [`pyforce.online.tr_geim`](https://ermete-lab.github.io/ROSE-pyforce/_modules/pyforce/online/tr_geim.html#TRGEIM)
- an **Indirect Reconstruction** algorithm to reconstruct non-observable fields -> [`pyforce.online.indirect_recon`](https://ermete-lab.github.io/ROSE-pyforce/api/pyforce.online.html#module-pyforce.online.indirect_recon)
44
46
45
47
This package is aimed to be a valuable tool for other researchers, engineers, and data scientists working in various fields, not only restricted in the Nuclear Engineering world.
46
48
@@ -104,12 +106,18 @@ create a conda environment using `environment.yml`
104
106
cd ROSE-pyforce
105
107
conda env create -f pyforce/environment.yml
106
108
```
107
-
activate the environment and then install the package using `pip`
109
+
activate the environment and then install the package using `pip` (be aware than on PyPI there exists another package named *pyforce*, so be sure to install it from the cloned repository)
108
110
```bash
109
111
conda activate pyforce-env
110
-
python -m pip install pyforce/
112
+
cd pyforce/
113
+
python -m pip install .
111
114
```
112
115
116
+
## Package Structure
117
+
The package **pyforce** comprises 3 subpackages: *offline*, *online* and *tools*. The first two collect the main functionalities, in particular the different DDROM techniques; whereas, the last includes importing and storing functions (from *dolfinx* directly or mapping from OpenFOAM), some backend classes for the snapshots and the calculation of integrals/norms. In the following, some figures are sketching how the different classes are connected to each other during the offline and online phases.
118
+
119
+
More details on how the classes are connected to each other (both during the offline and online phases) can be found in the [docs](https://ermete-lab.github.io/ROSE-pyforce/theory.html#package-structure).
120
+
113
121
## Tutorials
114
122
The *pyforce* package is tested on some tutorials available in the [docs](https://ermete-lab.github.io/ROSE-pyforce/tutorials.html), including fluid dynamics and neutronics problems.
115
123
@@ -121,6 +129,45 @@ The *pyforce* package is tested on some tutorials available in the [docs](https:
121
129
122
130
The snapshots can be either generated by the user or be downloaded at the following link [](https://zenodo.org/records/15705990)
123
131
132
+
### Demo results
133
+
134
+
Two demo results are reported here for a quick overview of the package capabilities, for the POD with Interpolation and for the GEIM with Tikhonov Regularisation. More details can be found in the [docs](https://ermete-lab.github.io/ROSE-pyforce/tutorials.html).
135
+
136
+
-**POD** with **Interpolation** on the Laminar Flow over Cylinder tutorial: in the following block, a code-block will be reported to show how to generate the POD basis from a set of train snapshots (offline phase) and how to perform the online phase and the state reconstruction
-**GEIM** with **Tikhonov Regularisation** on the Multi-Group Neutron Diffusion tutorial: in the following block, a code-block will be reported to show how to generate the GEIM basis and sensors from a set of train snapshots (offline phase) and how to perform the online phase and the state reconstruction
Copy file name to clipboardExpand all lines: docs/installation.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Installation notes
2
2
3
-
**pyforce** has been tested on MacOS and Linux machines with **Python3.10**.
3
+
**pyforce** has been tested on MacOS and Linux machines with **Python3.10**, using **conda** as package manager. There is no direct support for Windows machines, but it can work using WSL2.
4
4
5
5
## Dependencies
6
6
The *pyforce* package requires the following dependencies:
Copy file name to clipboardExpand all lines: docs/theory.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,23 @@
1
1
# Theory and package structure
2
2
This section presents the main ideas behind Reduced Order Modelling (ROM) {cite:p}`Quarteroni2016, MadayChapter2020, Degen2020_conference`, focusing on data-driven paradigm of these techniques. Then, the structure of the package is presented showing how the different classes are connected to each other.
3
3
4
+
The following table summarises the main acronyms used throughout the documentation.
|**DA**| Data Assimilation | Methodology to combine model predictions with observational data to improve state estimates. |
9
+
|**DDROM**| Data-Driven Reduced Order Model | ROM built only from data without requiring explicit knowledge of the governing equations, including state estimation from sparse measurements. |
10
+
|**FOM**| Full Order Model | High-fidelity model, typically a discretized PDE, used to generate snapshots for ROM construction. |
11
+
|**GEIM**| Generalized Empirical Interpolation Method | State estimation method able to reconstruct the state from measurements and place sensors in a greedy way. |
12
+
|**IR**| Indirect Reconstruction | Technique to reconstruct non-observable fields from measurements of observable ones using ROM. |
13
+
|**ODE**| Ordinary Differential Equation | Mathematical equations involving functions of a single variable and their derivatives. |
14
+
|**PBDW**| Parametrized-Background Data-Weak formulation | Data assimilation approach combining a background model with experimental measurements in a variational framework. |
15
+
|**PDE**| Partial Differential Equation | Mathematical equations involving multivariable functions and their partial derivatives, governing many physical phenomena. |
16
+
|**POD**| Proper Orthogonal Decomposition | Technique to extract dominant modes from data/snapshots for reduced modelling. |
17
+
|**RB**| Reduced Basis | Set of basis functions derived from FOM snapshots to represent solutions in a low-dimensional space. |
18
+
|**ROM**| Reduced Order Model | Low-dimensional surrogate model that approximates high-fidelity simulations. |
19
+
|**SVD**| Singular Value Decomposition | Matrix factorization method used in POD to identify dominant spatial modes. |
20
+
4
21
## What is Reduced Order Modelling?
5
22
In scientific literature, the expression Reduced Order Modelling is related to a set of techniques devoted to the search for an optimal coordinate system onto which some parametric solutions of Partial Differential Equations (PDEs) - typically called High-Fidelity (HF) or Full Order Model (FOM) - can be represented. These methods are very useful in multi-query and real-time scenarios, when quick and efficient solutions of models are required, e.g. optimization, uncertainty quantification and inverse problems {cite:p}`Guo_Veroy2021, Degen2022`. Recently, with the developments in data-driven modelling, a lot of interest in the combination of data and models has been raised. ROM offers new opportunities both to integrate the model with experimental data in real-time and to define methods of sensor positioning, by providing efficient tools to compress the prior knowledge about the system coming from the parametrized mathematical model into low-dimensional forms.
6
23
@@ -26,7 +43,7 @@ Data-Driven Reduced Order Modelling (DDROM) {cite:p}`RMP_2024, DDMOR_CFR` is a s
26
43
27
44
The techniques implemented here follow the same underlying idea expressed in the Figure \ref{fig:darom}. They all share the typical offline/online paradigm of ROM techniques: the former is computationally expensive and it is performed only once, whereas the latter is cheap from the computational point of view and allows to have quick and reliable evaluations of the state of the system by merging background model knowledge and real evaluations of quantities of interest {cite:p}`MadayPBDW`.
28
45
29
-
During the offline (also called training) phase, a *high-fidelity* or Full Order Model (FOM), usually parameterised partial differential equations, is solved several times to obtain a collections of snapshots $\mathbf{u}_{FOM}\in\mathbb{R}^{\mathcal{N}_h}$, given $\mathcal{N}_h$ the dimension of the spatial mesh, which are dependent on some parameters $\boldsymbol{\mu}_n$; then, these snapshots are used to generate a reduced representation through a set of basis functions $\{\psi_n(\mathbf{x})\}$ of size $N$, in this way the degrees of freedom are decreased from $\mathcal{N}_h$ to $N$, provided that $\mathcal{N}_h>>N$. This allows for an approximation of any solution of the FOM as follows
46
+
During the offline (also called training) phase, a *high-fidelity* or Full Order Model (FOM), usually parameterised partial differential equations, is solved several times to obtain a collection of snapshots $\mathbf{u}_{FOM}\in\mathbb{R}^{\mathcal{N}_h}$, given $\mathcal{N}_h$ the dimension of the spatial mesh, which are dependent on some parameters $\boldsymbol{\mu}_n$; then, these snapshots are used to generate a reduced representation through a set of basis functions $\{\psi_n(\mathbf{x})\}$ of size $N$, in this way the degrees of freedom are decreased from $\mathcal{N}_h$ to $N$, provided that $\mathcal{N}_h>>N$. This allows for an approximation of any solution of the FOM as follows
@@ -41,7 +58,7 @@ The online phase aims to obtain a quick and reliable way a solution of the FOM f
41
58
The package **pyforce** comprises 3 subpackages: *offline*, *online* and *tools*. The first two collect the main functionalities, in particular the different DDROM techniques; whereas, the last includes importing and storing functions (from *dolfinx* directly or mapping from OpenFOAM), some backend classes for the snapshots and the calculation of integrals/norms. In the following, some figures are sketching how the different classes are connected to each other during the offline and online phases.
42
59
43
60
### Offline Phase
44
-
Once the snapshots have been generated and collected into the class `FunctionsList`, the aims of this phase consists in generating a proper reduced representation and obtain an optimal sensors configuration.
61
+
Once the snapshots have been generated and collected into the class `FunctionsList`, the aim of this phase consists in generating a proper reduced representation and obtain an optimal sensors configuration.
0 commit comments