Skip to content
Levi Kilcher edited this page May 28, 2013 · 13 revisions

Welcome to the pyTurbSim wiki.

pyTurbSim is designed to simulate water turbulence for tidal device simulations (HydroTurbSim) and to be a development and testing platform for NREL's original TurbSim tool. New spectral models can be implemented here relatively easily.

pyTurbSim (herafter pyTS) is a tool for producing spatial time-series (a sequence of 2-D planes) that are statistically similar to real oceanic and riverine Turbulence. In particular, pyTS is designed to produce time-series with energy spectra, spatial coherence, mean profile, tke profile, and Reynolds-stress profiles that are similar to real marine/river turbulence.

This software is copyrighted by the National Renewable Energy Laboratory. It is released publically under the Gnu GPLv3.

Adding Models

There are four primary statistical variables pyTurbSim is designed to control:

  1. Mean velocity profile (for each component),
  2. The turbulence spectrum (Power spectral density of turbulence for the 3 velocity components at each grid point),
  3. Spatial coherence (spatial correlations between grid points as a function of frequency),
  4. Reynold's stresses (cross-component correlation magnitude).

The mean velocity profile is implemented in the 'profModels' folder of the pyTS tool, all other variables are specified in the 'turbModels' folder. The profile and turbulence models can then be specified at runtime using an input file (config file)**. In general, the steps for defining and utilizing a new model (profile or turbulence) are:

  1. Create a new model file (e.g. newModel3.py) in the appropriate directory (profModels or turbModels). This file should import the mBase module in that directory.
  2. Define the new model (subclass of the module's base class).
  3. Specify the model in the input file.

For further details on this, see the 'newModel_example.py' file in the profModels and turbModels directories.

**While this approach is not very pythonic; it was designed to reproduce the existing TurbSim functionality. A more 'pythonic' interface (one that utilizes scripts rather than input files) will be developed over the summer.

Clone this wiki locally