Skip to content
Snippets Groups Projects
Commit 890589ba authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

updates overview

parent e9a41f47
Branches
Tags
1 merge request!40Feature/documentation
......@@ -501,7 +501,7 @@ int kspace<be, dt>::filter(
* the large scales is approximately the same (within the inertial range)
* independently of the shape of the filter.
*
* This was done by hand, see [INSERT CITATION HERE] for details, with the
* This was done by hand, see [lalescu2018jfm]_ for details, with the
* results:
*
* \f[
......
......
......@@ -19,13 +19,10 @@ With TurTLE, the desire is to identify core functionality that should be
implemented in a library.
The core library can then be used by many problem-specific codes.
In this sense, the structuring of the code-base is non-standard.
The core functionality is implemented in C++ (classes useful for
describing working with fields or sets of particles), while a Python3
wrapper is used for generating "main" programmes to be linked against
the core library.
The core library uses a hybrid MPI/OpenMP approach for parallelization, and the Python3 wrapper
compiles this core library when being installed.
The core functionality is implemented in C++, while a Python3
wrapper is typically used for generating initial conditions and
light-weight post-processing.
The core library uses a hybrid MPI/OpenMP approach for parallelization.
Python3 "wrapper"
-----------------
......@@ -36,13 +33,6 @@ launching jobs and postprocessing data.
Classes defined in the Python3 package can be used to generate executable
codes, compile/launch them, and then for accessing and postprocessing
data with a full Python3 environment.
Code generation is quite straightforward, with C++ code snippets handled
as strings in the Python3 code, such that they can be combined in
different ways.
Once a "main" file has been written, it is compiled and linked against
the core library.
Depending on machine-specific settings, the code can then be launched
directly, or job scripts appropriate for queueing systems are generated
and submitted.
......@@ -50,16 +40,22 @@ and submitted.
C++ core library
----------------
TurTLE has a hierarchy of classes that provide prototypes for three basic tasks: perform a DNS, post-process existing data or test arbitrary functionality.
As a guiding principle, the distinct tasks and concepts involved in the numerical simulation in TurTLE are isolated as much as possible, which simplifies the development of extensions.
There are two types of simple objects.
Firstly, an abstract class encapsulates three elements: generic *initialization*, *do work* and *finalization* functionality.
Secondly, essential data structures (i.e. fields, sets of particles) and associated functionality (i.e. I/O) are provided by "building block"-classes.
The solver then consists of a specific arrangement of the building blocks.
The heterogeneous TurTLE development team benefits from the separation of generic functionality from building blocks:
TurTLE is naturally well-suited to the distribution of conceptually distinct work, in particular fully isolating projects such as, e.g., "implement new numerical method" from "optimize the computation of field statistics with OpenMP".
As already stated, TurTLE's main goal is to facilitate novel research
avenues.
To this end, there are two types of simple objects.
Firstly, children of an abstract class that encapsulates three elements: generic
*initialization*, *do work* and *finalization* functionality.
Secondly, essential data structures (i.e. fields, sets of particles) and
associated functionality (i.e. I/O) are provided by "building block"-classes.
Each TurTLE "solver" then consists of a specific arrangement of the building
blocks.
The heterogeneous TurTLE development team benefits from the separation of
generic functionality from building blocks:
TurTLE is naturally well-suited to the distribution of conceptually distinct
work, in particular fully isolating projects such as, e.g., "implement new
numerical method" from "optimize the computation of field statistics with
OpenMP".
---------
Equations
......@@ -67,15 +63,16 @@ Equations
The code uses a fairly standard pseudo-spectral algorithm to solve fluid
equations.
The incompressible Navier Stokes equations in velocity form are as
follows:
The incompressible Navier Stokes equations in velocity form (see the
`NSE` C++ class) are as follows:
.. math::
\partial_t \mathbf{u} + \mathbf{u} \cdot \nabla \mathbf{u} =
- \nabla p + \nu \Delta \mathbf{u} + \mathbf{f}
``TurTLE`` solves the vorticity formulation of these equations:
TurTLE also solves the vorticity formulation of these equations (see the
`NSVE` C++ class):
.. math::
\partial_t \mathbf{\omega} +
......@@ -155,9 +152,9 @@ wavenumbers:
kval[..., 1] = ky[:, None, None]
kval[..., 2] = kz[None, :, None]
--------
Tutorial
--------
----------------
Tutorial: basics
----------------
First DNS
---------
......@@ -179,6 +176,7 @@ This launches a simulation in the current folder, with the simulation
name "test".
The simulation itself should not take more than a few seconds, since
this is just a :math:`32^3` simulation run for 8 iterations.
The prior compilation step may take a bit longer.
First thing you can do afterwards is open a python console, and type
the following:
......@@ -237,8 +235,9 @@ In brief the following takes place:
various parameters are written.
``c`` also generates the various datasets that the backend code
will write into (statistics).
4. ``c`` writes a C++ file that is compiled and linked against
``libTurTLE``.
4. ``c`` writes a simple C++ file that is compiled and linked against
``libTurTLE`` (to be specific, it calls the :code:`main_code`
function defined in :code:`cpp/full_code/main_code.hpp`).
5. ``c`` executes the C++ code using the appropriate launcher (e.g. ``mpiexec``).
6. the C++ code actually performs the DNS, and outputs various
results into the ``<simname>.h5`` file. It also outputs the final
......@@ -251,11 +250,15 @@ file, and the dataset names should be reasonably easy to interpret, so
custom postprocessing codes can easily be generated.
--------------------
Scaling tests.
--------------------
-------------
Scaling tests
-------------
Our own scaling tests are reported in [lalescu2021arXiv]_.
Initial scaling data is available at (url coming soon).
For now you need to run a preliminary DNS of 8192 iterations using a
grid of :math:`128^3` points.
Please copy the files to the location `TURTLE_FIELD_DATABASE`.
Separately, please recompile TurTLE with the `TIMING_OUTPUT` cmake
......@@ -272,6 +275,7 @@ Afterwards, please run variations of the following command:
--src-wd ${TURTLE_FIELD_DATABASE} \
--src-iteration 8192
..
Available iterations for
* n = 128: 8192
......
......
......@@ -19,3 +19,13 @@ Bibliography
J. Comput. Phys.
**229**, 5862-5869, 2010
.. [lalescu2021arXiv] C. C. Lalescu, B. Bramas, M. Rampp and M. Wilczek
*An Efficient Particle Tracking Algorithm for Large-Scale Parallel
Pseudo-Spectral Simulations of Turbulence*.
`arXiv 2107.01104 (2021) <https://arxiv.org/abs/2107.01104>`_
.. [lalescu2018jfm] C. C. Lalescu and M. Wilczek
*Acceleration statistics of tracer particles in filtered turbulent fields*.
`J. Fluid Mech. 847, R2 (2018)
<https://doi.org/10.1017/jfm.2018.381>`_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment