Merge branch 'debug/improve-evaporation-BC' into 'master'
Improve evaporation BC switch I improved the evaporation BC by changing the condition for which the applied BC switches from Neumann to Dirichlet BC: For any quadrature point with evaporation BC, the numeric flux is calculated once per time step. If this numeric flux is smaller than the flux applied by the Neumann BC, the Dirichlet BC is applied. This smoothes the transition between the two BCs. Tested improvements: * The head value given in the evaporation BC is not a mere cutoff value but the target boundary condition if the Neumann flux cannot be sustained * Evaporation from homogeneous surfaces is very stable and reaches high time step values * The new condition allows for a smooth transition back from Dirichlet to Neumann if the soil regains water saturation (e.g., by a rising water table) Undecided: * Evaporation from a Miller regime is still not very stable. This is due to the fact that the Dirichlet BC itself is not very stable for a Miller regime. * Higher FEM orders can reduce the numeric stability * Numeric flux is not a physical flux and depends on the `dg.penaltyFactor`. Bad: * The code for the switch check is copypasta from the Dirichlet BC. See merge request !8
Showing with 49 additions and 13 deletions