hydrobricks
Loading...
Searching...
No Matches
SolverExponentialEuler Class Reference

#include <SolverExponentialEuler.h>

Inheritance diagram for SolverExponentialEuler:
SolverSequential Solver

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< SolverFactory (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
 

Detailed Description

Sequential exponential Euler solver (analytic integration of the linearized system).

Each brick's total outflow is linearized around the start-of-step content, Q(S) ~ Q(S0) + k (S - S0) with k obtained by finite difference, and the linearized equation dS/dt = I - Q(S0) - k (S - S0) is integrated exactly over the step. The scheme is exact for linear reservoirs (where the linearization is the reservoir itself), second-order accurate for smooth non-linear processes, and unconditionally stable. The total outflow volume is distributed over the connections proportionally to their trapezoidal-average rates.

Member Function Documentation

◆ ComputeBrickRates()

void SolverExponentialEuler::ComputeBrickRates ( Brick * brick,
double content,
double inflow,
double timeStepInDays,
int iRateStart )
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).

Parameters
brickThe brick to solve.
contentStart-of-step content [mm], including instantaneous deposits.
inflowInflows as a constant rate over the step [mm/d].
timeStepInDaysThe time step in days.
iRateStartIndex of the brick's first connection in _rates.

Implements SolverSequential.


The documentation for this class was generated from the following files: