dipole_analyses module
Module contains dipole analysis functions for use in pycharge.
calculate_dipole_properties(dipole, first_index, plot=False, print_values=False)
Return the dipole's decay rate and frequency shift from kinetic energy.
The function calculates the modified decay rate (\gamma) and frequency shift (\delta_12) of the dipole by fitting these variables to the kinetic energy at each time step. The first index of the kinetic energy array used to calculate these parameters can be specified (calculations should only use performed using kinetic energy values after the dipoles in the simulation reach equilibrium.)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dipole |
Dipole
|
|
required |
first_index |
int
|
The first index of the kinetic energy array that is used to calculate the dipole properties. |
required |
plot |
bool
|
Plots the kinetic energy fit if |
False
|
print_values |
bool
|
Plots \gamma_12 and \delta_12 if |
False
|
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
\delta_12 and \gamma scaled by \gamma_0. |
Source code in pycharge/dipole_analyses.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
p_dipole_theory(r, d_12, omega_0, print_values=False)
Return \delta_12 and \gamma_12 of two identical coupled p-dipoles.
Calculates results from Green's function theory. The results are scaled by gamma_0. Both dipoles must have identical initial dipole moments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r |
float
|
Distance between two charges in dipole. |
required |
d_12 |
float
|
Distance between two dipoles. |
required |
omega_0 |
float
|
Natural angular frequency of dipole. |
required |
print_values |
bool
|
Prints \delta_12 and \gamma_12 if |
False
|
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
\delta_12 and \gamma_12 scaled by \gamma_0. |
Source code in pycharge/dipole_analyses.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
s_dipole_theory(r, d_12, omega_0, print_values=False)
Return \delta_12 and \gamma_12 of two identical coupled s-dipoles.
Calculates results from Green's function theory. The results are scaled by gamma_0. Both dipoles must have identical initial dipole moments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r |
float
|
Distance between two charges in dipole. |
required |
d_12 |
float
|
Distance between two dipoles. |
required |
omega_0 |
float
|
Natural angular frequency of dipole. |
required |
print_values |
bool
|
Prints \delta_12 and \gamma_12 if |
False
|
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
\delta_12 and \gamma_12 scaled by \gamma_0. |
Source code in pycharge/dipole_analyses.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |