Package ComboCode :: Package cc :: Package modeling :: Package profilers :: Module Velocity :: Class Velocity
[hide private]
[frames] | no frames]

Class Velocity

source code


An interface for a velocity profile and its derivative

Instance Methods [hide private]
 
__init__(self, r, func, dfunc=None, order=3, *args, **kwargs)
Create an instance of the Velocity() class.
source code

Inherited from cc.modeling.profilers.Profiler.Profiler: __call__, diff, eval

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, r, func, dfunc=None, order=3, *args, **kwargs)
(Constructor)

source code 

Create an instance of the Velocity() class. Requires a radial grid and a velocity function.

The function can also be given as an interp1d object.

The optional args and kwargs give the additional arguments for the velocity function, which are ignored in case func is an interp1d object.

Parameters:
  • r (array) - The radial points (cm)
  • func (function) - The function that describes the velocity profile. Can be given as an interp1d object.
  • dfunc (function/interp1d object) - The function that describes the derivative of the profile with respect to r. Can be given as an interp1d object. If None, a generic central difference is taken and interpolated.

    (default: None)

  • order (int) - Order of the spline interpolation. Default is cubic.

    (default: 3)

  • args (tuple) - Additional parameters passed to the functions when eval or diff are called.

    (default: [])

  • kwargs (dict) - Additional keywords passed to the functions when eval or diff are called.

    (default: {})

Overrides: object.__init__