From 93e017fef7725ffec8b496b67388638ad117616a Mon Sep 17 00:00:00 2001 From: bshanahan Date: Thu, 10 Oct 2024 14:13:09 +0200 Subject: [PATCH 1/3] Fix ExB term in Ohm's law --- hermes-2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes-2.cxx b/hermes-2.cxx index a05db92..4d63e84 100644 --- a/hermes-2.cxx +++ b/hermes-2.cxx @@ -2632,7 +2632,7 @@ int Hermes::rhs(BoutReal t) { //ddt(VePsi) -= bracket(phi, vdiff, BRACKET_ARAKAWA)*bracket_factor; // ExB advection if (VePsi_perp){ - auto tmp = Div_n_bxGrad_f_B_XPPM(VePsi, phi, false,poloidal_flows) * bracket_factor * scale_ExB; + auto tmp = Div_n_bxGrad_f_B_XPPM(vdiff, phi, false,poloidal_flows) * bracket_factor * scale_ExB; if(TE_VePsi){ TE_VePsi_perp = tmp; } From b77a06753f9f5fa30fa4461cf6c26b662581c57f Mon Sep 17 00:00:00 2001 From: bshanahan Date: Thu, 10 Oct 2024 14:15:30 +0200 Subject: [PATCH 2/3] Change sign in ExB term for Ohm's law was a typo --- hermes-2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes-2.cxx b/hermes-2.cxx index 4d63e84..6aa11a4 100644 --- a/hermes-2.cxx +++ b/hermes-2.cxx @@ -2636,7 +2636,7 @@ int Hermes::rhs(BoutReal t) { if(TE_VePsi){ TE_VePsi_perp = tmp; } - ddt(VePsi) += tmp; + ddt(VePsi) -= tmp; } // Should also have ion polarisation advection here From 44fab91a518c15239e399a00703841363906430c Mon Sep 17 00:00:00 2001 From: bshanahan Date: Fri, 11 Oct 2024 10:55:30 +0200 Subject: [PATCH 3/3] Fix 'fixed' sign vdiff had different convention than I expected. --- hermes-2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes-2.cxx b/hermes-2.cxx index 6aa11a4..4d63e84 100644 --- a/hermes-2.cxx +++ b/hermes-2.cxx @@ -2636,7 +2636,7 @@ int Hermes::rhs(BoutReal t) { if(TE_VePsi){ TE_VePsi_perp = tmp; } - ddt(VePsi) -= tmp; + ddt(VePsi) += tmp; } // Should also have ion polarisation advection here