# Solution to streamlines issues.

Turns out we are calling the wrong position in the array. The expressions should be:

By_downx = array_decompose(projections,0)

Bz_downx = array_decompose(projections,1)

Bz_downy = array_decompose(projections,0)

Bx_downy = array_decompose(projections,1)

Byz_downx = {<By_downx>, <Bz_downx>}

Bzx_downy = {<Bz_downy>, <Bx_downy>}

This yields the following:

Which makes much more sense.

# Potential problems with projected streamlines?

So I am attempting to plot the streamlines for our colliding flows problem. Here is an example of the shear-0 case at 10.1 Myr (or frame 101) (also I did these under Erica' account on BH2 - hence the username haha).

The first image is down the barrel of the two flows (otherwise projecting the mass down the x-axis) thus the vertical axis is z and the horizontal is y.

The second image is a projection down the y-axis. Thus the vertical axis is x and the horizontal is z. This makes sense given that we've defined GxBounds = 0d0,0d0,0d0,62.5d0,75d0,75d0. The two flows are colliding along x, so in the second image, they are coming in from top and bottom.

In both images I've plotted the column density maps for min = 60 and max = 1000. I did similarly for the min/max of the streamlines which are plotted on top of the column density maps. I also checked that they are scaled by magnitude. Now after talking with Erica we are not sure if these streamlines make any physical sense if we have defined a magnetic field along the flow axis (i.e. x). Ignore the visit axis labels as they are generic and don't define the dimensions of our problem.

In our problem.f90 we have defined the projections for streamlines like so:

!For 'projected' streamlines plot of the data down x: CALL CreateProjection(projection) Projection%dim=1 Projection%Field(1)%iD=By_field Projection%Field(1)%component=BOTHCOMP Projection%field(1)%name='By' Projection%Field(2)%iD=Bz_field Projection%Field(2)%component=BOTHCOMP Projection%field(2)%name='Bz' !For 'projected' streamlines plot of the data down y: CALL CreateProjection(projection) Projection%dim=2 Projection%Field(1)%iD=Bz_field Projection%Field(1)%component=BOTHCOMP Projection%field(1)%name='Bz' Projection%Field(2)%iD=Bx_field Projection%Field(2)%component=BOTHCOMP Projection%field(2)%name='Bx'

So in Visit I defined a few expressions to be able to plot the streamlines. For down the x-axis (which correspond to the mass1 CDMs):

By_downx = array_decompose(projections, 1)

Bz_downx = array_decompose(projections, 2)

which you can create the expression for the vector Byz_downx = {<By_downx, Bz_downx>} to plot the streamlines like I have above. The first component corresponds should correspond to the right axis if the horizontal component is truly y. Thus the second component will correspond to z if the vertical is truly z. So I think I have these lined up correctly? For projections down the y-axis (corresponding to mass2 CDMs):

Bz_downy = array_decompose(projections, 1)

Bx_downy = array_decompose(projections, 2)

you can create Bzx_downy = {<Bz_downy>, <Bx_downy>}. Clearly from the size of the box we know the horizonal component is z, and thus the first parameter in our vector should be Bz. Similarly for the second being x. However the streamlines don't seem right? Not sure what is going on.