From 11f9852db259cdee4e2c2511fabe4458a601880e Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Mon, 2 Oct 2023 09:35:31 +0200 Subject: [PATCH] fix todos --- src/+dryair/assembleCoefficientMatrices.m | 8 +++----- src/+dryair/calculateDryAirParameters.m | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/+dryair/assembleCoefficientMatrices.m b/src/+dryair/assembleCoefficientMatrices.m index 44390f2a..d2f31352 100644 --- a/src/+dryair/assembleCoefficientMatrices.m +++ b/src/+dryair/assembleCoefficientMatrices.m @@ -49,15 +49,13 @@ + (C2(n - 1, 2) / Delt_t) * SV.T(n - 1) + (C2(n, 1) / Delt_t) * SV.T(n) ... + (C1(n - 1, 2) / Delt_t) * SV.h(n - 1) + (C1(n, 1) / Delt_t) * SV.h(n); else - % TODO issue i defined outside of the loop! - ARG4 = C1(i - 1, 2) / Delt_t; - ARG5 = C1(i, 1) / Delt_t; - ARG6 = C1(i, 2) / Delt_t; - RHS(1) = -C7(1) + (C3(1, 1) * P_g(1) + C3(1, 2) * P_g(2)) / Delt_t ... - (C1(1, 1) / Delt_t + C4(1, 1)) * SV.hh(1) - (C1(1, 2) / Delt_t + C4(1, 2)) * SV.hh(2) ... + (C1(1, 1) / Delt_t) * SV.h(1) + (C1(1, 2) / Delt_t) * SV.h(2); for i = 2:ModelSettings.NL + ARG4 = C1(i - 1, 2) / Delt_t; + ARG5 = C1(i, 1) / Delt_t; + ARG6 = C1(i, 2) / Delt_t; RHS(i) = -C7(i) + (C3(i - 1, 2) * P_g(i - 1) + C3(i, 1) * P_g(i) + C3(i, 2) * P_g(i + 1)) / Delt_t ... - (ARG4 + C4(i - 1, 2)) * SV.hh(i - 1) - (ARG5 + C4(i, 1)) * SV.hh(i) - (ARG6 + C4(i, 2)) * SV.hh(i + 1) ... + ARG4 * SV.h(i - 1) + ARG5 * SV.h(i) + ARG6 * SV.h(i + 1); diff --git a/src/+dryair/calculateDryAirParameters.m b/src/+dryair/calculateDryAirParameters.m index 55c6875f..cb586cd8 100644 --- a/src/+dryair/calculateDryAirParameters.m +++ b/src/+dryair/calculateDryAirParameters.m @@ -44,7 +44,7 @@ QL_T(i) = -((KLTBAR + DTDBAR) * DTDZ); end - % used in EnrgyPARM % TODO issue DDhDZ not a global var in EnrgyPARM + % used in EnrgyPARM AirVariabes.KLhBAR(i) = KLhBAR; AirVariabes.KLTBAR(i) = KLTBAR; AirVariabes.DDhDZ(i) = DDhDZ;