ElementHandler

class PlasmaCalcs.mhd.multifluid.mhd_fluids.ElementHandler

Bases: object

MhdFluid which handles Elements, e.g. might have non-None self.element.

provides get_element, get_elements, neutral, ion, and saha_list.

Methods

get_element([default])

return self.element if it exists and is not None, else crash with FluidKeyError.

get_elements([default])

return list of elements in self.

ion([q])

return ionized Specie of self.get_element()

neutral(**kw_specie)

return neutral Specie of self.get_element().

saha_list(*[, istart])

return SpecieList of neutral & once-ionized ions of self.get_element().

Attributes

get_I

alias to neutral

get_II

alias to ion

element_cls

alias of Element

property get_I

alias to neutral

property get_II

alias to ion

get_element(default=NO_VALUE)

return self.element if it exists and is not None, else crash with FluidKeyError.

default: NO_VALUE or any value.
If provided, when element missing or None, return default instead of crash.
get_elements(default=NO_VALUE)

return list of elements in self.

The implementation here just returns [self.get_element(default=default)].
ion(q=1, **kw_specie)

return ionized Specie of self.get_element()

q: charge in elementary charge units. (default: +1)
neutral(**kw_specie)

return neutral Specie of self.get_element().

saha_list(*, istart=0, **kw_specie)

return SpecieList of neutral & once-ionized ions of self.get_element().

istart: start index for the SpecieList. Index affects conversion to int.
specie_cls

alias of Specie

specie_list_cls

alias of SpecieList