Commit 16e2673b authored by albajacas_a's avatar albajacas_a

Resolve "Correct eV to eV/c for momentum in the manual"

parent c25b9e40
......@@ -79,7 +79,7 @@ latexmath:[p_{z}]). Momentum is given as
latexmath:[\beta_{x} \gamma], latexmath:[\beta_{y} \gamma] and
latexmath:[\beta_{z} \gamma], as in link:opalt#sec.opalt.variablesopalt[_OPAL-t_ variables].
|`INPUTMOUNITS` |`EV` (default for _OPAL-cycl_) |Use the units eV for
|`INPUTMOUNITS` |`EVOVERC` (default for _OPAL-cycl_) |Use the units eV/c for
the input momentum (latexmath:[p_{x}], latexmath:[p_{y}],
latexmath:[p_{z}]).
|=======================================================================
......
......@@ -150,12 +150,12 @@ VALUE, {KIP3_1L_vary, KIVU_vary_Z, KIG3U_vary_Z, KIG3O_vary_Z};
// Distributions //
//---------------------------------------------------------------------------------------------//
// Note: Distribution in eV need to be specified as EV in the parameter INPUTMOUNITS (see Opal
// Note: Distributions in eV/c need to be specified as EVOVERC in the parameter INPUTMOUNITS (see Opal
// Manual). Some from other sources are in BETA*GAMMA, thus have no units.
//For Single Particle
DistSP: DISTRIBUTION, TYPE = fromfile, FNAME = "spdist.opal",
INPUTMOUNITS = EV;
INPUTMOUNITS = EVOVERC;
//For Multiple Particles
DistSC: DISTRIBUTION, TYPE = fromfile, FNAME = "scdist.opal",
INPUTMOUNITS = NONE;
......
......@@ -150,12 +150,12 @@ VALUE, {KIP3_1L_vary, KIVU_vary_Z, KIG3U_vary_Z, KIG3O_vary_Z};
// Distributions //
//---------------------------------------------------------------------------------------------//
// Note: Distribution in eV need to be specified as EV in the parameter INPUTMOUNITS (see Opal
// Note: Distributions in eV/c need to be specified as EVOVERC in the parameter INPUTMOUNITS (see Opal
// Manual). Some from other sources are in BETA*GAMMA, thus have no units.
//For Single Particle
DistSP: DISTRIBUTION, TYPE = fromfile, FNAME = "spdist.opal",
INPUTMOUNITS = EV;
INPUTMOUNITS = EVOVERC;
//For Multiple Particles
DistSC: DISTRIBUTION, TYPE = fromfile, FNAME = "scdist.opal",
INPUTMOUNITS = NONE;
......
......@@ -325,13 +325,29 @@ link:distribution#sec.distribution.gaussdisttype[`GAUSS`] and
link:distribution#sec.distribution.binomialdisttype[`BINOMIAL`]
distribution types have changed from
previous versions of _OPAL_. However, legacy distribution commands
should work as before with one exception. If you are using _OPAL-cycl_
then your old input files will work just fine. However, if you are using
_OPAL-t_ then you will need to set the distribution attribute
should work as before as long as the momentum units are converted to
the current convention
(see section on link:distribution#sec.distribution.unitsdistattributes[`units`]).
[[sec.tutorial.change-in-momentum-units]]
==== Change in Momentum Units
Input momentum can be given without units i.e. as
latexmath:[\beta\gamma], or in eV/c. Up until OPAL 2.2
eV was used instead of eV/c, but this was changed since
eV is a unit of energy rather than momentum. To adapt old files
with momentum in eV, such that they can work for the newer OPAL
versions, the following formula can be used:
[latexmath]
++++
P[{eV/c}]c = mc^2\sqrt{(\frac{P[{eV}]}{mc^2} + 1)^2 - 1}
++++
and you will need to set the distribution attribute
link:distribution#sec.distribution.unitsdistattributes[`INPUTMOUNITS`] to:
----
INPUTMOUNITS = EV
INPUTMOUNITS = EVOVERC
----
// EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment