Tutorials#
Preliminary: introduction on Nek5000 classical workflow
Let’s recall that working with Nek5000 involves:
setting up a directory with different files defining a simulation, in particular (for a case called
phill
),phill.usr
defining Fortran functions,phill.par
,phill.box
andSIZE
containing parameters,SESSION.NAME
, etc.running commands to create the mesh, compile and launch the simulation.
To restart a simulation or create another simulation from a previous one, other manual file manipulations are necessary.
Then, some output files can be analyzed and used to produce figures and movies.
Snek5000 is a unified framework providing a Python API and shell commands to help us for these different steps. These tutorials present how it works in practice.
Versions used in these tutorials:
!snek-info
Package Version
------- -------
snek5000 0.9.3.dev17+geae3ba7
fluiddyn 0.5.2
fluidsim_core 0.7.3
pymech 1.5.0
snakemake 7.32.3
Installed solvers: canonical, cbox, kth, nek, phill, tgv
- First step with
snek5000-phill
: setting up a simulation - Second step with
snek5000-phill
: Snakemake rules - Demo periodic hill (
snek5000-phill
solver): running a simulation from a script - Demo Taylor-Green vortex (
snek5000-tgv
solver) - Demo sidewall convection (
snek5000-cbox
solver) - Configuring compilation and execution
- Create your own Snek5000 solver, packaging your Nek5000 user source code
The snek5000-cbox repository contains scripts used for a real life study that can be interesting for any Snek5000 users.