title: | | A free and open source computational tool | for solving differential equations in the cloud author: Germán Theler email: [email protected] institute: | | Mid-term evaluation, PhD in Nuclear Engineering | Instituto Balseiro, San Carlos de Bariloche, Argentina aspectratio: 169 lang: en-US theme: default innertheme: rectangles fonttheme: professionalfonts outertheme: number colorlinks: true sansfont: Carlito monofont: DejaVuSansMono header-includes: \include{syntax.tex} ...
\centering
- 2007 Fuzzy logic & chaotic natural convection loops @ IB
- 2008 Instabilities in the coupled neutronic-thermal-hydraulic problem @ IB
- 2008 TECNA---CNA2
- 2009 First attempt at PhD---v1
- 2010 Paper on stability of point kinetics @ Nuc. Eng. & Design
- 2010 First presentation of milonga at AATN
- 2011 First ME with milonga (mrivero) @ UBA
- 2011 IMEF
$\rightarrow$ milonga with FEM @ UBA - 2012 Paper generalized boiling channel @ ENIEF
- 2013 Monograph milonga FEM vs. FVM @ UBA
- 2013 Paper unstructured grids for neutron diffusion
- 2013 Doppler measurement @ CNA1---v2
- 2014 Design basis @ ENIEF
- 2014 Doppler measurement @ CNA2
- 2015 Workshop milonga @ CAC
- 2016 First PhD with milonga (vitor) @ Belo Horizonte
- 2017 Fatigue for LTE @ CNE
- 2018 Opportunity @ KAIST---second attempt at PhD
- 2020 Remote courses---third attempt at PhD
- 2021 FeenoX (v3)
\newcommand{\todonow}{\textcolor{Plum}{TO-DO}} \newcommand{\todolater}{\textcolor{Orange}{TO-DO}} \newcommand{\good}{\textcolor{OliveGreen}{$\checkmark$}} \newcommand{\bad}{\textcolor{red}{$\times$}} \newcommand{\neutral}{\textcolor{DarkBlue}{$\sim$}}
:::::::::::::: {.columns} ::: {.column width="25%"} \centering \onslide<1->{\includegraphics[height=2cm]{word}} :::
::: {.column width="25%"} \centering \onslide<3->{\includegraphics[height=2cm]{google_docs}} :::
::: {.column width="25%"} \centering \onslide<4->{\includegraphics[height=2cm]{markdown}} :::
::: {.column width="25%"} \centering \onslide<2->{\includegraphics[height=2cm]{tex}} ::: ::::::::::::::
\rowcolors{1}{black!10}{black!0}
Feature | \onslide<1->{Word} | \onslide<3->{Docs} | \onslide<4->{Markdown$^{*}$} | \onslide<2->{\TeX} |
---|---|---|---|---|
Aesthetics | \onslide<1->{\bad} | \onslide<3->{\bad} | \onslide<4->{\good} | \onslide<2->{\good} |
Convertibility | \onslide<1->{\neutral} | \onslide<3->{\neutral} | \onslide<4->{\good} | \onslide<2->{\neutral} |
Traceability | \onslide<1->{\bad} | \onslide<3->{\neutral} | \onslide<4->{\good} | \onslide<2->{\good} |
Mobile-friendliness | \onslide<1->{\bad} | \onslide<3->{\good} | \onslide<4->{\good} | \onslide<2->{\bad} |
Collaborative | \onslide<1->{\bad} | \onslide<3->{\good} | \onslide<4->{\good} | \onslide<2->{\neutral} |
Licensing/openness | \onslide<1->{\bad} | \onslide<3->{\bad} | \onslide<4->{\good} | \onslide<2->{\good} |
Non-nerd friendliness | \onslide<1->{\good} | \onslide<3->{\good} | \onslide<4->{\neutral} | \onslide<2->{\bad} |
\onslide<4->{\centering
:::::::::::::: {.columns} ::: {.column width="25%"} \centering \onslide<1->{\includegraphics[height=2cm]{prepomax}} :::
::: {.column width="25%"} \centering \onslide<3->{\includegraphics[height=2cm]{caeplex}} :::
::: {.column width="25%"} \centering \onslide<4->{\includegraphics[height=2cm]{feenox-logo}} :::
::: {.column width="25%"} \centering \onslide<2->{\includegraphics[height=2cm]{libraries}} ::: ::::::::::::::
\rowcolors{1}{black!10}{black!0}
Feature | \onslide<1->{Desktop GUIs} | \onslide<3->{Web frontends} | \onslide<4->{FeenoX$^{*}$} | \onslide<2->{Libraries} |
---|---|---|---|---|
Flexibility | \onslide<1->{\neutral} | \onslide<3->{\bad} | \onslide<4->{\good} | \onslide<2->{\good} |
Scalability | \onslide<1->{\bad} | \onslide<3->{\neutral} | \onslide<4->{\good} | \onslide<2->{\good} |
Traceability | \onslide<1->{\bad} | \onslide<3->{\neutral} | \onslide<4->{\good} | \onslide<2->{\good} |
Cloud-friendliness | \onslide<1->{\bad} | \onslide<3->{\good} | \onslide<4->{\good} | \onslide<2->{\good} |
Collaborative | \onslide<1->{\bad} | \onslide<3->{\good} | \onslide<4->{\neutral} | \onslide<2->{\bad} |
Licensing/openness | \onslide<1->{\good/\neutral/\bad} | \onslide<3->{\bad} | \onslide<4->{\good} | \onslide<2->{\good} |
Non-nerd friendliness | \onslide<1->{\good} | \onslide<3->{\good} | \onslide<4->{\neutral} | \onslide<2->{\bad} |
\onslide<4->{\centering
After a successful project with a foreign company I decided to structure the PhD based on a fictitious & imaginary "Request for Quotation" for a computational tool:
:::::::::::::: {.columns} ::: {.column width="35%"}
- Introduction
- 1.1. Objective
- 1.2. Scope
- Architecture
- 2.1. Deployment
- 2.2. Execution
- 2.3. Efficiency
- 2.4. Scalability
- 2.5. Flexibility
- 2.6. Extensibility
- 2.7. Interoperability :::
::: {.column width="50%"}
- Interfaces
- 3.1. Problem input
- 3.2. Results output
- Quality assurance
- 4.1. Reproducibility and traceability
- 4.2. Automated testing
- 4.3. Bug reporting and tracking
- 4.4. Verification
- 4.5. Validation
- 4.6. Documentation ::: ::::::::::::::
- A fictitious & imaginary tender applying to the SRS addressing each section.
:::::::::::::: {.columns} :::::: {.column width="50%"}
- Application to industrial problems
- Open source (to allow third-party V&V)
- First version should handle some problems
- Extensible to other problems & formulations
- Free (as in freedom to hire somebody to modify/extend it)
- Solve DAEs and/or PDEs
- Heat conduction
- Elasticity
- Electromagnetism
- Fluid mechanics
- ...
- State-of-the-art cloud friendly
::::::
. . .
:::::: {.column width="50%"}
-
Free as “software libre”
- GPLv3+
- Only FOSS dependencies
- Main target is
linux-x86_64
- Development environment is Debian \medskip
-
Initial version supports
- Dynamical systems (DAE)
- Laplace/Poisson/Helmholtz (FEM)
- Heat (FEM)
- Elasticity (FEM)
- Modal (FEM)
- Neutron transport and diffusion (FEM/FVM)
-
Templates for more formulations
- Electromagnetism
- Chemical diffusion/reaction
- Fluid mechanics?
:::::: ::::::::::::::
:::::::::::::: {.columns} :::::: {.column width="50%"}
- The problem should be defined programatically
- One or more input files (JSON, YAML, ad-hoc format), and/or
- An API for high-level language (Python, Julia, etc.)
- There is no need to include a GUI
- The tool should allow a GUI to be used
- Desktop
- Web
- Mobile
- The tool should allow a GUI to be used
- The mesh can be an input
- As long as its creation meets the SRS
- Include documentation about how a...
- Pre-processor should create inputs
- Post-processor should read outputs
::::::
. . .
:::::: {.column width="50%"}
-
No GUI, console binary executable
-
"Transfer-function"-like between I/O
-
English-like syntactic-sugared input files
- Nouns are definitions
- Verbs are instructions
-
Python & Julia API: \todolater
- But already taken into account in the design & implementation
-
Separate mesher
- Gmsh (GPLv2, meets SRS)
- Anything that writes
.msh
-
Possibility to use GUI
- CAEplex https://www.caeplex.com
:::::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="45%"}
Solve $$ \begin{cases} \dot{x} = \sigma \cdot (y - x) \ \dot{y} = x \cdot (r - z) - y \ \dot{z} = x y - b z \end{cases} $$
\noindent for
\noindent and
. . .
::: {.column width="55%"}
$ feenox lorenz.fee
0.000000e+00 -1.100000e+01 -1.600000e+01 2.250000e+01
2.384186e-07 -1.100001e+01 -1.600001e+01 2.250003e+01
4.768372e-07 -1.100002e+01 -1.600002e+01 2.250006e+01
[...]
3.997567e+01 4.442995e+00 3.764391e+00 2.347301e+01
3.998290e+01 4.399950e+00 3.886609e+00 2.314602e+01
3.999012e+01 4.368713e+00 4.016860e+00 2.282821e+01
$
::: ::::::::::::::
https://www.seamplex.com/feenox/videos/caeplex-ipad.mp4
:::::::::::::: {.columns} ::: {.column width="50%"}
\newcommand{\unix}{{\textcolor{cyan}{UNIX}}} \newcommand{\ruleof}[1]{{\textcolor{cyan}{Rule of {#1}}}} \newcommand{\ruleofpar}[1]{\vspace{-0.25cm}\hfill{\footnotesize\textcolor{cyan}{(Rule of {#1})}}}
- Should run on mainstream cloud servers
- GNU/Linux
- Multi-core Intel-compatible CPUs
- Several levels of memory cache
- A few Gb of RAM
- Several Gb of SSD
- Either
- Bare metal
- Virtualized
- Containerized
- Standard compilers, libraries and dependencies
- Available in common GNU/Linux repositories
- Preferable 100% open source
- Adhere to well-established standards
:::
. . .
::: {.column width="50%"}
-
Third-system effect (after v1 & v2)
-
\unix philosophy: "do one thing well"
- \ruleof{separation}: no GUI
- \ruleof{composition}: Gnuplot, Gmsh, ...
- ...more rules to come!
-
Third-party math libraries
- GNU GSL, PETSc, SLEPc, SUNDIALS
- \ruleof{modularity}
-
Dependencies available in APT
apt-get install git gcc make automake autoconf apt-get install libgsl-dev apt-get install lib-sundials-dev petsc-dev slepc-dev
-
Sources on github.com/seamplex/feenox
git clone https://github.com/seamplex/feenox
-
Autotools & friends for compilation
./autogen.sh && ./configure && make
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Small coarse problems should be run in single hosts to check inputs
- Local desktop/laptops (not needed but suggested)
- Windows and MacOS (not needed but suggested)
- Small cloud instances
- Large actual problems should be split into several hosts
- HPC clusters
- Scalable cloud instances
- Mobile devices (not needed but suggested)
- As control/monitoring devices :::
. . .
::: {.column width="50%"}
-
Tested on
- Raspberry Pi
- Laptop (GNU/Linux & Windows 10)
- Macbook
- Desktop PC
- Bare-metal servers
- Vagrant/Virtualbox
- Docker/Kubernetes
- AWS/DigitalOcean/Contabo
-
Parallelization: \todolater
- Gmsh partitioning with METIS
- PETSc/SLEPc with MPI
-
Web: https://www.caeplex.com (v2)
\centering {width=30%}
{width=30%}\raggedright
-
Mobile: \todolater ::: ::::::::::::::
\renewcommand{\vec}{\mathbf}
:::::::::::::: {.columns} ::: {.column width="50%"} \centering {height=8cm} ::: ::: {.column width="50%"}
-
Create a maze
-
Download it in PNG
-
Perform some conversions
- PNG
$\rightarrow$ PNM$\rightarrow$ SVG$\rightarrow$ DXF$\rightarrow$ GEO
$ wget http://www.mazegenerator.net/static/orthogonal_maze_with_20_by_20_cells.png $ convert orthogonal_maze_with_20_by_20_cells.png \ -negate maze.png $ potrace maze.pnm --alphamax 0 --opttolerance 0 \ -b svg -o maze.svg $ ./svg2dxf maze.svg maze.dxf $ ./dxf2geo maze.dxf 0.1
- PNG
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"} 5. Open it with Gmsh
![](gmsh-maze.png)\
- Add a surface
- Set physical curves for "start" and "end"
-
Mesh it
gmsh -2 maze.geo
:::
::: {.column width="50%"} \centering\includegraphics[height=8cm]{maze2.png} ::: ::::::::::::::
:::::::::::::: {.columns}
::: {.column width="50%"}
7. Solve
\vspace{-0.5cm}
```{.feenox include="maze/maze.fee"}
```
```terminal
$ feenox maze.fee
$
```
\ruleofpar{silence}
- Go to start and follow the gradient\
$\nabla \phi$ !
:::
::: {.column width="50%"} \only<1 | handout:0>{\centering\includegraphics[height=8cm]{maze2.png}}\only<2>{\centering\includegraphics[height=8cm]{maze3.png}} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
:::
::: {.column width="50%"}
http://www.mazegenerator.net/Examples.aspx
\centering {width=45%} \centering {width=45%}
\centering {width=45%} \centering {width=45%} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Automatically compile from source
- Particular optimization flags
- Availability of pre-compiled binaries
- Common architectures and options
- Both of them have to be available online
- Remote execution, either
- By a direct user action
- From a higher-level workflow
- Outer loops have to be supported
- scripted
- parametric
- optimization
- Ways to read data from the outer loop
- Ways to write scalar figures of merit
:::
. . .
::: {.column width="50%"}
-
Compile optimized dependencies
$ cd $PETSC_DIR $ export PETSC_ARCH=linux-fast $ ./configure --with-debug=0 COPTFLAGS="-Ofast" $ make -j8
-
Configure FeenoX with particular flags
$ git clone https://github.com/seamplex/feenox $ cd feenox $ ./autogen.sh $ export PETSC_ARCH=linux-fast $ ./configure MPICH_CC=clang CFLAGS=-Ofast $ make -j8 # make install
-
Or use pre-compiled binaries
wget http://gmsh.info/bin/Linux/gmsh-Linux64.tgz wget https://seamplex.com/feenox/dist/linux/feenox-linux-amd64.tar.gz
-
Everything is Docker-friendly
-
Execution examples follow
$\rightarrow$
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="60%"}
. . .
. . .
:::
. . .
::: {.column width="40%"}
$ feenox fibo_formula.fee | tee one
1 1
2 1
3 2
4 3
5 5
6 8
7 13
8 21
9 34
10 55
11 89
12 144
13 233
14 377
15 610
16 987
17 1597
18 2584
19 4181
20 6765
$ feenox fibo_vector.fee > two
$ feenox fibo_iterative.fee > three
$ diff one two
$ diff two three
$
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="60%"}
\ruleofpar{generation}
:::
::: {.column width="40%"}
- \ruleof{simplicity}
- Only one material, no need to link volumes with materials
E = 2.1e11 # Young modulus in Pa
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="20%"}
. . .
::: {.column width="40%"}
import math
import gmsh
import subprocess # to call FeenoX and read back
def create_mesh(r, w, l1, l2, n):
gmsh.initialize()
...
gmsh.finalize()
return len(nodes)
def main():
target = 440 # target frequency
eps = 1e-2 # tolerance
r = 4.2e-3 # geometric parameters
w = 3e-3
l1 = 30e-3
l2 = 60e-3
for n in range(1,7): # mesh refinement level
l1 = 60e-3 # restart l1 & error
error = 60
while abs(error) > eps: # loop
l1 = l1 - 1e-4*error
# mesh with Gmsh Python API
nodes = create_mesh(r, w, l1, l2, n)
# call FeenoX and read scalar back
# TODO: FeenoX Python API (like Gmsh)
result = subprocess.run(['feenox', 'fork.fee'], stdout=subprocess.PIPE)
freq = float(result.stdout.decode('utf-8'))
error = target - freq
print(nodes, l1, freq)
\ruleofpar{parsimony}
:::
::: {.column width="40%"}
\ruleofpar{simplicity}
. . .
$ python fork.py > fork.dat
$
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="47.5%"}
- Similar to to other tools in terms of
- CPU/GPU
- RAM
- Storage
- Small problems to check correctness
- Large problems in parallel
- Reasonable weak & strong scalability
- Engineering problems with
- Multiple materials
- Space-dependent properties
- Space & time-dependent BCs
- Handle point-wise data
- Properties
- Time-dependent scalars
:::
. . .
::: {.column width="52.5%"}
- First make it work, then optimize
- \ruleof{optimization}
- Premature optimization is the root of all evil
- Optimization: \todolater
- Parallelization: \todolater
- Comparison: \todolater
- Linear solvers
- Direct solver MUMPS
- Robust but not scalable
- GAMG-preconditioned KSP
- Near-nullspace improves convergence
- Direct solver MUMPS
- Non-linear & transient solvers
- Scalable as PETSc
- Written in ANSI C99 (no C++ nor Fortran)
- Autotools & friends, POSIX
- Tested with
gcc
,clang
andicc
- Rust & Go, can't tell (yet)
- \ruleof{transparency}
- Flexibility follows
$\rightarrow$ ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="45%"}
Solve heat conduction on the slab
\noindent and uniform conductivity. Compute
. . .
-
English self-evident ASCII input
- Syntactic sugar
- Simple problems, simple inputs
- Robust (
heat
orthermal
)
-
Mesh separated from problem
- Git-friendly
.geo
&.fee
- Git-friendly
-
Output is 100% user-defined
- No
PRINT
no output - \ruleof{silence}
- No
-
There is no node at
$x=1/2=0.5$ !
:::
::: {.column width="55%"}
\ruleofpar{composition}
\ruleofpar{simplicity}
$ gmsh -1 slab.geo
[...]
Info : 4 nodes 5 elements
Info : Writing 'slab.msh'...
[...]
$ feenox thermal-1d-dirichlet-uniform-k.fee
0.5
$
\ruleofpar{economy} :::
::::::::::::::
:::::::::::::: {.columns} ::: {.column width="45%"}
. . .
- Everything is an expression
- Similar problems need similar inputs
- \ruleof{least surprise}:
$k(x)=1+x$
:::
::: {.column width="55%"}
for i in uniform space temperature; do
feenox thermal-1d-dirichlet.fee ${i} > ${i}.dat
done
:::
::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
\ruleofpar{clarity} :::
. . .
::: {.column width="50%"}
- Volumes
$\Leftrightarrow$ materials now needed - FeenoX detects the problem is non-linear
- \todolater: roughish output ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
:::
. . .
::: {.column width="50%"}
$ feenox nafems-t3.fee
0.000 0.062 0.00 0.00
0.002 0.002 0.01 0.00
[...]
30.871 0.565 65.71 36.04
31.435 0.565 62.31 36.33
32.000 1.050 58.78 36.56
# result = 36.5636 ºC
$
::: ::::::::::::::
https://www.seamplex.com/feenox/videos/temp-valve-smooth.mp4
:::::::::::::: {.columns} ::: {.column width="45%"}
\vspace{-0.5cm}
|
|
---|---|
0 | 0 |
5 | 0 |
10 | 10 |
30 | 10 |
35 | 0 |
100 | 0 |
\vspace{-0.5cm}
\noindent for
. . .
::: {.column width="55%"}
$ feenox reactivity-from-table.fee > flux.dat
$
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
. . .
:::
. . .
::: {.column width="50%"}
$ feenox inverse-dae.fee flux.dat > inverse-dae.dat
$ feenox inverse-integral.fee flux.dat > inverse-integral.dat
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Possibility to add more features
- More PDEs
- New material models (i.e. stress-strain)
- Other element types
- Clear licensing scheme for extensions
- Ability to exchange data with other tools following this SRS
- Pre and post processors
- Optimization tools
- Coupled multi-physics calculations
:::
. . .
::: {.column width="50%"}
- Think for the future! \ruleof{extensibility}
- GPLv3**+**: the '+' is for the future
- Nice-to-haves: \todolater
- Lagrangian elements, DG,
$h$ -$p$ AMR, ...
- Lagrangian elements, DG,
- Other problems & formulations: \todolater
- Each PDE has an independent directory
- "Virtual methods" as function pointers
- Use Laplace as a template (elliptic)
- Coupled calculations: \todolater
- Wide experience from CNA2 (v2)
- Plain (RAM-disk) files
- Shared memory & semaphores
- MPI
- Interoperability
- Gnuplot, matplotlib, etc.
- Gmsh (+ Meshio), Paraview
- CAEplex
- PrePoMax, FreeCAD, ...: \todolater
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="60%"}
Solve
\ruleofpar{diversity}
:::
. . .
::: {.column width="40%"}
\centering \hspace{0.5cm}{width=70%}\
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Fully human-less execution
- Input files (1 or more)
- Output files (0 or more)
- Ability to remotely report status
- Progress
- Errors
- Problem fully defined in input files
- Ad-hoc syntax
- API for high-level languages
- Other files (data, meshes, scripts)
- Preferably ASCII (for DCVS)
- Avoid mixing problem and mesh data
- GUI not mandatory but possible
- Ok to have basic usage through GUI
- Advanced features through API
:::
. . .
::: {.column width="50%"}
- Already deployed industrial human-less production workflow (based on v2)
- There are ASCII progress bars
- Build matrix
- Solve equations
- Gradient recovery
- Heartbeat: \todolater
\medskip
- English self-evident ASCII input
- Syntactically-sugared
- Nouns are definitions
- Verbs are instructions
- Simple problems, simple inputs
- Similar problems, similar inputs
- Everything is an expression!
- \ruleof{least surprise}:
$f(x)=\frac{1}{2} \cdot x^2$ f(x) = 1/2 * x^2
- Expansion of command line arguments ::: ::::::::::::::
- Syntactically-sugared
https://www.seamplex.com/feenox/videos/caeplex-progress.mp4
:::::::::::::: {.columns} ::: {.column width="50%"}
:::
. . .
::: {.column width="50%"}
\ruleofpar{clarity}
$ gmsh -3 nafems-le10.geo
[...]
Info : Done meshing order 2 (Wall 0.433083s, CPU 0.414008s)
Info : 205441 nodes 59892 elements
Info : Writing 'nafems-le10.msh'...
$ feenox nafems-le10.fee
sigma_y @ D = -5.38361 MPa
$
\ruleofpar{economy} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
:::
. . .
::: {.column width="50%"}
\ruleofpar{least surprise}
$ gmsh -3 -clscale 0.5 nafems-le11.geo
[...]
Info : 8326 nodes 1849 elements
Info : Writing 'nafems-le11.msh'...
$ feenox nafems-le11.fee
sigma_z(A) = -105.043 MPa
$
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Clean output expected
- Do not clutter the output with
- ASCII art
- Notices
- Explanations
- Page separators
- Output should interpreted by both
- A human
- A computer
- Open standards and well-documented formats should be preferred
:::
. . .
::: {.column width="50%"}
- \ruleof{economy}: output is completely defined by the user
- \ruleof{silence}: no
PRINT
no output - ASCII columns
PRINT
&PRINT_FUNCTION
- Gnuplot & compatible
- Markdown/LaTeX tables
- Post-processing formats
.msh
.vtk
.vtu
: \todolater.hdf5
: \todolater.frd
: \todolater ?
- Dumping of vectors & matrices
- ASCII
- PETSc binary
- Octave (sparse)
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
For the model below, draw the sequence of loading and unloading for different levels of strains. All bars have the same geometry and elastic properties but different yield stresses.
for i in 1 2 3 4; do
feenox 3bars.fee ${i}
pyxplot 3bars.ppl
mv 3bars-sigma-vs-eps.pdf 3bars-sigma-vs-eps-${i}.pdf
done
:::
::: {.column width="50%"}
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"} \centering {width=80%} :::
::: {.column width="50%"} \centering {width=80%} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"} \centering {width=80%} :::
::: {.column width="50%"} \centering {width=80%} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="40%"}
Experimental Physics 101 (2004)
::: {.column width="60%"}
# compare the frequencies
PRINT " \$n\$ | FEM | Euler | Relative difference [%]"
PRINT ":----:+:------:+:-----:+:-----------------------:"
PRINT_VECTOR i f(2*i-1) f_euler 100*(f_euler(i)-f(2*i-1))/f_euler(i)
PRINT
PRINT ": $2 wire over $1 mesh, frequencies in Hz"
$ feenox wire.fee copper hex > copper-hex.md
$
: copper wire over hex mesh, frequencies in Hz
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="55%"}
:::
::: {.column width="45%"}
\vspace{1cm}
- Computation of NUREG-EPRI sample problem for Environmentally-assisted fatigue in NPP piping
\bigskip
- Top is a table from a publication by a multi-billion dollar agency
- Bottom is a PDF from FeenoX output piped through
- AWK
- \LaTeX
::: ::::::::::::::
https://www.seamplex.com/feenox/videos/pendulums.webm
https://www.seamplex.com/feenox/videos/sine.webm
https://www.seamplex.com/feenox/videos/mode5.mp4 https://www.seamplex.com/feenox/videos/mode6.mp4 https://www.seamplex.com/feenox/videos/mode7.mp4
:::::::::::::: {.columns} ::: {.column width="50%"} \centering :::
::: {.column width="50%"} \centering ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"} \centering :::
::: {.column width="50%"} \centering ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
::: ::: {.column width="50%"}
\vspace{1cm}
- One-group neutron transport
- The Stanford Bunny as the geometry
-
$S_2$ method in 3D (8 angular directions) - Finite elements for spatial discretization
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: :::::::::::::: :::::::::::::: {.columns} ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: ::: {.column width="25%"} \centering {height=2cm} ::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Generic good software QA practices
- Distributed version control system
- Automated testing suites
- User-reported bug tracking support
- Signed releases
- etc.
- Both the source and the documentation should be tracked with a DVCS
- Repository should be accessible online
- Might need credentials even for RO
- Version reporting
- Executables must allow
--version
- Libraries must provide an API call
- Executables must allow
- The files needed to solve a problem should be simple & traceable by a DVCS
:::
. . .
::: {.column width="50%"}
- Hosted on Github (
git
)- Previously on Bitbucket (
hg
) - Previously on Launchpad (
bzr
) - Previously on-premise (
svn
)
- Previously on Bitbucket (
- https://github.com/seamplex/feenox
- https://seamplex.com/feenox
- Mailing list (Google group)
- Build a community! \todolater
- Code of conduct
$ feenox
FeenoX v0.1.12-gb9a534f-dirty
a free no-fee no-X uniX-like finite-element(ish) computational engineering tool
usage: feenox [options] inputfile [replacement arguments]
[...]
$
-
-v
/--version
: copyright notice -
-V
/--versions
: linked libraries -
\ruleof{generation}: inputs from M4
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- A mean to test the code is mandatory
- After each change
- Check for regressions
- Problems with already-computed solutions
- Different from verification
- The compiler should not issue warnings
- Dynamic memory allocation checks are recommended
- Good practices are suggested
- Unit testing
- Continuous integration
- Test coverage analysis
- Users should be able to report bugs
- A task should be created for each report
- Address and document :::
. . .
::: {.column width="50%"}
-
Standard test suite
$ make check Making check in src [...] PASS: tests/trig.sh PASS: tests/vector.sh ============================================= Testsuite summary for feenox v0.1.12-gb9a534f ============================================= # TOTAL: 26 # PASS: 25 # SKIP: 0 # XFAIL: 1 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================= $
-
Periodic
valgrind
runs -
Integration tests: \todolater
-
CI & test coverage: \todolater
\medskip
- Github issue tracker
- Branching & merging procedures: \todolater
::: ::::::::::::::
:::::::::::::: {.columns} ::: {.column width="50%"}
- Code must be always verified
- Check it solves right the equations
- MES (mandatory)
- MMS (recommended)
- One test case has to be added to the automated testing
- Third-party verification should be allowed
- Per-problem documentation
- Code should be validated as required
- Check it solves the right equations
- Against experiments
- Against other codes
- Third-party validation should be allowed
- Per-application/industry documentation
- Procedures following standards
:::
. . .
::: {.column width="50%"}
-
There is a V&V report for the industrial human-less workflow project
- Medical devices
- Based on ASME V&V 40
-
There is a lot to do!
-
MES
- Set of well-known benchmarks
- NAFEMS, IAEA, etc.
-
MMS
- Everything is an expression
- Parametric runs
-
MESH_INTEGRATE
allows to compute$L_2$ norms directly in the.fee
\bigskip
- TL;DR: \todolater
::: ::::::::::::::
https://fusor.net/board/viewtopic.php?f=13&t=14087
:::::::::::::: {.columns} ::: {.column width="50%"}
- Documentation should be complete
- User manual
- Tutorial
- Reference
- Developer guide
- User manual
- Quick reference cards, video tutorials, etc. not mandatory but recommended
- Non-trivial mathematics and methods
- Explained
- Documented
- Should be available as hard copies and mobile-friendly online
- Clear licensing scheme for the documentation
- People extending the functionality ought to be able to document their work
::: ::: {.column width="50%"}
- FeenoX is not compact!
- Even I have to check the reference
- Commented sources: \todonow
- Keywords
- Functions
- Functionals
- Variables
- Material properties
- Boundary conditions
- Solutions
- Shape functions: \todonow
- Gradient recovery: \todonow
- Mathematical models: \todonow
\medskip
- Code is GPLv3+
- Documentation is GFDLv1.3+
::: ::::::::::::::
- closes a 15-year loop (2006--2021) with a third-system effect
- is to FEA what Markdown is to documentation
- is (so far) the only tool that fulfills 100% a fictitious SRS:
- Free and open source (GPLv3+)
- No recompilation needed
- Cloud and web friendly
- Human-less workflow
- follows the \unix philosophy: "do one thing well"
- is already usable (and used!)
- FeenoX v1.0 coincident with the PhD (\todonow)
- Laplace, heat, elasticity, modal, neutron transport & diffusion
- Every current feature is there because there was at least one need from an actual project
- Future versions online (\todolater)
- Electromagnetism? CFD? Schrödinger's equation?
- Python & Julia API
- Coupled & multiphysics computations
- Free and open-source online community
- FeenoX v1.0 coincident with the PhD (\todonow)