1 Introduction

Traditionally the global structure of the coronal magnetic field is modeled with the help of source surface potential field models (PFSS, see Schatten, Wilcox, and Ness, 1969). In potential field models electric currents are neglected and they require as photospheric boundary condition only line-of-sight magnetic field measurements. Nevertheless, the effect of a solar wind flow is considered by the introduction of a so called ‘source surface’ as outer boundary condition. At this artificial surface, usually at \(2.5~R_{s}\), all field lines are assumed to become radial, thereby mimicking the effect of the solar wind. Going beyond this simple potential field approach with non-potential global coronal magnetic field models has been an active research topic for several years with various physical models (see, e.g., Mackay and Yeates, 2012; Wiegelmann, Petrie, and Riley, 2017, for review articles on global coronal magnetic field modeling). Recently, several of the non-potential methods (seven different codes) have been compared in the framework of an ISSI meeting and the results have been published (Yeates et al., 2018). While all of the models are non-potential and incorporate electric currents, the physical assumptions and computational implementations are different and the models used also different input data. One group of codes are nonlinear force-free extrapolations (3 different implementations have been compared), which do not consider time dependence and plasma effects. As boundary condition these codes require measurements of the photospheric magnetic field vector. Codes for solving the nonlinear force-free equations have been first applied to active regions and different numerical methods and implementations have been intensively compared and evaluated in a number of studies, e.g., Schrijver et al. (2006), Metcalf et al. (2008), Schrijver et al. (2008), DeRosa et al. (2009, 2015). Active region and global nonlinear force-free codes finally solve the same nonlinear force-free equations, but do so with different numerical implementations. Well known codes for global nonlinear force-free computations are based on the Grad–Rubin method (see Amari et al., 2013, 2014), an optimization principle (see Wiegelmann, 2007; Tadesse et al., 2014) and force-free electrodynamics (see Contopoulos, Kalapotharakos, and Georgoulis, 2011; Contopoulos, 2013).

Other approaches go beyond the force-free assumption and take effects like plasma forces, flows and time-dependence into account. In the linear magnetostatic approaches (see Bogdan and Low, 1986; Neukirch, 1995) the Lorentz force is compensated by plasma pressure and gravity forces. Coronal equilibria with plasma pressure and steady 3D nonlinear flows have been found in Nickeler et al. (2017). The evolving magnetofrictional method (see Mackay and van Ballegooijen, 2006; Yeates, 2014) solves also the force-free equations, but takes the time dependence into account and requires therefore a time sequence of photospheric magnetograms (radial component only) as boundary condition and incorporates flux transport. MHD codes from different research groups (see, e.g., Mikic and Linker, 1994; Mikić et al., 1999 and Feng et al., 2012; Feng, 2020) are capable to solve the full MHD equations.

For global corona models these codes use the radial photospheric field as boundary conditions. It is possible, however, to limit the MHD simulations to the assumption of a zero-\(\beta \) plasma, and to incorporate additional observations, e.g., use results from magnetofrictional simulations (see Yeates et al., 2018, for details).

An interesting point is that only the (static) nonlinear force-free codes make use of the photospheric vector magnetograms, whereas all other methods compared in Yeates et al. (2018) use the radial photospheric field only. As a consequence the study of Yeates et al. (2018) revealed that the nonlinear force-free extrapolations are superior in active regions (where the vector magnetic field measurements are most accurate) while quiet Sun features like filament channels are better modeled by other approaches. These findings stimulated us using vector magnetograms as boundary condition and go beyond the force-free assumption. To do so we develop a new stationary MHD code with field aligned plasma flow, which uses synoptic vector magnetograms as boundary condition.

We organize the paper as follows: In Section 2 we present the stationary MHD-equations and how we aim to solve them with the help of an optimization principle. Section 3 contains an application and evaluation of the newly developed code to a synoptic vector magnetogram observed with SDO/HMI. Finally we draw conclusions and give an outlook for future work in Section 4.

2 Basic Equations

2.1 Stationary Compressible MHD

To model the coronal magnetic field and plasma environment we use the equations of stationary compressible ideal MHD,

$$\begin{aligned} \rho \left ({\mathbf{v}} \cdot \nabla \right ){\mathbf{v}} =& \frac{1}{\mu _{0}} \, \left (\nabla \times {\mathbf{B}} \right )\times { \mathbf{B}} - \nabla p -\rho \nabla \Psi \ , \end{aligned}$$
(1)
$$\begin{aligned} \nabla \cdot {\mathbf{B}} =& 0 \, , \end{aligned}$$
(2)
$$\begin{aligned} \nabla \cdot \left (\rho {\mathbf{v}}\right ) = & 0\, , \end{aligned}$$
(3)
$$\begin{aligned} p = & \rho R \, T, \end{aligned}$$
(4)
$$\begin{aligned} {\mathbf{E}} + {\mathbf{v}} \times {\mathbf{B}} =& 0, \end{aligned}$$
(5)

where \({\mathbf{B}}\) is the magnetic field, \(p\) the plasma pressure, \(\rho \) the mass density, \({\mathbf{v}}\) the flow velocity, \(\Psi \) the gravity potential, \(\mu _{0}\) the permeability of free space, \(T\) the temperature, \(R\) the gas constant and \({\mathbf{E}}\) the electric field. The stationary MHD equations are given by the force balance Equation 1, the solenoidal condition (Equation 2), mass continuity Equation 3, an energy equation or an equation of state (Equation 4) and ideal Ohm’s law (Equation 5). We are aware that non-ideal effects as, e.g., caused by turbulence, can lead to a violation of ideal Ohm’s law and play an important role for coronal heating and solar wind expansion (see Cranmer et al., 2015, for a review article). For special cases (2.5D, incompressible flow and no gravity) stationary solutions of resistive MHD have been found (see, e.g., Throumoulopoulos, 1998; Throumoulopoulos and Tasso, 2000; Nickeler et al., 2014). Studying turbulence and resistivity is well outside the scope of this work, however. For simplicity we assume an isothermal equation of state in Equation 4, which leads to a linear relation of plasma pressure and density. We replace \(p\) by \(\rho R T\) in Equation 1 to reduce the number of independent quantities. For the highly conducting coronal plasma we have to consider ideal Ohms law, which is for a vanishing electric field satisfied if \({\mathbf{v}} \times {\mathbf{B}} = \nabla f\), with an arbitrary scalar function \(f\), which is constant on magnetic field lines. For the particular choice \(f=0\), which we use here, the plasma flows and magnetic fields are parallel.

2.2 Optimization Principle for Stationary MHD

Minimizing a functional \(L\) of quadratic terms to compute 3D coronal magnetic field models has been introduced by Wheatland, Sturrock, and Roumeliotis (2000) for computing nonlinear force-free fields. First implementations of this optimization approach have been done in Cartesian geometry to model active regions. A spherical implementation for global force-free optimization has been done in Wiegelmann (2007) and was first applied with synoptic vector magnetograms as boundary condition in Tadesse et al. (2014). A magnetohydrostatic optimization code has been developed in Wiegelmann et al. (2007) for global computations in spherical geometry. Within this work we try to extend this optimization approach towards stationary MHD.

We aim to solve the stationary MHD Equations 15 by minimizing a functional \(L\) which we define as

$$ L({\mathbf{B}}, {\mathbf{v}}, \rho ) = L_{\mathrm{force}} + L_{\mathrm{divB}} + L_{\mathrm{cont}} + L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}, $$
(6)

where all terms in the functional have a quadratic form as defined below. This means that the stationary MHD equations are solved when \(L\) is zero. The term \(L_{\mathrm{force}}\) is

$$ L_{\mathrm{force}} = \int _{V} \frac{ \left [ \left ({\nabla } \times {\mathbf{B}}\right )\times {\mathbf{B}} - \mu _{0} \nabla (\rho R T) - \mu _{0} \rho \nabla \Psi -\mu _{0} \rho \left (\nabla \times {\mathbf{v}} \right ) \times {\mathbf{v}} -\frac{\mu _{0} \rho }{2} \nabla {v^{2}} \right ]^{2}}{B^{2}} \; dV, $$
(7)

and if this term vanishes, Equation 1 is satisfied. We applied vector identities to the flow terms to bring them into a similar form as the magnetic terms. The linearity in the isothermal equation of state (Equation 4) has been used to substitute \(p\) by \(\rho R T\).

The other parts of the functional are linked to the solenoidal condition, the steady-state continuity equation, and the condition that the flow is field aligned:

$$\begin{aligned} L_{\mathrm{divB}} = & \int _{V} [ \nabla \cdot {\mathbf{B}}]^{2} \; dV, \end{aligned}$$
(8)
$$\begin{aligned} L_{\mathrm{cont}} = & \int _{V} \left [\nabla \cdot \left (\rho {\mathbf{v}} \right ) \right ]^{2} \; dV, \end{aligned}$$
(9)
$$\begin{aligned} L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})} = & \int _{V} \; \tanh (M_{A}^{2}) \; \frac{\left [ \mathbf{v} \times \mathbf{B }\right ]^{2}}{v^{2} \, B^{2}} \; dV, \end{aligned}$$
(10)

where \(M_{A}=v/v_{A}\) is the Alfvén Mach number and \(v_{A}=B/\sqrt{\mu _{0} \rho }\) is the Alfvén velocity. In the \(L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}\) term we use a weighting with the Alfvén Mach number \(M_{A}\) to give a stronger weight to regions with strong flow. The \(B^{2}\) in the nominator of Equation 7 originates from the nonlinear force-free and magnetohydrostatic optimization codes. Dividing by this term ensures that sufficient weight is given to the equilibrium in weak field regions and gives the terms \(L_{\mathrm{force}}\) and \(L_{\mathrm{divB}}\) the same dimensionality. While in the functional all terms are of quadratic form, it might be convenient for humans to monitor also the angle between magnetic fields and flows in degrees,

$$ {\mathrm{angle}(\mathrm{B}, \mathrm{v})}= {\mathrm{asin}} \left (\left (\int \frac{|{\mathbf{v}} \times {\mathbf{B}}|}{|{\mathbf{B}}|} \; dV \right )/ \int |{ \mathbf{v}}| \; dV \right ) .$$
(11)

This formula is similar to the definition of the weighted average angle between magnetic field and electric currents used for evaluating the quality of force-free computations (see Schrijver et al., 2006, for details).

3 Testing and Application of the Method

Previous versions of optimization codes have been tested first with known analytical or semi-analytical equilibria, see e.g. Low and Lou (1990) for nonlinear force-free active region models and Neukirch (1995) for global magnetostatic equilibria. Unfortunately we are not aware of analytic 3D solutions of stationary MHD-equilibria with compressible plasma flow and gravity. We therefore use the code to construct a numerical equilibrium by minimizing the functional (Equation 6) and monitoring the individual terms (Equations 710).

3.1 Boundary Conditions and Initial Force-Free Model

If all non-magnetic terms in the stationary MHD Equations 15 are neglected, we get as a subclass the nonlinear force-free field equations, which are given as

$$\begin{aligned} \left (\nabla \times \mathbf{B}\right )\times \mathbf{B } = & 0, \end{aligned}$$
(12)
$$\begin{aligned} \nabla \cdot \mathbf{B } =& 0. \end{aligned}$$
(13)

As boundary data we use a synoptic vector magnetogram from SDO/HMI for Carrington rotation 2099 as shown in Figure 1, which has been observed between 13/07/2010 and 09/08/2010. Because of the grid convergence problem at the poles (see Wiegelmann, 2007) and because accurate vector field measurements at poles are still not available, we cut out polar regions and limit our computation to latitudes \(\theta =20 \dots 160\). The spatial grid resolution is 2 degrees. As initial state we compute a nonlinear force-free field up to \(r=10~R_{s}\), which solves the force-free Equations 1213 with the global force-free optimization approach as described in Wiegelmann (2007), Tadesse et al. (2014). The force-free iteration itself uses a potential field as initial state and the potential field solution is also kept on the theta boundaries. We would like to point out that the initial state for the force-free iteration is not a PFSS model, because that is radially limited to the source surface located at \(2.5~R_{s}\). We use just the decaying mode of a spherical harmonic representation and for the tests done here limit them to \(l=12\). This corresponds to a special case of the global linear magnetostatic model developed in Bogdan and Low (1986) with \(\alpha =0\) and \(a=0\).

Figure 1
figure 1

As boundary data we use a synoptic vector magnetogram from SDO/HMI for Carrington rotation 2099, which has been observed between 13/07/2010 and 09/08/2010. The polar regions have been cut out. One active region (white box in top panel) and a quiet sun area of the same size (black box) are investigated in Section 3.5.

3.2 Initial Parker Solar Wind Solution

If all magnetic terms in the stationary MHD Equations 15 are neglected, we get as a subclass the stationary hydrodynamic equations

$$\begin{aligned} \rho \left (\mathbf{v}\cdot \nabla \right )\mathbf{v } =& - \nabla p -\rho \nabla \Psi , \end{aligned}$$
(14)
$$\begin{aligned} \nabla \cdot \left (\rho \mathbf{v}\right ) = & 0, \end{aligned}$$
(15)
$$\begin{aligned} p = & \rho R \, T, \end{aligned}$$
(16)

where the gravitational potential is \(\Psi =-G M_{s}/r\), where \(G\) is the gravity constant, \(M_{s}\) the solar mass and \(r\) the distance from the center of the sun. To initialize the plasma and flow variables we use the spherical symmetric solution of the stationary hydrodynamic Equations 1416, which was found by Parker (1958) and describes the solar wind. We use an isothermal solution which can be solved analytically by using the Lambert W function (see Cranmer, 2004, for details). In the isothermal case there are only two free parameters, \(T\) and \(p\) (or alternatively \(T\) and \(\rho \)). We use \(T=3~\mbox{MK}\) and \(p\) is so specified that the average plasma beta at \(r= 1~R_{s}\) is \(\beta =0.01\), whereas the magnetic pressure was computed (and averaged over the sphere) from the initial force-free magnetic field. The sound velocity is \(c_{s}=157\mbox{ km}/\mbox{s}\) and the corresponding critical radius is \(r_{c}=3.84~R_{s}\). Figure 2 shows several quantities of this spherically symmetric solution as a function of the radius \(r\). Panel a) contains the plasma pressure gradient force (black), gravity force (green) and the flow force (red). At low coronal heights the flow force is small and gravity and pressure forces compensate each other. With increasing distance from the sun the flow becomes more and more important. The flow velocity is shown in panel b). In panel c) we compare the magnetic pressure (green), plasma pressure (black) and solar wind ram pressure (red). At low heights in the low \(\beta \) corona (black line in panel d) the magnetic pressure dominates. This is also the region which is usually computed using the force-free assumption. With increasing height the plasma pressure and kinematic pressure become more important and finally dominate over the magnetic pressure. The red line in panel d) shows the Alfvén Mach-number \(M_{A}\). In the lower corona \(M_{A}\) is very small, but increases to values above unity with increasing distance from the sun. In regions with \(\beta \ll 1\) and \(M_{A} \ll 1\) it is justified to neglect the influence of plasma effects and flows and this is a justification why these regions are usually modeled under the force-free assumption. Higher up in the corona, however, \(\beta \) and \(M_{A}\) exceed unity and the force-free assumption is not valid. Therefore plasma and flow effects have to be taken into account, which is done here in the framework of stationary MHD.

Figure 2
figure 2

The variation of the initial conditions, based on a combination of a force-free magnetic field and a spherically symmetric Parker wind solution. a) Shows the different force terms. b) Solar wind velocity as a function of \(r\) c) Plasma and kinematic pressure from Parker’s model, magnetic pressure from force-free field model. d) Plasma Beta and Alfvén Mach number: If both quantities are small, plasma and flow forces can be neglected for computing the coronal magnetic field.

3.3 Evaluation of the Initial State and Optimization

In the initial state the force-free Equations 1213 and the hydrodynamic Equations 1416 are fulfilled separately. Table 1 shows in the line ‘NLFFF, Parker’ the discretization errors of the terms \(L_{\mathrm{force}}\), \(L_{\mathrm{divB}}\) and \(L_{\mathrm{cont}}\) in the initial state. The term \(L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}\) is not a discretization error, it indicates how well the magnetic field and the plasma flow are aligned. For a perfect equilibrium with field aligned flow all terms would be zero. While this initial state contains a force-free magnetic field configuration and a spherically symmetric hydrodynamic solar wind, the magnetic field and plasma flow are not aligned. The averaged weighted angle between \({\mathbf{v}}\) and \({\mathbf{B}}\) is \(31.1^{\circ }\) and the corresponding term of the functional \(L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}\) is more than two orders of magnitude larger than the discretization errors in final state after relaxation.

Table 1 Value of the different terms of the functional \(L\) (see Equations 610) for the initial state and the final stationary MHD equilibrium. The evolution of these quantities during the iteration is shown in Figure 3. We monitor also the weighted angle between magnetic field and plasma flow as defined in Equation 11.

We minimize the functional \(L\) iteratively with a steepest descent method, which has been successfully used in the global nonlinear force-free and magnetohydrostatic optimization codes (see Wiegelmann, 2007; Wiegelmann et al., 2007, for details). Figure 3 shows the evolution of \(L\) in black and its individual terms: \(L_{\mathrm{force}}\) in green,\(L_{\mathrm{divB}}\) in blue, \(L_{\mathrm{cont}}\) in orange and \(L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}\) in red. While the \(L_{\mathrm{force}}\) and \(L_{\mathrm{divB}}\) term stay approximately constant, the term \(L_{\mathrm{angle}(\mathrm{B}, \mathrm{v})}\) decreases rapidly until it is of the order of the discretization errors of the initial equilibrium, which corresponds to an average weighted angle between flow and magnetic field of \(2^{\circ }\). An exception is the term \(L_{\mathrm{cont}}\) which increases somewhat. To understand the evolution of the \(L_{\mathrm{cont}}\) term we must consider that while the initial force-free magnetic field is already complex, the plasma flow is smooth and strictly radial in the initial state, which results in a low initial value of \(L_{\mathrm{cont}}\). This is not the case in the final equilibrium, when the flow becomes field aligned and thereby more complex. In the final state all terms of \(L\) are roughly of the same order and of the level of the discretization error of the initial NLFFF-solution (see also Table 1, line ‘Stationary MHD’). It can therefore be considered that a solution of the stationary MHD equations with field aligned plasma flow has been reached to a good approximation.

Figure 3
figure 3

In the initial state the force-free magnetic field and plasma properties are decoupled. During the iteration B and V become parallel. In the final state we have found a solution of the stationary compressible MHD equations with field aligned plasma flow. The residual discretization errors are similar to those of nonlinear force-free computations.

3.4 Brief Analysis of the Final Stationary MHD Equilibrium

Figure 4 shows in the top panel ‘NLFFF’ selected field lines for the initial force-free equilibrium. In the bottom panel ‘FlowMHD’ field lines (same starting points) of the final stationary MHD equilibrium are shown. It seems that low lying field lines are hardly affected, whereas further away from the sun the field lines become considerably more radial in the stationary MHD equilibrium. Physically this can be understood in the sense that the solar wind flow stretches and opens the field lines. In Figure 5 we investigate the differences more quantitatively. Panel a) shows how radial the magnetic field is as a function of the radius, where \(|B_{r}|\) and \(|{\mathbf{B}}|\) have been averaged over the whole sphere. The black line ‘NLFFF’ shows the initial force-free field and the red line ‘FlowMHD’ the stationary MHD solution. A value of unity means that the field is fully radial while a value of zero means the field is horizontal. The plot corroborates that the magnetic field becomes more radial on average with increasing distance from the Sun. At low heights both solutions agree, but above about \(2~R_{s}\) the stationary MHD solution becomes significantly more radial then the initial field, as was already qualitatively seen in the field line plots in Figure 4. Figure 5 panel b) shows the relative quadratic difference (quadratic difference of the magnetic field vectors averaged over the entire sphere at each radial distance and divided by the averaged magnetic field strength). This plot confirms that below about \(2~R_{s}\) the initial force-free and final stationary MHD equilibria are almost identical and deviate higher up in the corona.

Figure 4
figure 4

Comparison of magnetic field lines for the initial force-free field [NLFFF] and the final stationary MHD equilibrium [FlowMHD]. Solar wind in stationary MHD stretches and opens magnetic field lines.

Figure 5
figure 5

Panel a) Compared with the initial NLFFF the stationary MHD field becomes more radial from about 2 solar radii on. Panel b) Comparison of (horizontal averaged) magnetic field. NLFFF and stationary MHD are almost identical below 2 solar radii, where \(M_{A} \ll 1\) and flow effects are not important.

Figure 6 shows some quantities at a height of \(r=2.5~R_{s}\), which is usually the distance the source surface in located in PFSS-models. Panel a) shows the radial magnetic field component \(B_{r}\). Between the positive (red) and negative (green) magnetic field areas is the polarity inversion line. Around this line the plasma pressure increases (panel b) and the kinematic pressure \(p_{\mathrm{kin}}=\rho v^{2}/2\) of the solar wind decreases (panel c). A reduced kinematic pressure around the polarity inversion line happens naturally, because here the magnetic field and consequently the aligned plasma flow are not dominated by the radial component.

Figure 6
figure 6

Along the polarity inversion line of the magnetic field (panel a) the plasma pressure (panel b) becomes enhanced and the kinematic pressure (panel c) decreases.

3.5 Influence of Initial Conditions

An important question is to which extent simpler force-free extrapolations are justified in some areas. From the equilibrium investigated so far, it seems that non-force-free effects become important above about \(2~R_{s}\). In the following we want to quantify this further and investigate how the radii where the transition from force-free to non-force-free occur depend on the initial conditions. We also investigate if the results based on global averaging (marked ‘Global’ in Table 2) are different from a selected active region (marked ‘AR’ in Table 2 and with a white box in Figure 1 top panel) and a selected quiet sun area (marked ‘QS’ in Table 2 and with a black box in Figure 1). We investigate the effect of the initial magnetic field (either a nonlinear force-free field (marked with NLFFF) or a potential field (marked Potential). We also investigate the effect of the initial hydrodynamic Parker solar wind equilibrium by varying the temperature. Similar as in Figure 5 panel b) we compute the relative quadratic difference of the initial magnetic field and the final stationary MHD equilibrium. In Table 2 we check at which radii the relative quadratic differences exceed thresholds of \(10^{-4}\), \(10^{-3}\), and \(10^{-2}\), respectively.

Table 2 Comparison of initial and final magnetic field. The first four columns contain information on the initial state and the investigated area. Column one names the investigated area, either the entire sphere ‘Global’, or an active region ‘AR’, or a quiet Sun area ‘QS’ (see the white and black boxes in Figure 1. Column two contains the initial magnetic field model, either a potential field ‘Potential’ or a nonlinear force-free field ‘NLFFF’. The third, fourth and fifth column contain the temperature on the initial hydrodynamic equilibrium, the sound velocity \(c_{s}\) and the related critical radius \(r_{c}\) where the solar wind passes the sound velocity. The remaining columns six, seven and eight contain the results. Computed is the relative quadratic differences of the initial and final magnetic field as a function of the radius and subsequently it is checked at which radial distance from the sun the difference exceeds \(10^{-4}\), \(10^{-3}\) and \(10^{-2}\), respectively.

The areas with \(r\) below the radius defined by a relative quadratic difference of \(10^{-4}\) can be considered as force-free. For areas with \(r\) larger than the radius defined by a relative quadratic difference of \(10^{-2}\) the effects of plasma flow and plasma forces are important. Between the two radii the transition between force-freeness and stationary MHD takes place. For the equilibrium investigated earlier (first row in Table 2) this transition area is between \(1.80~R_{s}\) and \(2.54~R_{s}\) for the global case. Restricting the computations on a selected active region or quiet sun area hardly changes anything. The corresponding radii change only by less than \(0.1~R_{s}\) (upward for the active region and downward for the quiet sun). The influence of using a potential field as initial state instead of a force-free one is very small, too and leads to a very small (well below \(0.1~R_{s}\)) shift upwards. Changing the initial solar wind equilibrium has a significantly stronger effect. For a lower temperature the sound velocity \(c_{s}\) decreases and the critical radius \(r_{c}\) where the flow transits the sound velocity increases. The opposite happens for an increased temperature. This results in a higher sound velocity and the radius \(r_{c}\), where the wind passes the sound velocity is lower. Consequently one has significant faster flows at lower heights. It is found that the plasma flow starts having a significant effect already at a radial solar distance of approximately \(r_{c}/2\).

4 Conclusions and Outlook

In this paper we developed an optimization principle for the computation of stationary MHD equilibria, using synoptic vector magnetograms as boundary condition. As a first step we used a rather simple spherically symmetric and isothermal solar wind model as initial condition for the plasma and flow variables. We found that the newly developed code converged towards a stationary MHD equilibrium because the residual errors of the equilibrium are comparable with discretization errors of nonlinear force-free solution. Below about \(2R_{s}\) the MHD solution is very similar to a nonlinear force-free field. The reason is that because of the low plasma \(\beta \) and small Alfvén Mach number \(M_{A}\) in these regions, plasma and flow effects can be neglected. Higher up in the corona the solar wind flow stretches out and opens up the magnetic field line. Such an effect of the solar wind is considered already in PFSS model, but with an artificial source surface, whereas in stationary MHD the influence of the wind flow on the magnetic field is computed self-consistently. While the choice of the initial magnetic field configuration hardly influences this result, the profile of the outflow velocity is important. Fast flows in lower heights do obviously require that the effects of these flows have to be taken into account.

In the application of the method there is certainly room for improvement. Naturally one could relax the isothermal condition used here just for reasons of simplicity and use a more involved energy equation. In principle it is also possible to take measurements into account for the solar wind profile, which does not necessarily have to be spherically symmetric in the initial state. Including the observations of coronal loops to constrain the magnetic field as done in the force-free models of e.g. Aschwanden (2013), Chifu, Wiegelmann, and Inhester (2017) can in principle also be incorporated in stationary MHD models. It is a useful feature of optimization principles that additional constraints are straightforward to implement by additional terms in the functional \(L\).