|
1 | | -function [RHS, SAVE, CHK, SoilVariables, EnergyVariables] = solveEnergyBalanceEquations(InitialValues, SoilVariables, HeatVariables, TransportCoefficient, ... |
2 | | - AirVariabes, VaporVariables, GasDispersivity, ThermalConductivityCapacity, ... |
3 | | - HBoundaryFlux, BoundaryCondition, ForcingData, DRHOVh, DRHOVT, KL_T, ... |
4 | | - Xah, XaT, Xaa, Srt, L_f, RHOV, RHODA, DRHODAz, L, Delt_t, P_g, P_gg, ... |
5 | | - TOLD, Precip, EVAP, r_a_SOIL, Rn_SOIL, KT, CHK, ModelSettings, GroundwaterSettings) |
| 1 | +function [RHS, SAVE, CHK, SoilVariables, EnergyVariables, gwfluxes] = solveEnergyBalanceEquations(InitialValues, SoilVariables, HeatVariables, TransportCoefficient, ... |
| 2 | + AirVariabes, VaporVariables, GasDispersivity, ThermalConductivityCapacity, ... |
| 3 | + HBoundaryFlux, BoundaryCondition, ForcingData, DRHOVh, DRHOVT, KL_T, ... |
| 4 | + Xah, XaT, Xaa, Srt, L_f, RHOV, RHODA, DRHODAz, L, Delt_t, P_g, P_gg, ... |
| 5 | + TOLD, EVAP, r_a_SOIL, Rn_SOIL, KT, CHK, ModelSettings, GroundwaterSettings) |
6 | 6 | %{ |
7 | 7 | Solve the Energy balance equation with the Thomas algorithm to update |
8 | 8 | the soil temperature 'SoilVariables.TT', the finite difference |
|
19 | 19 | [RHS, EnergyMatrices, SAVE] = energy.assembleCoefficientMatrices(InitialValues, EnergyMatrices, SoilVariables, Delt_t, P_g, P_gg, ModelSettings, GroundwaterSettings); |
20 | 20 |
|
21 | 21 | [RHS, EnergyMatrices] = energy.calculateBoundaryConditions(BoundaryCondition, EnergyMatrices, HBoundaryFlux, ForcingData, SoilVariables, ... |
22 | | - Precip, EVAP, Delt_t, r_a_SOIL, Rn_SOIL, RHS, L, KT, ModelSettings, GroundwaterSettings); |
| 22 | + EVAP, Delt_t, r_a_SOIL, Rn_SOIL, RHS, L, KT, ModelSettings, GroundwaterSettings); |
23 | 23 |
|
24 | 24 | [SoilVariables, CHK, RHS, EnergyMatrices] = energy.solveTridiagonalMatrixEquations(EnergyMatrices, SoilVariables, RHS, CHK, ModelSettings, GroundwaterSettings); |
25 | 25 |
|
|
42 | 42 | end |
43 | 43 | end |
44 | 44 |
|
45 | | - % These are unused vars, but I comment them for future reference, |
46 | | - % See issue 100, item 2 |
47 | | - % [QET, QEB] = energy.calculateEnergyFluxes(SAVE, TT)(SAVE, SoilVariables.TT); |
| 45 | + [QET, QEB] = energy.calculateEnergyFluxes(SAVE, SoilVariables.TT, ModelSettings, GroundwaterSettings); |
| 46 | + gwfluxes.energyTopflux = QET; % energy flux at the top boundary node |
| 47 | + gwfluxes.energyBotmflux = QEB; % energy flux at the bottom boundary node |
48 | 48 | end |
0 commit comments