|
hydrobricks
|
#include <SolverImplicitEuler.h>
Protected Member Functions | |
| void | ComputeBrickRates (Brick *brick, double content, double inflow, double timeStepInDays, int iRateStart) override |
Protected Member Functions inherited from SolverSequential | |
Additional Inherited Members | |
Public Member Functions inherited from SolverSequential | |
| void | InitializeContainers () override |
| bool | Solve (double timeStepInDays) final |
Public Member Functions inherited from Solver | |
| void | Connect (Processor *processor) |
Static Public Member Functions inherited from Solver | |
| static std::unique_ptr< Solver > | Factory (const SolverSettings &solverSettings) |
Static Protected Member Functions inherited from SolverSequential | |
| static double | TotalRateAt (Brick *brick, double *contentDelta, double offset) |
| static void | StoreRatesAtCurrentContent (Brick *brick, vecDouble &rates) |
Protected Attributes inherited from SolverSequential | |
| axd | _rates |
Protected Attributes inherited from Solver | |
| Processor * | _processor |
Sequential implicit (backward) Euler solver.
Each brick is advanced by solving the implicit equation
S(t+h) = S(t) + h (I - Q(S(t+h)))
where Q(S) is the total outflow rate of the brick's processes evaluated at the end-of-step content. The scalar equation is solved by bisection, which is robust because Q is non-decreasing in S. All processes (including non-linear ones such as ET) are evaluated at the end-of-step state, making the scheme unconditionally stable: fast-reacting or strongly non-linear reservoirs cannot destabilize it, at first-order accuracy.
|
overrideprotectedvirtual |
Compute the average outflow rates of the brick over the time step and store them in the _rates slice starting at iRateStart (one value per process connection, in process declaration order).
| brick | The brick to solve. |
| content | Start-of-step content [mm], including instantaneous deposits. |
| inflow | Inflows as a constant rate over the step [mm/d]. |
| timeStepInDays | The time step in days. |
| iRateStart | Index of the brick's first connection in _rates. |
Implements SolverSequential.