Intuitively, an angular vector field $\theta(x)$ such as the following would describe a domain wall between two vortices/strings of opposite winding number.

Domain Wall

I would like to draw this on a computer using Mathematica.

  1. How do I do this? What vector field describes a configuration depicted above?
  2. If it's not too much to ask, how do I model a time-evolving field which is constant at time $t=0$ and then as time evolves, the two vortices (fluxes) get created and separated to give the above configuration?


I can draw a single vortex/string with the following code, for example. How do I introduce another vortex with a domain wall in between?

θnew[r0_] := ArcTan[r Sin[θ]/(r Sin[θ] - r0)]

field = 
  {FullSimplify[Cos[num (θ + α)] Cos[θ] + Sin[num (θ + α)] Sin[θ]], 
   FullSimplify[-Cos[num (θ + α)] Sin[θ] + Sin[num (θ + α)] Cos[θ]]} /. 
  num -> 1 /. α -> Pi/2 /. θ -> θnew[0.5]

  Evaluate @ TransformedField["Polar" -> "Cartesian", field, {r, θ} -> {x, y}], 
  {x, -1, 1}, {y, -1, 1}, 
  RegionFunction -> Function[{x, y}, x^2 + y^2 > .2]]
  • 1
    $\begingroup$ Such fields can be visualized with StreamPlot and VectorPlot. Please look them up and show what you tried so far. $\endgroup$ – Szabolcs Feb 18 at 14:17
  • $\begingroup$ @Szabolcs I am aware of those. Please see the edit above. $\endgroup$ – Nanashi No Gombe Feb 18 at 14:29
  • $\begingroup$ What you show in the embedded in figure and what the code in your edit produces are very different. I do not see the relationship. $\endgroup$ – Szabolcs Feb 18 at 14:32
  • $\begingroup$ @Szabolcs A vortex is a region around which a vector field has a winding number or a flux. What I have achieved so far is draw one such flux tube in Mathematica. The embedded figure shows two such fluxes or vortices. Away from the vortices, the field is constant. $\endgroup$ – Nanashi No Gombe Feb 18 at 14:37

Here's one way to produce graphics similar to what you show.

   s/3 ( Grad[1/Sqrt[(x + s)^2 + y^2], {x, y}] - 
       Grad[1/Sqrt[(x - s)^2 + y^2], {x, y}]) + {0.2, 0}],
  {x, -4, 4}, {y, -4, 4}, StreamMarkers -> "Pointer", 
  StreamPoints -> Fine],
 {s, 0, 2}

enter image description here

  • $\begingroup$ That's brilliant. Thanks. $\endgroup$ – Nanashi No Gombe Feb 18 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.