The physics module¶
All physics-related functions.
-
netsalt.physics.
dispersion_relation_dielectric
(freq, params=None)[source]¶ Linear dispersion relation with dielectric constant.
- Parameters
freq (float) – frequency
params (dict) – parameters, must include ‘gamma_perp’ and ‘k_a’
-
netsalt.physics.
dispersion_relation_linear
(freq, params=None)[source]¶ Linear dispersion relation with wavespeed.
The dispersion relation is
\[\omega(k) = \frac{k}{c}\]- Parameters
freq (float) – frequency
params (dict) – parameters, must include wavespeed ‘c’
-
netsalt.physics.
dispersion_relation_pump
(freq, params=None)[source]¶ Dispersion relation with dielectric constant and pump.
If a pump is given in params
\[\omega(k) = k \sqrt{\epsilon + \gamma(k) D_0 \delta_\mathrm{pump}}\]otherwise
\[\omega(k) = k \sqrt{\epsilon}\]- Parameters
freq (float) – frequency
params (dict) – parameters, must include the dielectric_constant in params, if pump is in params, it must include D0 and necessary parameter for the computation of \(gamma\)
-
netsalt.physics.
gamma
(freq, params)[source]¶ Gamma function.
The gamma function is
\[\gamma(k) = \frac{\gamma_\perp}{ \mathrm{real}(k) - k_a + j\gamma_\perp}\]- Parameters
freq (float) – frequency
params (dict) – parameters, must include ‘gamma_perp’ and ‘k_a’
-
netsalt.physics.
q_value
(mode)[source]¶ Compute the \(\mathcal Q\) value of a mode.
It is defined as
\[\mathcal Q = \frac{\mathrm{Real} k}{2 \mathrm{Im}(k)}\]- Parameters
mode (complex) – complex values mode
-
netsalt.physics.
set_dielectric_constant
(graph, params, custom_values=None)[source]¶ Set dielectric constant in params, from dielectric constant or refraction index.
- Parameters
graph (networkx graph) – current graph
params (dict) – parameters
custom_values (list) – custum edge values for dielectric constant