Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
d3017ba
mirror2_velocity_div.m has term1 and term2 div terms involving advect…
lwonnell Aug 6, 2021
4c11cdc
Added params_cgs inside mirror2_velocity_div.m case 3 which contains …
Aug 12, 2021
43a7ac8
Added m_D_cgs option to case 3 inside mirror2_velocity_div.m. Updated…
lwonnell Aug 13, 2021
08287d5
mirror2_velocity_div.m has boundary conditions that yield stable resu…
Aug 20, 2021
d95a50b
Changed term1a and term1b within mirror2_velocity_div.m to the approp…
lwonnell Aug 20, 2021
1ebbf80
Attached coefficient of cos(x) in term1a and term1b to the DIV term.
lwonnell Aug 20, 2021
4c58024
Changed sign of G function in term1b inside mirror2_velocity_div.m. C…
Aug 24, 2021
842a734
Added David's parameters from runaway electron case to case2 in mirro…
Aug 25, 2021
df94559
Added second expression for spitzer conductivity in plot_mirror_output.m
lwonnell Aug 26, 2021
e97db35
Changed toy problem to have the problem termE2 from mirror2_velocity_…
lwonnell Aug 27, 2021
c89a6cf
Reset mirror2_velocity_div.m to have only termE2 present after rebase…
Aug 27, 2021
96628a3
Fixed conflicts with mirror2_velocity_div.m
Aug 27, 2021
698448a
Added manufactured solution test to mirror_test.m, changing collision…
lwonnell Nov 19, 2020
76e2b06
mirror_manufacture_test changed to BE timestep method and test still …
lwonnell Nov 19, 2020
da9702c
Modified mirror_parameters.m to have B_func2 where the loop function …
lwonnell Dec 3, 2020
28dd865
Modified objects in mirror_parameters to distinguish between energy a…
lwonnell Dec 9, 2020
2cc36cb
Modified initial condition so that initial beam is in mirror, and add…
lwonnell Dec 14, 2020
fa3bcc1
Changes to mirror_parameters.m variable of coil_radius, which used to…
lwonnell Dec 14, 2020
cc4631f
fixed B and dBds calculations
dlg0 Dec 14, 2020
befdb54
Cleaned up mirror files to make variables more informative. Modified …
lwonnell Jan 5, 2021
06b5f5f
Modified plot_mirror_output and moment_integral to get plots of lower…
lwonnell Jan 7, 2021
a150bb8
Added missing term associated with advection in velocity space. Coeff…
lwonnell Jan 15, 2021
750a01a
Comments changed to have cos(z) in denominator of velocity-space adve…
lwonnell Jan 19, 2021
65f12f8
Term associated with advection in velocity space in mirror3.m is corr…
lwonnell Jan 19, 2021
4faf8cd
Fixed problems with comments in mirror3.m and added new term to mirro…
lwonnell Jan 20, 2021
687b2cf
moment_integral now working for 1D integrals in 2D data - but still h…
dlg0 Jan 20, 2021
82d4ade
cleaned up the moment_integral implementation and testing - problem i…
dlg0 Jan 20, 2021
0ccc663
mirror1_velocity has been updated with advection and mass terms. Now …
lwonnell Jan 21, 2021
cc4ffff
Changed plot_mirror_output so that it plots the latest time-step and …
lwonnell Feb 4, 2021
f948bb3
mirror1_pitch.m modified to implement weak form of equations. LHS_ter…
lwonnell Feb 8, 2021
f93f58e
Changed 1D mirror equation files to weak form of equations by multipl…
lwonnell Feb 11, 2021
0fd0b3e
Weak form of 1D and 3D mirror equations present, with Jacobian added …
lwonnell Feb 15, 2021
de4f041
fixed assert for num_dims <= 1
dlg0 Feb 15, 2021
bb3b0b4
mirror_space1, mirror1_velocity, and mirror1_pitch modified to reflec…
lwonnell Feb 18, 2021
309025b
mirror_velocity2.m updated with electric field term, and comments add…
Apr 9, 2021
0b146f0
Electric field term added on left hand side so equation 25 from CQL4D…
Apr 13, 2021
356a430
Added mirror_Mfunctional.m to PDE and mirror_Mfunctional_test.m to ge…
May 4, 2021
821a316
Added N, R, and E functionals from Franz and test files for those fun…
May 4, 2021
a9d2451
Moved all functionals into mirror_functional.m and all tests into mir…
May 5, 2021
a47df4c
mirror_Vcoeff now works and passes tests for l=0 and l=1 values. It t…
May 17, 2021
749c42e
Changed mirror_Vcoeff.m and mirror_Vcoeff_test.m to mirror_Ucoeff.m a…
May 18, 2021
16e0624
Added mirror_RosenbluthCoeffs.m that calculates the coefficients A an…
May 19, 2021
2943494
Added mirror_RosenbluthCoeffs.m and mirror_FokkerPlanckCoeffs.m, the …
Jun 7, 2021
adb76d3
Fixed (perhaps again), the moment_integral implementation and testing
dlg0 Jun 9, 2021
b0561ba
Added mirror1_collision.m testing collision operator and a test for i…
Jun 9, 2021
0ff8024
Debugging mirror_FokkerPlanckCoeffs.m and added test for mirror1_coll…
Jun 10, 2021
a450cb9
Tests for mirror1_collision.m shifting beam and changing temperature …
Jun 10, 2021
c043967
Modified code within mirror_FokkerPlanckCoeffs.m to be more readable.…
Jun 10, 2021
f4c3f01
Integrals inside mirror_Ucoeff.m reformulated using integral function…
Jun 11, 2021
6c012b9
Fixed error in mirror_Ucoeff.m where 2l+1/2 was not added in front of…
Jun 14, 2021
03a9ac4
Changed mirror_FokkerPlanckCoeffs_test.m to include multiple l values…
Jun 18, 2021
954c8cb
Changed mirror_Ucoeff.m to produce the zeroth order of the associated…
lwonnell Jun 21, 2021
aff8818
Changed mirror_Ucoeff.m and mirror_functional.m to use trapz instead …
lwonnell Jun 28, 2021
8aad7f5
Added mirror2_collision.m to work on the 2D collision operator with a…
Jul 8, 2021
8a0078d
Changed background mass to electron mass while still working on mirro…
Jul 14, 2021
c40c239
Adjusted plot_mirror_output.m to produce initial condition 2D plots a…
lwonnell Jul 14, 2021
a46b7a6
Fixed c value inside mirror_RosenbluthCoeffs.m and fixed Maxwellian i…
Jul 14, 2021
4cf14d8
Fixed termC inside mirror2_collision.m by putting velocity pterm1 ins…
lwonnell Jul 14, 2021
0a7a047
Added b2 species to mirror2_collision.m. Added grid files for velocit…
Jul 19, 2021
636d36d
Fixed error in interpolate_numerical_distribution with griddedInterpo…
Jul 20, 2021
4db0d14
Added mirror1_collision_div.m featuring div operators.
lwonnell Jul 21, 2021
f6112c3
Included LHS_terms inside pde object
lwonnell Jul 21, 2021
c2d51fd
fixed mass_t error
dlg0 Jul 21, 2021
120d079
fixing the calculate_mass and the normalize_by_mass
dlg0 Jul 21, 2021
c419fd9
Modified mirror2_velocity.m with appropriate initial conditions insid…
lwonnell Jul 21, 2021
020f2b6
Ensured that mirror1_collision_div.m passes test inside asgard_test.m…
Jul 22, 2021
3fc55e1
Added the capability to do multiple background species for mirror1_co…
Jul 27, 2021
79f3ab9
mirror_FokkerPlanckCoeffs.m was missing a params.gamma(uVal)/uVal ins…
Jul 27, 2021
0200e30
Added l=2 test to mirror_functional_test.m. Discovered that l=2 cause…
lwonnell Jul 28, 2021
e690910
Fixed formula for nu_E inside mirror_parameters.m. Modified plot_mirr…
lwonnell Jul 28, 2021
0d3eb4b
Testing out trapz versus integral inside mirror_Ucoeff.m and diagnosi…
Jul 28, 2021
e4d595b
Energy density data more finely plotted within plot_mirror_output.m. …
Jul 29, 2021
53abee5
Added option of trying unevenly spaced pitch angle mesh within mirror…
Aug 2, 2021
0521203
Added mirror2_velocity_div.m, which still needs modification for the …
Aug 6, 2021
e39fc7f
plot_mirror_output.m has been modified to produce contour plots of lo…
Aug 6, 2021
a8d6804
mirror2_velocity_div.m has term1 and term2 div terms involving advect…
lwonnell Aug 6, 2021
592c325
Added params_cgs inside mirror2_velocity_div.m case 3 which contains …
Aug 12, 2021
14675c7
Added m_D_cgs option to case 3 inside mirror2_velocity_div.m. Updated…
lwonnell Aug 13, 2021
f12806f
mirror2_velocity_div.m has boundary conditions that yield stable resu…
Aug 20, 2021
808759f
Changed term1a and term1b within mirror2_velocity_div.m to the approp…
lwonnell Aug 20, 2021
9ea9353
Attached coefficient of cos(x) in term1a and term1b to the DIV term.
lwonnell Aug 20, 2021
d814385
Changed sign of G function in term1b inside mirror2_velocity_div.m. C…
Aug 24, 2021
bc0345e
Added David's parameters from runaway electron case to case2 in mirro…
Aug 25, 2021
8daef95
Added second expression for spitzer conductivity in plot_mirror_output.m
lwonnell Aug 26, 2021
ce93449
Changed toy problem to have the problem termE2 from mirror2_velocity_…
lwonnell Aug 27, 2021
7f75225
Merge branch 'mirror_3D' of https://github.com/project-asgard/DG-Spar…
lwonnell Aug 27, 2021
6084f52
Changed dV_v termin front of termC3 inside mirror2_collision_div.m an…
lwonnell Aug 27, 2021
9538322
Fixed conflict with K term in termE2.
Aug 27, 2021
a46eb8a
Modified nu_D function within mirror2_collision_div.m. Added test whe…
Aug 30, 2021
c574c6c
The solution_v function in mirror_parameters.m includes pde.params.no…
Aug 31, 2021
7d5b192
Found a problem with the equation / physics model, ie, the 1/p^3 in {…
dlg0 Sep 1, 2021
b647ad4
plot_fval.m modified to make sure 1D slices are visible.
Sep 8, 2021
9190b32
Added source1 in case 3 of mirror2_velocity_div.m which incorporates …
Sep 10, 2021
860fc45
Added mirror2_advection_Efield_div_test to mirror_test.m, which passe…
Sep 14, 2021
84b3567
Added mirror1_space.m that tests the 1D physical space dimension with…
Sep 15, 2021
eb249b6
Implemented changes to MASS, DIV, and GRAD operators in mirror3_div.m…
Sep 20, 2021
4ef72b1
Fixed tests within mirror_test.m that all pass for the div versions o…
Sep 20, 2021
5867d0b
Added mirror1_pitch_div.m which adds a 1D test for the pitch angle di…
lwonnell Sep 21, 2021
9286341
Modified mirror1_space_div.m to have decay_coeff as a function of vel…
lwonnell Sep 21, 2021
52389df
Added mirror1_space_diffSign2_test which changes the magnetic field t…
lwonnell Sep 21, 2021
ef496d7
Added mirror2_space_pitch_div.m to test the 2D spatial-pitch angle eq…
Sep 29, 2021
a3d374f
fixed the lev>=1 bug in the adaptivity
dlg0 Sep 29, 2021
27c5baf
Added source to mirror2_velocity_div.m which does work for very low t…
Oct 18, 2021
11703c3
Fixed bug in mirror2_space_pitch_div.m with the placement of the gfun…
lwonnell Oct 27, 2021
1223fe3
Added script spitzer_test.m to produce Z variation in spitzer conduct…
lwonnell Oct 27, 2021
96f8321
Added mirror2_velocity_nonlinear_div.m which uses A, B, and F coeffic…
lwonnell Nov 16, 2021
902d10c
Adding mixed diffusion problem diffusion2_mixed_div.m
stefan-schnake Nov 23, 2021
b26718e
Added manufactured solution test to mirror_test.m, changing collision…
lwonnell Nov 19, 2020
d29f528
mirror_manufacture_test changed to BE timestep method and test still …
lwonnell Nov 19, 2020
96d1575
Modified mirror_parameters.m to have B_func2 where the loop function …
lwonnell Dec 3, 2020
e4758c6
Modified objects in mirror_parameters to distinguish between energy a…
lwonnell Dec 9, 2020
0469529
Modified initial condition so that initial beam is in mirror, and add…
lwonnell Dec 14, 2020
6f71bae
Changes to mirror_parameters.m variable of coil_radius, which used to…
lwonnell Dec 14, 2020
7daf50e
fixed B and dBds calculations
dlg0 Dec 14, 2020
da37304
Cleaned up mirror files to make variables more informative. Modified …
lwonnell Jan 5, 2021
de91fb2
Modified plot_mirror_output and moment_integral to get plots of lower…
lwonnell Jan 7, 2021
85f8c9e
Added missing term associated with advection in velocity space. Coeff…
lwonnell Jan 15, 2021
9ff3a66
Comments changed to have cos(z) in denominator of velocity-space adve…
lwonnell Jan 19, 2021
309ef5b
Term associated with advection in velocity space in mirror3.m is corr…
lwonnell Jan 19, 2021
b2807ec
Fixed problems with comments in mirror3.m and added new term to mirro…
lwonnell Jan 20, 2021
7b159a9
moment_integral now working for 1D integrals in 2D data - but still h…
dlg0 Jan 20, 2021
97e7f08
cleaned up the moment_integral implementation and testing - problem i…
dlg0 Jan 20, 2021
99a5236
mirror1_velocity has been updated with advection and mass terms. Now …
lwonnell Jan 21, 2021
34321b6
Changed plot_mirror_output so that it plots the latest time-step and …
lwonnell Feb 4, 2021
58b24a3
mirror1_pitch.m modified to implement weak form of equations. LHS_ter…
lwonnell Feb 8, 2021
3efd4db
Changed 1D mirror equation files to weak form of equations by multipl…
lwonnell Feb 11, 2021
718a825
Weak form of 1D and 3D mirror equations present, with Jacobian added …
lwonnell Feb 15, 2021
f6e6d8e
fixed assert for num_dims <= 1
dlg0 Feb 15, 2021
64e2d27
mirror_space1, mirror1_velocity, and mirror1_pitch modified to reflec…
lwonnell Feb 18, 2021
0e249b0
mirror_velocity2.m updated with electric field term, and comments add…
Apr 9, 2021
83cabd0
Electric field term added on left hand side so equation 25 from CQL4D…
Apr 13, 2021
29037e6
Added mirror_Mfunctional.m to PDE and mirror_Mfunctional_test.m to ge…
May 4, 2021
88162a6
Added N, R, and E functionals from Franz and test files for those fun…
May 4, 2021
57fe608
Moved all functionals into mirror_functional.m and all tests into mir…
May 5, 2021
ba83034
mirror_Vcoeff now works and passes tests for l=0 and l=1 values. It t…
May 17, 2021
f400480
Changed mirror_Vcoeff.m and mirror_Vcoeff_test.m to mirror_Ucoeff.m a…
May 18, 2021
fecf021
Added mirror_RosenbluthCoeffs.m that calculates the coefficients A an…
May 19, 2021
330e1c2
Added mirror_RosenbluthCoeffs.m and mirror_FokkerPlanckCoeffs.m, the …
Jun 7, 2021
b6d881a
Fixed (perhaps again), the moment_integral implementation and testing
dlg0 Jun 9, 2021
55fd2b5
Added mirror1_collision.m testing collision operator and a test for i…
Jun 9, 2021
8d790ef
Debugging mirror_FokkerPlanckCoeffs.m and added test for mirror1_coll…
Jun 10, 2021
b48147d
Tests for mirror1_collision.m shifting beam and changing temperature …
Jun 10, 2021
1883107
Modified code within mirror_FokkerPlanckCoeffs.m to be more readable.…
Jun 10, 2021
9cb8a8c
Integrals inside mirror_Ucoeff.m reformulated using integral function…
Jun 11, 2021
f49cc71
Fixed error in mirror_Ucoeff.m where 2l+1/2 was not added in front of…
Jun 14, 2021
ff6ca48
Changed mirror_FokkerPlanckCoeffs_test.m to include multiple l values…
Jun 18, 2021
3966cf9
Changed mirror_Ucoeff.m to produce the zeroth order of the associated…
lwonnell Jun 21, 2021
0871159
Changed mirror_Ucoeff.m and mirror_functional.m to use trapz instead …
lwonnell Jun 28, 2021
230779d
Added mirror2_collision.m to work on the 2D collision operator with a…
Jul 8, 2021
cf2e6e6
Changed background mass to electron mass while still working on mirro…
Jul 14, 2021
1675d82
Adjusted plot_mirror_output.m to produce initial condition 2D plots a…
lwonnell Jul 14, 2021
2822bd3
Fixed c value inside mirror_RosenbluthCoeffs.m and fixed Maxwellian i…
Jul 14, 2021
ba5856c
Fixed termC inside mirror2_collision.m by putting velocity pterm1 ins…
lwonnell Jul 14, 2021
5323c5d
Added b2 species to mirror2_collision.m. Added grid files for velocit…
Jul 19, 2021
85966b5
Fixed error in interpolate_numerical_distribution with griddedInterpo…
Jul 20, 2021
f436fe1
Added mirror1_collision_div.m featuring div operators.
lwonnell Jul 21, 2021
d4e5268
Included LHS_terms inside pde object
lwonnell Jul 21, 2021
58c7698
fixed mass_t error
dlg0 Jul 21, 2021
c4912bf
fixing the calculate_mass and the normalize_by_mass
dlg0 Jul 21, 2021
4a63fe2
Modified mirror2_velocity.m with appropriate initial conditions insid…
lwonnell Jul 21, 2021
1f3969f
Ensured that mirror1_collision_div.m passes test inside asgard_test.m…
Jul 22, 2021
55396ae
Added the capability to do multiple background species for mirror1_co…
Jul 27, 2021
ba52fec
mirror_FokkerPlanckCoeffs.m was missing a params.gamma(uVal)/uVal ins…
Jul 27, 2021
7c093d9
Added l=2 test to mirror_functional_test.m. Discovered that l=2 cause…
lwonnell Jul 28, 2021
399e1dd
Testing out trapz versus integral inside mirror_Ucoeff.m and diagnosi…
Jul 28, 2021
893fec5
Fixed formula for nu_E inside mirror_parameters.m. Modified plot_mirr…
lwonnell Jul 28, 2021
51b0737
Energy density data more finely plotted within plot_mirror_output.m. …
Jul 29, 2021
8dc0c2e
Added option of trying unevenly spaced pitch angle mesh within mirror…
Aug 2, 2021
861d265
Added mirror2_velocity_div.m, which still needs modification for the …
Aug 6, 2021
d07ae6c
plot_mirror_output.m has been modified to produce contour plots of lo…
Aug 6, 2021
f16568c
mirror2_velocity_div.m has term1 and term2 div terms involving advect…
lwonnell Aug 6, 2021
af8b40d
Added params_cgs inside mirror2_velocity_div.m case 3 which contains …
Aug 12, 2021
512ed49
Added m_D_cgs option to case 3 inside mirror2_velocity_div.m. Updated…
lwonnell Aug 13, 2021
b81deef
mirror2_velocity_div.m has boundary conditions that yield stable resu…
Aug 20, 2021
8ac5fe2
Changed term1a and term1b within mirror2_velocity_div.m to the approp…
lwonnell Aug 20, 2021
c907aee
Attached coefficient of cos(x) in term1a and term1b to the DIV term.
lwonnell Aug 20, 2021
8a9720d
Changed sign of G function in term1b inside mirror2_velocity_div.m. C…
Aug 24, 2021
fdcc232
Added David's parameters from runaway electron case to case2 in mirro…
Aug 25, 2021
676f7af
Added second expression for spitzer conductivity in plot_mirror_output.m
lwonnell Aug 26, 2021
a56e35a
Changed toy problem to have the problem termE2 from mirror2_velocity_…
lwonnell Aug 27, 2021
ba1af85
Reset mirror2_velocity_div.m to have only termE2 present after rebase…
Aug 27, 2021
2f9e310
Added manufactured solution test to mirror_test.m, changing collision…
lwonnell Nov 19, 2020
374105a
mirror_manufacture_test changed to BE timestep method and test still …
lwonnell Nov 19, 2020
b3adbf6
Modified mirror_parameters.m to have B_func2 where the loop function …
lwonnell Dec 3, 2020
72e1a44
Modified objects in mirror_parameters to distinguish between energy a…
lwonnell Dec 9, 2020
45b7bcd
Modified initial condition so that initial beam is in mirror, and add…
lwonnell Dec 14, 2020
ba3a4ae
Changes to mirror_parameters.m variable of coil_radius, which used to…
lwonnell Dec 14, 2020
ed9424d
fixed B and dBds calculations
dlg0 Dec 14, 2020
51378e4
Cleaned up mirror files to make variables more informative. Modified …
lwonnell Jan 5, 2021
3211922
Modified plot_mirror_output and moment_integral to get plots of lower…
lwonnell Jan 7, 2021
16f8f36
Added missing term associated with advection in velocity space. Coeff…
lwonnell Jan 15, 2021
f9b7c49
Comments changed to have cos(z) in denominator of velocity-space adve…
lwonnell Jan 19, 2021
3ecf4bd
moment_integral now working for 1D integrals in 2D data - but still h…
dlg0 Jan 20, 2021
8c54a74
cleaned up the moment_integral implementation and testing - problem i…
dlg0 Jan 20, 2021
8e88bfc
Changed plot_mirror_output so that it plots the latest time-step and …
lwonnell Feb 4, 2021
e9f0f71
Weak form of 1D and 3D mirror equations present, with Jacobian added …
lwonnell Feb 15, 2021
b59da07
fixed assert for num_dims <= 1
dlg0 Feb 15, 2021
a10817c
Added mirror_Mfunctional.m to PDE and mirror_Mfunctional_test.m to ge…
May 4, 2021
aa0ab2e
Added N, R, and E functionals from Franz and test files for those fun…
May 4, 2021
3372689
mirror_Vcoeff now works and passes tests for l=0 and l=1 values. It t…
May 17, 2021
68999af
Added mirror_RosenbluthCoeffs.m and mirror_FokkerPlanckCoeffs.m, the …
Jun 7, 2021
5ba63ab
Added mirror2_collision.m to work on the 2D collision operator with a…
Jul 8, 2021
6f7c13e
Changed background mass to electron mass while still working on mirro…
Jul 14, 2021
eadfcb9
fixed mass_t error
dlg0 Jul 21, 2021
78de99c
fixing the calculate_mass and the normalize_by_mass
dlg0 Jul 21, 2021
b9a02cd
Added the capability to do multiple background species for mirror1_co…
Jul 27, 2021
7ec5a08
Added mirror2_velocity_div.m, which still needs modification for the …
Aug 6, 2021
441d8ce
Changed sign of G function in term1b inside mirror2_velocity_div.m. C…
Aug 24, 2021
3821347
Modified mirror_parameters.m to have B_func2 where the loop function …
lwonnell Dec 3, 2020
01cb0e2
Modified plot_mirror_output and moment_integral to get plots of lower…
lwonnell Jan 7, 2021
1ad5faf
moment_integral now working for 1D integrals in 2D data - but still h…
dlg0 Jan 20, 2021
130cf05
cleaned up the moment_integral implementation and testing - problem i…
dlg0 Jan 20, 2021
d208b8f
Weak form of 1D and 3D mirror equations present, with Jacobian added …
lwonnell Feb 15, 2021
ac9de85
fixed assert for num_dims <= 1
dlg0 Feb 15, 2021
9d627f5
Added mirror_Mfunctional.m to PDE and mirror_Mfunctional_test.m to ge…
May 4, 2021
fc4cf46
Added N, R, and E functionals from Franz and test files for those fun…
May 4, 2021
3f3fb9a
mirror_Vcoeff now works and passes tests for l=0 and l=1 values. It t…
May 17, 2021
703bb4d
Added mirror_RosenbluthCoeffs.m and mirror_FokkerPlanckCoeffs.m, the …
Jun 7, 2021
5cf33f2
Added mirror2_collision.m to work on the 2D collision operator with a…
Jul 8, 2021
ce45023
Changed background mass to electron mass while still working on mirro…
Jul 14, 2021
f1cd652
fixing the calculate_mass and the normalize_by_mass
dlg0 Jul 21, 2021
787ab46
Changed sign of G function in term1b inside mirror2_velocity_div.m. C…
Aug 24, 2021
5b28d06
plot_fval.m modified to make sure 1D slices are visible.
Sep 8, 2021
14276a5
Added mirror1_pitch_div.m which adds a 1D test for the pitch angle di…
lwonnell Sep 21, 2021
b298af6
Added mirror2_velocity_nonlinear_div.m which uses A, B, and F coeffic…
lwonnell Nov 16, 2021
a7809b3
Fixed conflict with mirror2_advection_Efield_div.m after rebasing mir…
Nov 30, 2021
23d0593
mirror_parameters.m now requires opts as an argument. All pdes pass o…
lwonnell Nov 30, 2021
7ee46d9
Added _div files to appropriate PDES
stefan-schnake Dec 1, 2021
0fa4860
Merged old and _div pde files
stefan-schnake Dec 1, 2021
53a97a7
Forgot to add advection1
stefan-schnake Dec 1, 2021
f9e96af
Cleaning up old *.mat testing files
stefan-schnake Dec 1, 2021
b746ab4
Cleaning up old *.mat testing files
stefan-schnake Dec 1, 2021
be719af
updating RE manuscript plotting
dlg0 Dec 6, 2021
d947eff
Merge branch 'fixing-fp2-complete-stefan2' of github.com:project-asga…
dlg0 Dec 6, 2021
93f073e
Still working on runaway_electron_plots.m to generate RE rates.
Dec 6, 2021
f1635c3
Added Lenard-Bernstein Collision Operator
stefan-schnake Dec 7, 2021
ffcb8f1
Forgot to remove the _div from the first line of the pde files. Fixed
stefan-schnake Dec 7, 2021
ebe6f34
Moving Lin's Separable Test to a new folder so it is not run
stefan-schnake Dec 7, 2021
237186d
Fixed error of upwinding/downwinding inside termE1a and termE1b (sign…
Dec 9, 2021
b4c257e
Changed Boundary condition to incorporate gfuncs in other 1D_sd_mass …
stefan-schnake Dec 10, 2021
c582814
Modifying E range within runaway_electron_plots.m to include wider ra…
Dec 13, 2021
4c15330
Fixed conflicts between mirror_3D and fixing-fp2-complete-stefan2 ins…
Dec 13, 2021
09fa119
Forgot to remove diary
stefan-schnake Dec 14, 2021
1f75e8d
Merge branch 'fixing-fp2-complete-stefan2' of github.com:project-asga…
dlg0 Dec 14, 2021
d6b2073
Merge branch 'fixing-fp2-complete-stefan2' into reference
dlg0 Dec 14, 2021
02aed3c
Added args.frac into runaway_electron_plots.m to modify frac variable…
Dec 14, 2021
99364b9
Merge remote-tracking branch 'origin/fixing-fp2-complete-stefan2' int…
Dec 14, 2021
f6dec97
mirror_3D layout
lwonnell Dec 14, 2021
25a1201
Fixed conflicts within asgard_run_pde.m and runaway_electron_rate_plo…
Dec 14, 2021
f680aa9
Added a variable inside maxwell function in mirror_parameters.m that …
Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
557 changes: 557 additions & 0 deletions 2020-07-runaway-electron-paper-scripts/runaway_electron_rate_plots.m

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions 2020-10-mirror_3D_scripts/dpitch_long_i.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
7.952452671E-02 1.129492901E-01 5.941727353E-02 4.820582348E-02 4.205907478E-02 3.804727771E-02 3.518877981E-02 3.304121677E-02 3.137077637E-02 3.004056109E-02
2.896447062E-02 2.808543543E-02 2.736411117E-02 2.677256624E-02 2.629055317E-02 2.590320725E-02 2.559957714E-02 2.537166455E-02 2.521378977E-02 2.512217608E-02
2.509468969E-02 2.513069855E-02 2.523103142E-02 2.539803169E-02 2.563571299E-02 2.595003751E-02 2.634935658E-02 2.684508125E-02 2.745269801E-02 2.819332669E-02
2.909617023E-02 3.020250455E-02 3.157247937E-02 3.329740395E-02 3.552366840E-02 1.852512870E-02 5.273452973E-04 1.051280553E-03 1.574664544E-03 2.093190533E-03
2.606449645E-03 3.114289632E-03 3.612702340E-03 4.103848307E-03 4.584888596E-03 5.052951443E-03 5.509961183E-03 5.952774356E-03 6.380680873E-03 6.793063026E-03
7.187307084E-03 7.563505927E-03 7.919970508E-03 8.254927667E-03 8.567450786E-03 8.855783065E-03 9.117702407E-03 9.350836405E-03 9.553584580E-03 9.720618113E-03
9.849303078E-03 9.936221244E-03 9.972213075E-03 9.952859362E-03 9.867414270E-03 9.702892042E-03 9.449252096E-03 9.080992811E-03 8.580439098E-03 7.927108237E-03
7.086565160E-03 6.044876865E-03 4.789057312E-03 3.328063965E-03 1.021491200E-01 1.021491200E-01 3.328063965E-03 4.789057312E-03 6.044876865E-03 7.086565160E-03
7.927108237E-03 8.580439098E-03 9.080992811E-03 9.449252096E-03 9.702892042E-03 9.867414270E-03 9.952859362E-03 9.972213075E-03 9.936221244E-03 9.849303078E-03
9.720618113E-03 9.553584580E-03 9.350836405E-03 9.117702407E-03 8.855783065E-03 8.567450786E-03 8.254927667E-03 7.919970508E-03 7.563505927E-03 7.187307084E-03
6.793063026E-03 6.380680873E-03 5.952774356E-03 5.509961183E-03 5.052951443E-03 4.584888596E-03 4.103848307E-03 3.612702340E-03 3.114289632E-03 2.606449645E-03
2.093190533E-03 1.574664544E-03 1.051280553E-03 5.273452973E-04 1.852512870E-02 3.552366840E-02 3.329740395E-02 3.157247937E-02 3.020250455E-02 2.909617023E-02
2.819332669E-02 2.745269801E-02 2.684508125E-02 2.634935658E-02 2.595003751E-02 2.563571299E-02 2.539803169E-02 2.523103142E-02 2.513069855E-02 2.509468969E-02
2.512217608E-02 2.521378977E-02 2.537166455E-02 2.559957714E-02 2.590320725E-02 2.629055317E-02 2.677256624E-02 2.736411117E-02 2.808543543E-02 2.896447062E-02
3.004056109E-02 3.137077637E-02 3.304121677E-02 3.518877981E-02 3.804727771E-02 4.205907478E-02 4.820582348E-02 5.941727353E-02 1.129492901E-01 7.952452671E-02
2,250 changes: 2,250 additions & 0 deletions 2020-10-mirror_3D_scripts/f_ij.txt

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions 2020-10-mirror_3D_scripts/interpolate_numerical_distribution.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
function F_out = interpolate_numerical_distribution()

function out = F2(u,z)
out = ones(numel(u),numel(z));
if size(u) == size(z)
for i = 1:numel(u)
for j = 1:numel(z)
out(i,j) = F(u(i),z(j));
end
end
elseif isscalar(u)
for j = 1:numel(z)
out(j) = F(u,z(j));
end
end
end

pitch_file = fopen('pitch_i.txt', 'r');
vel_file = fopen('u_j.txt', 'r');
dist_file = fopen('f_ij.txt', 'r');

z = fscanf(pitch_file, '%f');
u = fscanf(vel_file, '%f');
f_vals = fscanf(dist_file, '%f');

size_f = length(f_vals);
num = sqrt(size_f);

n_o = 8e14;
temp = 1.6022e-10; %temperature in erg
m_e = 9.109*10^-28;
u_th = sqrt(2*temp/m_e);
lIndex = [0 1 2];

%[u,z] = meshgrid(vel_vals,pitch_vals);
%maxwell = n_o.*exp(-u.^2./u_th^2).*(z.*0 + 1)./(u_th.^3.*pi^(3/2));

analytic = @(x,y) n_o.*exp(-x.^2./u_th^2).*(y.*0 + 1)./(u_th.^3.*pi^(3/2));
f_vals = reshape(f_vals, [num num]);

% ax1 = subplot(1,3,1);
% contour(vel_vals,pitch_vals,f_vals);
% ax2 = subplot(1,3,2);
% contour(u,z,analytic(u,z));

%u = u';

%z = z';

F = griddedInterpolant({u,z},f_vals');
F_out = @F2;

%ax3 = subplot(1,3,3);
%f_plot = F_out(u(:),z(:));
%f_plot = reshape(f_plot, size(u));
%contour(u,z,f_plot);
%



end
15 changes: 15 additions & 0 deletions 2020-10-mirror_3D_scripts/pitch_i.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
0.00000E+00 1.59049E-01 2.25899E-01 2.77884E-01 3.22310E-01 3.62002E-01 3.98405E-01 4.32379E-01 4.64487E-01 4.95121E-01
5.24568E-01 5.53050E-01 5.80739E-01 6.07778E-01 6.34284E-01 6.60359E-01 6.86091E-01 7.11558E-01 7.36834E-01 7.61986E-01
7.87078E-01 8.12175E-01 8.37340E-01 8.62637E-01 8.88136E-01 9.13909E-01 9.40036E-01 9.66607E-01 9.93726E-01 1.02151E+00
1.05011E+00 1.07971E+00 1.11052E+00 1.14285E+00 1.17711E+00 1.21390E+00 1.21416E+00 1.21495E+00 1.21627E+00 1.21810E+00
1.22045E+00 1.22331E+00 1.22668E+00 1.23054E+00 1.23489E+00 1.23971E+00 1.24499E+00 1.25073E+00 1.25690E+00 1.26349E+00
1.27049E+00 1.27787E+00 1.28561E+00 1.29371E+00 1.30212E+00 1.31084E+00 1.31983E+00 1.32908E+00 1.33854E+00 1.34818E+00
1.35798E+00 1.36788E+00 1.37785E+00 1.38783E+00 1.39776E+00 1.40756E+00 1.41716E+00 1.42646E+00 1.43532E+00 1.44362E+00
1.45118E+00 1.45779E+00 1.46327E+00 1.46737E+00 1.46992E+00 1.67167E+00 1.67422E+00 1.67833E+00 1.68380E+00 1.69042E+00
1.69797E+00 1.70627E+00 1.71513E+00 1.72443E+00 1.73403E+00 1.74384E+00 1.75377E+00 1.76374E+00 1.77371E+00 1.78362E+00
1.79341E+00 1.80306E+00 1.81252E+00 1.82176E+00 1.83075E+00 1.83947E+00 1.84789E+00 1.85598E+00 1.86373E+00 1.87111E+00
1.87810E+00 1.88469E+00 1.89086E+00 1.89660E+00 1.90188E+00 1.90670E+00 1.91105E+00 1.91491E+00 1.91828E+00 1.92114E+00
1.92349E+00 1.92533E+00 1.92664E+00 1.92743E+00 1.92770E+00 1.96448E+00 1.99874E+00 2.03107E+00 2.06189E+00 2.09148E+00
2.12008E+00 2.14787E+00 2.17499E+00 2.20156E+00 2.22768E+00 2.25346E+00 2.27896E+00 2.30425E+00 2.32942E+00 2.35451E+00
2.37961E+00 2.40476E+00 2.43003E+00 2.45550E+00 2.48123E+00 2.50731E+00 2.53381E+00 2.56085E+00 2.58854E+00 2.61702E+00
2.64647E+00 2.67711E+00 2.70921E+00 2.74319E+00 2.77959E+00 2.81928E+00 2.86371E+00 2.91569E+00 2.98254E+00 3.14159E+00
15 changes: 15 additions & 0 deletions 2020-10-mirror_3D_scripts/pitch_long_i.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
0.000000000E+00 1.590490534E-01 2.258985802E-01 2.778836005E-01 3.223102271E-01 3.620017501E-01 3.984047825E-01 4.323793097E-01 4.644872161E-01 4.951208624E-01
5.245683382E-01 5.530498037E-01 5.807392091E-01 6.077780260E-01 6.342843416E-01 6.603591323E-01 6.860907561E-01 7.115582866E-01 7.368340852E-01 7.619858662E-01
7.870784373E-01 8.121752455E-01 8.373398344E-01 8.626373084E-01 8.881358978E-01 9.139087343E-01 9.400359728E-01 9.666074475E-01 9.937261353E-01 1.021512844E+00
1.050112789E+00 1.079705184E+00 1.110517798E+00 1.142850143E+00 1.177112606E+00 1.213897480E+00 1.214162863E+00 1.214952170E+00 1.216265424E+00 1.218101499E+00
1.220451805E+00 1.223314399E+00 1.226680385E+00 1.230539803E+00 1.234888081E+00 1.239709580E+00 1.244993984E+00 1.250729503E+00 1.256899533E+00 1.263490865E+00
1.270485659E+00 1.277865479E+00 1.285612671E+00 1.293705420E+00 1.302122526E+00 1.310840321E+00 1.319834092E+00 1.329075726E+00 1.338535765E+00 1.348182895E+00
1.357977001E+00 1.367881501E+00 1.377849444E+00 1.387825928E+00 1.397755162E+00 1.407560756E+00 1.417160946E+00 1.426459260E+00 1.435322932E+00 1.443620138E+00
1.451177149E+00 1.457793269E+00 1.463266902E+00 1.467371383E+00 1.469923030E+00 1.671669623E+00 1.674221270E+00 1.678325751E+00 1.683799385E+00 1.690415505E+00
1.697972515E+00 1.706269722E+00 1.715133393E+00 1.724431707E+00 1.734031898E+00 1.743837491E+00 1.753766726E+00 1.763743210E+00 1.773711152E+00 1.783615652E+00
1.793409758E+00 1.803056889E+00 1.812516928E+00 1.821758561E+00 1.830752332E+00 1.839470128E+00 1.847887234E+00 1.855979983E+00 1.863727175E+00 1.871106995E+00
1.878101789E+00 1.884693121E+00 1.890863151E+00 1.896598670E+00 1.901883073E+00 1.906704572E+00 1.911052850E+00 1.914912269E+00 1.918278255E+00 1.921140848E+00
1.923491154E+00 1.925327229E+00 1.926640483E+00 1.927429790E+00 1.927695174E+00 1.964480048E+00 1.998742511E+00 2.031074856E+00 2.061887470E+00 2.091479865E+00
2.120079810E+00 2.147866518E+00 2.174985206E+00 2.201556681E+00 2.227683919E+00 2.253456756E+00 2.278955345E+00 2.304252819E+00 2.329417408E+00 2.354514216E+00
2.379606787E+00 2.404758568E+00 2.430034367E+00 2.455501898E+00 2.481233521E+00 2.507308312E+00 2.533814628E+00 2.560853444E+00 2.588542850E+00 2.617024315E+00
2.646471791E+00 2.677105438E+00 2.709213344E+00 2.743187871E+00 2.779590904E+00 2.819282426E+00 2.863709053E+00 2.915694073E+00 2.982543600E+00 3.141592654E+00
247 changes: 204 additions & 43 deletions 2020-10-mirror_3D_scripts/plot_mirror_output.m
Original file line number Diff line number Diff line change
@@ -1,45 +1,196 @@
function plot_mirror_output(nodes, f_nD, f_nD_analytic, pde)
function plot_mirror_output(nodes, outputs, pde, opts)

x = nodes{1};
y = nodes{2};
z = nodes{3};

nx = numel(x);
ny = numel(y);
nz = numel(z);

%%
n_cgs = 8e14; %equilibrium density in cm.^-3
m_e_cgs = 9.109*10^-28; %electron mass in g
m_D_cgs = 3.3443*10^-24; %Deuterium mass in g
m_He_cgs = 6.7*10^-24; %helium 4 mass in g
m_B_cgs = 1.82*10^-23; %Boron 11 mass in g
m_Ne_cgs = 3.3509177*10^-23; %Neon mass in g
temp_cgs = 1.6022e-10; %temperature in erg
params_cgs.a.n = n_cgs;
params_cgs.b.n = n_cgs;
params_cgs.b2.n = n_cgs;
% params_cgs.a.vth = sqrt(2*temp_cgs/m_e_cgs);
% params_cgs.b.vth = sqrt(2*temp_cgs/m_e_cgs);
params_cgs.a.m = m_e_cgs; %beam is electrons
params_cgs.b.m = m_D_cgs; %background ions
params_cgs.b2.m = m_e_cgs; %background electrons
params_cgs.e = 4.803*10^-10; %charge in Fr
params_cgs.c = 3*10^10; %speed of light in cm/s
params_cgs.a.theta = pde.params.a.T_eV/(params_cgs.a.m*params_cgs.c^2);
nu_ee = 4*pi*params_cgs.a.n.*params_cgs.e.^4*pde.params.ln_delt/(params_cgs.a.theta^(3/2)...
*params_cgs.a.m^3*params_cgs.c^3);
franz_conduct = params_cgs.a.n*params_cgs.e^2/(pde.params.b.Z*params_cgs.a.m*nu_ee);
x = nodes{1};
y = nodes{2};
nx = numel(x);
ny = numel(y);
sx = max(1, floor(nx/2));
sy = max(1, floor(2*ny/8));
energy_func_v = @(x) 0.5*pde.params.a.m.*x.^2/(1.602*10^-19);
energy_func_z = @(z) z.*0 + 2*pi;
current_func_v = @(x) 2*pi*pde.params.a.Z.*pde.params.e.*x;
current_func_z = @(x) cos(x);
coord = get_realspace_coords(pde,nodes);
mass_func = @(x) x.*0 + sqrt(2*pi);
zero_func = @(x) x.*0;
num_dims = numel(pde.dimensions);
moment_func_nD{1} = energy_func_v;
moment_func_nD{2} = energy_func_z;
mass_func_nD{1} = mass_func;
mass_func_nD{2} = mass_func;
current_func_nD{1} = current_func_v;
current_func_nD{2} = current_func_z;
x_E = 0.5.*pde.params.a.m*x.^2/pde.params.e;
num_steps = length(outputs.time_array);
spitzer_conduct = (3/(4*sqrt(2*pi)))*(4*pi*pde.params.eps0)^2*(1.38e-23*pde.params.a.T_eV*11604)^(3/2)...
/(pde.params.b.Z*pde.params.e^2*pde.params.a.m^(1/2)*pde.params.ln_delt);
spitzer_conduct2 = 4*pi*pde.params.eps0^2*(pde.params.a.m*pde.params.a.vth^2)^(3/2) ...
/(pde.params.a.m^(1/2)*pde.params.e^2*pde.params.ln_delt*pde.params.b2.Z);
f1d_analytic = outputs.f_realspace_analytic_nD_t{1,num_steps};
f1d_ic = outputs.f_realspace_analytic_nD_t{1,1};
%getting energy density
lev_vec = [opts.lev, opts.lev];
% data = struct2cell(outputs);
% f_data = cell2mat(data{6,1});
% f_data = reshape(f_data, [num_steps size(f1d_ic)]);
% [x_grid, y_grid] = meshgrid(outputs.time_array,x_E);
outputs.time_array(1) = 0;
for i = 1:numel(outputs.time_array)
f_data(i,:) = outputs.f_realspace_nD_t{i}(ny/2,:);
end
%contourf(outputs.time_array,x_E,real(f_data)',50);
% f_data = permute(f_data,[1 3 2]);

% contour(outputs.time_array',x',squeeze(f_data(:,:,sy))');
for j = 1:num_steps
%plot(x,f1d);
hold on
fval_realspace = reshape(outputs.f_realspace_nD_t{j}, [numel(f1d_ic) 1]);
mass_vals(j) = moment_integral(lev_vec, opts.deg, coord, fval_realspace, mass_func_nD, pde.dimensions);
mass = moment_integral(lev_vec, opts.deg, coord, fval_realspace, mass_func_nD, pde.dimensions);
conduct_vals(j) = moment_integral(lev_vec,opts.deg,coord,fval_realspace, current_func_nD,pde.dimensions)/(pde.params.E);
conduct_vals(j) = conduct_vals(j)/spitzer_conduct;
energy_vals(j) = moment_integral(lev_vec, opts.deg, coord, fval_realspace, moment_func_nD, pde.dimensions)./mass;
% vel_vals(i) = sum(outputs.f_realspace_nD_t{1,i}(:).*coord{:,:}*1e-4);
% x_hint_t = @(t) -x_hint(t,pde.params.a.vel_vals(j),pde.params.a,pde.params.b);
%e_hint = integral(x_hint_t, 0, outputs.time_array(j));
%hint_func(j) = energy_vals(1)*exp(-e_hint);
for i = 1:length(x)
f1d_new(i) = fval_realspace(i);
f1d_analytic_new(i) = f1d_analytic(i);
end
time = outputs.dt*j;
%loglog(x,f_data(j,:),'DisplayName',[num2str(time)]);
hold on
end
legend();
hold off
%formulating the Hinton solution
% timespan = [0 1e-3]; %time span in seconds
% x0 = 3e3; %initial energy in eV
% y = @(x) sqrt(1.602e-19.*x./(0.5.*3.3443e-27)); %velocity function in terms of energy
% [t,E] = ode45(@(t,E) (-params.nu_E(y(E),params.a,params.b)-params.nu_E(y(E),params.a,params.b2)).*E,timespan,x0);
%plot(x,f1d_ic,'--');
%plotting Hinton solution alongside numerical values
%x = x./x0;
%hold on
%plot(t,E,'r','LineWidth', 2);
%plot(outputs.time_array,energy_vals,'-o','LineWidth',1);
%figure
%plot(outputs.time_array,mass_vals,'-o','LineWidth',2);
%hold off
%f_slice = outputs.f_realspace_nD_t{1,num_steps};
%v_norm = x./pde.params.b.vth;
%plot(v_norm,f_slice);
%figure
plot(outputs.time_array,conduct_vals,'-','LineWidth',2);
hold on
%loglog(x_E,f1d_analytic_new, '-o');
%semilogy(outputs.time_array,hint_func,'k');
% hold off
% hold off;
% y = nodes{2};
% z = nodes{3};
% nx = numel(x);
% ny = numel(y);
% ax1 = subplot(2,2,1);
% contourf(y,x,squeeze(f_nD{1,1}(:,:))');
% ax2 = subplot(2,2,2);
% contourf(y,x,squeeze(f_nD{1,num_steps}(:,:))');
%title('Pitch vs Velocity');

% sy = numel(f_nD{1,1}(:,1))/4;
% sx = 1;
% f1d = f_nD{1,num_steps}(:,sx);
% f1d_ic = f_nD{1,1}(:,sx);
% ax3 = subplot(2,2,3);
% plot(y,f1d,'-o');
% hold on
% plot(y,f1d_ic, '-');
% hold off
% f1d = f_nD{1,num_steps}(sy,:);
% f1d_ic = f_nD{1,1}(sy,:);
% ax4 = subplot(2,2,4);
% plot(x,f1d,'-o');
% hold on
% plot(x,f1d_ic, '-');

% nz = numel(z);
% num_dims = 3;
% subset_dimensions = 2;
% deg = 6;
% space_func = @(x) x.*0 + 1;
% energy_func = @(x) x.^2;
% perp_func = @(x) sin(x).^2;
% par_func = @(x) cos(x).^2;
% coord = get_realspace_coords(pde,nodes);
% moment_func_nD = {energy_func,perp_func,space_func};
% % v_perp_temp = moment_integral(pde.get_lev_vec,deg,coord,f_nD,moment_func_nD,pde.dimensions,subset_dimensions);
% moment_func_nD = {energy_func,par_func,space_func};
% % v_par_temp = moment_integral(pde.get_lev_vec,deg,coord,f_nD,moment_func_nD,pde.dimensions,subset_dimensions);
% %%
% Plot a 1D line through the solution
for i = 1:nx
for j = 1:ny
v_par(i,j) = x(i).*cos(y(j));
v_perp(i,j) = x(i).*sin(y(j));
end
end
%
% sz = numel(f_nD{1,1}(:,1,1))/2 + 1;


sz = numel(f_nD(:,1,1))/2;
sy = numel(f_nD(1,:,1))/2;
sx = numel(f_nD(1,1,:)) - 1;

% contourf(v_par,v_perp,outputs.f_realspace_nD_t{1,num_steps}(:,sx));
% hold on
%plot(v_par,fval_realspace);
% plot(z,v_perp_temp, 'r');
% plot(z,v_par_temp, 'b');
% hold off
%plotting
f1d = f_nD(:,sy,sx);
f1d = f1d(1,:);
x = nodes{1};
y = nodes{2};
z = nodes{3};
x = 9.109*10^-31*x.^2/(1.602*10^-19);
plot(z,f1d,'-o');
% f1d = f1d(1,:);
% x = nodes{1};
% y = nodes{2};
% z = nodes{3};
% x = 9.109*10^-31*x.^2/(1.602*10^-19);
%xlim([0.01,1e4]);
%ylim([0.01,1e4]);
title('Mirror 2D Relaxation');

%%

%%
% Overplot analytic solution

if pde.checkAnalytic
f_1d_analytic = f_nD_analytic(:,sy,sx);
f_1d_analytic = f_1d_analytic(1,:);
hold on;
plot(z,f_1d_analytic,'-');
hold off;
end

% title('Mirror 2D Relaxation');
%
% %%
%
% %%
% % Overplot analytic solution
%
% % if pde.checkAnalytic
% % f_1d_analytic = f_nD_analytic(:,sy,sx);
% % f_1d_analytic = f_1d_analytic(1,:);
% hold on;
% f_1d_analytic = f_nD_analytic{1,2};
% plot(x,f_1d_analytic,'-');
% hold off;
% % end
%
% sx = max(1,floor(nx/2));
% if nx > 2
% sx = sx+2; % just to get off the exact middle
Expand All @@ -56,12 +207,22 @@ function plot_mirror_output(nodes, f_nD, f_nD_analytic, pde)
% %%
% % Plot 2D
%
% ax1 = subplot(2,2,3);
% f_nD_with_noise = f_nD;
% f_nD_with_noise(1,1) = f_nD_with_noise(1,1)*1.0001;
% contourf(x,y,f_nD_with_noise,'LineColor','none');
% title('numeric 2D solution');
% ax1 = subplot(2,3,1);
% contourf(z,y,squeeze(f_nD{1,num_steps}(:,:,sx))');
% title('Space vs. Pitch');
% ax2 = subplot(2,3,2);
% contourf(z,x,squeeze(f_nD{1,num_steps}(:,sy,:))');
% title('Space vs. Velocity');
% %sx = 46;
% ax3 = subplot(2,3,3);
%
%


% n_total = zeros(nz, num_steps);
% for i = 1:num_steps
% n_total(:,i) = squeeze(sum(f_nD{1,i}, [2 3]));
% end
% ax4 = subplot(2,3,5);
% contourf(z,time_array,squeeze(n_total(:,:))');
% title('Number Density vs. Time');

end
Loading