pylag.windage module

WindageCalculators are used to determine the impact of windage on a particle’s velocity.

Note

windage is implemented in Cython. Only a small portion of the API is exposed in Python with accompanying documentation.

class pylag.windage.WindageCalculator

Bases: object

Abstract base class for PyLag windage calculators

get_velocity_wrapper(self, DataReader data_reader, DTYPE_FLOAT_t time, ParticleSmartPtr particle)

Python friendly wrapper for get_velocity()

The get_velocity() method must be implemented in the derived class.

Parameters
Returns

windage_velocity – Two component array giving the velocity due to windage.

Return type

NumPy array

class pylag.windage.ZeroDeflectionWindageCalculator(config)

Bases: WindageCalculator

Velocity proportional to wind velocity

Basic calcuator which returns a velocity proportional to the wind velocity: \(\mathbf{v}_{windage} = \alpha \mathbf{v}_{wwind}\), where \(\alpha\) is the wind factor and can be set in the run configuration file.

Parameters

config (ConfigParser) – Configuration object.

Variables
  • _config (ConfigParser) – Configuration object.

  • _wind_factor (float) – The wind factor, which should be a fraction of the wind speed.

pylag.windage.get_windage_calculator(config)

Factory method for windage calculators

Parameters

config (ConfigParser) – PyLag configuraton object

Returns

A windage calculator

Return type

WindageCalculator