Skip to content

Commit

Permalink
define qvbar
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton committed Nov 26, 2024
1 parent 021e019 commit 2424344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gusto/equations/shallow_water_equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def __init__(self, domain, parameters, fexpr=None, topog_expr=None,
def _setup_residual(self, fexpr, topog_expr, u_transport_option):

g = self.parameters.g
H = self.parameters.H

w, phi = self.tests[0:2]
u, D = split(self.X)[0:2]
Expand Down Expand Up @@ -386,6 +385,7 @@ def _setup_residual(self, fexpr, topog_expr, u_transport_option):
beta2 = self.parameters.beta2
qsat_expr = self.compute_saturation(self.X, topog)
qv = conditional(qt < qsat_expr, qt, qsat_expr)
qvbar = conditional(qtbar < qsat_expr, qtbar, qsat_expr)
source_form = pressure_gradient(subject(prognostic(
-D * div(b*w) * dx - 0.5 * b * div(D*w) * dx
+ jump(b*w, n) * avg(D) * dS + 0.5 * jump(D*w, n) * avg(b) * dS
Expand Down Expand Up @@ -432,7 +432,7 @@ def _setup_residual(self, fexpr, topog_expr, u_transport_option):
if self.equivalent_buoyancy:
qt_adv = prognostic(advection_form(gamma_qt, qt, u), "q_t")
if self.linearisation_map(qt_adv.terms[0]):
linear_b_adv = linear_advection_form(gamma_qt, qtbar, u_trial)
linear_qt_adv = linear_advection_form(gamma_qt, qtbar, u_trial)
qt_adv = linearisation(qt_adv, linear_qt_adv)
residual += subject(qt_adv, self.X)

Expand Down

0 comments on commit 2424344

Please sign in to comment.