The Grad-Shafranov equation is typically solved in toroidal 
coordinates(R,Z,phi) assuming toroidal symmetry. Some equilibrium codes use 
conformal mapping to solve the equations[1,2]. Using this technique, the 
(arbitrarily shaped) cross section of the last closed flux surface is 
mapped to a circular disk (Hence why I think ApproxFun.jl/DiskFun.jl could 
be used).

[1] http://fusionwiki.ciemat.es/wiki/HBT
[2] Goedbloed, J. P. "Conformal mapping methods in two-dimensional 
magnetohydrodynamics." *Computer Physics Communications* 24.3 (1981): 
311-321.


On Wednesday, September 16, 2015 at 11:17:45 PM UTC-7, Sheehan Olver wrote:
>
> On what kind of domain?  
>
>
> On 17 Sep 2015, at 12:07 pm, Luke Stagner <[email protected] 
> <javascript:>> wrote:
>
> It's actually a 2D non-linear, elliptic PDE (psi is a function of R,Z). 
> I'm thinking about created a Julia library for fusion/plasma physics and 
> the ability to quickly calculate magnetic equilibrium would be a killer 
> feature. 
>
>
> On Wednesday, September 16, 2015 at 6:46:09 PM UTC-7, Sheehan Olver wrote:
>>
>>
>> I’m having trouble reading the formulae, but I guess its a nonlinear PDE 
>> in 3D?   Right now the package can only do nonlinear ODEs and linear PDEs 
>> on rectangles and disks.  We’ll hopefully eventually extend it to nonlinear 
>> PDEs, and 3D PDEs.
>>
>>
>>
>>
>>
>> On 17 Sep 2015, at 11:40 am, Luke Stagner <[email protected]> wrote:
>>
>> Can this package be used to solve the Grad-Shafranov equation 
>> <https://en.wikipedia.org/wiki/Grad%E2%80%93Shafranov_equation>? 
>>
>>
>> On Wednesday, September 16, 2015 at 3:33:22 PM UTC-7, Sheehan Olver wrote:
>>>
>>>
>>> ApproxFun is a package for approximating and solving differential 
>>> equations. ApproxFun v0.0.8 Adds (experimental) support for solving 
>>> nonlinear ODEs, using Newton iteration and automatic differentiation.  The 
>>> following example solves and plots a singularly perturbed nonlinear 
>>> two-point boundary value problem
>>>
>>> x=Fun()
>>> u0=0.x  # The initial guess for Newton iteration
>>>
>>> N=u->[u[-1.]-1.,u[1.]+0.5,0.001u''+6*(1-x^2)*u'+u^2-1.]
>>> u=newton(N,u0)
>>>
>>> ApproxFun.plot(u)  # Requires PyPlot or Gadfly
>>>
>>>
>>>
>>> Note: previous support for approximating functions on a disk has been 
>>> moved to a separate package:
>>>
>>>      https://github.com/ApproxFun/DiskFun.jl
>>>
>>> And this will be the last version to support Julia 0.3!  
>>>
>>>
>>
>

Reply via email to