Draftversion August18,2015 PreprinttypesetusingLATEXstyleemulateapjv.08/22/09 MAGNETOHYDRODYNAMICS USING PATH OR STREAM FUNCTIONS Yossi Naor and Uri Keshet PhysicsDepartment, Ben-GurionUniversityoftheNegev,P.O.Box653,Be’er-Sheva84105, Israel;[email protected] (Dated: August 18, 2015) Draft version August 18, 2015 5 ABSTRACT 1 Magnetization in highly conductive plasmas is ubiquitous to astronomical systems. Flows in such 0 media can be described by three path functions Λ , or, for a steady flow, by two stream functions α 2 λ and an additional field such as the mass density ρ, velocity v, or travel time ∆t. While typical κ g analyses of a frozen magnetic field B are problem-specific and involve nonlocal gradients of the fluid u element position x(t), we derive the general, local (in Λ or λ space) solution B = (∂x/∂Λ ) B˜ ρ/ρ˜, α t α A where Lagrangian constants denoted by a tilde are directly fixed at a boundary hypersurface H˜ on which B is known. For a steady flow, ρ˜B/ρ = (∂x/∂λ ) B˜ +vB˜ /v˜; here the electric field 6 κ ∆t κ 3 1 E (B˜2∇λ1 B˜1∇λ2)/ρ˜ depends only on λκ and the boundary conditions. Illustrative special ∼ − cases include compressible axisymmetric flows and incompressible flows around a sphere, showing ] that viscosity and compressibility enhance the magnetization and lead to thicker boundary layers. A Our method is especially useful for directly computing electric fields, and for addressing upstream G magnetic fields that vary in spacetime. We thus estimate the electric fields above heliospheres and magnetospheres,computethedrapingofmagneticsubstructurearoundaplanetarybody,anddemon- . h stratethe resultinginversepolarityreversallayer. Ouranalysiscanbe immediately incorporatedinto p existing hydrodynamic codes that are based on stream or path functions, in order to passively evolve - theelectromagneticfieldsinasimulatedflow. Furthermore,insuchaprescription,theelectromagnetic o fields are frozen onto the grid, so it may be developed into a fully magnetohydrodynamic (MHD), r t efficient simulation. s Subject headings: magnetohydrodynamics (MHD) - magnetic fields - planets and satellites: magnetic a [ fields - galaxies: magnetic fields - ISM: magnetic fields. 4 v 1. INTRODUCTION give (Els¨asser 1956) 2 Magneticfieldsfrozeninhighlyconductiveplasmasare ρ 9 studied in diverse astronomical systems. Examples in- B = B˜ ∇˜ x , (1) 8 ρ˜ · clude the solar corona, flares and wind (e.g., Longcope 6 (cid:16) (cid:17) 0 2005; Zhang & Low 2005), planetary magnetospheres where B is the magnetic field, ρ is the mass density, x . and bow shocks (e.g., Spreiter & Alksne 1970; Spreiter is the position of the fluid element, and a tilde denotes 1 & Stahara 1995; Zhang et al. 2004; Corona-Romero & (henceforth) a Lagrangian constant evaluated on a ref- 0 Gonzalez-Esparza 2013), the interstellar medium (ISM) erence hypersurface H˜, on which B is known. Thus, 5 (e.g., Price & Bate 2008; Li et al. 2011; Padovaniet al. 1 ∇˜ is a non-local operator, acting in the vicinity of H˜, 2014),inparticularwhereitmeetsthesolarwind(Parker : ratherthanaroundx. Therefore,toderiveBfromEqua- v 1961; Aleksashov et al. 2000; Whang 2010), and the in- tion(1),onemustessentiallyintegratefirstoverthe flow i tergalactic medium (IGM) of galaxy groups and galaxy X clusters (Bernikov & Semenov 1979; Kim et al. 1991; to compute the mapping of x on H˜. r Vikhlinin et al.2001;Keshet et al.2010;Bru¨ggen2013). HereweshowthatB andE canbe locallyandsimply a Forgeneralreviewsofmagnetizationinastronomicalsys- computed for a general flow, by working in the space tems, see Widrow (2002), Vall´ee (2011). spanned by the path functions or stream functions that In such systems, magnetization away from shocks and describe the dynamics. Such functions exist as long as reconnectionregionscanbetypicallyapproximatedusing particle diffusion can be neglected (Yih 1957). Stream ideal magnetohydrodynamics (MHD), on a background functionsdescribesteadyflows,andarealsoknownasthe rangingfroma simple axisymmetric flow arounda blunt EulerorClebschpotentialsofthemassflux (Euler1769; object to complicated, turbulent motions. The passive Clebsch 1859). Path functions describe time-dependent evolutionofmagneticfields frozenin agivenflowis thus flows,andaresometimesreferredtoasmaterialfunctions important in space physics, astrophysics, applied math- (Van Roessel & Hui 1991; Loh & Hui 2000). ematics, and computational physics (e.g., Ranger 1997; Thus, the dynamics of time dependent flows can be Sekhar 2003; Sekhar et al. 2005; Bennett 2008). How- fully described by three path functions, Λα=1,2,3 (Yih ever, present derivations of the magnetic field evolution 1957, in three spatial dimensions; used henceforth and in a general flow are inherently nonlocal. denoted 3D). The dynamics of steady flows can be fully Formally, the ideal MHD equations can be solved to described by two stream functions, λκ=1,2, which fix the mass flux j ρv (Giese 1951),and an additionalfield ϕ ≡ suchasρ,the velocityv,orthetraveltime∆t. (Herewe ignore an additional thermal quantity, such as temper- 2 Naor & Keshet ature or pressure, which is needed to fully describe the our results into simulations that are based on path or flowbutisunnecessaryforourpurposes.) Path(stream) streamfunctions, and the prospects for developing a full functions are useful in picturing the flow, because their MHD simulation based on this approach. equivalue surfaces intersect at pathlines (streamlines), the trajectoriesoffluidelementsinspacetime (inspace). 2. EVOLVINGELECTROMAGNETICFIELDS For simplicity, we focus on non-relativistic flows, with WebegininSection2.1byintroducingtheMHDequa- negligible particle diffusion, in the ideal MHD limit. Ar- tions, and switching to a Lagrangian perspective. Next, bitrary flows are considered, including those involving we analyze the evolution of B for arbitrary steady (in discontinuity surfaces such as shocks. Our assumptions, Section 2.2) and time-dependent (in Section 2.3) flows. in particular ideal MHD, may break down across shocks Todemonstratetheconsistencyofthesetwoframeworks, and in reconnection regions, where kinetic plasma ef- inSection2.4,anarbitrarysteadyflowis analyzedusing fects can be important. In such cases, our analysis may the time-dependent formalism. be piecewise applied, for example, on both sides of the shock. 2.1. Two Viewpoints of the Relation B ρl ∝ Thesolutionwederiveforpassivemagnetizationholds Let l be an infinitesimal vector adjoining nearby fluid for arbitrary initial magnetic field configurations. It is elements that lie onthe same magnetic field line (hence- analyzed for a general steady, axisymmetric flow, tested forth: lengthelement). Themagneticfieldcanbe shown for an arbitrary time dependent, one-dimensional (1D) to evolve in proportion to ρl (e.g., Landau & Lifshitz flow,andillustratedforbasicflowpatterns,inparticular 1960). We derive this relation in an Eulerian picture steady flows around blunt objects used to model astro- in Section 2.1.1, and in a Lagrangian framework in Sec- nomicalsystems. This includes both novelsolutions and tion 2.1.2. generalizations of previously solved problems. The re- sults indicate that passive magnetization is in general 2.1.1. Eulerian picture enhanced by viscosity and compressibility effects, lead- The ideal MHD equations, ingtostrongermagnetizationinfrontofmovingobjects, and thus to thicker boundary layers. Gauss’ law, ∇ B =0 ; (2) Analytic solutions to the nonmagnetized flow around · ∂ρ an obstacle are available only for a handful of time- continuity, +∇ (ρv)=0 ; (3) ∂t · independent cases, such as incompressible, potential ∂B flows around simple objects (e.g., Landau & Lifshitz convection, =∇ (v B) ; (4) 1959; Leal 2007), or the approximate, compressible flow ∂t × × v infrontofanaxisymmetricbody (Keshet& Naor2014). and Ohm’s law, E = B , (5) Solutions to the induced magnetization are even more −c × rare,notableexamplesincluding the steady,incompress- can be combined (e.g., Landau & Lifshitz 1960) to give ible, potential flow around a sphere (Chacko & Hassam the Helmholtz equation 1997;Lyutikov2006;Dursi&Pfrommer2008;Romanelli et al. 2014) or around simplified surfaces representing d B B = ∇ v . (6) for example bow shocks (Corona-Romero & Gonzalez- dt ρ ρ · Esparza2013)orthe heliopause(R¨okenetal.2014). We (cid:18) (cid:19) (cid:18) (cid:19) areunawareofapreviousmagnetizationsolutionevenfor Here, E is the electric field, and c is the speed of light. the simple, Stokes (creeping) incompressible steady flow As l is fixed to the flow, it satisfies the equation around a sphere. Such solutions are derived as special dl cases of our general axisymmetric result. =(l ∇)v . (7) dt · Our primary goal is to show that the evolution of the electromagnetic field in a given system becomes trivial ComparingEquations(6)and(7)indicatesthatas(B/ρ) (transparent) if the time-dependent (steady) flow is pa- and l evolve, their ratio remains constant, such that rameterizedintermsofpath(stream)functions. Thisen- ρl ablesustoquicklyreproduceknownanalyticresults,and B =B˜ . (8) to analytically solve the field evolution in simple flows ρ˜˜l and test problems of astrophysical importance. More- This equationholds forboth steadyandtime-dependent over, our method can be incorporated into existing nu- flows, and even across surfaces of discontinuity. Using mericalsimulationsthatutilizeastreamfunctionorpath Equation (8) to evolve B from H˜ guarantees that the function description; this is straightforward for weak MHD equations are satisfied everywhere, assuming con- electromagneticfields,butappearsfeasibleforfullMHD, at least in two-dimensions (2D). tinuity and that Gauss’ law holds on H˜; see appendix The paperis organizedas follows. InSection2,wede- A. rivethetemporalevolutionofthemagneticfield,forboth In our non-relativistic, ideal MHD limit, E is small, steady and time dependent flows. Arbitrary axisymmet- and may be estimated from Equation (5) once B is ricflowsareanalyzedinSection3,focusing inparticular known. on the axis of symmetry. In Section 4, we present some 2.1.2. Lagrangian picture basic flows and analyze their magnetization. In Section 5, we apply the analysis to a few illustrative astronom- Forthesubsequentanalysis,itisusefultovisualizethe ical systems. The results are summarized and discussed magnetic field amplitude as proportional to the density in Section 6, where we also examine the integration of offieldlines,i.e. inverselyproportionaltothedistanceψ MHD with path/stream functions 3 ˆ betweenthem. Therefore,Binthedirectionlisinversely is Kronecker’s delta. Namely, ˆ proportional to the perpendicular (to l) area element spanned by two such distances, ψ1 and ψ2. Hence, A a ∂x ; a ∂x ; a vq ∂x =vˆ . 1 2 3 ≡ ∂λ ≡ ∂λ ≡ v ∂q ˜ (cid:18) 1(cid:19)q (cid:18) 2(cid:19)q (cid:18) (cid:19)~λ B =B˜Aˆl , (9) (14) Here, ~λ λ ,λ , and it is understood (henceforth) A ≡ { 1 2} that derivatives with respect to λ (λ ) are taken at a wAsphsaetnrhneeeAdma=bsysˆlρ·l(A,ψψl1o1×f,ψtψh2e2)fliuissidcaosenslusetmmaneendt,tinin˜fi/nthitee=spiamρrlaa/ll(llρey˜l˜lo)s,gmraaanlmld. fimarxeeendnsioλotn2lne(λsesc1,e)s.asnaLdriiklieys n{pAoewrjph}ee,nrtedhieccourplealcarinp1taroor.coa2Nnleobtaeasnitsohtathoteorth,iseadnaidj- { } A A we recover Equation (8). that the q-dependent a are not necessarily unit vec- 1,2 tors. 2.2. Steady Flow Magnetization An advantage of the aj basis is that the κ = 1,2 { } { } componentsofanyvectorV inthisbasisareindependent 2.2.1. General analysis of q, as The flow can be fully determined by specifying two satnreaadmditfuionncatliosncsa,laλrκfiwelhderϕe (κG∈ie{se1,129}51(h).enTcwefoorstuhr)f,aacnesd, V1 V ·A1 V ·∇λ1 V =V a +V a = V = V A = V ∇λ . definedbyconstantvaluesofthestreamfunctions,inter- κ κ 3 3 2 · 2 · 2 sect along a streamline, so V V A v V ∇q 3 · 3 vq · (15) v ∇λ =0 . (10) κ Moreover,forl,theκcomponentsl areconservedalong · κ streamlines, as we show below. We use (henceforth) Thisequation,alongwiththetime-independentcontinu- squarebracketsto denote vectorsinthe reciprocalbasis, ity equation which in general is neither orthogonal nor normalized, ∇ (ρv)=0 , (11) and reserve round brackets for vectors in orthonormal · (inparticular,cylindrical,exceptinSections4.3and5.1) are identically satisfied by the λ gauge (Yih 1957) bases. Now, consider two infinitesimally close fluid elements, xˆ xˆ xˆ 1 2 3 which at some instant are at the locations x(λ ,q) and κ ρv ρ˘v˘ =(∇λ1×∇λ2)=(cid:12)(cid:12)(cid:12) ∂∂λx11 ∂∂λx12 ∂∂λx13 (cid:12)(cid:12)(cid:12) , (12) x+l=x(λκ+lκ,q+δq) (16) (cid:12) (cid:12) ∂x ∂x (cid:12) ∂λ2 ∂λ2 ∂λ2 (cid:12) =x(λ ,q)+l +δ +O l2 , (cid:12)(cid:12) ∂x1 ∂x2 ∂x3 (cid:12)(cid:12) κ κ(cid:18)∂λκ(cid:19)q q(cid:18)∂q(cid:19)~λ where the determinant, as w(cid:12)(cid:12)ritten without(cid:12)(cid:12)Lame´ coef- (cid:0) (cid:1) ficients, is valid only in Cartesian coordinates. We use where we generalized the Einstein summation rule also stream functions (and later, path functions) as coordi- for stream function indices κ= 1,2 (and, later on, for { } nates. For convenience, we take them in units of length path function indices α= 1,2,3 ). As the ~λ of each of { } by introducing the overall normalizations denoted by the two fluid elements is conserved along the flow, the breve(henceforth; e.g., ρ/ρ˘is a dimensionless massden- intervals l =˜l are constant along the streamline. κ κ sity). Equation(12),whichis knownasthe Clebschrep- Henceforth, we work to first order in the infinitesimal resentationforthemassflux(e.g., Stern1967),indicates l, such that thatρv cannotbechosenastheindependentϕ,andthat swapping λ1 and λ2 would reverse the flow. ˜l In order to parameterizethe position of fluid elements 1 l=l a +l a =˜l a +l a = ˜l , (17) in the volume spanned by the flow, we must introduce, κ κ 3 3 κ κ 3 3 2 in addition to λ and λ , a third variable q(x), not nec- l 1 2 3 essarily equal to ϕ. The surfaces defined by λ , λ and 1 2 q may never overlap; namely, the vectors where l = vδ /v . As l = ˜l , the κ components of 3 q q κ κ l in the reciprocal basis are indeed seen to be constant v A1 =∇λ1; A2 =∇λ2; A3 = ∇q (13) along the streamline. In contrast, l3 is in general not (cid:18)vq(cid:19) conserved. The evolution of l and its decomposition in the reciprocal basis are illustrated in Figure 1. cannotbecoplanaranywhereintheflow(exceptatstag- In order to evaluate l , consider the travel time ∆t of 3 nation points, where the analysis breaks down; see be- a fluid element from H˜ to the position x, low). Here, v dq/dt = v ∇q is the rate of change q ≡ · in q along the flow (in units of q/t). The normalization q(x) factor (v/vq) is included to keep the Aj basis dimen- dq′ sionless. The freedom in the choice o{f q w}ill be utilized ∆t(x)= . (18) v in Section 2.2.2. q˜(Zx) q Itisusefultointroducethereciprocalbasisa =A−1, j j defined (e.g., Kishan 2007) by a A = δ , where δ During the same time, the x + l fluid element travels i j ij ij · 4 Naor & Keshet from q˜+δ˜ (not necessarily on H˜) to q+δ , so Ž q q H B Ž q dq′ q+δq dq′ B l3a3 =∆t= . (19) æ Λ vq(λκ,q′) v λ +˜l ,q′ Ž aΚ l Κ Zq˜ q˜+Zδ˜q q(cid:16) κ κ (cid:17) æ lΚæ ΛΚ+lŽ Κ Expanding to first order in l indicates that æ δ δ˜ ∂∆t q = q ˜l , (20) v v˜ − κ ∂λ Fig. 1.— Illustration of magnetic field evolution in the flow q q (cid:18) κ(cid:19)q,q˜ around a blunt object (green half disk), starting from a bound- where derivatives of ∆t = ∆t(~λ,q,q˜) with respect to λ aryhypersurface H˜ (dashed cyan curve). A magnetic fieldlineB 1 (dotted-dashed red curve) is locally represented by an infinitesi- or λ2 are taken (henceforth) with the other three argu- malvector l(thick redarrow), adjoiningtwo fluidelements (pink mentsof∆tfixed. Thecomponentl cannowbe related disks) that are initially along B, and advected along streamlines 3 (thin blackarrows withstream function labels). Inthe reciprocal to the Lagrangianconstants through basis,lisdecomposed(seelabels)intocomponents paralleltothe δ v ∂∆t streamline(l3a3,purplearrows)andalongthe(constantq)stream l3 =v q =˜l3 v˜lκ . (21) functiongradients(lκaκ,bluearrows;hereinitiallyconfinedtoH˜ vq v˜ − ∂λκ forthespecificchoiceq=∆t;seeSection2.2.2). Ifasurfaceofconstantqoverlapswithoneoftheconstant λ surfaces, v vanishes and Equation (20) is rendered κ q invalid; a piecewise analysis may still be possible. The Equation (25), leaving analysisbreaksdownatstagnationpoints,where∆t(and so also l and B) diverges. E = ρ˘v˘ B˜ ∇λ B˜ ∇λ . (27) Finally, the length element l is now given, throughout ρ˜c 2 1− 1 2 the flow connected to H˜, by (cid:16) (cid:17) Therefore, E is entirely determined by the stream func- ˜l 0 tions, independent of ϕ, once B and ρ are given on H˜. l=˜l a + v ˜l ˜l v˜∂∆t = ˜l1 0 ˜l ∂∆t . Notice that deriving the electric field directly from the κ κ v˜ 3− κ ∂λ 2 − κ∂λ stream(andbelow,fromthepath)functionsiscomputa- (cid:18) κ(cid:19) vv˜˜l3 v κ tionallymuchsimplerthanfirstcomputingthemagnetic (22) field,whichtypicallyinvolvesintegration,andthenusing Note that in addition to a , the ∆t derivative also de- Ohm’s law to find E. κ pends on q. It can be written as 2.2.2. Choice of a third variable q(x) q ∂∆t ∂∆t = ∂vq−1 dq′ . (23) There are various choices for the third variable, q, de- ∂λκ ≡(cid:18)∂λκ(cid:19)q,q˜ Zq˜ ∂λκ !q′ pisetnhdeintgraovnelthtiemsepe∆citfi,cwphriocbhleinmsaotmheancads.eAs iusseeafusillycheositcie- mated or computed. For q = ∆t, which is the specific The Lagrangian constants are fixed at x˜, where the case illustrated in Figure 1, Equations (22) and (25) re- streamline meets H˜. The point x˜(x) can be computed duce to by inverting H˜(x˜), as ~λ(x) = ~λ(x˜) is given, and re- mains constant along the streamline. The components ∂x v ˜l1 ˜l are found by projecting l˜onto the reciprocal basis as l=˜l +˜l = ˜l , (28) j κ ∂λ 3v˜ 2 in Equation (15), (cid:18) κ(cid:19)∆t v˜l v˜ 3 v ˜l =l ∇λ =(l ∇λ ) and ˜l = l ∇q . and κ · κ · κ H˜ 3 v · (cid:18) q (cid:19)H(˜24) ∂x v ρ B˜1 ρ Equations (8) and (22) yield the magnetic field, as B = B˜ +B˜ = B˜ . (29) κ ∂λ 3v˜ ρ˜ 2 ρ˜ ρρ˜B =B˜l˜l =vBB˜˜B˜12 −v00B˜κ∂∂∆λκt , (25) ferNreodtifcreo(cid:20)mthatht(cid:18)eErqeucκaipt(cid:19)iroo∆ncta(l2b8a)scisoup(cid:21)lrdojheacvtieovv˜bnB˜eE3enqudaitrieocntl(y1i5n)-, v˜ 3 by noting that l ∇(∆t) = ∆t(x+l) ∆t(x)+O(l2) where the Lagrangian constants B˜ = (B˜/˜l)˜l are fixed is constant (to fir·st order) along a stre−am line, as this j j by the projection Equation (15) on H˜, is the difference between the travel times of two nearby fluid elements. v Inthecaseofanirrotationalflow,apotentialΦcanbe B˜κ =(B·∇λκ)H˜ and B˜3 = v B·∇q . (26) definedsuchthatv =v˘∇Φ,wherethenormalizationfac- (cid:18) q (cid:19)H˜ tor assigns Φ with units of length. Here we may choose Next, consider the electric field E. The vector prod- q = Φ, and read l and B off Equations (22) and (25), uct (v B) in Equation (5) eliminates the a terms in respectively, with the time derivative term (cf. Equa- 3 × MHD with path/stream functions 5 tion (23)) Define l as the distance between two simultaneous,in- finitesimally close spacetime events, Φ ∂∆t ∂∆t ∂v−2 = =v˘ dΦ′ . (30) xµ(Λ ,Q)= t (36) ∂λκ (cid:18)∂λκ(cid:19)Φ,Φ˜ ZΦ˜ (cid:18) ∂λκ (cid:19)Φ′ α (cid:18)x(cid:19) and Equipotential surfaces are perpendicular to the stream- lines, so here a1 and a2 are conveniently perpendicular t =xµ+dxµ =xµ(Λ +L ,Q+δ ) (37) to a3. In simple, e.g., axisymmetric,flows where a1 and x+l α α Q a are perpendicular to each other, the reciprocal basis (cid:18) (cid:19) 2 ∂xµ ∂xµ thus becomes orthogonal. =xµ+L +δ +O(l2) . Amongtheinfiniteotherpossiblechoicesofq,notewor- α∂Λα Q ∂Q thy are the natural coordinates of the flow, for example As xµ = xµ(Λ ,Q), derivatives with respect to Q or the axialcoordinate z in simple axisymmetricflows,and α one of the Λ are understood as taken with the other the length s(x) of the streamline from H˜ to x. In gen- three argumeαnts fixed. Here, the infinitesimal L = L˜ eral, the simplest variable which is monotonic along the α α are constant along the pathline, because they are the flow is advantageous. differences between the conserved path function values. In contrast, δ varies in general along the pathline. 2.3. Time-dependent Flow Magnetization Q Working to first order in l, the spacetime length ele- A time-dependent flow can be fully specified by three ment is now given by path functions, Λ , when particle diffusion can be α=1,2,3 neglected (Yih 1957). Three spacetime manifolds, de- 0 =L˜ ∂t/∂Λα + δQ 1 , (38) fined by some constant values of these path functions, l α ∂x/∂Λα v v (cid:18) (cid:19) (cid:18) (cid:19) Q (cid:18) (cid:19) intersect along a pathline. Therefore, along the flow where we defined v dQ/dt as the rate of change in Q Q ≡ dΛ (x,t) ∂ alongthe flow(inunits ofQ/t). Thevanishingtemporal α = +v ∇ Λ (x,t)=0 , (31) α component requires dt ∂t · (cid:18) (cid:19) δ ∂t which determines v through Q = L˜ , (39) α v − ∂Λ ǫ (∂ Λ )(∇Λ ∇Λ ) Q α v =− i2jk(∇Λt i ∇Λj)×∇Λk , (32) so the spatial component gives 1 2 3 × · ∂x ∂t where ǫijk is the Levi-Civita symbol. The continuity l=L˜α v . (40) equation (3) is then identically satisfied by the Λ gauge (cid:18)∂Λα − ∂Λα(cid:19) (Yih 1957) Taking the scalar product of this result with ∇Λ , and α ρ = (∇Λ ∇Λ ) ∇Λ . (33) using Equation (31) and the chain rule, implies that the ρ˘ − 1× 2 · 3 constant L˜ satisfy α Equations (32) and (33) can be written as (Yih 1957) L˜ =l ∇Λ =(l ∇Λ ) , (41) α · α · α H˜ xˆ1 xˆ2 xˆ3 1 andareindependentofQ. Theymaythusbedetermined at any position where l is known, in particular on H˜. ρ 1 ρ (cid:12)(cid:12) ∂∂Λx11 ∂∂Λx21 ∂∂Λx31 ∂∂Λt1 (cid:12)(cid:12) Finally, combining Equations (8) and (40) yields = (1+v)=(cid:12) (cid:12) , (34) ρ˘(cid:18)v(cid:19) ρ˘ (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) ∂∂Λx12 ∂∂Λx22 ∂∂Λx32 ∂∂Λt2 (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) B =B˜αρρ˜(cid:18)∂∂Λxα −v∂∂Λtα(cid:19) , (42) (cid:12)(cid:12)(cid:12) ∂∂Λx13 ∂∂Λx23 ∂∂Λx33 ∂∂Λt3 (cid:12)(cid:12)(cid:12) where the Lagrangian constants B˜α ≡ (B˜/˜l)L˜α can be where 1 is a unit vector i(cid:12)n some non-spatial d(cid:12)imension, determined using (cid:12) (cid:12) and the determinant, as written without Lame´ coeffi- ρ˜ c(VieanntsR,hooelsdsselo&nlyHiuniC19a9rt1e)s,iiafnvcµoord(1in,avt)e,s. Equivalently B˜α = ρB·∇Λα =(B·∇Λα)H˜ . (43) ≡ Asinthetime-independentcase,heretoothereiscon- ρ ∂Λ ∂Λ ∂Λ vα = ǫαβγδ 1 2 3 , (35) siderable freedom in choosing Q. A useful choice is the ρ˘ − ∂xβ∂xγ∂xδ temporal coordinate, Q = t, for which Equation (40) reduces to where α,β,γ,δ are four-indices, x0 t, and ǫαβγδ is the fou{r-dimensi}onal Levi-Civita symbo≡l. ∂x l=L˜ . (44) To parameterize spacetime using the path functions α ∂Λ Λ , Λ , and Λ , we normalize them in units of length, (cid:18) α(cid:19)t 1 2 3 and introduce a fourth coordinate, Q(x,t). The fourth Thetime-dependentvectors(∂x/∂Λ ) cannowbeiden- α t coordinatecanbechosenarbitrarily,aslongastheequiv- tified as the generalizations of the reciprocal basis vec- alue hypersurfaces of the four parameters never overlap. tors found for steady flows; cf. Equations (14) and (17). 6 Naor & Keshet Equation (42) now gives the magnetic field, field v is φ-independent, we may choose λ λ(̺,z). 2 ≡ For these stream functions, Equation (12) yields ρ ∂x B =B˜ . (45) α µ˘ ∂λ ∂λ ρ˜(cid:18)∂Λα(cid:19)t v =(v̺,0,vz)= ,0, , (50) ̺ρ ∂z −∂̺ Other choices of Q may be advantageous in certain cir- (cid:18) (cid:19) cumstances. where µ ρ̺v is the mass flux in a ring of radius ̺ The electric field in a time-dependent flow becomes, (and has u≡nits of viscosity). Here, the normalizations R˘ according to Equations (5) and (42), and µ˘ ρ˘v˘R˘ arise from our use of stream functions as ≡ coordinates with units of length. Round bracket vectors ρ˘B˜ ∂Λ E =ǫ i j ∇Λ . (46) in this section pertain to cylindrical coordinates. ijk k ρ˜c ∂t In addition to λ and λ , we must now choose a third (cid:18) (cid:19) 1 2 variable q to parameterize space. The choice q = z is 2.4. Time-dependent Description of a Steady Flow advantageous for simple flow regions in which v does z To ascertain that Section 2.2 and Section 2.3 are mu- not change sign. For our choice of stream functions and tually consistent, we consider an arbitrary steady flow, q, the reciprocal basis Equation (14) becomes and regard it as time-dependent. If the steady flow is ̺ µ˘ characterizedby the streamfunctions λ andλ , we can a = φˆ ; a = ̺ˆ; a =vˆ . (51) choose two path functions as time indep1endent2, 1 R˘ 2 −µz 3 Λ1 =λ1 and Λ2 =λ2 . (47) A given B˜ = (B˜̺, B˜φ, B˜z) may now be decomposed as B˜ a˜ , where (cf. Equation (26)) i i Solving Equations (32) and (33) with the aid of Equa- tion (12) and the definitions of Section 2.2, we find that B˜ B˜ R˘ the third path function must be B˜ = B˜1 = (µ˜ B˜ φµ˜̺˜B˜ )/µ˘ . (52) 2 ̺ z z ̺ − Λ3 =v˘(t−∆t) . (48) B˜3 B˜zv˜v˜z We can now use the time-dependent results of Sec- Recall that in our notations, vectors in square brackets tion2.3,andattempttoreproducethesteadyflowresults (as in Equation (52)) are in the reciprocal basis. of Section 2.2. Equation (25) then yields Forsimplicity,we chooseQ=t,suchthatthe solution Equation (44) for l in the time dependent regime gives ρ˜ ̺ µ˘ v ∂∆t B = B˜ φˆ B˜ ̺ˆ+ B˜ B˜ v˜ (53) l=L˜ ∂x +L˜ ∂x (49) ρ R˘ 1 − µz 2 v˜ (cid:18) 3− 2 ∂λ (cid:19) κ(cid:18)∂Λκ(cid:19)Λ3,t 3(cid:18)∂Λ3(cid:19)Λκ,t µµ˜zzB˜̺ vv˜̺z − µµ˜z̺ v̺ ∂∆t =L˜κ ∂x + L˜3v˜ v . = ̺̺˜B˜φ+ 0 B˜z−0B˜2 ∂λ . ∂λ − v˘ v˜ This is formally id(cid:18)entiκca(cid:19)l∆tot,tEqu(cid:18)ation(2(cid:19)8),derivedfor a vv˜zzB˜z 0 vz steady flow under the choice q = ∆t, provided that one The only computation necessary is an integral for the may consistently identify ˜l = L˜ and ˜l = L˜ (v˜/v˘). time derivative term, κ κ 3 3 − Indeed,Equation(41)yieldsL˜ =l ∇Λ =l ∇λ =˜l , z and,onH˜,L˜ =l ∇Λ = v˘lκ∇(∆·t)=κ (v˘/·v˜)(vκ/v )κl ∂∆t = ∂∆t(̺,z) = ∂vz−1 dz′ . (54) ∇q = (v˘/v˜)3˜l ; co·nsist3ent−with· the defin−itions of Eqqua-· ∂λ (cid:20) ∂λ (cid:21)φ,z,z˜ Z (cid:18) ∂λ (cid:19)φ,z′ 3 z˜ − tion (24). The electric field is found from Equations (27), (50) In conclusion, the time-dependent analysis with Q=t and (52), and given simply by yields the time-independent analysis with q =∆t, when applied to a steady flow. This shows that the two for- µzB˜ µ B˜ malisms, involving path functions and stream functions, µ˜ φ z φ v˜ v˜ are consistent with each other. E = ̺˜µ˘B˜ = ̺˜(µ˜ B˜ µ˜ B˜ ) . (55) WiththeaboveΛ ,thetime-dependentelectricfieldin c ̺µ˜ 2 µ˜c ̺ ̺ z − z ̺ α EEqiunatEioqnua(t4i6o)nd(2ir7e)c,tlaysr∂eΛdu/c∂est=tov˘tδhe.time-independent −µµ˜̺B˜φ −µ̺B˜φ j 3,j 3.2. The Axis of Symmetry 3. STEADYAXISYMMETRICFLOWMAGNETIZATION Next,wefocusonthe vicinityofthe axisofsymmetry, 3.1. General Analysis in Cylindrical Coordinates ̺ = 0, along which v = 0. Taking the incident flow ̺ Consider a steady, axisymmetric flow. Using cylindri- in the ( zˆ) direction, we denote the incoming velocity − cal coordinates ̺,φ,z , such flows are characterizedby as u(ρ 0,z) v , and assume it is finite. Then, z { } ≃ ≡ − v =0,andbyvanishingφderivativesoftheflowparam- Equation (50) indicates that in the vicinity of the axis, φ eters. Therefore, constant φ surfaces are perpendicular λ = (ρu/2µ˘)̺2 +O(̺3). Along a streamline, λ is con- totheflow,andwemaychooseλ R˘φ,whereR˘issome stant,therefore so is ρu̺2; this is a direct expression of 1 ≡ arbitrary length scale of the problem. Since the velocity mass conservation. In the vicinity of the axis, we may MHD with path/stream functions 7 thus write ̺/̺˜ = (ρ˜u˜/ρu)1/2 along a streamline. This irrotational (and thus, effectively inviscid) case in Sec- holds even in the presence of a shock, which conserves tion 4.1, and in the viscous limit in Section 4.2. In Sec- the normal, in this case axial, mass flux j =ρu. tion4.3westudythe simple,1Dclassoftime-dependent Equation (53) now becomes flows. ρρ˜//uu˜ 21 B˜̺ 0 4.1. Potential IncompressSibplheerSeteady Flow Around a B =(cid:16)ρ/u(cid:17)12 B˜ +C 0 , (56) Consider the inviscid, incompressible, steady flow (cid:16)ρ˜/u˜˜jjB(cid:17)˜z φ B˜̺ aitsirroheuoflnmodwoageissnoeilroidruosst,pauthineorindea.irl.WecHteieoarnsesa,ult,mhaeendmthasaustsbtsdhoeenniiscni,ctysidoρetnh=teflρ˜eonwis- where constant, the radius of the sphere is taken (henceforth) as R = 1, and the constant v˜ = u˜zˆ is taken on H˜ far z jµ˜ ∂∆t ju˜ u dz′ upstream, z˜ . It is thus na−tural to choose ρ˘ = ρ˜, z 1 C(z)≡− ρ˜µ˘ ∂λ = ˜j Zz˜ u20√j , (57) R˘A=s1∇andvv˘=→=0u˜∞,asnodµ˘∇=ρ˜u˜v. = 0, the flow satisfies the p Poisson e·quation ∇2Φ =×0 for the velocity potential Φ, and we expanded u=u (z)+u (z)ρ+O(ρ2). 0 1 defined by v = u˜∇Φ. The solution for boundary con- For a potential flow, u = 0, and so C = 0. Such a 1 ditions of a vanishing normal velocity across the sphere flow arises, for example, if a homogeneous incident flow is remains subsonic or mildly supersonic (e.g., Landau & 1 Lifshitz 1959). Φ= z 1+ . (61) − 2r3 It is typically possible to derive (ρ/ρ˜) as a function (cid:18) (cid:19) of u, such that B = B(u) along the axis. For exam- Here we primarily use cylindrical coordinates, but occa- ple, consider a steady, inviscid flow in a polytropic gas sionally allude to spherical coordinates r,θ,φ , where of an adiabatic index γ, with dynamically insignificant r2 =̺2+z2. Thus, { } magnetic field. Such a flow is governed, in addition to continuity, by Euler’s equation, 1 3z2 3u˜̺z v =u˜ 1 + and v = . (62) z − − 2r3 2r5 ̺ 2r5 ∇P c2∇ρ (cid:18) (cid:19) (v ∇)v = = s , (58) · − ρ − ρ The stream functions can be chosen as λ1 = φ and, ac- cording to Equation (50), and Bernoulli’s equation, ̺2 1 u2 + c2s = c¯2s =constant . (59) λ≡λ2 = 2 (cid:18)1− r3(cid:19) , (63) 2 γ 1 γ 1 − − such that ̺˜=(2λ)1/2. Here,P isthefluidpressure,c =(γP/ρ)1/2isthe(local) Solving Euler’s Equation (58) gives the pressure, s speedofsound,andabardenotes(henceforth)aputative 4r3 5+3 4r3 1 cos2θ stagnation point where v = 0, whether or not such a P =P˜+ρ˜u˜2 − − , (64) point lies along a given streamline. 16r6 (cid:0) (cid:1) whTehree aSxial m[2a/s(sγden1s)i]t1y/2s,olauntdionMis0 ρ2 ∝u/(c¯Ss2i−s tMhe02)aSx2-, wsuhreeresmcoasll2erθt=ha(nz2(−5/̺82))ρ˜/u˜r22.wNouotlde tlehaadt atonainnciodnepnhtypsriceas-l ≡ − ≡ ial Mach number with respect to the stagnation sound P <0 around z =0, as the plasma would be too cold to speed. Hence, away from shocks, remain incompressible. Consider the evolution of a magnetic field, initially ρ = S2−M02 1/(γ−1) (60) given by B˜ = (B˜̺,B˜φ,B˜z), for different choices of q. In ρ˜ S2 M˜2 this subsection, round-bracket vectors are in cylindrical (cid:18) − 0(cid:19) coordinates. can be used in Equation (56) to find B once u is deter- mined. When a shock is present, the Lagrangian con- 4.1.1. The natural choice q=z stants here are taken downstream; if H˜ is located up- Forthechoiceq =z,whichisnaturalbecausez mono- stream,theshockcompressionratio(M˜ /W)2 shouldbe tonically decreases for all fluid elements, the magnetic 0 incorporated. Here, W [2/(γ +1)]1/2 and S are the field is given by (cf. Equation 53) ≡ weak and strong shock limits of M ; see Keshet & Naor (2014). 0 B =B˜ ̺φˆ B˜ ̺˜u˜ ̺ˆ v B˜ +B˜ ̺˜u˜∂∆t , (65) φ ̺ z ̺ ̺˜ − ̺v − u˜ ∂λ z (cid:18) (cid:19) 4. MAGNETIZATIONOFBASICFLOWS where To illustrate the general magnetization solution, de- z rived in general in Section 2 and for axial symmetry in ∂∆t ∂∆t 12 r′8 r′2 5z′2 dz′ = = − . Section 3, here we study the magnetic fields evolving in ∂λ ∂λ − u˜ (r′2+2r′5 3z′2)3 specific,basicflows. Passivemagnetizationinsteady,in- (cid:18) (cid:19)φ,z,z˜ ∞Z (cid:0) − (cid:1) (66) compressible flows around a sphere are analyzed in the 8 Naor & Keshet Fig. 2.— Potential, incompressible, steady flow (arrows with direction and length proportional to v) around a solid sphere (green half disk), forauniformmagnetic fieldfarupstream. The constant φ sliceshows thepressureenhancement (gray scale; forP˜ =ρ˜u˜2)andthe magneticamplificationB/B˜ (colorscale;Green2011)forfieldlinesparallel(arrows)orinitiallyperpendicular(solidcurves)totheflow. Theintegralistakenataconstantλ,sor′(λ,z′)isfound 4.1.3. The orthogonal choice q=Φ from Equation (63). Another optional choice for q is the velocity potential Figure2showsaconstantφslicethroughtheflow,de- Φ. Here, the reciprocal basis becomes picting the pressure (grayscale) and the magnetic field cpoemndpiocunleanrts(cpoalorarsllceall(ecdolcourrsvceasl)edtoartrhoewvse)loocriitny.itiFaollryilpluesr-- a1 =̺φˆ ; a2 = u˜ vˆ φˆ ; a3 =vˆ . (70) ̺v × trative purposes, in the figure we take P˜ =ρ˜u˜2. (cid:16) (cid:17) TheelectricfieldhereisaspecialcaseofEquation(55), These vectors are perpendicular to one another, and namely therefore may be useful as an orthogonal (albeit not or- thonormal) basis. The magnetic field here is given by v B˜ z φ E = ̺ 2λu˜B˜ . (67) ̺˜−1B˜φ 0 ̺˜c ̺2 ̺ ∂∆t v̺B˜φ B = ̺˜B˜̺ −0B˜̺ ∂λ , (71) 4.1.2. The problem−atic choice q=r −uv˜B˜z ̺˜v Another seemingly possible choice is q =r. According where toEquation(25),themagneticfieldmaythenbewritten as ∂∆t ∂∆t = (72) B =B˜ ̺φˆ+B˜ ̺rθˆ v B˜ +B˜ ̺˜u˜∂∆t , (68) ∂λ (cid:18) ∂λ (cid:19)φ,Φ,Φ˜ φ ̺ z ̺ ̺˜ ̺˜z − u˜ ∂λ Φ (cid:18) (cid:19) 48 z′4+4r′8Φ′2+10z′4r′3 1 2r′3 where = u˜ r−11z−4[4r′8Φ′2+3z′4(1 −4r′3)]3 dΦ′ . r −Z∞ (cid:0) − (cid:1) ∂∆t ∂∆t r′4dr′/u˜ ∂λ = ∂λ = − 3 . The parameters r′(λ,Φ′) and z′(λ,Φ′) are found from (cid:18) (cid:19)φ,r,r˜ ∞Z (r′3−1)2 1− r2′3λ−r′1 2 Equations (61) and (63). (cid:16) (cid:17) (69) 4.2. Stokes Incompressible Steady Flow Around a However, this result, obtained previously (Dursi & Sphere Pfrommer 2008; Romanelli et al. 2014) by solving the Consider the Stokes, incompressible, steady flow MHD equations, is strictly valid only in the half space around a solid sphere. As in Section 4.1, ρ = ρ˜ is con- θ <π/2. Atthe surfaceθ =π/2,the denominatorofthe stant, the radius of the sphere is taken as R = 1, we integranddiverges,andtheintegrationcannotbecontin- ued. Thisistobeexpected,assurfacesofconstantλand assume that the incident flow v˜ u˜zˆ, taken on H˜ far ≡ − surfacesofconstantr overlapatθ =π/2,as∇λand∇r upstream (z˜ ), is homogeneous and unidirectional, → ∞ become parallel. The problem can be circumvented by and use a mixture of cylindrical and spherical coordi- computing the converging ∆t, rather than its diverging nates. It is again natural to choose ρ˘ = ρ˜, R˘ = 1 and derivative. v˘=u˜, so µ˘ =ρ˜u˜. The integral in Equation (69) can be solved analyti- Stokes flows are characterized by viscous forces much cally as a power series in λ; see appendix B. greater than the inertial forces, so the flow is governed MHD with path/stream functions 9 510. 0.69 1.7 5.1 0.62 11..11 ™ 2.4 0.53 Ž(cid:144)BB¦ Ž(cid:144)BB° Ž(cid:144)PP 0.43 0.95 1.7 1.5 0.3 0.87 1.2 0.0002 0.26 Fig.3.—Stokes, incompressible,steadyflowaroundasolidsphere. Notations areasinFigure2,withP˜=2ρ˜u˜2/Re. by the approximate Navier-Stokes equation which is formally equivalent to Equation (65). Here, P ∂∆t ∂∆t 0= ∇ +ν∇2v, (73) = (80) − ρ˜ ∂λ ∂λ (cid:18) (cid:19) (cid:18) (cid:19)φ,z,z˜ z where ν is the kinematic viscosity, assumed constant. 48 r′6 5z′2r′2+r′4 1+3z′2 = − dz′ , Taking the curl of this equation gives u˜ ∞Z 1− r1′2 3 r′2−3z(cid:0)′2+ 14+r′r4′(cid:1)3 ∇× ∇2v =0 . (74) where r′(λ,z′) is(cid:0)found fr(cid:1)om(cid:16)Equation (78). (cid:17) The solution, for bounda(cid:0)ry co(cid:1)nditions of a hard sphere, Figure3showsthepressureandmagnetizationinsuch is a flow, with the same notations used in Figure 2. For illustrative purposes, in the figure P˜ =2ρ˜u˜2/Re. 1 r2 3z2 (r+1) Here too, the electric field is a special case of Equa- v = u˜ 1 1+ − , (75) z − (cid:18) − r(cid:19)" (cid:0) 4r(cid:1)4 # tion (55), and is given by Equation (67). 4.3. One-dimensional, Time Dependent Flow and As a simple illustration of magnetization in the time- 1 ̺z dependent regime, consider the case of an arbitrary 1D v =3u˜ 1 . (76) ̺ − r2 4r3 flow. Classical examples include the plasma in a cylin- (cid:18) (cid:19) drical pipe, disturbed by a moving piston, or a 1D rar- Solving Equation (73) gives the pressure distribution, efaction wave. If discontinuities are present in the flow, the following applies separately to each region bounded P =P˜+ρ˜u˜ν 3z . (77) by surfaces of discontinuity or H˜. 2r3 Without loss of generality, take the flow in the xˆ di- rection,suchthatv =vxˆ andtheperpendicularvelocity Here too, the incident plasma cannot be too cold, as an components vanish. A simple choice of path functions is incident pressure P˜ < (3/2)ρ˜u˜2/Re, where Re = u˜R/ν then is the incident Reynolds number, would lead to a non- physical P <0 around the z <0 axis. Λ2 =y and Λ3 =z , (81) The stream functions can be chosen as λ = φ and, 1 as both are constant along the flow. Equations (32) and according to Equation (50), (33) therefore constrain Λ , as 1 ̺2 1 2 1 ∂Λ ρ ∂Λ ρv λ λ2 = 1 1+ . (78) 1 = and 1 = . (82) ≡ 2 − r 2r ∂x −ρ˘ ∂t ρ˘ (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19)y,z,t (cid:18) (cid:19)x,y,z As in the case of a potential flow, here too ̺˜= (2λ)1/2, The solution is the path function family and we proceed similarly with the natural choice q = z. 1 x The magnetic field is given by Λ (x,t)= ρ(x′,t)dx′+ , (83) 1 −ρ˘ C Z B =B˜ ̺φˆ B˜ ̺˜u˜ ̺ˆ v B˜ +B˜ ̺˜u˜∂∆t , (79) where we used the continuity equation, and is an in- φ̺˜ − ̺̺vz − u˜ (cid:18) z ̺ ∂λ (cid:19) significant constant. C 10 Naor & Keshet For a given l˜ = (˜l ,˜l ,˜l ), Equation (41) yields the Consider however the case of a steady flow, with the x y z Lagrangianconstants choiceq =∆t. Here,evenifB˜ (x,t)variesinspaceand in ρ˜ time, we may directly determine B˜ using L˜ = ˜l ; L˜ =˜l ; L˜ =˜l , (84) 1 x 2 y 3 z −ρ˘ B˜(x;t)=B˜(λ ,λ ,∆t;t)=B˜(λ ,λ ,0;t˜ t ∆t) 1 2 1 2 ≡ − where here and in the rest of Section 4.3, round brack- =B˜ (λ ,λ ,0;t˜) , (88) ets are in Cartesian coordinates. Equivalently, for B˜ = in 1 2 (B˜ ,B˜ ,B˜ ), Equation (43) gives where t˜ is the time at which the fluid element, which x y z presently lies at (x,t), was on H˜. Equation (88) applies ρ˜ B˜ = B˜ ; B˜ =B˜ ; B˜ =B˜ . (85) for any choice of q, if Equation (18) is used to compute 1 x 2 y 3 z −ρ˘ the travel time. For example, in cylindrical coordinates Finally, Equations (44) and (45) give, respectively with H˜ at z , we may compute it by →∞ ρ˜ z l= ˜l ,˜l ,˜l , (86) dz′ ρ x y z ∆t= . (89) (cid:18) (cid:19) Z vz and ∞ B = B˜ ,ρB˜ ,ρB˜ . (87) An arbitrary unperturbed B˜(x,t) can be Fourier de- x y z ρ˜ ρ˜ composedintocomponentsofwavenumberkandangular (cid:18) (cid:19) frequency ω. As a simple example, assume a flow in the Equations (86) and (87) can be seen directly from La- ( z) direction, and consider a Fourier component of the grangian considerations. Since the gas flows only in the − form x direction, the perpendicular (to the flow) distance be- B˜ =B (cos(ωt˜), 0, cos(k̺˜)) , (90) tween fluid elements is constant. Perpendicular length 0 elements l ,l and the parallel magnetic field B , are y z x whereB isaconstant,andround-bracketvectorsinthis { } 0 thus conserved. The parallel distance between nearby subsection are in Cartesian coordinates. Notice that no fluid elements is simply lx ρ−1, so the perpendicular spatial component of this B˜ contributes to Gauss’ law, ∝ fields follow {By,Bz}∝ρ. and that a t-dependence on H˜ induces a z-dependence 5. ASTROPHYSICALEXAMPLES in its vicinity, i.e. Equation (90) becomes The simplicity of the above MHD formalism allows B˜ =B (cos[ω(t+z/v˜)], 0, cos(k̺)) (91) 0 us to easily obtain results, both general and specific, for the evolution of electromagnetic fields in a wide in the region where the flow is approximately uniform. range of astronomical systems. In particular, the for- Figure. 4 presents the evolutionof the Fourier compo- malism yields analytic expressions for the electric field, nent Equation (90), in an incompressible potential flow directly incorporates time-dependent flows, and admits around a sphere (see Section 4.1). As Figures 4 and 5 inhomogeneousinitialconditionsinbothspaceandtime, show, substructure in the far upstream magnetic field is B˜ = B˜(x;t), whether or not the flow itself is time- non-trivially imprinted on the downstream flow. In situ dependent. measurements of B downward of an object such as a In Section 5.1, we demonstrate such inhomogeneous planet would thus be sensitive to both the substructure scenarios by considering substructure in B˜. In particu- and details of the flow. As an example, consider measurements of the inverse lar, some observational consequences are outlined for a polarity reversal layer (henceforth IPRL) induced by a stellar wind behind a planet or a moon. Near the nose planetarybody(Romanellietal.2014). TheIPRLisde- of a body, the magnetic field is greatlyamplified; the re- finedas the layerinwhichthe magnetic fieldcomponent sulting magnetic layer,analyzed in Section 5.2, becomes inthedirectionoftheinitialflowchangesitssign,imply- dynamically significant and distorts the flow. In Sec- inginourcasethatB =0. AccordingtoEquation(53), tion 5.3, we derive analytic expressions for the electric z forq =z,the IPRLisdescribedforageneralflowbythe field above heliospheres and magnetospheres. Sophisti- simple formula cated astronomical scenarios typically require a numeri- cal computation; the integration of our method into nu- v˜ µ˜ B˜ µ˜ B˜ merical simulations is discussed in Section 6. ∂∆t ̺ z z ̺ ∂∆t B˜ =B˜ v˜ = − . (92) 5.1. Spacetime Dependent B˜ z 2 ∂λ (cid:16) µ˘ (cid:17) ∂λ Given a flow and an initial magnetic configuration Considerthe IPRL for a magnetic field with initial os- B˜ on H˜, the electromagnetic field solution in Equa- cillatorysubstructure. Foraninitialmagneticinclination in θ , let tions (25), (27), (29), (42), (45) or (46), depends only 0 on knowing the Lagrangian constant B˜ corresponding B˜ =B (sinθ , 0, cosθ )+xˆζB sin(θ )cosωt˜, (93) 0 0 0 0 0 to every spacetime location. For an initially uniform magnetic field, B˜ is everywhere constant, and the result where ζ < 1 is a small number; this B˜ trivially satisfies is straightforward even for time-dependent flows. For a Gauss’lawnearH˜. Asnapshotoftheresultingmagnetic spacetime-dependentinitialmagneticfield,thismapping configurationis shown in Figure 5, where for illustrative can become complicated, especially for time-dependent purposes we adopt the incompressible, steady potential flows. flowofSection4.1. Asthefigureshows,thefarupstream