Commit 3960f80
adding infrastructure for computing the mass matrices to be used by the implicit EM solvers (#5768)
This PR adds the basic infrastructure for computing the mass matrices
needed by the implicit EM solvers to efficiently take time steps larger
than the plasma period.
The mass matrices are deposited to the grid from the particles in the
same fashion as the current is deposited to the grid. The relationship
between dJ and dE is written as
dJx = MassMatrices_xx * dEx + MassMatrices_xy * dEy + MassMatrices_xz *
dEz
dJy = MassMatrices_yx * dEx + MassMatrices_yy * dEy + MassMatrices_yz *
dEz
dJz = MassMatrices_zx * dEx + MassMatrices_zy * dEy + MassMatrices_zz *
dEz
At each grid point, each element in the expressions above is a sum over
all local grid points depending on the particle shape factor. **For this
PR, we are only computing the diagonal elements of the diagonal mass
matrices**:
dJx(i,j,k) = **MassMatrices_xx(i,j,k)** * dEx(i,j,k)
dJy(i,j,k) = **MassMatrices_yy(i,j,k)** * dEy(i,j,k)
dJz(i,j,k) = **MassMatrices_zz(i,j,k)** * dEz(i,j,k)
The diagonal elements are used in the preconditioner for capturing
plasma response.
The mass matrices are described in
Justin Ray Angus, et. al., An implicit particle code with exact energy
and charge conservation for electromagnetic studies of dense plasmas,
Journal of Computational Physics, Volume 491, 2023, 112383,
https://doi.org/10.1016/j.jcp.2023.112383.
<img width="1029" alt="dane_gmres_planar_pinch_longer"
src="https://github.com/user-attachments/assets/edf66b6a-a9ce-4eb1-a519-a183c14f0ce8"
/>
This figure illustrates the effectiveness of including the plasma
response in the preconditioner. These results are from 1D planar pinch
simulations as described in the above reference. The parameters are such
that \omega_{pe}*\Delta_t ranges from 18 at t = 0 to 33 for t > 15 ns
where the density is compressed. The CFL number is 4.2.
The number of GMRES iterations per Newton iteration increases as the
plasma density increases when not using a preconditioner. Using the curl
curl preconditioner without the plasma response actually result in more
iterations. This is not totally unexpected since the stiffness of the
system is dominated by the plasma rather than light waves. When the
diagonal mass matrices are included in the curl curl preconditioner, the
number of iterations decreases and becomes relatively insensitive to the
change in density. This behavior is similar to that for the same
conditions as reported in the above reference.
The number of GMRES iterations can be reduced further by including the
first layer of off-diagonal elements of the mass matrices in the PC.
That will be done in a future PR.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent f161db9 commit 3960f80
File tree
31 files changed
+1845
-78
lines changed- Docs/source/usage
- Examples/Tests/implicit
- Regression/Checksum/benchmarks_json
- Source
- Evolve
- FieldSolver/ImplicitSolvers
- NonlinearSolvers
- Parallelization
- Particles
- Deposition
31 files changed
+1845
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
4 | 14 | | |
5 | 15 | | |
6 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
Lines changed: 155 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | | - | |
| 1142 | + | |
| 1143 | + | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | 1147 | | |
1147 | | - | |
| 1148 | + | |
| 1149 | + | |
1148 | 1150 | | |
1149 | 1151 | | |
1150 | 1152 | | |
1151 | 1153 | | |
1152 | 1154 | | |
1153 | | - | |
| 1155 | + | |
1154 | 1156 | | |
1155 | 1157 | | |
1156 | 1158 | | |
| |||
1178 | 1180 | | |
1179 | 1181 | | |
1180 | 1182 | | |
| 1183 | + | |
1181 | 1184 | | |
1182 | 1185 | | |
1183 | 1186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
| |||
102 | 96 | | |
103 | 97 | | |
104 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
| |||
166 | 178 | | |
167 | 179 | | |
168 | 180 | | |
| 181 | + | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
| |||
174 | 187 | | |
175 | 188 | | |
176 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
177 | 195 | | |
178 | 196 | | |
179 | 197 | | |
| |||
0 commit comments