### 4.6 Consistency criteria for force-free boundary conditions

After Stokes inversion (see Section 4.1) and azimuth ambiguity removal, we derive the photospheric
magnetic field vector. Unfortunately there might be a problem, when we want to use these data as the
boundary condition for NLFFF extrapolations. Due to Metcalf et al. (1995), the solar magnetic field is not
force-free in the photosphere (finite plasma), but becomes force-free only at about 400 km above the
photosphere. This is also visible in Figure 2 from Gary (2001), which shows the distribution of the
plasma value with height. Consequently, the assumption of a force-free magnetic field is not
necessarily justified in the photosphere. Unless we have information on the magnetic flux through the
lateral and top boundaries, we have to assume that the photospheric magnetic flux is balanced
which is usually the case when taking an entire active region as the field-of-view.
In the following, we review some necessary conditions the magnetic field vector has to fulfill in order to
be suitable as boundary conditions for NLFFF extrapolations. Molodenskii (1969); Molodensky (1974) and
Aly (1989) defined several integral relations, which are related to two moments of the magnetic stress
tensor.

- The first moment corresponds to the net magnetic force, which has to vanish on the boundary:
- The second moment corresponds to a vanishing torque on the boundary:

The total energy of a force-free configuration can be estimated directly from boundary conditions with the help
of the virial theorem (see, e.g., Aly, 1989, for a derivation of this formula)

For Equation (36) to be applicable, the boundary conditions must be compatible with the force-free
assumption. If the integral relations (31) – (35) are not fulfilled then the data are not consistent with the
assumption of a force-free field. A principal way to avoid this problem would be to measure the magnetic
field vector in the low- chromosphere, but unfortunately such measurements are not routinely available.
We have therefore to rely on photospheric measurements and apply some procedure, dubbed
‘preprocessing’, in order to derive suitable boundary conditions for NLFFF extrapolations. As pointed out
by Aly (1989) the condition that is constant on magnetic field lines (12) leads to the integral relation
where and correspond to areas with positive and negative in the photosphere, respectively,
and is an arbitrary function. Condition (37) is referred to as differential flux-balance condition
as it generalizes the usual flux-balance condition (30). As the connectivity of magnetic field
lines (magnetic positive and negative regions on the boundary connected by field lines) is a
priori unknown, relation (37) is usually only evaluated after a 3D force-free model has been
computed.