# Braginskii coefficients¶

A short example of how to calculate classical transport coefficients from Bragiński’s theory.

from astropy import units as u
from plasmapy.formulary import ClassicalTransport


We’ll use some sample ITER data, without much regard for whether the regime is even fit for classical transport theory:

thermal_energy_per_electron = 8.8 * u.keV
electron_concentration = 10.1e19 / u.m**3

thermal_energy_per_ion = 8.0 * u.keV
ion_concentration = electron_concentration
ion = 'D+'  # a crude approximation


We now make the default ClassicalTransport object:

braginskii = ClassicalTransport(thermal_energy_per_electron,
electron_concentration,
thermal_energy_per_ion,
ion_concentration,
ion)


Out:

/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/validators.py:372: ImplicitUnitConversionWarning: The argument 'T_e' to function __init__() has a non-standard unit conversion...converting keV to K
f"{err_msg} has a non-standard unit conversion..."
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/validators.py:372: ImplicitUnitConversionWarning: The argument 'T_i' to function __init__() has a non-standard unit conversion...converting keV to K
f"{err_msg} has a non-standard unit conversion..."
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/checks.py:1392: RelativityWarning: thermal_speed is yielding a velocity that is 18.561% of the speed of light. Relativistic effects may be important.
RelativityWarning,
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/checks.py:1392: RelativityWarning: V is yielding a velocity that is 18.561% of the speed of light. Relativistic effects may be important.
RelativityWarning,
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/checks.py:1392: RelativityWarning: thermal_speed is yielding a velocity that is 18.559% of the speed of light. Relativistic effects may be important.
RelativityWarning,
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/validators.py:350: UnitsWarning: The argument 'z_mean' to function collision_frequency() has no specified units. Assuming units of . To silence this warning, explicitly pass in an astropy Quantity (e.g. 5. * astropy.units.cm) (see http://docs.astropy.org/en/stable/units/)
f"{err_msg} has no specified units. Assuming units of "
/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/checks.py:1392: RelativityWarning: V is yielding a velocity that is 18.559% of the speed of light. Relativistic effects may be important.
RelativityWarning,


These variables are calculated during initialization and can be referred to straight away:

print(braginskii.coulomb_log_ei)
print(braginskii.coulomb_log_ii)
print(braginskii.hall_e)
print(braginskii.hall_i)


Out:

18.015542112815666
20.41557520752423
0.0
0.0


These quantities are not calculated during initialization and can be referred to via methods. To signify the need to calculate them, we call them via ().

print(braginskii.resistivity)
print(braginskii.thermoelectric_conductivity)
print(braginskii.electron_thermal_conductivity)
print(braginskii.ion_thermal_conductivity)


Out:

/home/docs/checkouts/readthedocs.org/user_builds/plasmapy/checkouts/latest/plasmapy/utils/decorators/validators.py:350: UnitsWarning: The argument 'z_mean' to function Coulomb_logarithm() has no specified units. Assuming units of . To silence this warning, explicitly pass in an astropy Quantity (e.g. 5. * astropy.units.cm) (see http://docs.astropy.org/en/stable/units/)
f"{err_msg} has no specified units. Assuming units of "
1.1541382845331304e-09 m Ohm
0.7110839986207994
1065176076.6192665 W / (K m)
21360464.463766705 W / (K m)


They also change with magnetization:

mag_braginskii = ClassicalTransport(thermal_energy_per_electron,
electron_concentration,
thermal_energy_per_ion,
ion_concentration,
ion,
B = 0.1 * u.T)

print(mag_braginskii.resistivity)
print(mag_braginskii.thermoelectric_conductivity)
print(mag_braginskii.electron_thermal_conductivity)
print(mag_braginskii.ion_thermal_conductivity)


Out:

1.1541382845331304e-09 m Ohm
0.7110839986207994
1065176076.6192665 W / (K m)
21360464.463766705 W / (K m)


They also change with direction with respect to the magnetic field. Here, we choose to print out, as arrays, the (parallel, perpendicular, and cross) directions. Take a look at the docs to ClassicalTransport for more information on these.

all_direction_braginskii = ClassicalTransport(thermal_energy_per_electron,
electron_concentration,
thermal_energy_per_ion,
ion_concentration,
ion,
B = 0.1 * u.T,
field_orientation = 'all')

print(all_direction_braginskii.resistivity)
print(all_direction_braginskii.thermoelectric_conductivity)
print(all_direction_braginskii.electron_thermal_conductivity)
print(all_direction_braginskii.ion_thermal_conductivity)


Out:

[1.15413828e-09 2.25078755e-09 1.39690568e-15] m Ohm
[7.11083999e-01 6.76676822e-13 5.46328992e-07]
[1.06517608e+09 2.08451764e-04 3.06777888e+02] W / (K m)
[2.13604645e+07 4.24754851e-03 2.69422221e+02] W / (K m)


The viscosities return arrays:

print(braginskii.electron_viscosity)
print(mag_braginskii.electron_viscosity)
print(braginskii.ion_viscosity)
print(mag_braginskii.ion_viscosity)


Out:

[16.29411376 16.28874805 16.28874805  0.          0.        ] Pa s
[1.62941138e+01 2.00480711e-25 8.01922844e-25 1.47442522e-12
2.94885044e-12] Pa s
[1271.38945503 1267.52435833 1267.52435833    0.            0.        ] Pa s
[1.27138946e+03 5.99222933e-17 2.39689173e-16 2.57162285e-07
5.14324570e-07] Pa s


Total running time of the script: ( 0 minutes 0.561 seconds)

Gallery generated by Sphinx-Gallery