Skip to content

Commit

Permalink
Correct volume calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekryjak committed Jul 30, 2024
1 parent a56000e commit 259cd30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sheath_boundary_simple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void SheathBoundarySimple::transform(Options& state) {
/ (sqrt(coord->g_22[i]) + sqrt(coord->g_22[ip])); // This omits dx*dz because we divide by dx*dz next

// Divide by volume of cell to get energy loss rate (> 0)
BoutReal power = heatflow / (coord->dy[i] * coord->J[i]);
BoutReal power = heatflow / (coord->dx[i] * coord->dy[i] * coord->dz[i] * coord->J[i]);

hflux_e[i] -= power;
electron_energy_source[i] -= power;
Expand Down Expand Up @@ -548,7 +548,7 @@ void SheathBoundarySimple::transform(Options& state) {
/ (sqrt(coord->g_22[i]) + sqrt(coord->g_22[im])); // This omits dx*dz because we divide by dx*dz next

// Divide by volume of cell to get energy loss rate (< 0)
BoutReal power = heatflow / (coord->dy[i] * coord->J[i]);
BoutReal power = heatflow / (coord->dx[i] * coord->dy[i] * coord->dz[i] * coord->J[i]);

hflux_i[i] += power;
energy_source[i] += power;
Expand Down

0 comments on commit 259cd30

Please sign in to comment.