Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0725963
Merge pull request #19 from totork/fci-metric-sheathtest
totork Mar 19, 2026
57b8c29
Fix amjuel reaction averaging that cause slow down
totork Apr 23, 2026
2bc38b2
Merge pull request #23 from totork/fci-metric-fix-neutrals
totork Apr 23, 2026
6449816
Delete more averaging
totork Apr 23, 2026
0db3901
Merge pull request #25 from totork/fci-metric-fix-neutrals
totork Apr 23, 2026
4628ec1
Firsst commit of full velocity model
totork May 8, 2026
7158027
First commit of mms test
totork May 8, 2026
4bce85e
Add MMS test for neutral full
totork May 8, 2026
6f2a1e9
More work on MMS test
totork May 8, 2026
200e6e5
Delete unused operators
totork May 8, 2026
a77de4f
Bugfixes
totork May 8, 2026
d195b73
Working MMS test but builds corragations after some time because no d…
totork May 8, 2026
5103643
Add both velocity directions
totork May 8, 2026
dd20ad2
Add anomalous transport for neutral full velocity model
totork May 8, 2026
4ab6328
First step for MMS test of momentum in the full v model
totork May 8, 2026
f3233c7
More work on MMS test
totork May 8, 2026
8b9209a
Add MMS test to cmake
totork May 8, 2026
ca39b22
Update neutral full model
totork May 8, 2026
077b77a
Add neutral viscosity
totork May 8, 2026
19c4043
Add nonlinear momentum advection
totork May 8, 2026
ac12588
Add momentum advection to be optional
totork May 9, 2026
ce5744a
Change to numerically better scheme
totork May 9, 2026
e317adb
Add possible lax flux for perpendicular diffusion
totork May 9, 2026
762730c
Add slope limiter for perpendicular advection
totork May 9, 2026
4453f2f
Add disabling of dndt
totork May 9, 2026
f3472e1
Add neutral pressure
totork May 9, 2026
109b3f2
Add missing variable
totork May 9, 2026
84ab072
Add possible momentum loss as well as different stabliization of div_…
totork May 10, 2026
e974065
Change slope/flux limiters
totork May 11, 2026
1919c5b
Add momentum source to neutrals
totork May 12, 2026
d5e271c
Fix missing field
totork May 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set(HERMES_SOURCES
src/div_ops.cxx
src/fci_gridcheck.cxx
src/neutral_mixed.cxx
src/neutral_full_velocity_curv.cxx
src/full_velocity.cxx
src/electromagnetic.cxx
src/electron_force_balance.cxx
Expand Down Expand Up @@ -149,6 +150,7 @@ set(HERMES_SOURCES
include/ionisation.hxx
include/neutral_boundary.hxx
include/neutral_mixed.hxx
include/neutral_full_velocity_curv.hxx
include/neutral_parallel_diffusion.hxx
include/solkit_neutral_parallel_diffusion.hxx
include/noflow_boundary.hxx
Expand Down Expand Up @@ -298,6 +300,10 @@ if(HERMES_TESTS)
DEPENDS setup-test)
endif()
endfunction()
hermes_add_integrated_test(2D-neutral-full-density-fci
REQUIRES BOUT_ENABLE_METRIC_3D)
hermes_add_integrated_test(2D-neutral-full-momentum-fci
REQUIRES BOUT_ENABLE_METRIC_3D)
hermes_add_integrated_test(2D-vorticity-inversion-fci
REQUIRES BOUT_ENABLE_METRIC_3D)
hermes_add_integrated_test(1D-sheathtest-recycling-fci
Expand Down
4 changes: 2 additions & 2 deletions hermes-3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ int Hermes::init(bool restarting) {


// try loading J from the grid, otherwise use the one calculated from the metric coefficients
Field3D Jtmp = 0.0;
Coordinates::FieldMetric Jtmp = 0.0;
if (mesh->get(Jtmp, "J_new")==0){
mesh->communicate(Jtmp);
coord->J = Jtmp;
Expand All @@ -291,7 +291,7 @@ int Hermes::init(bool restarting) {
coord->J_perp = sqrt(coord->g_11 * coord->g_33 - coord->g_13 * coord->g_13);

// try loading g_22 at the lower and upper cell interface from the grid, otherwise caluculate from the mean of the two cellcentered ones
Field3D loadtmp = 0.0;
Coordinates::FieldMetric loadtmp = 0.0;
if (mesh->get(loadtmp, "g_22_cell_ylow")==0) {
coord->g_22_cell_ylow = loadtmp / SQ(rho_s0);
} else {
Expand Down
27 changes: 8 additions & 19 deletions include/amjuel_reaction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,9 @@ protected:
BoutReal avgNe = 0.0;
BoutReal avgN1 = 0.0;
BoutReal avgTe = 0.0;
if (Ne.isFci()) {
avgNe = (4.0 * Ne[i] + Ne.ydown()[iym] + Ne.yup()[iyp]) / 6.0;
avgN1 = (4.0 * N1[i] + N1.ydown()[iym] + N1.yup()[iyp]) / 6.0;
avgTe = (4.0 * Te[i] + Te.ydown()[iym] + Te.yup()[iyp]) / 6.0;
} else {
avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
}

avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
reaction_rate[i] = avgNe * avgN1 * evaluate(rate_coefs, avgTe * Tnorm, avgNe * Nnorm) * Nnorm / FreqNorm * rate_multiplier;
}

Expand Down Expand Up @@ -179,15 +172,11 @@ protected:
BoutReal avgNe = 0.0;
BoutReal avgN1 = 0.0;
BoutReal avgTe = 0.0;
if (Ne.isFci()) {
avgNe = (4.0 * Ne[i] + Ne.ydown()[iym] + Ne.yup()[iyp]) / 6.0;
avgN1 = (4.0 * N1[i] + N1.ydown()[iym] + N1.yup()[iyp]) / 6.0;
avgTe = (4.0 * Te[i] + Te.ydown()[iym] + Te.yup()[iyp]) / 6.0;
} else {
avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];
}

avgNe = Ne[i];
avgN1 = N1[i];
avgTe = Te[i];

energy_loss[i] = avgNe * avgN1 * evaluate(radiation_coefs, avgTe * Tnorm, avgNe * Nnorm) * Nnorm / (Tnorm * FreqNorm) * radiation_multiplier;
}

Expand Down
Loading
Loading