User Manual: Examples

From FLUX

Jump to: navigation, search

Here are some example relaxations to demonstrate how to carry out simple tasks. The examples are designed to work if you start from the top directory of the FLUX distribution -- the filenames in the read_world calls and in the @PDLLIB paths are relative to that location.

Contents

Toy cases

Line-tied potential flux rope

Flux tubes

Expansion of a twisting flux rope

Expansion under an open-field boundary

Twisted flux rope

Here's an example of a twisted flux rope expanding through an open boundary with a radius of 3 units. It uses the twisted flux tube in the menagerie that is included with FLUX. The initial render call lets you drag the window and image around to the geometry you like. I ran this twice, once to generate each view, and spliced the frames together -- cheesy but effective.

The flux system expands and refines, showing how normal line-tied fluxons behave as they pass through the open boundary. In the end, all of the flux in the simulation is open. When enough of the flux has opened, the twist propagates outward through the boundary. All but a small remnant escapes, leaving two open field regions in a near potential state.

## Remember to start from the FLUX distribution directory
## (Enter the following commands into the perldl shell)
push(@PDLLIB,"+./pdl/PDL");                     # Find autoload helper files
use PDL::AutoLoader;                            # Make sure autoloading happens
use Flux;                                       # Load the FLUX modules
$a = read_world('pdl/menagerie/twisted.flux');  # Read the sample file
$range = pdl([-2,-2,0],[2,2,4]);                # Specify a volume to render
$a->render(1,$range);
$a->forces('f_pressure_equi2b','f_curvature','f_vertex4');
$a->{auto_open} = 1;
$a->{fc_oe}->{locale_radius} = 3;
$a->{fc_ob}->{locale_radius} = 3;
$a->{scale_s_power} = 0;
$a->{dtau} = 0.15;
simple_relaxer($a,0,0,10,{disp_n=>10,movie_n=>10,range=>$range,render_opt=>{points=>1,linewidth=>2}});
$a->fix_curvature(0.3,0.1);
simple_relaxer($a,0,0,3000,{disp_n=>10,movie_n=>10,range=>$range,render_opt=>{points=>1,linewidth=>2}});

Relaxation step 300 (frame 30 in the demo movie), showing some open and some closed fluxons.

Plasmoid

Here's an example of a linked plasmoid escaping through an open boundary with a radius of 3 units. It uses the plasmoid in the menagerie that is included with FLUX. The initial render call lets you drag the window and image around to the geometry you like. I ran this twice, once to generate each view, and spliced the frames together -- cheesy but effective.

The flux system expands and refines, showing how both normal fluxons and plasmoid loops behave as they pass through the open boundary. In the end, all of the flux in the simulation is open. Note that this is quite different from the results of a similar relaxation without the plasmoid! In that case, some of the flux would stay closed. Once a line-tied flux loop opens at the boundary there's no way for it to close again without reconnecting to form U-loop, and here we haven't imposed any reconnection.

Interestingly, metastable states aren't hard to come by -- here, we're left with a single fluxon from the plasmoid, stuck under the canopy formed by the two now-open flux concentrations.

The final stiffness coefficient is 0.1% -- the average force balance at each vertex is accurate to about 1 part in a thousand.

push(@PDLLIB,"+/usr/local/src/flux/pdl/PDL");
use PDL; use Flux;
$a = read_world('/usr/local/src/flux/pdl/menagerie/pot_with_plasmoid.flux');
$range = pdl([-2,-2,0],[2,2,4]);
$a->render(1,$range);
$a->forces('f_pressure_equi2b','f_curvature','f_vertex4');
$a->{auto_open} = 1;
$a->{fc_oe}->{locale_radius} = 3;
$a->{fc_ob}->{locale_radius} = 3;
$a->{scale_s_power} = 0;
$a->{dtau} = 0.15;
simple_relaxer($a,0,0,10,{disp_n=>10,movie_n=>10,range=>$range,render_opt=>{points=>1,linewidth=>2}});
$a->fix_curvature(0.3,0.1);
simple_relaxer($a,0,0,3000,{disp_n=>10,movie_n=>10,range=>$range,render_opt=>{points=>1,linewidth=>2}});


Relaxation step 970 (frame 97 in the demo movie, showing some open, some closed, and some trapped fully open field fluxons demo movie

Personal tools