Groups 177 of 99+ julia-users › ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver 9 posts by 3 authors Sheehan Olver 9 16 15 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! Luke Stagner 9 16 15 Can this package be used to solve the Grad-Shafranov equation? Sheehan Olver 9 16 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver 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. Luke Stagner 9 16 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver 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. Sheehan Olver 9 17 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver On what kind of domain? Tomas Lycken 9 17 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver Luke, I finished my Masters' Thesis work this past spring working with a Cpp simulation for fusion plasma physics applications - during most of that time, I was clenching my teeth wishing I was allowed to use Julia instead. If you want any help with your Fusion Plasma Physics toolbox, ping me tlycken on Github and I'll jump in where I can : T Luke Stagner 9 17 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver 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. Luke Stagner 9 17 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver Nice! What were you stuck using Matlab or IDL IDL for me . I looked up your masters thesis and it looks like we are in the same sub-field Energetic Particles . For my Ph.D thesis work I need to calculate orbits in Constants of motion space so my plan was to write up some routines that can handle magnetic equilibriums read EFIT files, switching from different flux coordinates, those sort of things and implement this 1,2 guiding center code in Julia. Are you still working in the field? 1 Ellison, Clanguage. Leland, et al. Development of variational guiding center algorithms for parallel calculations in experimental magnetic equilibria. Plasma Physics and Controlled Fusion 57.5 2015 : 054007. 2 https: github.com lellison NCSI_Basic Tomas Lycken 9 18 15 Re: julia-users Re: ANN: ApproxFun v0.0.8 with experimental nonlinear ODE solver No, I actually ended up using MATLAB for some preprocessing basically a script given to me by my supervisor, to massage the input data into our self-designed XML format , then Cpp for the actual simulation and Julia for the postprocessing and analysis. Most of the time, it turned out, was spent on IO to the intermediate format used between Cpp and Julia, so just writing it all in Julia would have been way faster : I'll gladly share my code with you, if you think you can have use for it, and or help porting it to Julia. This is beginning to be real OT, though - we can continue this discussion in private instead. Ping me at my-first-name-dot-my-last-name at gmail ; T