  A lot of plasma physics problems are not amenable to exact solutions due to
many reasons. It is worth mentioning among them, for example, nonlinearity of
the motion equations, variable coefficients or non lineal conditions on known
or unknown borders. To solve these problems, different types of approximations
which are combinations of analytical and numerical simulation methods are put
into practice. The problem of plasma behavior in numerous varieties of a
minimum-B magnetic trap where the plasma is heated under electron cyclotron
resonance (ECR) conditions is the subject of numerical simulation studies. At
present, the ECR minimum-B trap forms the principal part of the multicharge ion
sources.
  In this work, a scheme of the relativistic Particle-in-Cell (PIC) code
elaborated for an ECR plasma heating study in minimum-B traps is presented. For
a PIC numerical simulation, the code is applied to an ECR plasma confined in a
minimum-B trap formed by two current coils generating a mirror magnetic
configuration and a hexapole permanent magnetic bars to suppress the MHD
instabilities. The plasma is maintained in a cylindrical chamber excited at
$TE_{111}$ mode by $2.45$ $GHz$ microwave power. In the obtained magnetostatic
field, the ECR conditions are fulfilled on a closed surface of ellipsoidal
type. Initially, a Maxwellian homogeneous plasma from ionic temperature of $2$
$eV$ being during $81.62$ $ns$, that correspond to $200$ cycles of microwaves
with an amplitude in the electric field of $1$ $kV/cm$ is heated. The electron
population can be divided conditionally into a cold group of energies smaller
than $0.2$ $keV$, a warm group whose energies are in a range of $3-10$ $keV$
and hot electrons whose energies are found higher than $10$ $keV$.
