@@ -1171,12 +1171,10 @@ function update_implicit_equation_jacobian!(A, Y, p, dtγ, t)
1171
1171
- (dtγ * ᶜadvdivᵥ_matrix () ⋅ ∂ᶜupdraft_mass_flux_∂ᶜscalar)
1172
1172
1173
1173
# # grid-mean ρq_tot
1174
- ∂ᶜρq_tot_err_∂ᶜρ = matrix[@name (c. ρq_tot), @name (c. ρ)]
1175
1174
@. ∂ᶜρq_tot_err_∂ᶜρ +=
1176
1175
dtγ * ᶜadvdivᵥ_matrix () ⋅ ∂ᶜupdraft_mass_flux_∂ᶜscalar ⋅
1177
1176
DiagonalMatrixRow (- (ᶜspecific. q_tot) / ᶜρ)
1178
1177
1179
- ∂ᶜρq_tot_err_∂ᶜρq_tot = matrix[@name (c. ρq_tot), @name (c. ρq_tot)]
1180
1178
@. ∂ᶜρq_tot_err_∂ᶜρq_tot +=
1181
1179
dtγ * ᶜadvdivᵥ_matrix () ⋅ ∂ᶜupdraft_mass_flux_∂ᶜscalar ⋅
1182
1180
DiagonalMatrixRow (1 / ᶜρ)
@@ -1187,6 +1185,17 @@ function update_implicit_equation_jacobian!(A, Y, p, dtγ, t)
1187
1185
- (dtγ * ᶜadvdivᵥ_matrix () ⋅ ∂ᶜupdraft_mass_flux_∂ᶜscalar)
1188
1186
1189
1187
# grid-mean ∂/∂(u₃ʲ)
1188
+ ∂ᶜρe_tot_err_∂ᶠu₃ = matrix[@name (c. ρe_tot), @name (f. u₃)]
1189
+ @. ∂ᶜρe_tot_err_∂ᶠu₃ +=
1190
+ dtγ * ᶜadvdivᵥ_matrix () ⋅ DiagonalMatrixRow (
1191
+ ᶠinterp (
1192
+ (Y. c. sgsʲs.:(1 ). mse + ᶜKʲs.:(1 ) - ᶜh_tot) *
1193
+ ᶜρʲs.:(1 ) *
1194
+ ᶜJ *
1195
+ draft_area (Y. c. sgsʲs.:(1 ). ρa, ᶜρʲs.:(1 )),
1196
+ ) / ᶠJ * (g³³ (ᶠgⁱʲ)),
1197
+ )
1198
+
1190
1199
∂ᶜρe_tot_err_∂ᶠu₃ʲ =
1191
1200
matrix[@name (c. ρe_tot), @name (f. sgsʲs.:(1 ). u₃)]
1192
1201
@. ∂ᶜρe_tot_err_∂ᶠu₃ʲ =
@@ -1199,6 +1208,16 @@ function update_implicit_equation_jacobian!(A, Y, p, dtγ, t)
1199
1208
) / ᶠJ * (g³³ (ᶠgⁱʲ)),
1200
1209
)
1201
1210
1211
+ ∂ᶜρq_tot_err_∂ᶠu₃ = matrix[@name (c. ρq_tot), @name (f. u₃)]
1212
+ @. ∂ᶜρq_tot_err_∂ᶠu₃ +=
1213
+ dtγ * ᶜadvdivᵥ_matrix () ⋅ DiagonalMatrixRow (
1214
+ ᶠinterp (
1215
+ (Y. c. sgsʲs.:(1 ). q_tot - ᶜspecific. q_tot) *
1216
+ ᶜρʲs.:(1 ) *
1217
+ ᶜJ *
1218
+ draft_area (Y. c. sgsʲs.:(1 ). ρa, ᶜρʲs.:(1 )),
1219
+ ) / ᶠJ * (g³³ (ᶠgⁱʲ)),
1220
+ )
1202
1221
1203
1222
∂ᶜρq_tot_err_∂ᶠu₃ʲ =
1204
1223
matrix[@name (c. ρq_tot), @name (f. sgsʲs.:(1 ). u₃)]
0 commit comments