\section{Source\_Maxwell\_3: A continuous source
with a Maxwellian spectrum}
\label{source-maxwell}
\index{Sources!Continuous source
with a Maxwellian spectrum}

%\component{Source\_Maxwell\_3}{System}{ $h$, $w$, $d_\textrm{foc}$, $xw$, $yh$, $\lambda_\textrm{low}$, $\lambda_\textrm{high}$, $I_1$, $T_1$}{$I_2$, $T_2$, $I_3$, $T_3$}{Validated. t=0}
\mcdoccomp{sources/Source_Maxwell_3.parms}

This component is a source with a Maxwellian energy/wavelength distribution
sampled in the range $\lambda_\textrm{low}$ to $\lambda_\textrm{high}$.
The initial neutron ray position is chosen randomly from within a
rectangle of area $h \times w$ in the $z=0$ plane.
The initial neutron ray direction is focused within
a solid angle, defined by a rectangular target of width
$xw$, height $yh$, parallel to
the $xy$ plane placed at $(0,0,d_\textrm{foc})$.
The energy distribution used is a sum of 1, 2, or 3 Maxwellians with
temperatures $T_1$ to $T_3$ and integrated intensities $I_1$ to $I_3$.

For one single Maxwellian,
the intensity in a small wavelength interval $[\lambda, \lambda+d\lambda]$ is
$ I_1 M(\lambda,T_1) d\lambda $
where
$M(\lambda,T_1) = 2 \alpha^2 \exp(-\alpha/\lambda^2) / \lambda^5 $
is the normalized Maxwell distribution ($\alpha=949.0$~K \AA$^2/T_1$).
The initial weight of the created neutron ray, $p_0$, is
calculated according to Eq. (\ref{proprule}), with $\Psi(\lambda)$ replaced
by $\sum_{j=1}^3 I_j M(\lambda,T_j)$.

%
%The number of neutrons per second through a focusing window
%of solid angle $\Omega$
%from a source of area $A$ within the wavelength interval $\lambda_1$ to
%$\lambda_2$ is thus
%\begin{equation}
%I_\textrm{tot} = \Omega A \int_{\lambda_1}^{\lambda_2} I_1 M(\lambda,T_1) d\lambda.
%\end{equation}
%In a Monte Carlo integration, the observed intensity becomes
%\begin{equation}
%I_\textrm{MC} \approx N_\textrm{MC} \int p(\lambda) \pi_1(\lambda) d\lambda ,
%\end{equation}
%where $N_\textrm{MC}$ is the number of Monte Carlo steps.
%We here choose the wavelength from a uniform distribution between the two
%limits, giving $p(\lambda)=1/(\lambda_2-\lambda_1)$.
%To fulfill $I_\textrm{tot} = I_\textrm{MC}$ we need to have
%\begin{equation}
%\pi_1(\lambda) = \Omega A (\lambda_2-\lambda_1) I_1 M(\lambda,T_1) / N_\textrm{MC} .
%\end{equation}
%
%This expression is strictly valid only for $\Omega \ll 1$,
%see also the discussion on focusing in section \ref{s:focus}.
%The expression is easily generalized to a general number of Maxwellians.

The component \textbf{Source\_gen} (see section \ref{source-gen})
works on the same principle, but provides more options concerning
wavelength/energy range specifications, shape, etc.

Maxwellian parameters for some continuous sources
are given in Table~\ref{t:source-params}. As nobody knows exactly the characteristics of the sources (it is not easy to measure spectrum there), these figures should be used with caution.

