Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
5f87cc6a
Commit
5f87cc6a
authored
9 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
add slight improvement to tutorial
parent
d7ec1ffc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
documentation/_static/api.rst
+11
-0
11 additions, 0 deletions
documentation/_static/api.rst
documentation/_static/overview.rst
+31
-5
31 additions, 5 deletions
documentation/_static/overview.rst
with
42 additions
and
5 deletions
documentation/_static/api.rst
+
11
−
0
View file @
5f87cc6a
...
...
@@ -13,6 +13,17 @@ bfps.tools
:show-inheritance:
-------------
bfps.Launcher
-------------
.. autoclass:: Launcher.Launcher
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
-----------------
bfps.NavierStokes
-----------------
...
...
This diff is collapsed.
Click to expand it.
documentation/_static/overview.rst
+
31
−
5
View file @
5f87cc6a
...
...
@@ -107,6 +107,8 @@ this is just a :math:`32^3` simulation run for 8 iterations.
First thing you can do afterwards is open up a python console, and type
the following:
.. _sec-first-postprocessing:
.. code:: python
import numpy as np
...
...
@@ -123,9 +125,10 @@ the following:
(2*np.pi/c.parameters['nx']))))
print ('Tint = {0:.4e}, tauK = {1:.4e}'.format(c.statistics['Tint'],
c.statistics['tauK']))
data_file = c.get_data_file()
print ('total time simulated is = {0:.4e} Tint, {1:.4e} tauK'.format(
c.
data_file['iteration'].value*c.parameters['dt'] / c.statistics['Tint'],
c.
data_file['iteration'].value*c.parameters['dt'] / c.statistics['tauK']))
data_file['iteration'].value*c.parameters['dt'] / c.statistics['Tint'],
data_file['iteration'].value*c.parameters['dt'] / c.statistics['tauK']))
:func:`compute_statistics <NavierStokes.NavierStokes.compute_statistics>`
will read the data
...
...
@@ -143,7 +146,30 @@ it also saves some data into a ``<simname>_postprocess.h5`` file, and
then it also performs some time averages, yielding the ``statistics``
dictionary that is used in the above code.
What happened
-------------
Behind the scenes
-----------------
What happens, in brief, is the following:
1. An instance ``l`` of :class:`Launcher <Launcher.Launcher>` is created.
One of its members is an :class:`argparse.ArgumentParser`, and
it processes command line arguments given to the ``bfps`` script.
2. ``l`` generates a
:class:`NavierStokes <NavierStokes.NavierStokes>` object ``c``, with
reasonable DNS parameters constructed from the command line
arguments.
4. ``c`` generates a parameter file ``<simname>.h5``, into which the
various parameters are written.
``c`` also generates the various datasets that the backend code
will write into (statistics and other stuff).
3. ``c`` writes a C++ file that is compiled and linked against
``libbfps``.
4. ``c`` executes the C++ code using ``mpirun``.
5. the C++ code actually performs the DNS, and outputs various
results into the ``<simname>.h5`` file.
After the simulation is done, things in :ref:`sec-first-postprocessing`
are simpler.
In fact, any ``HDF5`` capable software can be used to read the data
file, and the dataset names should be reasonably easy to interpret.
Behind the scenes, something more complicated took place.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment