\chapter{The force betwen nucleons}
Even before describing any further experiments to study the force between two nucleons, we can already guess at a few of the properties of the nucleon-nucleon force:\\
\begin{enumerate}
	\item At short distances it is stronger than the Coulomb force: the nuclear force can overcome the Coulomb repulsion of protons in the nucleus.
	\item At long distances, of the order of atomic sizes, the nuclear force is negligibly feeble: the interactions among nuclei in a molecule can be understood based only on the Coulomb force.
	\item Some particles are immune from the nuclear force: there is no evidence from atomic structure, for example. that electrons feel the nuclear force at all.
	\item The nucleon-nucleon force seems to be nearly independent of whether the nucleons are neutrons or protons. This property is called charge independence.
	\item The nucleon-nucleon force depends on whether the spins of the nucleons are parallel or antiparallel.
	\item The nucleon-nucleon force includes a repulsive term. which keeps the nucleons at a certain average separation.
	\item The nucleon-nucleon force has a noncentral or tensor component. This part of the force does not conserve orbital angular momentum. which is a constant of the motion under central forces.
\end{enumerate}
\section{Properties of nuclear force(in detail)}
\subsection{ The Nucleon - Nucleon Interaction is Strongly Spin Dependent}
Until now we neglected the fact that both neutron and proton possess a spin. The question remains how the spin influences the interaction between the two particles. The total angular momentum for the deuteron (or in general for a nucleus) is usually denoted by $I$. Here it is given by
$$
\hat{\vec{I}}=\hat{\vec{L}}+\hat{\vec{S}}_{p}+\hat{\vec{S}}_{n}
$$
For the bound deuteron state $l=0$ and $\hat{\vec{I}}=\hat{\vec{S}}_{p}+\hat{\vec{S}}_{n}=\hat{\vec{S}}$. A priori we can have $\hat{\vec{S}}=0$ or 1 (recall the rules for addition of angular momentum, here $\hat{\vec{S}}_{p, n}=\frac{1}{2}$ ).
There are experimental signatures that the nuclear force depends on the spin. In fact the deuteron is only found with $\hat{\vec{S}}=1$ (meaning that this configuration has a lower energy).\\
\par The simplest form that a spin-dependent potential could assume is $V_{\text {spin }} \propto \hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}$ (since we want the potential to be a scalar). The coefficient of proportionality $V_{1}(r) / \hbar^{2}$ can have a spatial dependence. Then, we guess the form for the spin-dependent potential to be $V_{\text {spin }}=V_{1}(r) / \hbar^{2} \hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}$. What is the potential for the two possible configurations of the neutron and proton spins?
The configuration are either $\hat{\vec{S}}=1$ or $\hat{\vec{S}}=0$. Let us write $\hat{\vec{S}}^{2}=\hbar S(S+1)$ in terms of the two spins:
$$
\hat{\vec{S}}^{2}=\hat{\vec{S}}_{p}^{2}+\hat{\vec{S}}_{n}^{2}+2 \hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}
$$
The last term is the one we are looking for:
$$
\hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}=\frac{1}{2}\left(\hat{\vec{S}}^{2}-\hat{\vec{S}}_{p}^{2}-\hat{\vec{S}}_{n}^{2}\right)
$$
Because $\hat{S}^{2}$ and $\hat{\vec{S}}_{p}^{2}, \hat{\vec{S}}_{n}^{2}$ commute, we can write an equation for the expectation values wrt eigenfunctions of these operators 10 :
$$
\left\langle\hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}\right\rangle=\left\langle S, S_{p}, S_{n}, S_{z}\left|\hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}\right| S, S_{p}, S_{n}, S_{z}\right\rangle=\frac{\hbar^{2}}{2}\left(S(S+1)-S_{p}\left(S_{p}+1\right)-S_{n}\left(S_{n}+1\right)\right)
$$
since $S_{p, n}=\frac{1}{2}$, we obtain
$$
\left\langle\hat{\vec{S}}_{p} \cdot \hat{\vec{S}}_{n}\right\rangle=\frac{\hbar^{2}}{2}\left(S(S+1)-\frac{3}{2}\right)=\begin{array}{ll}
+\frac{\hbar^{2}}{4} & \text { Triplet State, }\left|S=1, \frac{1}{2} \frac{1}{2}, m_{z}\right\rangle \\
-\frac{3 \hbar^{2}}{4} & \text { Singlet State, }\left|S=0, \frac{1}{2}, \frac{1}{2}, 0\right\rangle
\end{array}
$$
If $V_{1}(r)$ is an attractive potential $(<0)$, the total potential is $\left.V_{n u c}\right|_{S=1}=V_{T}=V_{0}+\frac{1}{4} V_{1}$ for a triplet state, while its strength is reduced to $\left.V_{n u c}\right|_{S=0}=V_{S}=V_{0}-\frac{3}{4} V_{1}$ for a singlet state. How large is $V_{1}$ ?
We can compute $V_{0}$ and $V_{1}$ from knowing the binding energy of the triplet state and the energy of the unbound virtual state of the singlet (since this is very close to zero, it can still be obtained experimentally). We have $E_{T}=-2.2 \mathrm{MeV}$ (as before, since this is the experimental data) and $E_{S}=77 \mathrm{keV}$. Solving the eigenvalue problem for a square well, knowing the binding energy $E_{T}$ and setting $E_{S} \approx 0$, we obtain $V_{T}=-35 \mathrm{MeV}$ and $V_{S}=-25 \mathrm{MeV}(\mathrm{Notice}$ that of course $V_{T}$ is equal to the value we had previously set for the deuteron potential in order to find the correct binding energy of $2.2 \mathrm{MeV}$, we just -wrongly- neglected the spin earlier on). From these values by solving a system of two equations in two variables:
$$
\left\{\begin{array}{l}
V_{0}+\frac{1}{4} V_{1}=V_{T} \\
V_{0}-\frac{3}{4} V_{1}=V_{S}
\end{array}\right.
$$
we obtain $V_{0}=-32.5 \mathrm{MeV} V_{1}=-10 \mathrm{MeV}$. Thus the spin-dependent part of the potential is weaker, but not negligible.
\subsection{The Internucleon Potential Includes a Noncentral Term, Known as a Tensor Potential}
Evidence for the tensor force comes primarily from the observed quadrupole moment of the ground state of the deuteron. An s-state $(\ell=0)$ wave function is spherically symmetric; the electric quadrupole moment vanishes. Wave functions with mixed $\ell$ states must result from noncentral potentials. For a single nucleon, the choice of a certain direction in space is obviously arbitrary; nucleons do not distinguish north from south or east from west. The only reference direction for a nucleon is its spin, and thus only terms of the form $s \cdot r$ or $s \times \boldsymbol{r}$, which relate $r$ to the direction of $s$, can contribute. To satisfy the requirements of parity invariance, there must be an even number of factors of $r$, and so for two nucleons the potential must depend on terms such as $\left(s_{1} \cdot \boldsymbol{r}\right)\left(s_{2} \cdot \boldsymbol{r}\right)$ or $\left(s_{1} \times \boldsymbol{r}\right) \cdot\left(s_{2} \times \boldsymbol{r}\right)$.
Using vector identities we can show that the second form can be written in terms of the first and the additional term $s_{1} \cdot s_{2}$, which we already included in $V(r)$. Thus without loss of generality we can choose the tensor contribution to the internucleon potential to be of the form $V_{\mathrm{T}}(r) S_{12}$, where $V_{\mathrm{T}}(r)$ gives the force the proper radial dependence and magnitude, and
$$S_{12}=3\left(s_{1} \cdot r\right)\left(s_{2} \cdot r\right) / r^{2}-s_{1} \cdot s_{2}$$
which gives the force its proper tensor character and also averages to zero over all angles.
\subsection{ The Nucleon - Nucleon Force Is Charge Symmetric}
This means that the proton-proton interaction is identical to the neutron-neutron interaction, after we correct for the Coulomb force in the proton-proton system. Here "charge" refers to the character of the nucleon (proton or neutron) and not to electric charge. Evidence in support of this assertion comes from the equality of the pp and nn scattering lengths and effective ranges. Of course. the pp parameters must first be corrected for the Coulomb interaction. When this is done, the resulting singlet pp parameters are
 \begin{align*}
	&a=-17.1 \pm 0.2 \mathrm{fm} \\
	&r_{0}=2.84 \pm 0.03 \mathrm{fm}
\end{align*}
These are in very good agreement with the measured nn parameters ( $a=-16.6$ $\pm 0.5 \mathrm{fm}, r_{0}=2.66 \pm 0.15 \mathrm{fm}$ ). which strongly supports the notion of charge symmetry.
\subsection{The Nucleon - Nucleon Force Is Nearly Charge Independent}
After correcting for the electromagnetic interaction, the forces between nucleons (pp, nn, or np) in the same state are almost the same.
The force between a pair of protons, a pair of neutrons, and a pair of neutrons and protons are equal.
$$
F(n-n)=F(p-p)=F(n-p)
$$
The net force between pair of neutrons and a pair of neutron and proton is equal. This is slightly greater than the force between pair of protons because force between protons is reduced due to electrostatic repulsion
Net force $F(n-n)=$ Net force $F(n-p)>$ Net force $F(p-p)$
\subsection{The Nucleon-Nucleon Interaction Becomes Repulsive at Short Distances}
This conclusion follows from qualitative considerations of the nuclear density: as we add more nucleons, the nucleus grows in such a way that its central density remains roughly constant, and thus something is keeping the nucleons from crowding too closely together.
\section{The Deuteron}
A deuteron ( ${ }^{2} \mathrm{H}$ nucleus) consists of a neutron and a proton. (A neutral atom of ${ }^{2} \mathrm{H}$ is called deuterium.) It is the simplest bound state of nucleons and therefore gives us an ideal system for studying the nucleon-nucleon interaction. For nuclear physicists, the deuteron should be what the hydrogen atom is for atomic physicists. Just as the measured Balmer series of electromagnetic transitions between the excited states of hydrogen led to an understanding of the structure of hydrogen, so should the electromagnetic transitions between the excited states of the deuteron lead to an understanding of its structure. Unfortunately. there are no excited states of the deuteron-it is such a weakly bound system that the only "excited states" are unbound systems consisting of a free proton and neutron.
\subsection{Binding Energy}
The binding energy of the deuteron is a very precisely measured quantity. which can be determined in three different ways.\\
\textbf{First method}\\
The following determinations have been made (we use the symbol $\mathrm{D}$ for ${ }^{2} \mathrm{H}$ ):
$$
m\left(\mathrm{C}_{6} \mathrm{H}_{12}\right)-m\left(\mathrm{C}_{6} \mathrm{D}_{6}\right)=(9.289710 \pm 0.000024) \times 10^{-3} \mathrm{u}
$$
and
$$
m\left(C_{5} D_{12}\right)-m\left(C_{6} D_{6}\right)=(84.610626 \pm 0.000090) \times 10^{-3} \mathrm{u}
$$
From the first difierence we find. using $1.007825037 \mathrm{u}$ for the ${ }^{1} \mathrm{H}$ mass.
$$
m\left({ }^{2} \mathrm{H}\right)=2.014101789 \pm 0.000000021 \mathrm{u}
$$
and from the second.
$$
m\left({ }^{2} \mathrm{H}\right)=2.014101771 \pm 0.000000015 \mathrm{u}
$$
These precise values are in very good agreement.\\
\textbf{second method}\\
 And using the measured ${ }^{1} \mathrm{H}$ and neutron masses we can find the binding energy
 $$
 B=\left[m\left({ }^{1} \mathrm{H}\right)+m(\mathrm{n})-m\left({ }^{2} \mathrm{H}\right)\right] c^{2}=2.22463 \pm 0.00004 \mathrm{MeV}
 $$
 \textbf{Third method}\\
 We can also determine this binding energy directly by bringing a proton and a neutron together to form ${ }^{2} \mathrm{H}$ and measuring the energy of the $\gamma$-ray photon that is emitted:
 $$
 { }^{1} \mathrm{H}+\mathrm{n} \rightarrow{ }^{2} \mathrm{H}-\gamma
 $$
 The deduced binding energy. which is equal to the observed energy of the photon less a small recoil correction. is $2.224589 \pm 0.000002 \mathrm{MeV}$, in excellent agreement with the mass spectroscopic value.
 \subsection{Spin and parity}
 The total angular momentum $I$ of the deuteron should have three components: the individual spins $s_{\mathrm{n}}$ and $s_{\mathrm{p}}$ of the neutron and proton (each equal to $\frac{1}{2}$ ), and the orbital angular momentum $\ell$ of the nucleons as they move about their common center of mass:
 $$
 \boldsymbol{I}=\boldsymbol{s}_{\mathrm{n}}+s_{\mathrm{p}}+\ell
 $$
 When we solved the Schrödinger equation for the deuteron, we assumed $\ell=0$ in analogy with the lowest bound state (the $1 \mathrm{~s}$ state) in atomic hydrogen. The measured spin of the deuteron is $I=1$. Since the neutron and proton spins can be either parallel (for a total of 1 ) or antiparallel (for a total of zero), there are four ways to couple $s_{\mathrm{n}} . s_{\mathrm{p}}$. and $t$ to get a total $I$ of 1 :\\\\
 (a) $s_{n}$ and $s_{p}$ parallel with $\ell=0$.\\
 (b) $s_{n}$ and $s_{p}$ antiparallel with $l=1$.\\
 (c) $s_{\mathrm{n}}$ and $s_{\mathrm{p}}$ parallel with $l=1$.\\
 (d) $s_{n}$ and $s_{p}$ parallel with $l=2$.\\
 Another property of the deuteron that we can determine is its parity (even or odd). the behavior of its wave function when $r \rightarrow-r$. By studving the reactions involving deuterons and the property of the photon emitted during the formation of deuterons. we know that its parity is even. The observed even parity allows us to eliminate the combinations of spins that include $t=1$. leaving $\ell=0$ and $t=2$ as possibilities. The spin and parity of the deuteron are therefore consistent with $t=0$ as we assumed. but of course we cannot vet exclude the possibility of $t=2$.
 \subsection{Magnetic dipole moment}
 We knoe that the spin and orbital contributions to the magnetic dipole moment. If the $t=0$ assumption is correct. there should be no orbital contribution to the magnetic moment. and we can assume the total magnetic moment to be simply the combination of the neutron and proton magnetic moments:
 \begin{align*}
 \mu &=\mu_{n}+\mu_{p} \\
 &=\frac{g_{s n} \mu_{N}}{\hbar} s_{n}+\frac{g_{s p} \mu}{\hbar} s_{p}
 \end{align*}
 where $g_{\text {on }}=-3.826084$ and $g_{s p}=5.585691$. we take the observed magnetic moment to be the z component of $\mu$ when the spins have their maximum value $\left(+\frac{1}{2} \hbar\right)$ :
 \begin{align*}
 \mu &=\frac{1}{2} \mu_{N}\left(g_{s n}+g_{s p}\right) \\
 &=0.879804 \mu_{N}
 \end{align*}
 The observed value is $0.8574376 \pm 0.0000004 \mu_{\mathrm{N}}$, in good but not quite exact agreement with the calculated value. The small discrepancy can be ascribed to any of a number of factors, such as contributions from the mesons exchanged between the neutron and proton; in the context of the present discussion, we can assume the discrepancy to arise from a small mixture of $\mathrm{d}$ state $(\ell=2)$ in the deuteron wave function:
 $$\psi=a_{\mathrm{s}} \psi(\ell=0)+a_{\mathrm{d}} \psi(\ell=2)$$
Calculating the magnetic moment from this wave function gives
$$
\mu=a_{\mathrm{s}}^{2} \mu(\ell=0)+a_{\mathrm{d}}^{2} \mu(\ell=2)
$$
where $\mu(\ell=0)$ is the value calculated above and $\mu(\ell=2)=\frac{1}{4}\left(3-g_{s \mathrm{p}}\right.$ $\left.-g_{s \mathrm{n}}\right) \mu_{\mathrm{N}}$ is the value calculated for a d state. The observed value is consistent with $a_{\mathrm{s}}^{2}=0.96, a_{\mathrm{d}}^{2}=0.04$; that is, the deuteron is $96 \% \ell=0$ and only $4 \% \quad \ell=2$. The assumption of the pure $t=0$ state, which we made in calculating the well depth, is thus pretty good but not quite exact.
\subsection{Electric Quadrupole Moment}
The bare neutron and proton have no electric quadrupole moment. and so any measured nonzero value for the quadrupole moment must be due to the orbital motion. Thus the pure $t=0$ wave function would have a vanishing quadrupole moment. The observed quadrupole moment is
$$
Q=0.00288 \pm 0.00002 \mathrm{~b}
$$
which. while small by comparison with many other nuclei. is certainly not zero.
\section{Nucleon Nucleon potential}
The exact mathematical form of the interaction potential is not known.One approximate such a strong short range spherically symmetric potential by one of the following expressions.
\begin{enumerate}
	\item \textbf{Rectangular well potential}\\
	\begin{align*}
		V &=-V_{0} \text { for } r \leq b \\
		&=0 \text { for } r>b
	\end{align*}
	Often used in calculation, where $V_{0}>0$ and $b$ is the radius of the well.
	\item \textbf{Expotential Well Potential}
	$$
	V=-V_{0} \exp \left(-\frac{r}{b}\right)
	$$
	\item \textbf{Yukuwa Potetial}
	$$
	V=-\left\{\frac{V_{0}}{r / b}\right\} \exp \left(-\frac{r}{b}\right)
	$$
	\item \textbf{Wooden -Saxon Potential}
	$$
	V=-\frac{V_{0}}{\left[1+\exp \left\{-\frac{(r-b)}{c}\right\}\right]}
	$$
	Where $c$ is constant and representing the skin depth.
	\begin{figure}[H]
		\centering
		\includegraphics[height=3cm,width=12cm]{diagram-20220309(1)-crop}
		\caption{The four forms of nucleons potential:(a)Rectangular potential (b)Exponential potential(c)Yukawa potential (d)Wools-saxon potential well}
		\label{}
	\end{figure}
\end{enumerate}
 \section{The exchange force model}
 \begin{enumerate}
 	\item There are two principal arguments in support of the presence of exchange forces in nuclei. The first comes from the saturation of nuclear forces. The experimental support for saturation comes from the relatively constant nuclear density and binding energy per nucleon as we go to heavier nuclei. A given nucleon seems to attract only a small number of near neighbors, but it also repels at small distances to keep those neighbors from getting too close.
 	\item Another argument in favor of the exchange force model comes from the study of $\mathrm{np}$ scattering at high energies. There is a strong peak in the cross section at forward angles near $\theta^{\circ}$. corresponding to a small momentum transfer between the projectile and the target.
 	\item In summary, both the saturation of nuclear forces and the strong backward peak in np scattering are explained by exchange forces. In the former case. "something" is exchanged between nucleons to produce a sort of saturated bond. In the second case. "something" is exchanged between nucleons and actually changes their character.
 	\item according to quantum field theory. the first object does not set up a classical field throughout space but instead emits field quanta. The second object can then absorb those field quanta (and reemit them back to the first object). The two objects interact directly with the exchanged field quanta and therefore indirectly with each other.
 	\item In view of the preceding statement, it is natural to associate the "something" that is exchanged in the nucleon-nucleon interaction with quanta of the nuclear field. For a spin- $\frac{1}{2}$ neutron to turn into a spin- $\frac{1}{2}$ proton, it is clear that the exchanged particle must have integral spin $(0$ or 1$)$ and must carry electric charge.
 	\item  Let us assume that a nucleon (which we denote by $N$, to include both neutrons and protons) emits a particle $X$. A second nucleon absorbs the particle $X$ :
 	$$
 	\begin{aligned}
 	\mathrm{N}_{1} & \rightarrow \mathrm{N}_{1}+\mathrm{X} \\
 	\mathrm{X}+\mathrm{N}_{2} & \rightarrow \mathrm{N}_{2}
 	\end{aligned}
 	$$
 	\item How is it possible for a nucleon to emit a particle of mass energy $m_{x} c^{2}$ and still remain a nucleon, without violating conservation of energy? It is not possible, unless the emission and reabsorption take place within a short enough time $\Delta t$ that we are unaware energy conservation has been violated. Since the limits of our ability to measure an energy (and therefore to determine whether energy is conserved) are restricted by the uncertainty principle, if $\Delta t<\hbar /\left(m_{\mathrm{r}} c^{2}\right)$, we will be unaware that energy conservation has been violated by an amount $\Delta E=m_{x} c^{2}$. The maximum range of the force is determined by the maximum distance that the particle $\mathrm{x}$ can travel in the time $\lambda t$. If it moves at speeds of the order of $c$. then the range $R$ can be at most
 	$$R=c \Delta_{t}=\frac{\hbar c}{m_{x} c^{2}}$$
 	\item Such particles that exist only for fleeting instants and allow us to violate conservation of energy (and momentum-the emitting and absorbing nucleons do not recoil) are known as virtual particles. We can observe the force that results from the exchange of virtual particles. but we cannot observe the particles themselves during the exchange.
 	\item The exchanged particles that carry the nuclear force are called mesons (from the Greek " meso" meaning middle. because the predicted mass was between the masses of the electron and the nucleon). The lightest of the mesons, the $\pi$-meson or simply pion, is responsible for the major portion of the longer range (1.0 to $1.5$ $\mathrm{fm}$ ) part of the nucleon-nucleon potential. To satisfy all the varieties of the exchanges needed in the two-nucleon system. there must be three pions, with electric charges of $+1,0$, and $-1$. The pions have spin 0 and rest energies of $139.6 \mathrm{MeV}$ (for $\pi^{\pm}$) and $135.0 \mathrm{MeV}$ (for $\left.\pi^{0}\right)$. At shorter ranges $(0.5-1.0 \mathrm{fm}$ ),two-pion exchange is probably responsible for the nuclear binding; at much shorter ranges $(0.25 \mathrm{fm})$ the exchange of $\omega$ mesons $\left(m c^{2}=783 \mathrm{MeV}\right)$ may contribute to the repulsive core whereas the exchange of $\rho$ mesons $\left(m c^{2}=769\right.$ $\mathrm{MeV})$ may provide the spin-orbit part of the interaction.
 \end{enumerate}
\newpage
\begin{abox}
	Practice set 1
	\end{abox}
\begin{enumerate}
	\item The range of the nuclear force between two nucleons due to the exchange of pions is $1.40 \mathrm{fm}$. If the mass of pion is $140 \mathrm{MeV} / \mathrm{c}^{2}$ and the mass of the rho-meson is $770 \mathrm{MeV} / \mathrm{c}^{2}$, then the range of the force due to exchange of rho-mesons is
{\exyear{NET JUNE 2017}}
\begin{tasks}(2)
	\task[\textbf{A.}](a) $1.40 \mathrm{fm}$
	\task[\textbf{B.}]$7.70 \mathrm{fm}$
	\task[\textbf{C.}]$0.25 \mathrm{fm}$
	\task[\textbf{D.}]$0.18 \mathrm{fm}$
\end{tasks}
\end{enumerate}
\newpage
\begin{abox}
	Practice set 2
	\end{abox}
\begin{enumerate}
\item The ground state wavefunction of deuteron is in a superposition of $s$ and $d$ states. Which of the following is NOT true as a consequence?
{\exyear{GATE 2010}}
\begin{tasks}(2)
	\task[\textbf{A.}] It has a non-zero quadruple moment
	\task[\textbf{B.}]The neutron-proton potential is non-central
	\task[\textbf{C.}] The orbital wavefunction is not spherically symmetric
	\task[\textbf{D.}]The Hamiltonian does not conserve the total angular momentum
\end{tasks}
\item Deuteron has only one bound state with spin parity $1^{+}$, isospin 0 and electric quadrupole moment $0.286 \mathrm{efm}^{2}$. These data suggest that the nuclear forces are having
{\exyear{GATE 2012}}
\begin{tasks}(2)
	\task[\textbf{A.}] only spin and isospin dependence
	\task[\textbf{B.}] no spin dependence and no tensor components
	\task[\textbf{C.}]spin dependence but no tensor components
	\task[\textbf{D.}]spin dependence along with tensor components
\end{tasks}
\item Which of the following statements is NOT correct?
{\exyear{GATE 2016}}
\begin{tasks}(2)
	\task[\textbf{A.}] A deuteron can be disintegrated by irradiating it with gamma rays of energy $4 \mathrm{MeV}$.
	\task[\textbf{B.}] A deuteron has no excited states.
	\task[\textbf{C.}] A deuteron has no electric quadrupole moment.
	\task[\textbf{D.}] The ${ }^{1} S_{0}$ state of deuteron cannot be formed.
\end{tasks}
\end{enumerate}

Nuclear and particle properties/chapter/The force between nucleons.tex


\documentclass[main.tex]{subfiles}
\begin{document}

\section{Introduction}

What is the problem in NR?
We have the Einstein equation \(G_{ab} = 8 \pi T_{ab}\), in geometric units \(c = G = 1\), and we want to discuss its solutions which cannot be expressed analytically:
\begin{enumerate}
    \item gravitational collapse;
    \item BH or NS collisions;
    \item dynamical stability of some stationary solutions --- for example, Kerr black holes.
\end{enumerate}

The commonalities among these are: strong gravity, the absence of symmetries (no Killing vectors), and the fact that these are dynamical.

We need to:
\begin{enumerate}
    \item  formulate the EFE as a PDE system;
    \item check that it is well-posed;
    \item simulate this using certain numerical algorithms;
    \item extract information: we should use gauge-invariant quantities, such as gravitational waves or to-be-specified ``energies''.
\end{enumerate}

Regarding the third point, we need to be able to solve nonlinear PDES: these can be elliptic or hyperbolic, deal with space-time decomposition, deal with singularities, and use high-performance computing effectively.

\subsection{The PDE system}

Let us start by treating the equations in vacuo: they reduce to \(R_{\mu \nu } = 0 \).  The Ricci tensor can be expressed explicitly as
%
\begin{align}
0 = R_{\mu \nu } &= \underbrace{- \frac{1}{2} g^{\alpha \beta } \partial_{\alpha } \partial_{\beta } g_{\mu \nu } - g_{\alpha (\mu } \partial_{\nu )} H^{\alpha }}_{\text{principal part}} + Q_{\mu \nu } [g, \partial g]  \\
H^{\alpha } &= \partial_{\mu } g^{\alpha \mu } + \frac{1}{2} g^{\alpha \beta } g^{\rho \sigma } \partial_{\beta } g_{\rho \sigma }
\,,
\end{align}
%
where the part denoted as the principal contains the highest derivatives of the metric, while the part denoted as \(Q\) is less important.

It seems like we have 10 equations for \(g_{\mu \nu }\), so we are done! We actually do not, because of the Bianchi identities: \(\nabla_{a} G^{ab} = 0\). These are four more equations, which we need to consider.

Our questions are:
\begin{enumerate}
    \item what type of PDEs are these?
    \item how do we formulate an initial/boundary value problem?
    \item are these PDE problems well-posed?
\end{enumerate}

\begin{definition}[Well-posed PDE problem]
It is a problem in which a unique solution exists, it is continuous, and it depends continuously on the boundary data.
\end{definition}

\subsection{Maxwell equations in flat spacetime}

Let us start with these as a reference. They are written in terms of the antisymmetric Maxwell-Faraday tensor \(F_{\alpha \beta }\), and they read
%
\begin{align}
0 = \partial^{\alpha } F_{\alpha \beta } = \partial^{\alpha } \qty( \partial_{\alpha} A_\beta - \partial_{\beta } A_\alpha )
\,,
\end{align}
%
where \(A^{\alpha }\) is the vector potential.
We could naively interpret these as four wave-like equations for the vector potential because of the \(\square A\) operator
--- however, this is not true.
Let us show it by looking at the \(\beta = 0\) equation:
%
\begin{align}
0 &= \partial^{\alpha } \partial_{\alpha } A_0 - \partial^{\alpha } \partial_0 A_\alpha = \square A_0 - \partial_0 \partial^{\alpha } A_\alpha   \\
&= - \partial_0^2 A_0 + \partial_{i} \partial^{i} A_0 + \partial_0^2 A_0 - \partial_0 \partial^{i} A_i  \\
&= \partial^{i} \qty(\partial_{i} A_0 - \partial_{i} A_0 ) = \partial^{i} F_{0i} = \partial^{i} E_i = C
\,,
\end{align}
%
where \(E_\alpha = F_{\alpha 0} = F_{\alpha \beta } n^\beta \), where \(n^{\beta }\) is a unit four-vector in the time direction.

Importantly, this equation (\(C=0\)) does not contain second time derivatives (they cancelled out).
Can we get a wave equation from \(\partial^0 C = 0\), maybe? No: the computation goes like
%
\begin{align}
\partial^{0} C &= \partial^{0} \qty(\partial^{\alpha } \partial_{\alpha } A_0 - \partial_{0} A_\alpha )  \\
&= \partial^{i} \qty[\partial^{\alpha } (\partial_{\alpha } A_i - \partial_{i} A_\alpha )]
\,,
\end{align}
%
where we used the fact that \(\partial^{\alpha } \partial^{\beta } F_{\alpha \beta } = 0\).
The thing we are taking a derivative of is the left-hand side of the Maxwell equations for \(\beta = i\)!
If \(A\) is a solution, the equation \(\partial^{0} C= 0\) is an \emph{identity}, it does not constrain the solution in any way.

In summary, the Maxwell equations for \(A^{\alpha }\) are
3 evolution equations (which contain second time derivatives)
and the one \(C = 0\) equation, which is a \emph{constraint.}

What this means is that the Maxwell equations are \textbf{undetermined}!
Three evolution equations, four unknowns.
They are not well posed according to our mathematical definition.

However, from a physical point of view this is not a problem:
we know that there is gauge freedom in electromagnetism,
so the couple \(E_\alpha \), \(B_\alpha \) are calculated from \(A_\alpha \) up to a gauge transformation.
\(A_\alpha \) and \(A_\alpha + \partial_{\alpha } \phi \) for any scalar field \(\phi \) represent the same electric and magnetic fields.

What we can then do is to fix the gauge:
we can choose, for example the Lorentz gauge \(\partial_{\alpha } A^{\alpha } = 0\).

After doing so, the Maxwell equations reduce to \(0 = \partial_{\alpha } \partial^{\alpha } A_\beta =0 \).
These are 4 dynamical equations (containing \(\partial_0 \partial_0 \)) for 4 unknowns \(A_\alpha \).
This, then is a well-posed Cauchy problem.

Does the Lorentz Gauge hold for all time?
Yes, because
%
\begin{align}
0 = \partial^{\beta } \qty(\square A_\beta ) = \square (\partial^{\beta } A_\beta )
\,,
\end{align}
%
so the quantity in parentheses is zero initially and its derivative is always zero: then, it remains zero.

What happened to the \(C =0 \) constraint?
If \(C =0\) initially then the condition \(C = 0\) remains:
%
\begin{align}
C = \square A_\alpha - \partial^{\alpha } \partial_{0} A_\alpha = \square A_\alpha - \partial_0 \partial^{\alpha } A_\alpha = 0
\,,
\end{align}
%
which is usually stated as:
``\textbf{the constraints are transported along the dynamics}''.

Finally then we can say that the Maxwell equations, in an appropriate gauge, are well-posed.

\subsection{The EFE}

In the EFE case, the Bianchi identities have the same role as our \(C = 0\) constraint.

If \(n^b  \) is a timelike vector field, then the projection of the Einstein equations
%
\begin{align}
0 = G_{ab} n^a = C_b [\partial_{i}^2 g, \partial g, g]
\,,
\end{align}
%
are \emph{constraint} equations.
On the other hand, the Bianchi identities guarantee that these are transported along the dynamics.

If we pick a gauge such that \(0 = C^{\mu } = G^{0 \mu }\), then the Bianchi identities read
%
\begin{align}
\nabla_{\alpha } G^{\alpha \mu } &= 0  \\
\partial_0 G^{0 \mu } &= - \partial_{k} G^{k \mu } - \Gamma^{\mu }_{\alpha \beta } G^{\alpha \beta } - \Gamma^{\alpha }_{\alpha \rho  } G^{\mu \rho }
\,,
\end{align}
%
and they contain at most \(\partial_0^2 g\).

Can we write the Einstein equations in a way that makes them explicitly well-posed?
Let us ignore the term \(Q_{\mu \nu }\) --- the important part is the principal one.
The first term is already \(g^{\alpha \beta } \partial_{\alpha } \partial_{\beta }\), the Dalambertian.
The part we do not like is the derivative of \(H^{\alpha }\).

Can we say that \(H^{\alpha } = 0\)? Yes! This is the Hilbert / Lorentz / Harmonic gauge.
Then the EFE read
%
\begin{align}
\square_g g_{\mu \nu } \simeq 0
\,,
\end{align}
%
where the \(\simeq\) sign denotes the fact that this is only considering the principal part.

\subsection{Causality and globally hyperbolic spacetime}

What we have seen so far is still not enough to show that the PDE system is, as a whole, hyperbolic. For that, we need to consider the eingenvalues of the problem.

We have initially assumed a ``global motion of time''.

Note that we do not mean a specific global time: in SR we had such a notion, because of the light-cone structure.
An equation like \(\square_f \phi = 0\) is always ``clear'', its character is always determined by the lightcone structure --- the condition at a point is affected by the past light cone, and it affects the future lightcone.

In GR this is not the case in general!
An example are closed timelike curves.

In order to not have this problem, we need to restrict ourselves to a smaller class of spacetimes.

\begin{definition}
An achronal set \(S \subset M\) if made of events which are not connected by timelike curves.
\end{definition}

\begin{definition}
The future domain of dependence \(D_+ (S)\) is the set of events such that every causal curve starting from a point in \(D_+ (S)\) intersects \(S\) in the past.
\end{definition}

\begin{definition}
The future Cauchy horizon \(H_+ (S)\) is the boundary of \(D_+ (S)\).
\end{definition}

We can make an analogous definition by substituting the past for the future, and the plus for a minus.

\begin{definition}
The domain of dependence of \(S\) is \(D(S) = D_+ (S) \cup D_- (S)\).
\end{definition}

\begin{definition}
A \textbf{Cauchy surface} is a hypersurface \(\Sigma \subset M\) of spatial character such that \(D(\Sigma ) = M\), or \(H(\Sigma ) = 0\).
\end{definition}

A property of Cauchy surface is that every causal curve intersects \(\Sigma \) exactly once.

Then we can say that
\begin{definition}
A manifold \((M, g)\) is \textbf{globally hyperbolic} iff there exists a Cauchy surface \(\Sigma \subset M\).
\end{definition}

This is a key hypothesis in numerical relativity.
We restrict our class of solutions to globally hyperbolic spacetimes.

There is a theorem ensuring that the initial value problem \(\square_G \phi  = 0 \) is well-posed in globally hyperbolic spacetimes.

\end{document}


\XtoCBlock{uRateLimiter}
\label{block:uRateLimiter}
\begin{figure}[H]\includegraphics{uRateLimiter}\end{figure}

\begin{XtoCtabular}{Inports}
In & \tabularnewline
\hline
Init & Value which is loaded at rising flanke of enable signal\tabularnewline
\hline
Enable & Enable == 0: Deactivation of block; Out is set to In.

Enable != 0: Activation of block; Out is rate limited.

Enable 0->1: Preloading of output; Out is set to value of Init input\tabularnewline
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Outports}
Out & \tabularnewline
\hline
\end{XtoCtabular}

\begin{XtoCtabular}{Mask Parameters}
Tr & Rising time in seconds. Slew rate will be 1/Tr\tabularnewline
\hline
Tf & Falling time in seconds. Slew rate will be 1/Tf\tabularnewline
\hline
ts\_fact & Multiplication factor of base sampling time (in integer format)\tabularnewline
\hline
\end{XtoCtabular}

\subsubsection*{Description:}
Limitation of rising and falling rate.

    Function of Enable:

        0:       rate limiting disabled, signal is passed through

        1:       rate limiting enabled, signal is rate limited

        0->1: preload of output with value from init input

% include optional documentation file
\InputIfFileExists{\XcHomePath/Library/General/Doc/RateLimiter_Info.tex}{\vspace{1ex}}{}

\subsubsection*{Implementations:}
\begin{tabular}{l l}
\textbf{FiP8} & 8 Bit Fixed Point Implementation\tabularnewline
\textbf{FiP16} & 16 Bit Fixed Point Implementation\tabularnewline
\textbf{FiP32} & 32 Bit Fixed Point Implementation\tabularnewline
\textbf{Float32} & 32 Bit Floating Point Implementation\tabularnewline
\textbf{Float64} & 64 Bit Floating Point Implementation\tabularnewline
\end{tabular}

\XtoCImplementation{FiP8}
\index{Block ID!288}
\nopagebreak[0]
% Implementation details
\begin{tabular}{l l}
\textbf{Name} & FiP8 \tabularnewline
\textbf{ID} & 288 \tabularnewline
\textbf{Revision} & 1.0 \tabularnewline
\textbf{C filename} & uRateLimiter\_FiP8.c \tabularnewline
\textbf{H filename} & uRateLimiter\_FiP8.h \tabularnewline
\end{tabular}
\vspace{1ex}

8 Bit Fixed Point Implementation

\begin{XtoCtabular}{Controller Parameters}
RateUp & Rising time parameter\tabularnewline
\hline
RateDown & Falling time parameter\tabularnewline
\hline
out\_old & Output value from last cycle in int16 format\tabularnewline
\hline
enable\_old & Enable value from last cycle\tabularnewline
\hline
\end{XtoCtabular}

% Implementation data structure
\XtoCDataStruct{Data Structure:}
\begin{lstlisting}
typedef struct {
     uint16        ID;
     int8          *In;
     int8          *Init;
     int8          *Enable;
     int8          Out;
     int16         RateUp;
     int16         RateDown;
     int16         out_old;
     int8          enable_old;
} URATELIMITER_FIP8;
\end{lstlisting}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test_uRateLimiter_FiP8.tex}{}{}
\fi
\XtoCImplementation{FiP16}
\index{Block ID!289}
\nopagebreak[0]
% Implementation details
\begin{tabular}{l l}
\textbf{Name} & FiP16 \tabularnewline
\textbf{ID} & 289 \tabularnewline
\textbf{Revision} & 1.0 \tabularnewline
\textbf{C filename} & uRateLimiter\_FiP16.c \tabularnewline
\textbf{H filename} & uRateLimiter\_FiP16.h \tabularnewline
\end{tabular}
\vspace{1ex}

16 Bit Fixed Point Implementation

\begin{XtoCtabular}{Controller Parameters}
RateUp & Rising time parameter\tabularnewline
\hline
RateDown & Falling time parameter\tabularnewline
\hline
out\_old & Output value from last cycle in int32 format\tabularnewline
\hline
enable\_old & Enable value from last cycle\tabularnewline
\hline
\end{XtoCtabular}

% Implementation data structure
\XtoCDataStruct{Data Structure:}
\begin{lstlisting}
typedef struct {
     uint16        ID;
     int16         *In;
     int16         *Init;
     int8          *Enable;
     int16         Out;
     int32         RateUp;
     int32         RateDown;
     int32         out_old;
     int8          enable_old;
} URATELIMITER_FIP16;
\end{lstlisting}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test_uRateLimiter_FiP16.tex}{}{}
\fi
\XtoCImplementation{FiP32}
\index{Block ID!290}
\nopagebreak[0]
% Implementation details
\begin{tabular}{l l}
\textbf{Name} & FiP32 \tabularnewline
\textbf{ID} & 290 \tabularnewline
\textbf{Revision} & 1.0 \tabularnewline
\textbf{C filename} & uRateLimiter\_FiP32.c \tabularnewline
\textbf{H filename} & uRateLimiter\_FiP32.h \tabularnewline
\end{tabular}
\vspace{1ex}

32 Bit Fixed Point Implementation

\begin{XtoCtabular}{Controller Parameters}
RateUp & Rising time parameter\tabularnewline
\hline
RateDown & Falling time parameter\tabularnewline
\hline
enable\_old & Enable value from last cycle\tabularnewline
\hline
\end{XtoCtabular}

% Implementation data structure
\XtoCDataStruct{Data Structure:}
\begin{lstlisting}
typedef struct {
     uint16        ID;
     int32         *In;
     int32         *Init;
     int8          *Enable;
     int32         Out;
     int32         RateUp;
     int32         RateDown;
     int8          enable_old;
} URATELIMITER_FIP32;
\end{lstlisting}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test_uRateLimiter_FiP32.tex}{}{}
\fi
\XtoCImplementation{Float32}
\index{Block ID!291}
\nopagebreak[0]
% Implementation details
\begin{tabular}{l l}
\textbf{Name} & Float32 \tabularnewline
\textbf{ID} & 291 \tabularnewline
\textbf{Revision} & 0.1 \tabularnewline
\textbf{C filename} & uRateLimiter\_Float32.c \tabularnewline
\textbf{H filename} & uRateLimiter\_Float32.h \tabularnewline
\end{tabular}
\vspace{1ex}

32 Bit Floating Point Implementation

\begin{XtoCtabular}{Controller Parameters}
RateUp & Rising time parameter\tabularnewline
\hline
RateDown & Falling time parameter\tabularnewline
\hline
enable\_old & Enable value from last cycle\tabularnewline
\hline
\end{XtoCtabular}

% Implementation data structure
\XtoCDataStruct{Data Structure:}
\begin{lstlisting}
typedef struct {
     uint16        ID;
     float32       *In;
     float32       *Init;
     int8          *Enable;
     float32       Out;
     float32       RateUp;
     float32       RateDown;
     int8          enable_old;
} URATELIMITER_FLOAT32;
\end{lstlisting}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test_uRateLimiter_Float32.tex}{}{}
\fi
\XtoCImplementation{Float64}
\index{Block ID!292}
\nopagebreak[0]
% Implementation details
\begin{tabular}{l l}
\textbf{Name} & Float64 \tabularnewline
\textbf{ID} & 292 \tabularnewline
\textbf{Revision} & 0.1 \tabularnewline
\textbf{C filename} & uRateLimiter\_Float64.c \tabularnewline
\textbf{H filename} & uRateLimiter\_Float64.h \tabularnewline
\end{tabular}
\vspace{1ex}

64 Bit Floating Point Implementation

\begin{XtoCtabular}{Controller Parameters}
RateUp & Rising time parameter\tabularnewline
\hline
RateDown & Falling time parameter\tabularnewline
\hline
enable\_old & Enable value from last cycle\tabularnewline
\hline
\end{XtoCtabular}

% Implementation data structure
\XtoCDataStruct{Data Structure:}
\begin{lstlisting}
typedef struct {
     uint16        ID;
     float64       *In;
     float64       *Init;
     int8          *Enable;
     float64       Out;
     float64       RateUp;
     float64       RateDown;
     int8          enable_old;
} URATELIMITER_FLOAT64;
\end{lstlisting}

\ifdefined \AddTestReports
\InputIfFileExists{\XcHomePath/Library/General/Doc/Test_uRateLimiter_Float64.tex}{}{}
\fi


\chapter[Models]{Methods}

This work utilized both linear and nonlinear methods for analysis, modeling, and prediction, including Auto-Regressive Moving Average models with eXogenous inputs (ARMAX) and neural net models. No single method is ideal, and using many methods is better for insight, especially for nonlinear/complex systems. The details of their application will be expanded upon in their respective sections in this chapter.

\section{Linear}

\subsection{Overview}
Due to its simplicity and ease of application, linear models are used in practically all fields as a first attempt to interpret data and any potential relationships. In Space Physics, where the underlying behavior of a complex system is often not theoretically known, and in-situ measurements are sparse, linear models are often the first step towards understanding what components are related and to what degree. Sometimes this leads to understanding unexpected complexities in a system.

\subsection{ARX}

Impulse response systems are systems in which the output (a response) is driven by an input convolved with a linear sum of coefficients (a series of impulses). A simple example would be making a loud noise in a concert hall. The response is the unique echoes and reverberations created by the initial driving sound, and with enough signal, a statistical model can be generated that will map the input sound to a response echo. In the magnetosphere, the most used example is an impulse of $vB_S$ driving the Auroral Electrojet (AE/AL) index \citep{VBzAL}, or the Disturbance Storm Time ($D_{st}$) index \citep{VBzDST}. $vB_S$ is the solar wind velocity multiplied by the southward component of the solar wind magnetic field (i.e. southward components keep their value, northward components are zeroed). A sample result from this model is  shown in Figure \ref{VBzIRplot}

\begin{figure}[htp]
\centering
\includegraphics[scale=0.40]{{Figures/BasicModelExample-GOES6}}
\caption{(a) \dst\ (black), persistence (red), 12-hour impulse response model (blue). (b) $vB_S$ input.}
\label{VBzIRplot}
\end{figure}

This plot shows how different models are used to predict magnetospheric variables with varying amounts of success. In this work, what starts as a Box-Jenkins model of the form \citep{DOYvar}:
\begin{align*}
x(t)&=\sum_{j=1}^{m}{b_j \cdot f(t-j\Delta t)}+c_t
\end{align*}
can be modified to include an auto-regressive component to be an autoregressive model with exogenous inputs (ARX) such as that used in \cite{ARXEqn}, taking the form:
\begin{align}
\hat{x}(t)&=\sum_{i=1}^la_i\cdot x(t-i\Delta t)+\sum_{j=1}^m b_j\cdot f(t-j\Delta t)+c
\label{ARXEqn}
\end{align}
Where $m$ and $l$ are the number of coefficients desired for including previous data points in the prediction, and $c$ is a factor that corresponds to the mean of the input data. Note that in some cases the starting value of the iterators can be individually increased if there is a known delay in response time or there is a desire to predict further into the future. In \cite{ARXEqn}, second order equations ($m=2$) were used with anywhere from one to four driving coefficients, but in practice any number of coefficients and any number of driving variables can be used up to some fraction of the number of data points that allows the coefficient matrices to be solved for.

There generally is a limit to the usefulness of large-lead-time forecasts \cite{ExtremeEvents}. By looking at a plot of the cross correlation relative to the number of coefficients, a limit will generally be seen where adding more coefficients no longer reduces error in the model. By creating a threshhold of change in fit per coefficient added (perhaps via a bootstrap method), the minimum number of coefficients needed to optimally model the system can be determined.

By constructing a linear system of equations from Equation \ref{ARXEqn}, the coefficients can be solved for in a general matrix form (where, in this case, $l=m$):
\[
\left( \begin{array}{ccccccc}
x_0 & ... & x_{l-1} & f_0 & ... & f_{l-1} & 1\\
x_1 &     & x_l & f_l &  &f_l & 1\\
... &     &     &     &  &   & \\
x_{N-l} & ... & x_{N-1} & f_{N-l} & ... & f_{N-1} & 1
\end{array} \right)
\left(\begin{array}{c}
a_0\\...\\a_{l-1}\\b_0\\...\\b_{l-1}\\c
\end{array}\right)
=
\left(
\begin{array}{c}
x_l \\ x_{l+1} \\ ... \\ x_{N}
\end{array}
\right)
\]

This is a linear model for the behavior of a system. However, it has been shown that the set of coefficients describing the response of a system can change with storm intensity \cite{ARXEqn}, the time scale modeled \cite{Coupling}, and even the time of day \cite{VBzAL}. This creates a very large number of possible directions for research, from predicting storm onsets, to predicting storm intensities, to modeling the overall shape and behavior of a storm, as well as all of the other possible interactions outside of storm-time.

\subsection{ARMAX}

A class of model known as an Auto-Regressive Moving Average with eXogenous inputs model (ARMAX) is often used in time series analysis to combine the effects of persistence, linear dependence, and an average that changes with time. It makes a slight change on the ARX model in Equation \ref{ARXEqn}, adding the moving average term:

\begin{align}
\hat{x}(t)&=\sum_{i=1}^la_i\cdot x(t-i\Delta t)+\sum_{j=1}^m b_j\cdot f(t-j\Delta t)+\sum_{k=1}^n e_j\cdot c(t-k\Delta t)+c_t
\label{ARMAXEqn}
\end{align}

\subsection{Applicability}
As implied by the name, an ARMAX model is suitable for analysis of a time-dependent linear system where the value of a measurement is determined by its own persistence, an external variable, and some factor that contributes to a moving average with time. Most linear systems can be encapsulated by this framework.

\subsection{Caveats and Biases}
There will be a number of things that, ideally, must come together to make this kind of data prediction work. For one: ARX methods can often be heavily dependent on a concept known as ``persistence", whereby the best prediction for a variable at any time is that same variable at the last measured time step. For example, if the high temperature today is $70^\circ$, it is fairly likely that the high temperature tomorrow will be near $70^\circ$. Too much reliance on persistence forecasting, though, and predictions can lose their usefulness. Figure \ref{VBzIRplot}, for example, shows how a model can achieve high correlation with persistence, but be almost entirely useless for predicting events before they happen since the spikes are never anticipated, just modeled after they have been observed. Also, if the time of interest is multiple time-steps ahead, a simple persistence forecast becomes less and less accurate with each step.

The other major problem in forecasting is that of lead time. Being able to forecast a storm one minute in advance is generally not enough time for operators to take mitigating action.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=0.50]{{Figures/PersistentCorrelation.eps}}
	\caption{Correlation between prediction and measurement versus lead time of forecast.}
	\label{Lags}
\end{figure}

Figure \ref{Lags} shows the correlation of a set of predictions made for autocorrelation in the disturbance storm time index (\dst) against the amount of lead time in the forecasts. This metric is a measure of how much disturbances in the magnetosphere induce currents that cause ground-based magnetic field perturbations. The predictions were made further and further in time from the current magnetic field and \dst\ measurements, with decreasing accuracy as the predicted time got further from the current time. While an accurate prediction can be made one hour in advance, a prediction 3 days in advance has almost no correlation with what was measured.

\subsubsection{Mean versus Median}
The question of whether to use means or medians for analysis is based on what facets of the data are most important to the research. Since means are biased towards outliers and medians biased against them, the decision rests on how much weight should be given to outliers (or extreme values) in a study. For example, when looking at long-term solar wind variables, intermittent spikes may not be relevant to the overall pattern of behavior being analyzed, but knowing that on a short time scale a certain day had a noticeable spike may be important. In the former case, using the median would likely be best, whereas a mean would be best for the latter. However, space physics often deals with skewed distributions and sparse data, leading to an uncertainty of which method is best, so both are and analyzed with their respective traits in mind.

As an example, Figure \ref{fig:MeanMedian} shows a plot where data for multiple events is split into bins based on the average value of a binning variable, and then significance tests performed for each hour of the event to determine if the variable behaves differently based on bin. In this case, where the same events are used for both methods, when using means as the method of averaging the hours have far more variability and are thus seen to have less significance, whereas using medians finds over twice as many significant hours, as well as a clearly more divisive behavior. The events and analysis used to generate these plots are described in Chapter 4.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=0.70]{{Figures/RhoBinnedF_{10.7}-case24-t025-tf30-GOES6.eps}}
		\includegraphics[scale=0.70]{{Figures/RhoBinnedF_{10.7}-case24-t025-tf30-GOES6-means.eps}}
	\caption{Effect of using means over medians. Top: Events averaged using median values. Bottom: Events averaged using mean values.}
	\label{fig:MeanMedian}
\end{figure}

\subsubsection{Effects of time averaging}
Similarly to the mean versus median question, the decision on if or how much to average the data over time will affect the resulting time series to be biased against intermittent spikes in value. The more time added to any particular average, the less impact any short-term changes will have on the final value.

\subsection{Summary}
Because linear models are simple to develop and optimize and adequately model many physical systems, they are a useful first choice for trying to determine the behavior of mass density in the plasmatrough. The relationships between solar wind, plasmatrough, and plasmasphere may also be detectable on the first order approximation by a linear model even if they are not entirely linear in nature.

\section{Nonlinear}

\subsection{Overview}

While many nonlinear systems are approximated by a number of localized linear models for the sake of simplicity and ease of interpretation, the design and implementation of nonlinear models has become greatly simplified in recent years. Their use allows for determining nonlinear structure without pre-assuming any localization of the data, and as such were used to attempt forecasting in this dissertation. The first choice was a model based on neural networks \citep{NNARMA,ANNforecast} which approximates a non-linear system given a set of training data. The usefulness of this is apparent in a few key points: the weights of contribution of any particular variable to a system will likely be nonlinear in some fashion (e.g. a ground station's measurements will depend on sunlight heating the ionosphere which depends on latitude, time of year, and time of day), and the method allows for the non-linear effects of saturation where perhaps the magnetosphere will behave differently after reaching certain levels of particle density or electric potential, rather than directly scaling regardless of limits.

Another algorithm known as Principal Component Analysis (PCA) can be used to take the large number of possible variables and define an orthogonal set of vectors that most efficiently encapsulate the variance in the data. By doing this, the number of variables needed for computing any linear or non-linear algorithm can be reduced and optimized, making predictions quicker while maintaining most of the predictive benefits of using all possible data, as well as indicating which variables contain the most information relevant to the predictions.

\subsection{Neural Networks}

\subsection{Applicability}
Nonlinear models are applicable when a system has more complexity than can be encapsulated by a linear model. Since they are usually a class of model that trains adaptive weights that can be tuned by known inputs and outputs, they are especially useful for systems where a large amount of training data are available.

\subsection{Caveats}
Nonlinear models can be susceptible to overfitting, since they inherently attempt to fit more complexity than a linear model, but this can be controlled via the number of inputs and weights used. They also may suggest more structure than might truly exist. Both of these problems are lessened by training with more data, if available. Figure \ref{NNvsLinear} shows a comparison of predicting equatorial mass density (\req) with the $F_{10.7}$ index and the disturbance storm time index (\dst). The neural net models (left)  shows much more structure than the linear models (right) despite being given the same data. Whether that structure reflects any real physical phenomenon, however, is a difficult problem to answer, and so both models are often compared to attempt to ascertain what structure may be valid.

Sometimes, as in the top two plots of Figure \ref{NNvsLinear}, the structure seems to support the same conclusion where the nonlinear model just adds slight detail. Othertimes, as in the case of the lower two plots, the results seem discrepant. The linear model indicates increasing \req\ with increasing $B_z$ and increasing \f, while the nonlinear model shows a more nuanced structure with increased \req\ showing up with lower $B_z$ values, and at a range of \f\ values. Situations like these require further analysis and validation to determine the true underlying structure.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=0.35]{Figures/{NNDst-F107-rhoeq-GOES6}.eps}
		\includegraphics[scale=0.35]{Figures/{LinearDst-F107-rhoeq-GOES6}.eps}
			\includegraphics[scale=0.35]{Figures/{NNBz-F107-rhoeq-GOES5}.eps}
			\includegraphics[scale=0.35]{Figures/{LinearBz-F107-rhoeq-GOES5}.eps}
	\caption{Nonlinear models (left) versus linear models (right) of $\rho_{eq}$.}
	\label{NNvsLinear}
\end{figure}

\subsection{Comparison to Linear Model}
Nonlinear models differ from linear models by incorporating some method for accounting for effects within a domain that are not seen across the entire domain. Though both models can be given the same inputs, and trained on the same outputs, the models themselves can fundamentally differ. Linear models are also generally simple to interpret (e.g. $y=2*x$ means for every change in $x$, $y$ changes by double that amount.) Nonlinear models, on the other hand, often have no simple interpretation and must be approached by testing for a range of parameters in the model to map out resulting outputs and make some interpretation of the underlying structure.

Nonlinear models can be compared to a linear model using the same data in order to assess the usefulness of accounting for nonlinear features. If both models result in similar correlation values, it can be said that the nonlinear model offers no extra insight into the structure of the system and the relationships therein.

\subsection{Summary}
Nonlinear models are a useful addition to linear models by allowing for better approximations to more complex physical systems, where the entire system may not fit a linear model or may have localized dependencies.

\section{Epoch Analysis}
Epoch Analysis involves taking a number of time intervals centered around some common selection criteria, and looking at the average behavior of those time intervals. This allows for the analysis of the behavior of systems with a lot of noise or variability by only retaining features that exist in a majority of sampled events. In this case, the averaging is done via a median to find the typical behavior of the system without significant influence from the more extreme cases. As an example, Figure \ref{fig:epochexample} shows what this process typically looks like.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=0.75]{Figures/{epochexample}.eps}
	\caption{Example epoch analysis. Individual events in blue, median value in red.}
	\label{fig:epochexample}
\end{figure}

In this particular case, the centering point (called the "onset" of the event) was selected as when the \dst\ index crossed below a threshold of $-50$~nT. All values between 24 hours before and 48 hours after this crossing were aligned and then averaged per timestep. In the figure, each blue line represents one event, and the red line represents the resulting median for each hour of the 10 sampled events. This process makes the underlying behavior more obvious than it would otherwise be looking at individual events, and indeed shows that a drop in \dst\ is, on average, preceded by a drop in $B_z$. This sort of plot will be explained in more detail in Chapter 4.


\chapter{Clustering Spectral Images}
\label{ch:spectra_image_clustering}

\begin{wrapfigure}{o}{0.63\textwidth}
    \vspace{-0.5cm}
    \centering
    \includegraphics[scale=0.4]{sp_image_clustering-fig1.png}
    \label{fig:spectra_image_clustering-fig1}
\end{wrapfigure}

We have already seen hierarchical clustering. Another clustering algorithm, k-Means, is much faster for data with lots of rows, like images, which contain a row (a spectrum) for each pixel. Still, for the liver-cirrhosis data, both approaches are fast. Here, we use \widget{k-Means} with k=3 clusters.

\begin{figure*}[h]
  \vspace{-0.3cm}
  \newcommand{\kmeans}{\includegraphics[scale=0.40]{sp_image_clustering-fig2a.png}}
  \newcommand{\hyperspectra}{\includegraphics[scale=0.25]{sp_image_clustering-fig2b.png}}
  \infinitewidthbox{\kmeans \hspace{-0.5cm} \hyperspectra}
  \vspace{-1.0cm}
  \caption{The \widget{Spectra} widget shows wrong predictions for the DNA class.}
  \label{ffig:spectra_image_clustering-fig2}
\end{figure*}

\vspace{0.8cm}

\begin{wrapfigure}{o}{1.1\textwidth}
  \includegraphics[scale=0.4]{sp_image_clustering-fig3.png}%
  \label{fig:spectra_image_clustering-fig3}
\end{wrapfigure}

\noindent We see no meaningful clusters. Therefore, we need to preprocess the data. If we do it well, we see that a cluster corresponds to the background. We could remove it with the \widget{Select Rows} widget.

\begin{figure*}[h]
  \vspace{-0.3cm}
  \newcommand{\hyperspectra}{\includegraphics[scale=0.25]{sp_image_clustering-fig4b.png}}
  \newcommand{\selectrows}{\includegraphics[scale=0.45]{sp_image_clustering-fig4a.png}}
  \infinitewidthbox{\selectrows \hspace{-0.5cm} \hyperspectra}
  \vspace{-1.cm}
  \caption{The \widget{Spectra} widget shows wrong predictions for the DNA class.}
  \label{ffig:spectra_image_clustering-fig4}
\end{figure*}


\documentclass[runningheads]{llncs}
\usepackage{graphicx}

\begin{document}

\title{Simplex vs. Montecarlo using parallel computing, a brief comparison.\thanks{Supported by Universidad Tecnológica de Pereira.}}

\author{Oscar Eduardo Bernal}

\authorrunning{O. Bernal}

\institute{Universidad Tecnológia de Pereira, Colombia
\email{}}

\maketitle

\begin{abstract}
The Monte Carlo Method give us a process to solve big problems using randomness, by other side simplex is a method to solve linear optimization problems through an iterative process. Using HPC we can have an approach to parallel computing with a good amount of threads, but the Simplex method can't be easily parallelizable because in each iteration it depends of the previous state, while using Monte Carlo each step of the process is completely independent. Even so the question arises, is there really a difference between the Simplex method and the Monte Carlo method in a high-performance environment to solve linear optimization problems?

\keywords{HPC \and linear optimization \and Monte Carlo \and parallel computing \and Simplex}
\end{abstract}

\section{Introduction}
Is easy think that one algorithm is better than other, especially when we are working with parallel computing, but to give a conclusion like this, is needed to have a good comprehension of the subject, the algorithm and made a experimentation process, where we can check, using real information, the given hypothesis.

\subsection{Linear Optimization}
The Linear Optimization, also known as Linear Programming, is in the field of Mathematical optimization, a method to resolve problems where the target is achieve the best outcome subject to some requirements represented by linear inequality constraints.
Linear programming can be applied to various fields of study. It is widely used in mathematics, in business, economics, and for some engineering problems.

\subsection{Simplex Method}
The simplex method (or simplex algorithm) is a popular algorithm for linear programming, it uses the constraints as edges of a n-dimensional geometric object called a polytope (where n in the number of variables of the optimization problem), is an pivoting algorithm that do a iterative path over the vertices of the polytope to find the optimal solution.

\subsection{Monte Carlo Method}
Monte Carlo Method is a non deterministic computerized mathematical technique that allows to get an approximation to the solution of complex mathematical problems, Its fundamental idea is use randomness to solve the problems generating and evaluating points.

\subsection{Parallel computing}
Parallel computing is a computational technique in which many instructions are executed simultaneously, one of his main principles is that large problems can often be divided into smaller problems and solved individually.

\subsection{Hypothesis}
Taking the capacity of Monte Carlo method to solve a large different kinds of problem, to solve linear optimization and mixing with the parallel computing technique appear the main hypothesis of this paper:

\textit{Monte Carlo method is better than Simplex method to solve linear optimization problems with large number of variables.}

\section{Implementation}
To test the validation of the given hypothesis, the two methods (Simplex and Monte Carlo) have been developed, the Simplex in a basic sequential way, and the Monte Carlo method in a concurrent way.

\subsection{Sequential Simplex Method}
The simplex method takes the constraints and the objective function of the linear optimization problem and creates a matrix of nxm dimensions, where n is the number of variables and m the number of constraints, over this matrix the algorithm starts to iterate changing the values of some rows and columns until arrives to the optimal solution.
This algorithm have a quadratic complexity order O(n\textsuperscript{2}) in the worst case, and a lineal complexity order O(n) in its best case.

\subsection{Parallel Monte Carlo Method}
The concurrent implementation of the Monte Carlo Method starts whit a fixed amount of threads for each block, for this case 1024, and a fixed amount of blocks per grid, that also is 1024, for the logical distribution of the threads and blocks, that can be given by the size of the grid/block in terms of \textit x, \textit y and \textit z, was used a lineal distribution (\textit{x,1,1}), this aiming to make more clear and intuitive the index generation for the resultant vector; Anyway with little modifications can be extended to a full tri-dimensional distribution.

\paragraph{}
The kernel of this implementation generate an fixed amount of random numbers under the constraints and validating the objective function to find an individual optimal solution, all the solutions obtained by each thread are write in the thread's correspondent index of the resultant vector, after this process finished, in the vector is found the best solution.
By this way the number generation have a lineal complexity order O(n), and the find of the best solution too.

\section{Results}
After the execution of the implemented methods for linear optimization problems with a different number of variables and constraints, the execution times shows a unlooked-for results, although the behavior of the algorithms corresponds to the determinated complexity, the scale of the measures is completely unexpected.
For this reason, the importance of experimentation is remarkable.

\begin{figure}
\includegraphics[width=\textwidth]{fig1.eps}
\caption{Execution time in milliseconds for each algorithm} \label{fig1}
\end{figure}

\paragraph{}
By this way we have the Simplex method with a quadratic complexity order O(n\textsuperscript{2}) in the worst case, but here is where the core of behavior of the results, the worst case is an stranger case, the common case of the majority of the linear optimization problems are solved in a a lineal complexity order O(n) by the Simplex method, causing so the Monte Carlo method take superior execution times that the sequential Simplex.

\paragraph{}
In addition was observed, during the data collection, that linear optimization problems with a large number of variables were hardly found, the largest problem easily founded was of 8 variables, all other problems were artificially constructed to test the behavior of the methods. The largest problem tested was 22 variables and 23 restrictions.

\paragraph{}
This means that even if Monte Carlo have better execution times with a gigantic amount of variables, it is useless because the common linear optimization problems have a low number of variables.

\paragraph{}
The Monte Carlo method, unlike the Simplex method, finds an approximate values really close to the expected response ($Error=1/\sqrt{n}$ , with n equal to the total amount of threads times the number of solutions generated in each thread), but not always the exact value, and in this an important advantage for the Simplex Method, because it get the better answer (if the problem has a unique solution).Besides in the cases where the problem don't have an unique solution, Monte Carlo method finds a feasible solution, instead of being blocked as the simplex method.

\paragraph{}
For nonlinear optimization problems the Monte Carlo method can be adapted with few changes and conserving its properties, while the simplex method becomes useless and requires different methods that change depending on the kind of problem.

\section{Conclusions}

\paragraph{}
Not always parallel is better, it is easy to think that by using a parallel alternative for the solution of a problem we can obtain better results, but this always depends on the nature of the problem and it is necessary to have a correct analysis to determine if the implementation of a parallel method is the best option.

\paragraph{}
The complexity order of an algorithm is a great help to know the possible performance of it is, but also should keep in mind the common behavior of the algorithm, because there is a possibility that the common case is not the worst case.

\paragraph{}
In every process of experimentation it is important to have clearly defined the hypothesis and do a good analysis of the problem, but also pay attention to the results and the experience, because the result will not always be as expected and it is important to determine the explanation of these results.

\paragraph{}
High performance computing is a technology that offers many possibilities, but as any technological tool must be used with responsibility. The capacity of the developments made using HPC techniques will depend on the formulation and implementation of the correct kind of algorithms.

\paragraph{}
The Monte Carlo method allows to solve a whole range of different problems, while the simplex method specializes in a single class of problems but is very good in it. By this way we can concluded that a general solution is not always the best alternative, sometimes it is better to have solutions optimized to the requirements of the problem, and for this reason is important to do a correct analysis of the problem.

%
% ---- Bibliography ----
%
% BibTeX users should specify bibliography style 'splncs04'.
% References will then be sorted and formatted in the correct style.
%
% \bibliographystyle{splncs04}
% \bibliography{mybibliography}
%
\begin{thebibliography}{8}

\bibitem{ref_url1}
Monte Carlo Simulation: What Is It and How Does It Work? - Palisade, \url{http://www.palisade.com/risk/monte\_carlo\_simulation.asp}. Last accessed
Jun 2018

\bibitem{ref_url1}
A Gentle Introduction to Algorithm Complexity Analysis, \url{https://discrete.gr/complexity/}. Last accessed
Jun 2018

\bibitem{ref_article1}
Roughgarden, T. (2014). CS264: Beyond Worst-Case Analysis Lecture\# 15: Smoothed Complexity and Pseudopolynomial-Time Algorithms. Retrieved from \url{https://pdfs.semanticscholar.org/395c/5adcd11e95b8ec174ec359be54452fdb27a2.pdf}

\bibitem{ref_article1}
Smale, S. Mathematical Programming (1983) 27: 241. \doi{10.1007/BF02591902}

\bibitem{ref_article1}
Borgwardt, K.H. Zeitschrift für Operations Research (1982) 26: 157. \doi{10.1007/BF01917108}

\bibitem{ref_article1}
Lovász, L. The Mathematical Intelligencer (1980) 2: 141. \doi{10.1007/BF03023055}

\bibitem{ref_book1}
Bertsimas, D., \& Tsitsiklis, J. N. (1997). Introduction to linear optimization (Vol. 6, pp. 479-530). Belmont, MA: Athena Scientific.

\bibitem{ref_book1}
Doucet A., de Freitas N., Gordon N. (2001) An Introduction to Sequential Monte Carlo Methods. In: Doucet A., de Freitas N., Gordon N. (eds) Sequential Monte Carlo Methods in Practice. Statistics for Engineering and Information Science. Springer, New York, NY
\end{thebibliography}

\end{document}


\input{templates/ex_template.tex}

\title{BPP Bonus Sheet -- Recap and Project}
% {YYYY}{MM}{DD}
\setdate{2019}{05}{05}

\begin{document}

\section*{About this Sheet}

Although \textbf{there will be no lecture this week} due to May 1st being holiday, we we still would like to give you the opportunity to practice your skills.
Handing in your answers for this sheet is optional, but \textbf{it will give you an additional homework point} towards the 10 homework points you need to pass this course.

\vspace{1em}

\noindent This sheet gives you the choice between two kinds of task:

\vspace{1em}

\noindent You can either complete tasks A1 - A3 or complete the project described in B. Each of them will give you exactly one homework point if you get more than 60\% of the points associated with it. \newline \textbf{However, you may not hand in both, but only one of them.}

\section*{A1. Warm-up Exercises}

\subsection*{A1.1 Boolean Operators and Truth Tables (4 points)}

\vspace{1em}

\noindent Determine the truth values of the following boolean operators for each configuration of truth values as given in the tables.

\vspace{1em}

\begin{center}
    \begin{tabular}{| c | c | c | c |}
    \hline
    \textbf{a} & \textbf{b} & \textbf{c} & \textbf{(b or c) and (a or c)} \\
    \hline
    True & True & True &  \\
    \hline
    True & True & False &  \\
    \hline
    True & False & True &  \\
    \hline
    True & False & False &  \\
    \hline
    False & True & True &  \\
    \hline
    False & True & False &  \\
    \hline
    False & False & True &  \\
    \hline
    False & False & False &  \\
    \hline
    \end{tabular}
\end{center}

\vspace{1em}

\begin{solution}
\vspace{1em}
    \begin{center}
        \begin{tabular}{| c | c | c | c |}
        \hline
        \textbf{a} & \textbf{b} & \textbf{c} & \textbf{(b or c) and (a or c)} \\
        \hline
        True & True & True & True \\
        \hline
        True & True & False & True \\
        \hline
        True & False & True & True \\
        \hline
        True & False & False & False \\
        \hline
        False & True & True & True \\
        \hline
        False & True & False & False \\
        \hline
        False & False & True & True \\
        \hline
        False & False & False & False \\
        \hline
        \end{tabular}
    \end{center}
\end{solution}

\subsection*{A1.2 N Bottles of Beer (6 points)}

The 99 bottles programs give us an idea of how a programming language looks as they show the basic loop concepts.
The 99 bottles program “sings” a little song which goes like this:

\vspace{1em}

\noindent \textit{99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, no more bottles of beer on the wall.
}

\vspace{1em}

\noindent Write a function \texttt{n\_bottles(n)} which sings the song starting with n bottles instead of 99. If n is bigger than 99 or smaller than 5 print a message that you want to sing a funnier song than n bottles (of course replace n with the current n). Your final result may also structure the verses in a different layout.

\vspace{1em}

\begin{solution}
    \begin{pythoncode}
def bottles(n):
    """Formats plural according to number of bottles."""
    return ('1 bottle' if n == 1 else str(n) + ' bottles') + ' of beer'

def n_bottles(n):
    """
    Go through the bottles of beer on the wall, and pass them around.

    Calls `bottles(n)` for formatting, and reduces n by 1 each iteration
    """
    if 5 <= n <= 99:
        while(n > 0):
            print(bottles(n) + ' on the wall,\n  ' + bottles(n) + '.')
            n = n - 1
            print('Take one down and pass it around,\n  ' +
                # conditional expression to determine whether there are bottles left
                bottles(n if n > 0 else 'no more') +
                ' on the wall.\n')
    else:
        print('I want to sing funnier songs than "' + bottles(n) + '".\n')

n_bottles(3)
n_bottles(1011)
n_bottles(5)

    \end{pythoncode}
\end{solution}

\section*{A2. 2D Lists Revisited (20 points)}

In this assignment, you are supposed to implement a simple packing system (or at least some of the logic that would be needed for one).

\vspace{1em}

\noindent 1. Let's handle the input first: The user should be able to enter an arbitrary amount of numbers between 0 (exclusive) and 100 (inclusive). This is to simulate objects coming in over a conveyor belt with some specified weight. This should go on until the user types \texttt{end}. All numbers that have been entered should be stored in a list.

\vspace{1em}

\noindent \textbf{Example:}

\begin{outputcode}
Please enter a number or type 'end': 42
Please enter a number or type 'end': 3
Please enter a number or type 'end': 53
Please enter a number or type 'end': 30
Please enter a number or type 'end': 21
Please enter a number or type 'end': 82
Please enter a number or type 'end': 17
Please enter a number or type 'end': end
List of numbers: [42, 3, 53, 30, 21, 82, 17]
\end{outputcode}

\noindent 2. Next, the actual packing: We want to divide our list of numbers into smaller lists that can each only have a total sum of at maximum 100. Think of it like bins that can only carry 100 units of mass. That means that in the end, you should have a list of lists that each sum up to 100 or less, like this:

\begin{pythoncode}
[[42, 3, 53],   # sum: 98
 [30, 21],      # sum: 51
 [82, 17]]      # sum: 99
\end{pythoncode}

\noindent For that, iterate over the input list and decide for each number whether it fits in the current bin. If it does, put it in it, and if it does not, open up a new bin. \textbf{You may use the built-in function \texttt{sum(iterable)}}, which returns the sum of a list.

\vspace{1em}

\noindent \textbf{Note:} This is of course \textbf{not} the optimal way of packing. Suppose there would be one more number, say \texttt{20}. According to our algorithm, we would have to open up a new bin because it does not fit into the last one. However, if we could go back, we could have put it into the second bin just fine. For this assignment, we suppose that we have a machine that can only access one item at a time (because of the conveyor belt) and immediately sends off the bins for further processing as soon as the next item does not fit.

\vspace{1em}

\noindent 3. Lastly, we need to print our solution. Simply calling \texttt{print(list\_of\_bins)} would result in something like this:

\begin{outputcode}
[[42, 3, 53], [30, 21], [82, 17]]
\end{outputcode}

\noindent ...which obviously is not very pleasant to read. To fix that, implement a function \texttt{pretty\_print\_bins(list\_of\_bins)} that takes as an argument our list of bins from before and prints it like this:

\begin{outputcode}
===================================
Bin 1: 42, 3, 53 | Total weight: 98
Bin 2: 30, 21 | Total weight: 51
Bin 3: 82, 17 | Total weight: 99
===================================
There are 3 bins with a total weight of 248
\end{outputcode}

\noindent If you can get the \texttt{|} to line up that would be even better, but be warned: Without some formatting tools that we have not yet introduced this may get messy -- so this is optional. Feel free to use your favourite search engine to look for helpful formatting features.

\vspace{1em}

\begin{solution}
See file \texttt{04\_A2\_2D\_Lists\_Revisited.py}.
\end{solution}

\section*{A3. Dictionaries (20 points)}

Write a function that translates a list of integer numbers to a list of string number words.
\vspace{1em}

\noindent 1. Write a function that generates a list of random integers. The function should have three arguments:
the first and the second argument should specify the lowest and highest random integer that can be in the list;
the third argument is the length of the list i.e. how many numbers there will be in the list. The third argument should have the default value of 10.
\vspace{1em}

\noindent 2. Create a dictionary that translates the integer to number words. There should be at least 10 entries in your dictionary.
\vspace{1em}

\noindent 3. Write a function that takes the number list and the translation dictionary as arguments and returns a translated list of number words. Bonus: Can you use a list comprehension to do that?
\vspace{1em}

\noindent \textbf{Example:}

\begin{pythoncode}
# generating a list with 10 random numbers from 3 to 9
num_list_1 = make_randint_list(3, 9)

# print original number list
print(num_list_1)

# call function without error handling to translate number list
print(translate(num_list_1, translation_dict))
\end{pythoncode}

\noindent \textbf{Output:}
\begin{outputcode}
[7, 8, 8, 8, 6, 4, 8, 7, 9, 7]
['seven', 'eight', 'eight', 'eight', 'six', 'four', 'eight', 'seven', 'nine', 'seven']
\end{outputcode}

\vspace{1em}
\noindent 4. Thinking outside the box: Write \textbf{another} function that does the same as in 3.3., but also handles the case if there is no matching translation in the dictionary.
In that case the words 'unknown translation' instead of the matching number word should be returned.
Hints: there are multiple solutions to do this. If you need some inspiration search for the "dictionary get()" or "try except KeyError" with your favourite search engine.
\vspace{1em}

\noindent \textbf{Example:}

\begin{pythoncode}
# generating a list with 5 random numbers from 7 to 10
num_list_2 = make_randint_list(7, 10, 5)

# call function with try except error handling to translate number list
print(translate_except_error(num_list_2, translation))
\end{pythoncode}

\noindent \textbf{Output:}
\begin{outputcode}
[10, 8, 8, 9, 7]
['unknown translation', 'eight', 'eight', 'nine', 'seven']
\end{outputcode}

\begin{solution}
See file \texttt{04\_A3\_Dictionaries.py}.
\end{solution}

\newpage

\section*{B. Implementing Conway's Game of Life}

Your mission - should you choose to accept it - is to implement Conway's Game of Life in the terminal using Python.

\vspace{1em}

\noindent Conway's Game of Life is a zero-player game that was invented by the British mathematician John Conway in 1970. "Zero-player game" in this context means that it requires no input by the user - it just continuously proceeds based on its initial state.

\vspace{1em}

\noindent The "playing field" of the game is divided into a grid of cells which can either have the value 1 (alive) or 0 (dead). Each cell has eight neighboring cells which are either horizontally, vertically or diagonally adjacent. In each iteration of the game, the following rules are successively applied:

\begin{enumerate}

\item Any live cell with fewer than two live neighbours dies, as if by underpopulation.
\item Any live cell with two or three live neighbours lives on to the next generation.
\item Any live cell with more than three live neighbours dies, as if by overpopulation.
\item Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

\end{enumerate}

\noindent The question of how to handle cells at the borders of the playing field which have fewer than eight neighboring cells is handled differently in all implementations. For our project we can just accept that e.g. a cell in the top left corner of the playing field has only three neighbors.

\vspace{1em}

\noindent You can find more information about the game, the principles behind it and interesting initial formations on its \href{https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life}{Wikipedia Page}.

\vspace{1em}

\noindent For an existing implementation of the game, see \href{https://playgameoflife.com/}{this}.

\vspace{1em}

\noindent If you are now thinking "How do I even start programming such a thing in Python?" - don't worry, you don't have to start from nothing. In the homework sheet folder on StudIP you will find a script called \texttt{game\_of\_life\_template.py}. In this file, a function to display the playing field and the general structure of the code are already outlined. You can use this as the basis for your own script, all you have to do is complete the functions \texttt{rand\_fill} and \texttt{apply\_rules}.

\vspace{1em}

\noindent However, if you are up for a challenge, you can of course also just start with a blank document and implement everything on your own. Just note that you should only use methods that we already covered in one of our lectures (apart from \texttt{sleep}, which is also introduced in the template file). If you hit any obstacles, do not hesitate to write to one of us or simply drop by during the practice session.

\vspace{1em}

\noindent Enjoy your first real project in Python!

\begin{solution}
See file \texttt{04\_B\_Game\_of\_Life.py}.
\end{solution}

\end{document}


\chapter{Statistical Analysis Methodology}
\label{chap:appendix-a}

    % Please add the following required packages to your document preamble:
% \usepackage{multirow}
% \usepackage[normalem]{ulem}
% \useunder{\uline}{\ul}{}
\begin{table}[]
    \centering
    \caption{Data analysis metrics used in the survey results analysis}
    \label{annex:metrics}
    \resizebox{\textwidth}{!}{
    \begin{tabular}{l|l|l|}
    \cline{2-3}
                                                                                & Metrics                                                                & Meaning                                                                                \\ \hline
    \multicolumn{1}{|l|}{\multirow{3}{*}{\begin{tabular}[c]{@{}l@{}}Measures of\\ Central Tendency \\ or Location\end{tabular}}} & \textbf{Mean}                                                          & \begin{tabular}[c]{@{}l@{}}The mean represents the most probable value. In this\\ survey, with the use of scales with a lower and upper\\ bounds, the mean has the roles of representing the\\ average value of agreement, importance and other\\ measures.Normally, when the skewness of a distribution\\ is high, the meaning of the mean may get distorted by\\ the existence of outlier values. However, since the scales\\ have a low range, with a lower and upper bound on the\\ answer values, this is not much of a concern. Therefore,\\ even in cases of skewness, the mean can be a useful metric.\end{tabular} \\ \cline{2-3}
    \multicolumn{1}{|l|}{}                                                                                & \textbf{Median}                                                        & \begin{tabular}[c]{@{}l@{}}Value of the 50\% percentile, for numerical answers. Half\\ the answers are above this value and half are below,\\ pointing to a central tendency around this value. This is\\ a good metric to use, especially in skewed distributions\\ where there are outliers in the collected values, since the\\ meaning of the mean may get slightly distorted by the\\ outlier values.\end{tabular}                                                                                \\ \cline{2-3}
    \multicolumn{1}{|l|}{}                                                                                & \textbf{Mode}                                                          & \begin{tabular}[c]{@{}l@{}}Most frequent response. Though it represents the most\\ popular answers, by itself the metric means nothing else,\\ as there might be answers almost as popular or not.\end{tabular}                                                                                \\ \hline
    \multicolumn{1}{|l|}{\multirow{2}{*}{\begin{tabular}[c]{@{}l@{}}Measures of Spread,\\ Scale or Dispersion\end{tabular}}}     & \textbf{\begin{tabular}[c]{@{}l@{}}Standard \\ Deviation\end{tabular}} & \begin{tabular}[c]{@{}l@{}}Quantifies the variation within the data set, by showing\\ how much the distribution spreads to either sides of the\\ center. A high value for the standard deviation means\\ that there are a lot of values away from the mean, from\\ which can be concluded that there is not a general\\ consensus on a certain answers.A low value means that\\ there is consensus, since all the values of the data set are\\ bundled more closely together.\end{tabular}                                                                                \\ \cline{2-3}
    \multicolumn{1}{|l|}{}                                                                                & \textbf{Range}                                                         & \begin{tabular}[c]{@{}l@{}}Difference between highest and lowest value of the data set.\\ Together with the standard deviation, indicates the dispersion\\ of the value of the answers. A range of 0 means that a\\ question had the same value for all responses, for instance.\\ This metric ignores the frequency with which each answer\\ was given, that is why it must be coupled with the standard\\ deviation to be relevant.\end{tabular}                                                                                \\ \hline
    \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Measures of\\ Skewness and\\ Kurtosis\end{tabular}}                          & \textbf{Skew}                                                          & \begin{tabular}[c]{@{}l@{}}This metric indicates the lack of symmetry in a distribution,\\ where the results bunch up in one side of the distribution.\\ For instance, negative skewness values indicate a skew to\\ the left: the values bunch up at the right end of the distribution\\ and the left tail is long, indicating there are outliers in the lower\\ values.\end{tabular}                                                                                \\ \hline
    \end{tabular}
    }
    \end{table}


% Boris Jeremic (@ucdavis.edu)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{OpenSees Commands to Create Material Models using Template Elasto--Plastic Framework}
\label{EPTemplate_commands}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Yield Surface Command}
\label{YS_Command}

\begin{verbatim}
set ys "-YieldSurfaceType <parameter list>"
\end{verbatim}

This  command sets the yield surface variable \texttt{ys} to be
the  specified  type.  A  list  of  paramaters can be passed to
define the yield surface and the number of parameters depend on
the  type  of yield surface. Valid strings for YieldSurfaceType
are \texttt{DP}, \texttt{VM}, \texttt{CC}, and \texttt{RMC01},
which  are described in the following subsections.

\subsubsection{Drucker-Prager Yield Surface}
\label{dp_ys}
\begin{verbatim}
set ys "-DP"
\end{verbatim}

\texttt{DP}  stands  for  Drucker-Prager type, i.e. cone shaped
yield  surface. In this case, no parameter needs to be supplied
since the slope $\alpha$ is treated as an internal variable.

\subsubsection{von Mises Yield Surface}
\label{vm_ys}
\begin{verbatim}
set ys "-VM"
\end{verbatim}

\texttt{VM}  stands  for  von  Mises type, i.e. cylinder shaped
yield  surface. In this case, no parameter needs to be supplied
since  the  size  of  the  cylinder  is  treated as an internal
variable.

\subsubsection{Cam-Clay Yield Surface}
\label{cc_ys}
\begin{verbatim}
set ys "-CC M?"
\end{verbatim}

\texttt{CC}  stands  for  Cam-Clay  type, i.e. ellipsoid shaped
yield surface. For \texttt{CC} type yield surface, the slope of
the  critical  state  line  in  p--q  space, i.e. M, need to be
supplied.

\subsubsection{Rounded Mohr-Coulomb (Willam-Warnke) Yield Surface}
\label{rmc01_ys}
\begin{verbatim}
set ys "-RMC01"
\end{verbatim}

\texttt{RMC01} stands for rounded Mohr-Coulomb (Willam-Warnke) type,
i.e. cone shaped
yield  surface. In this case, no parameter needs to be supplied,
this is similar to the Drucker-Prager yield surface.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Potential Surface Command}
\label{PS_Command}

\begin{verbatim}
set ps "-PotentialSurfaceType <parameter list>"
\end{verbatim}

This command sets the potential surface variable \texttt{ps} to
be  the  specified  type. A list of paramaters can be passed to
define  the  potential  surface  and  the  number of parameters
depend  on  the  type  of  potential surface. Valid strings for
PotentialSurfaceType    are   \texttt{DP},   \texttt{VM},   and
\texttt{CC}, which are described in the following subsections.

\subsubsection{Drucker-Prager Potential Surface}
\label{dp_ps}
\begin{verbatim}
set ps "-DP"
\end{verbatim}

\texttt{DP}  stands  for  Drucker-Prager type, i.e. cone shaped
potential  surface.  In  this  case,  no  parameter needs to be
supplied  since  the  slope  $\alpha$ is treated as an internal
variable.

\subsubsection{von Mises Potential Surface}
\label{vm_ps}
\begin{verbatim}
set ps "-VM"
\end{verbatim}

\texttt{VM}  stands  for  von  Mises type, i.e. cylinder shaped
potential  surface.  In  this  case,  no  parameter needs to be
supplied  since  the  size  of  the  cylinder  is treated as an
internal variable.

\subsubsection{Cam-Clay Potential Surface}
\label{cc_ps}
\begin{verbatim}
set ps "-CC M?"
\end{verbatim}

\texttt{CC}  stands  for  Cam-Clay  type, i.e. ellipsoid shaped
potential  surface. For \texttt{CC} type potential surface, the
slope of the critical state line in p--q space, i.e. M, need to
be supplied.

\subsubsection{Rounded Mohr-Coulomb (Willam-Warnke) Potential Surface}
\label{rmc01_ps}
\begin{verbatim}
set ps "-RMC01"
\end{verbatim}

\texttt{RMC01} stands for rounded Mohr-Coulomb (Willam-Warnke) type,
i.e. cone shaped
Potential  surface. In this case, no parameter needs to be supplied,
this is similar to the Drucker-Prager Potential surface.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Evolution Law Command}
\label{EL_Command}

\begin{verbatim}
set el "-EvolutionLawType <parameter list>"
\end{verbatim}

This  command sets the evolution law variable \texttt{el} to be
the  specified  type.  A  list  of  paramaters can be passed to
define  the  potential  surface  and  the  number of parameters
depend  on  the  type  of  potential surface. Valid strings for
EvolutionLawType are \texttt{Leq}, \texttt{NLp}, and \texttt{},
which are described in the following subsections.

\subsubsection{Linear Scalar Evolution Law}
\label{leq_el}
\begin{verbatim}
set el "-Leq a?"
\end{verbatim}

\texttt{Leq}  stands  for  Linear  Scalar  Evolution  Law. This
hardening  rule  is  based on the equivalent deviatoric plastic
strain $\epsilon_q^{pl}$. In this case, linear hardening coefficient
\texttt{a}  needs  to  be  supplied. This hardening rule can be
applied  to  any scalar internal variable, such as the slope of
Drucker--Prager  yield  surface, the diameter of von Mises yield
surface, and so on.

\subsubsection{Nonlinear Scalar Evolution Law}
\label{nlp_el}

%\texttt{set} \texttt{el} \texttt{"-NLp} $e_o$? $\lambda$? $\kappa$? \texttt{"}
\begin{verbatim}
set el "-NLp e0? lambda? kappa? "
\end{verbatim}

\texttt{NLp}  stands  for  Nonlinear Scalar Evolution Law. This
hardening  rule  is  based  on  the  volumetic  plastic  strain
$\epsilon_p^{pl}$.  In  this  case, parameters including void ration
\texttt{e0},  \texttt{lambda} and  \texttt{kappa}  need   to  be  supplied. This
hardening rule is primarily for the evolution of the tip stress
$p^{'}_{o}$ in Cam-Clay model.

\subsubsection{Linear Tensorial Evolution Law}
\label{LEij}
\begin{verbatim}
set et "-LEij a?"
\end{verbatim}

\texttt{LEij}  stands  for  Linear Tensorial Evolution Law. This
hardening    rule    is    based    on   the   plastic   strain
$\epsilon_{ij}^{pl}$. In this case, linear hardening
coefficient  \texttt{a}  needs  to  be supplied. This hardening
rule can be applied to any tensorial internal variable, such as
the  the  center  $\alpha_{ij}$ of Drucker--Prager yield surface
or von Mises yield surface, and so on.

\subsubsection{Nonlinear Tensorial Evolution Law (Armstrong-Frederick model )}
\label{NLEij}
%\texttt{set et "-NLEij} $h_a$? $C_r$? \texttt{"}
\begin{verbatim}
set et "-NLEij ha? Cr?"
\end{verbatim}

\texttt{NLEij}  stands  for  Nonlinear Tensorial Evolution Law
from Armstrong--Frederick nonlinear model. This kinematic hardening law is
based on the plastic strain $\epsilon_{ij}^{pl}$. In this case,
nonlinear  hardening  coefficients  \texttt{ha}  and \texttt{Cr} need to be
supplied.  This  hardening rule can be applied to any tensorial
internal  variable,  such  as  the  the center $\alpha_{ij}$ of
Drucker--Prager yield surface or von Mises yield surface, and so
on.

%%\subsection{Nonlinear Tensorial Evolution Law (Manzari-Dafalias model)}
%%\label{LEij}
%%%\begin{verbatim}
%%\texttt{set et "-NLEijMD} $h_a$? $C_r$? \texttt{"}
%%%\end{verbatim}

%%\texttt{NLEij}  stands  for  Nonlinear  Tensorial Evolution Law
%%from Manzari--Dafalias model. This kinematic hardening law is
%%based on the plastic strain $\epsilon_{ij}^{pl}$. In this case,
%%nonlinear  hardening  coefficients  $h_a$  and $C_r$ need to be
%%supplied.  This  hardening rule can be applied to any tensorial
%%internal  variable,  such  as  the  the center $\alpha_{ij}$ of
%%Drucker--Prager yield surface or von Mises yield surface, and so
%%on.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{EPState Command}
\label{ep_Command}
%\texttt{set sts} \texttt{"} $\sigma_{xx}?~\sigma_{xy}?~\sigma_{xz}?~\sigma_{yx}?~\sigma_{yy}?
%~\sigma_{yz}?~\sigma_{zx}?~\sigma_{zy}?~\sigma_{zz}?$\texttt{"}
\begin{verbatim}
<set sts "Sxx? Sxy? Sxz? Syx? Syy? Syz? Szx? Szy? Szz?">
\end{verbatim}

\begin{verbatim}
set eps "<-NOD nt?> -NOS ns? sc1? sc2? ... <-stressp sts>"
\end{verbatim}

First  statement  sets  the  initial  stress tensor to variable
\texttt{sts} (if it is not stated here, no initial stress by default).
Second  statement  assigns to the Elasto-Plastic
state  variable  \texttt{eps}  the  specified state parameters,
including
%%Young's  Modulus at atmospheric pressure $E_o$, current Young's
%%Modulus  E,  Poisson's ratio $\nu$, mass density $\rho$,
number of  tensorial  internal variables \texttt{nt}
(if it is not stated here, $nt=0$ by default),
number of scalar internal variables \texttt{ns}
and corresponding initial values \texttt{sc1}, \texttt{sc2}, ...,
and  initial  stresses  defined  in \texttt{\$sts}
(if it has been previously defined).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Template Elasto-Plastic Material Command}
\label{temp_Command}
%\texttt{nDMaterial Template3Dep} mTag? -YS \$ys? -PS \$ps? -EPS \$eps?
%$<$-ELS1 \$el?$>$ $<$-ELT1? \$et?$>$
\begin{verbatim}
nDMaterial Template3Dep mTag? -YS $ys? -PS $ps? -EPS $eps? <-ELS1 $el?>
<$-ELT1 et?>
\end{verbatim}

A   template   elasto-plastic   material  is  constructed  using
\texttt{nDMaterial}  command.  The  argument  \texttt{mTag} is used to
uniquely  identify  this  nDMaterial  object  among  nDMaterial
objects  in  the  BasicBuilder  object.  The  other  parameters
include  previously  defined  yield surface object \texttt{ys},
potential  surface  object  \texttt{ps},  elasto-plastic  state
object  \texttt{eps},  scalar evolution law object \texttt{el},
and tensorial evolution law object \texttt{et}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Examples}
\label{ep_command_Examples}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{von Mises Model} \

\begin{small}
\begin{verbatim}
# Yield surface
set ys "-VM"

# Potential surface
set ps "-VM"

# Scalar evolution law: linear hardening coef = 1.0
set ES1  "-Leq  1.10"

# EPState
#______________k=f(Cu)
set EPS "-NOD 0 -NOS 1 20"#

# Creating nDMaterial using Template Elastic-Plastic Model
nDMaterial Template3Dep 1 -YS $ys -PS $ps -EPS $EPS -ELS1 $ES1

\end{verbatim}
\end{small}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Drucker--Prager Model} \

\begin{small}
\begin{verbatim}
# Yield surface
set ys "-DP"

# Potential surface
set ps "-DP 0.1"

# Scalar evolution law: linear hardening coef = 1.0
set ES1  "-Leq  1.10"

# Initial stress
set sts "0.10 0 0  0 0.10 0  0 0 0.10"

# EPState
#______________alpha___k
set EPS "-NOD 0 -NOS 2 0.2 0.0 -stressp $sts"
#
# where
#alpha = 2 sin(phi) / (3^0.5) / (3-sin(phi) ), phi is the friction angle
# and k is the cohesion

# Creating nDMaterial using Template Elastic-Plastic Model
nDMaterial Template3Dep 1 -YS $ys -PS $ps -EPS $EPS -ELS1 $ES1

\end{verbatim}
\end{small}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Cam-clay Model} \

\begin{small}
\begin{verbatim}
# Yield surface M = 1.2
set ys "-CC 1.2"

# Potential surface M = 1.2
set ps "-CC 1.2"

# Scalar evolution law___void ratio___Lamda___Kappa
set ES1  "-NLp           0.85        0.19   0.06"

# Initial stress
set sts "0.10 0 0  0 0.10 0  0 0 0.10"

#________________po
set EPS "-NOS 1 200.1 -stressp $sts"

#
nDMaterial Template3Dep 1 -YS $ys -PS $ps -EPS $EPS -ELS1 $ES1

\end{verbatim}
\end{small}