Skip to content

Commit 8a24f98

Browse files
committed
add excitation to the radiation sink term
1 parent 4b7030d commit 8a24f98

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

src/full-velocity.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ void FullVelocity::update(const Field3D &Ne, const Field3D &Te,
324324
/////////////////////////////////////////////////////
325325
// Atomic processes
326326

327-
Field3D Riz, Rrc, Rcx;
328-
neutral_rates(Ne, Te, Ti, Vi, Nn, Tn, Vnpar, S, F, Qi, Rp, Riz, Rrc, Rcx);
327+
Field3D Riz, Rrc, Rcx, Rex;
328+
neutral_rates(Ne, Te, Ti, Vi, Nn, Tn, Vnpar, S, F, Qi, Rp, Riz, Rrc, Rcx, Rex);
329329

330-
Fperp = Rrc + Rcx; // Friction for vorticity
330+
Fperp = Rrc + Rcx + Rex; // Friction for vorticity
331331

332332
// Loss of momentum in the X and Z directions
333333
ddt(Vn2D).x -= (DC(Rcx) + DC(Riz)) * Vn2D.x / Nn2D_floor;

src/mixed.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,13 @@ void NeutralMixed::update(const Field3D &Ne, const Field3D &Te,
168168
// Atomic processes
169169
TRACE("Atomic processes");
170170

171-
Field3D Riz, Rrc, Rcx;
172-
neutral_rates(Ne, Te, Ti, Vi, Nn, Tn, Vn, S, F, Qi, Rp, Riz, Rrc, Rcx);
171+
Field3D Riz, Rrc, Rcx, Rex;
172+
neutral_rates(Ne, Te, Ti, Vi, Nn, Tn, Vn, S, F, Qi, Rp, Riz, Rrc, Rcx, Rex);
173173

174174
// Neutral cross-field diffusion coefficient
175175
BoutReal neutral_lmax = 0.1 / Lnorm;
176176
Field3D Rnn = Nn * sqrt(Tn) / neutral_lmax; // Neutral-neutral collisions
177-
Dnn = Pnlim / (Riz + Rcx + Rnn);
177+
Dnn = Pnlim / (Riz + Rcx + Rnn + Rex);
178178

179179
mesh->communicate(Dnn);
180180
Dnn.clearParallelSlices();
@@ -254,7 +254,7 @@ void NeutralMixed::update(const Field3D &Ne, const Field3D &Te,
254254
+ FV::Div_par_K_Grad_par((2. / 5) * DnnNn, Vn) // Parallel viscosity
255255
;
256256

257-
Fperp = Rcx + Rrc;
257+
Fperp = Rcx + Rrc + Rex;
258258

259259
/////////////////////////////////////////////////////
260260
// Neutral pressure

src/neutral-model.cxx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void NeutralModel::neutral_rates(
4848
const Field3D &Vi, // Plasma quantities
4949
const Field3D &Nn, const Field3D &Tn, const Field3D &Vnpar, // Neutral gas
5050
Field3D &S, Field3D &F, Field3D &Qi, Field3D &R, // Transfer rates
51-
Field3D &Riz, Field3D &Rrc, Field3D &Rcx) { // Rates
51+
Field3D &Riz, Field3D &Rrc, Field3D &Rcx, Field3D &Rex) { // Rates
5252

5353
// Allocate output fields
5454
S = 0.0;
@@ -184,6 +184,27 @@ void NeutralModel::neutral_rates(
184184
BoutReal R_iz_R =
185185
Ne_R * Nn_R * hydrogen.ionisation(Te_R * Tnorm) * Nnorm / Fnorm;
186186

187+
// Excitation
188+
if (excitation) {
189+
/////////////////////////////////////////////////////////
190+
// Electron-neutral excitation
191+
// Note: Rates need checking
192+
// Currently assuming that quantity calculated is in [eV m^3/s]
193+
194+
BoutReal R_ex_L = Ne_L * Nn_L *
195+
hydrogen.excitation(Te_L * Tnorm) * Nnorm /
196+
Fnorm / Tnorm;
197+
BoutReal R_ex_C = Ne_C * Nn_C *
198+
hydrogen.excitation(Te_C * Tnorm) * Nnorm /
199+
Fnorm / Tnorm;
200+
BoutReal R_ex_R = Ne_R * Nn_R *
201+
hydrogen.excitation(Te_R * Tnorm) * Nnorm /
202+
Fnorm / Tnorm;
203+
204+
Rex(i, j, k) = (J_L * R_ex_L + 4. * J_C * R_ex_C + J_R * R_ex_R) /
205+
(6. * J_C);
206+
}
207+
187208
// Neutral sink, plasma source
188209
S(i, j, k) -=
189210
(J_L * R_iz_L + 4. * J_C * R_iz_C + J_R * R_iz_R) / (6. * J_C);
@@ -200,6 +221,8 @@ void NeutralModel::neutral_rates(
200221
(6. * J_C);
201222

202223
// Ionisation and electron excitation energy
224+
225+
203226
R(i, j, k) += (Eionize / Tnorm) *
204227
(J_L * R_iz_L + 4. * J_C * R_iz_C + J_R * R_iz_R) /
205228
(6. * J_C);

0 commit comments

Comments
 (0)