A simple Coronal magnetic field line model using four LFFF dipoles for a 3D printing example with conservation of flux in the tubes. Objective of this Code: produce a file (.stl) to be used in 3D printing of the generated loop structures over a solar active region.
ABSTRACT (original article): An X-ray or EUV image of the corona or chromosphere is a 2D representation of an extended 3D complex for which a general inversion process is impossible. A specific model must be incorporated in order to understand the full 3D structure. We approach this problem by modeling a set of optically-thin 3D plasma flux tubes which we render these as synthetic images. The resulting images allow the interpretation of the X-ray/EUV observations to obtain information on (1) the 3D structure of X-ray images, i.e., the geometric structure of the flux tubes, and on (2) the internal structure using specific plasma characteristics, i.e., the physical structure of the flux tubes. The data-analysis technique uses magnetograms to characterize photospheric magnetic fields and extrapolation techniques to form the field lines. Using a new set of software tools, we have generated 3D flux tube structures around these field lines and integrated the plasma emission along the line of sight to obtain a rendered image. A set of individual flux-tube images is selected by a non-negative least-squares technique to provide a match with an observed X-ray image. The scheme minimizes the squares of the differences between the synthesized image and the observed image with a non-negative constraint on the coefficients of the brightness of the individual flux-tube loops. The derived images are used to determine the specific photospheric foot points and physical data, i.e., scaling laws for densities and loop lengths. The development has led to computer efficient integration and display software that is compatible for comparison with observations (e.g., Yohkoh SXT data, NIXT, or EIT). This analysis is important in determining directly the magnetic field configuration, which provides the structure of coronal loops, and indirectly the electric currents or waves, which provide the energy for the heating of the plasma. We have used very simple assumptions (i.e., potential magnetic fields and isothermal corona) to provide an initial test of the techniques before complex models are introduced. We have separated the physical and geometric contributions of the emission for a set of flux tubes and concentrated, in this initial study, on the geometric contributions by making approximations to the physical contributions. The initial results are consistent with the scaling laws derived from the Yohkoh SXT data.
CITATION (original article): Gary, G.A. Rendering three-dimensional solar coronal structures. Solar Physics 174, 241–263 (1997). https://doi.org/10.1023/A:1004978630098
Reprint at NASA, 2013: https://ntrs.nasa.gov/citations/19990008038
NASA resources: Downloadable 3D model, 2022: https://nasa3d.arc.nasa.gov/detail/coronal-loops
CITATION (original article): Gary, G.A. Rendering three-dimensional solar coronal structures. Solar Physics 174, 241–263 (1997). https://doi.org/10.1023/A:1004978630098
Reprint at NASA, 2013: https://ntrs.nasa.gov/citations/19990008038
NASA resources: Downloadable 3D model, 2022: https://nasa3d.arc.nasa.gov/detail/coronal-loops
STL files in 3D printing
STL files in 3D printing
STL is a file format native to the stereo-lithography CAD software created by 3D Systems. STL has several acronyms such as “Standard Triangle Language” and “Standard Tessellation Language”. This file format is supported by many other software packages; it is used for rapid prototyping, 3D printing. STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture or other common CAD model attributes. The STL format specifies both ASCII and binary representations. Binary files are more common, since they are more compact. The model should fit into a 15 x 15 x 15 cm cube and mustn’t contain walls with a thickness under 1mm.
https://en.wikipedia.org/wiki/STL_(file_format)
https://www.sculpteo.com/en/3d-learning-hub/create-3d-file/what-is-an-stl-file/
https://3dfizzr.wordpress.com/2013/08/05/how-to-check-you-stl-files-before-3d-printing-them/
https://slic3r.org/
https://en.wikipedia.org/wiki/STL_(file_format)
https://www.sculpteo.com/en/3d-learning-hub/create-3d-file/what-is-an-stl-file/
https://3dfizzr.wordpress.com/2013/08/05/how-to-check-you-stl-files-before-3d-printing-them/
https://slic3r.org/
Generating this for 3D printing at the South Huntsville Maker Studio which is the south Huntsville branch of the Huntsville Madison County Public Library.
https://hmcpl.org/studio
https://hmcpl.org/curbside-printing <- site for uploading files “.stl” and less than 15 MB and with yellow plastic
HMCPL email: shvmakerstudio@hmcpl.org (or contact Jake Cornelius at jcornelius@hmcpl.org)
https://hmcpl.org/studio
https://hmcpl.org/curbside-printing <- site for uploading files “.stl” and less than 15 MB and with yellow plastic
HMCPL email: shvmakerstudio@hmcpl.org (or contact Jake Cornelius at jcornelius@hmcpl.org)
3D coordinate space and double dipole formulae
3D coordinate space and double dipole formulae
Location of the four dipoles =(x,y,z)’s and z is below the z=zero surface.
Two dipoles of equal strength (b01,-b01) and the other two of equal strengths (b02,-b02).
Magnetogram is 10x10 units so dipole are inside this region but below the surface.
Two dipoles of equal strength (b01,-b01) and the other two of equal strengths (b02,-b02).
Magnetogram is 10x10 units so dipole are inside this region but below the surface.
In[]:=
Clear[x,y,z,r,xp1,yp1,zp1,rp1,xp2,yp2,zp2,rp2,b01,b02]
dipoleposition1={5.,0.,-5.0};(*1stdipoleposition*)
dipoleposition2={-3.,0.,-5.0};(*2nddipoleposition*)
dipoleposition3={0.,2.,-2.0};(*3rddipoleposition*)
dipoleposition4={2.,6.,-2.0};(*4thdipoleposition*)
Potential Field
A set of field line foot points are generated center about the four dipole locations: (initial n pts around 4 dipoles)
A set of field line foot points are generated center about the four dipole locations: (initial n pts around 4 dipoles)
ptsperdipole = points per dipoles and maxpts = total number of foot points employed hence 4*16 = 64 field lines
ptsperdipole=16;maxpts4=ptsperdipole*4;
Seeds for random number generators to keep the same random numbers from trail to trail
SeedRandom[1134];
Clear[xps,yps];
In[]:=
xps=2.5(RandomReal[1,maxpts4]-0.5);(*2.5givethespreadingofthepoints*)
In[]:=
SeedRandom[1234];
In[]:=
yps=2.5(RandomReal[1,maxpts4]-0.5);
Redefine xps and yps
Vals=Table[xps[[n]]=xps[[n]]+dipoleposition1[[1]];yps[[n]]=yps[[n]]+dipoleposition1[[2]];xps[[n+ptsperdipole]]=xps[[n+ptsperdipole]]+dipoleposition2[[1]];yps[[n+ptsperdipole]]=yps[[n+ptsperdipole]]+dipoleposition2[[2]];xps[[n+2ptsperdipole]]=xps[[n+2ptsperdipole]]+dipoleposition3[[1]];yps[[n+2ptsperdipole]]=yps[[n+2ptsperdipole]]+dipoleposition3[[2]];xps[[n+3ptsperdipole]]=xps[[n+3ptsperdipole]]+dipoleposition4[[1]];yps[[n+3ptsperdipole]]=yps[[n+3ptsperdipole]]+dipoleposition4[[2]],{n,1,ptsperdipole}];
In[]:=
xps;
In[]:=
yps;
In[]:=
Dimensions[yps]
Out[]=
{64}
Potential Field Dipoles
Potential Field Dipoles
The definition of the magnetic filed from the four potential dipoles is defined
Dipole strength - arbitary units and strength - used to have something like the max photospheric magnetic field (G)
b01=1500.;
Second sets of Dipoles
b02=200.;
DoubleDipoleFieldPotential[x_,y_,z_,dipoleposition1_,dipoleposition2_,dipoleposition3_,dipoleposition4_,b01_,b02_]:=Module[{xp1,yp1,zp1,rp1},xp1=x-dipoleposition1[[1]];yp1=y-dipoleposition1[[2]];zp1=z-dipoleposition1[[3]];rp1=Sqrt[(x-dipoleposition1[[1]])^2+(y-dipoleposition1[[2]])^2+(z-dipoleposition1[[3]])^2];xp2=x-dipoleposition2[[1]];yp2=y-dipoleposition2[[2]];zp2=z-dipoleposition2[[3]];rp2=Sqrt[(x-dipoleposition2[[1]])^2+(y-dipoleposition2[[2]])^2+(z-dipoleposition2[[3]])^2];xp3=x-dipoleposition3[[1]];yp3=y-dipoleposition3[[2]];zp3=z-dipoleposition3[[3]];rp3=Sqrt[(x-dipoleposition3[[1]])^2+(y-dipoleposition3[[2]])^2+(z-dipoleposition3[[3]])^2];xp4=x-dipoleposition4[[1]];yp4=y-dipoleposition4[[2]];zp4=z-dipoleposition4[[3]];rp4=Sqrt[(x-dipoleposition4[[1]])^2+(y-dipoleposition4[[2]])^2+(z-dipoleposition4[[3]])^2];Bxx=((b013.xp1zp1/rp1^5)+(-b013.xp2zp2/rp2^5))+((b023.xp3zp3/rp3^5)+(-b023.xp4zp4/rp4^5));Byy=((b013.yp1zp1/rp1^5)+(-b013.yp2zp2/rp2^5))+((b023.yp3zp3/rp3^5)+(-b023.yp4zp4/rp4^5));Bzz=(-b01(1.-3.zp1^2/rp1^2)/rp1^3+b01(1.-3.zp2^2/rp2^2)/rp2^3-b02(1.-3.zp3^2/rp3^2)/rp3^3+b02(1.-3.zp4^2/rp4^2)/rp4^3);{Bxx,Byy,Bzz}];
In[]:=
DoubleDipoleFieldOld[5.,0.0,0.1,dipoleposition1,dipoleposition2,dipoleposition3,dipoleposition4,b01,b02]
Out[]=
DoubleDipoleFieldOld[5.,0.,0.1,{5.,0.,-5.},{-3.,0.,-5.},{0.,2.,-2.},{2.,6.,-2.},1500.,200.]
Linear Force Force Free Field Dipole: (implemented)
Linear Force Force Free Field Dipole: (implemented)
Reference: G. Allen Gary, 1989, Linear Force-free Magnetic Fields for Solar Extrapolation and Interpretation, ApJS., 69, 323G , See equations 38, 39abc, 40, and 41 and, of course, the potential solution (as above) is given when linear force free field parameter alpha is zero.
http://adsabs.harvard.edu/full/1989ApJS...69..323G
http://adsabs.harvard.edu/full/1989ApJS...69..323G
DoubleDipoleField[x_,y_,z_,dipoleposition1_,dipoleposition2_,dipoleposition3_,dipoleposition4_,b01_,b02_]:=(*LinearForceFreeFields-Fourdipole*)Module[{xp,yp,zp,rp,up,upder},alphap=0.20;(*0.2;*)xp1=x-dipoleposition1[[1]];yp1=y-dipoleposition1[[2]];zp1=z-dipoleposition1[[3]];rp1=Sqrt[(x-dipoleposition1[[1]])^2+(y-dipoleposition1[[2]])^2+(z-dipoleposition1[[3]])^2];up1=Cos[alphaprp1]/rp1;upder1=-up1/rp1-alphapSin[alphaprp1]/rp1;Bxp1=-(3upder1/rp1+alphap^2up1)xp1zp1/rp1^2+alphapupder1yp1/rp1;Byp1=-(3upder1/rp1+alphap^2up1)yp1zp1/rp1^2-alphapupder1xp1/rp1;Bzp1=(1-3zp1^2/rp1^2)upder1/rp1+alphap^2up1(1-zp1^2/rp1^2);potz1={(-b013.xp1zp1/rp1^5),(-b013.yp1zp1/rp1^5),(b01(1.-3.zp1^2/rp1^2)/rp1^3)};xp2=x-dipoleposition2[[1]];yp2=y-dipoleposition2[[2]];zp2=z-dipoleposition2[[3]];rp2=Sqrt[(x-dipoleposition2[[1]])^2+(y-dipoleposition2[[2]])^2+(z-dipoleposition2[[3]])^2];up2=Cos[alphaprp2]/rp2;upder2=-up2/rp2-alphapSin[alphaprp2]/rp2;Bxp2=-(3upder2/rp2+alphap^2up2)xp2zp2/rp2^2+alphapupder2yp2/rp2;Byp2=-(3upder2/rp2+alphap^2up2)yp2zp2/rp2^2-alphapupder2xp2/rp2;Bzp2=(1-3zp2^2/rp2^2)upder2/rp2+alphap^2up2(1-zp2^2/rp2^2);potz2={(b013.xp2zp2/rp2^5),(b013.yp2zp2/rp2^5),(-b01(1.-3.zp2^2/rp2^2)/rp2^3)};xp3=x-dipoleposition3[[1]];yp3=y-dipoleposition3[[2]];zp3=z-dipoleposition3[[3]];rp3=Sqrt[(x-dipoleposition3[[1]])^2+(y-dipoleposition3[[2]])^2+(z-dipoleposition3[[3]])^2];up3=Cos[alphaprp3]/rp3;upder3=-up3/rp3-alphapSin[alphaprp3]/rp3;Bxp3=-(3upder3/rp3+alphap^2up3)xp3zp3/rp3^3+alphapupder3yp3/rp3;Byp3=-(3upder3/rp3+alphap^2up3)yp3zp3/rp3^2-alphapupder3xp3/rp3;Bzp3=(1-3zp3^2/rp3^2)upder3/rp3+alphap^2up3(1-zp3^2/rp3^2);potz3={(-b023.xp3zp3/rp3^5),(-b023.yp3zp3/rp3^5),(b02(1.-3.zp3^2/rp3^2)/rp3^3)};xp4=x-dipoleposition4[[1]];yp4=y-dipoleposition4[[2]];zp4=z-dipoleposition4[[3]];rp4=Sqrt[(x-dipoleposition4[[1]])^2+(y-dipoleposition4[[2]])^2+(z-dipoleposition4[[3]])^2];up4=Cos[alphaprp4]/rp4;upder4=-up4/rp4-alphapSin[alphaprp4]/rp4;Bxp4=-(3upder4/rp2+alphap^2up4)xp4zp4/rp4^2+alphapupder4yp4/rp4;Byp4=-(3upder4/rp4+alphap^2up4)yp4zp4/rp4^2-alphapupder4xp4/rp4;Bzp4=(1-3zp4^2/rp4^2)upder4/rp4+alphap^2up4(1-zp4^2/rp4^2);potz4={(b023.xp4zp4/rp4^5),(b023.yp4zp4/rp4^5),(-b02(1.-3.zp4^2/rp4^2)/rp4^3)};{(b01*Bxp1-b01*Bxp2+b02*Bxp3-b02*Bxp4),(b01*Byp1-b01*Byp2+b02*Byp3-b02*Byp4),(b01*Bzp1-b01*Bzp2+b02*Bzp3-b02*Bzp4)}];
Marking locations of the four dipoles:
Show the photospheric magnetograms:
Generate Field Line Function - starting from a point ( usually on Z=0)
Generate Field Line Function - starting from a point ( usually on Z=0)
Set the maximum number of steps and step increment along a single field line
Here the function that generates the field line is defined using the Double Dipole field:
Position to start a series of footpoins - the first field line position
The displacement of the footpoints in the covered - wagon example below
Function generates a table of a series of nf LOOPS using Fieldline function
The Photosphere or plate for the loops
Select field lines x, y, z
Points in second field line
The field strength TBD
This uses bbb which are uses BFieldModTable which does terminate the field lines at the photosphere
Lengths of the loops
The loops that don’ t come back to surface due to allow number of points on field line
( One can see the foot points with field lines are the one that were remove because they didn’t return to the surface with the number of points allowed )
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
3D printing coronal loops of an active solar region, as featured in NASA 3D Resources
by Gilmer Allen Gary
Wolfram Community, STAFF PICKS, October 10, 2024
https://community.wolfram.com/groups/-/m/t/3295474
by Gilmer Allen Gary
Wolfram Community, STAFF PICKS, October 10, 2024
https://community.wolfram.com/groups/-/m/t/3295474