Skip to content

Commit 0ee5676

Browse files
committed
Change sin_alpha in sheath_boundary to a Field3D
1 parent da566bf commit 0ee5676

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/sheath_boundary.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct SheathBoundary : public Component {
7777
void transform(Options &state) override;
7878
private:
7979
BoutReal Ge; // Secondary electron emission coefficient
80-
BoutReal sin_alpha; // sin of angle between magnetic field and wall.
80+
Field3D sin_alpha; // sin of angle between magnetic field and wall.
8181

8282
bool lower_y; // Boundary on lower y?
8383
bool upper_y; // Boundary on upper y?

src/sheath_boundary.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ SheathBoundary::SheathBoundary(std::string name, Options &alloptions, Solver *)
7171
sin_alpha = options["sin_alpha"]
7272
.doc("Sin of the angle between magnetic field line and wall surface. "
7373
"Should be between 0 and 1")
74-
.withDefault(1.0);
74+
.withDefault(Field3D(1.0));
7575

76-
if ((sin_alpha < 0.0) or (sin_alpha > 1.0)) {
76+
if ((min(sin_alpha) < 0.0) or (max(sin_alpha) > 1.0)) {
7777
throw BoutException("Range of sin_alpha must be between 0 and 1");
7878
}
7979

@@ -211,7 +211,7 @@ void SheathBoundary::transform(Options &state) {
211211
0, 100); // Limit for e.g. Ni zero gradient
212212

213213
// Note: Vzi = C_i * sin(α)
214-
ion_sum[i] += s_i * Zi * sin_alpha * sqrt(C_i_sq);
214+
ion_sum[i] += s_i * Zi * sin_alpha[ip] * sqrt(C_i_sq);
215215
}
216216
}
217217
}
@@ -248,7 +248,7 @@ void SheathBoundary::transform(Options &state) {
248248
/ Mi,
249249
0, 100); // Limit for e.g. Ni zero gradient
250250

251-
ion_sum[i] += s_i * Zi * sin_alpha * sqrt(C_i_sq);
251+
ion_sum[i] += s_i * Zi * sin_alpha[im] * sqrt(C_i_sq);
252252
}
253253
}
254254
}

0 commit comments

Comments
 (0)