Skip to content

Commit

Permalink
Changing probe location to avoid cancelation due to rotational symmet…
Browse files Browse the repository at this point in the history
…ry around (0,0,1). Rebaseline reference data using 6 processors.

- The probe location at the center was resulting in high sensitivity to the solution in the surrounding elements
- Variation in the solution with number of processors resulted in significant enough differences that
the regression tests would fail.
- Changing the probe location to `(55,0,50)` in the unrotated case, gives non-trivial x-y components.
- Computing the probe value on the unrotated mesh, then applying the rotation gives
```
julia> (AngleAxis(pi/6, 0,0,1) * [+1.812639723e-01, -4.151745313e-03, +4.728904782e-02]) ./ [+2.137070366e-01, +1.250866735e-01, +6.449661332e-02]
3-element StaticArraysCore.SizedVector{3, Float64, Vector{Float64}} with indices SOneTo(3):
 0.7442669178782613
 0.6958092881005346
 0.7332020300876163

julia> (AngleAxis(pi/6, 0,0,1) * [+2.896221387e+00, +6.626550498e-03, +6.821049522e+00]) ./ [+3.384519675e+00, +1.982156277e+00, +9.223639395e+00]
3-element StaticArraysCore.SizedVector{3, Float64, Vector{Float64}} with indices SOneTo(3):
 0.7401014800946023
 0.7334686328421763
 0.739518234602449
```
where `2000 / 2732.05 = 0.7320510239563697` is the difference in the value of Lc computed off of the rotated domain compared to the unrotated domain.
This is exactly to be expected due to the nondimensionalization of the magnetic field, thus the new baseline values are sufficient for a regression test.
- Note: The magnetostatics solver exhibits processor count dependence for linear solving -> the solutions are not exact with changing number of ranks, hence the choice of 6 rather than 1 rank for generation.
  • Loading branch information
hughcars committed Aug 10, 2023
1 parent f298e8c commit 4855f20
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
11 changes: 6 additions & 5 deletions examples/rings/rings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
"Probe":
[
{
"Index": 1, // Center of rings
"X": 0.0,
"Y": 0.0,
"Z": 0.0
// Halfway between rings, above plane.
"Index": 1, // (55,0,50) rotated π/6 around (0,0,1)
"X": 47.63139720814413,
"Y": 27.5,
"Z": 50.0
}
]
}
Expand Down Expand Up @@ -79,7 +80,7 @@
{
"Type": "AMS",
"KSPType": "CG",
"Tol": 1.0e-10,
"Tol": 1.0e-9,
"MaxIts": 100
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/ref/rings/domain-E.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, E_elec, E_mag, E_cap, E_ind
1.000000e+00, +0.000000000e+00, +6.229882320e-03, +0.000000000e+00, +0.000000000e+00
2.000000e+00, +0.000000000e+00, +1.040027485e-01, +0.000000000e+00, +0.000000000e+00
1.000000e+00, +0.000000000e+00, +6.229882383e-03, +0.000000000e+00, +0.000000000e+00
2.000000e+00, +0.000000000e+00, +1.040047480e-01, +0.000000000e+00, +0.000000000e+00
4 changes: 2 additions & 2 deletions test/ref/rings/probe-B.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, B_x[1], B_y[1], B_z[1]
1.000000e+00, -3.376772219e+00, +4.127515723e-01, +1.383468300e+02
2.000000e+00, -1.064116495e-02, +1.431997242e-03, +1.375337228e+01
1.000000e+00, +2.137070366e-01, +1.250866735e-01, +6.449661332e-02
2.000000e+00, +3.384519675e+00, +1.982156277e+00, +9.223639395e+00
4 changes: 2 additions & 2 deletions test/ref/rings/surface-M.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, M[1] (H), M[2] (H)
1.000000e+00, +4.263362322e-11, +1.842867684e-12
2.000000e+00, +1.954153035e-12, +7.140042828e-10
1.000000e+00, +4.263362352e-11, +1.842918641e-12
2.000000e+00, +1.954203887e-12, +7.140129630e-10
4 changes: 2 additions & 2 deletions test/ref/rings/terminal-M.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, M[i][1] (H), M[i][2] (H)
1.000000e+00, +4.277681784e-11, +1.958742442e-12
2.000000e+00, +1.958742442e-12, +7.141237027e-10
1.000000e+00, +4.277681827e-11, +1.958819244e-12
2.000000e+00, +1.958819244e-12, +7.141374315e-10
4 changes: 2 additions & 2 deletions test/ref/rings/terminal-Minv.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, M⁻¹[i][1] (1/H), M⁻¹[i][2] (1/H)
1.000000e+00, +2.338008438e+10, -6.412833436e+07
2.000000e+00, -6.412833436e+07, +1.400493510e+09
1.000000e+00, +2.338008432e+10, -6.412961578e+07
2.000000e+00, -6.412961578e+07, +1.400466597e+09
4 changes: 2 additions & 2 deletions test/ref/rings/terminal-Mm.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
i, M_m[i][1] (H), M_m[i][2] (H)
1.000000e+00, +4.473556029e-11, -1.958742442e-12
2.000000e+00, -1.958742442e-12, +7.160824451e-10
1.000000e+00, +4.473563752e-11, -1.958819244e-12
2.000000e+00, -1.958819244e-12, +7.160962508e-10

0 comments on commit 4855f20

Please sign in to comment.