__init__(self,
r,
func,
dfunc=None,
order=3,
inner=0,
inner_eps=0.5,
*args,
**kwargs)
(Constructor)
| source code
|
Create an instance of the Temperature() class. Requires a radial grid
and a temperature function.
The function can also be given as an interp1d object.
The optional args and kwargs give the additional arguments for the
temperature function, which are ignored in case func is an interp1d
object.
An additional option concerns the extrapolation to smaller radii, e.g.
in the inner wind between the stellar surface and the dust condensation
radius. In this case, the eval/diff methods will differ between inner
wind (r<r0) and the rest of the wind (r>r0) in terms of
evaluation.
At r>r0: The given func (or interpolator) is used. At r<r0: A
Teps power law is used, for which 1 out of Tstar or epsilon can be
defined. The default sets epsilon == 0.5 (the optically thin case), but
inner_epsilon can be passed to the initialisation if needed. r0, T0 must
be defined in kwargs either for the main wind's Teps law, or as an
additional argument if a file is read.
r0 and T0 are usually passed as kwargs for the func. THey are used
here explicitly for the inner wind power law. If they are not given, the
defaults are used: r[0] and -- after T has been evaluated -- T[0]. In
case the func is interp_file, r0 and T0 can still be passed as kwargs but
they are then removed from the kwargs dict after extraction.
- Parameters:
r (array) - The radial points (cm)
func (function) - The function that describes the temperature 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)
inner (bool) - Applies a power law to the inner region, as a means of
extrapolation. Off by default, but can be turned on. In this
case, r0 is taken from kwargs, ie the r0 from the power law of
the wind (if Teps is chosen), or as an additional keyword if a
file is read.
(default: 0)
inner_eps (float) - The exponent for the power law in the inner wind.
(default: 0.5)
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__
|