dumux issueshttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/issues2024-02-16T08:57:42Zhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/issues/1356[test][porousmediumflow][2pncmin][nonisothermal] Neumann flux at top has to b...2024-02-16T08:57:42ZAnna Mareike Kostelecky[test][porousmediumflow][2pncmin][nonisothermal] Neumann flux at top has to be adaptedWithin in the [non-isothermal 2pncmin test](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/test/porousmediumflow/2pncmin/nonisothermal?ref_type=heads) a few things for the Neumann BC at the top should be adapted:...Within in the [non-isothermal 2pncmin test](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/tree/master/test/porousmediumflow/2pncmin/nonisothermal?ref_type=heads) a few things for the Neumann BC at the top should be adapted:
1. In the upwind term ([here](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal/problem.hh?ref_type=heads#L239)) the reference mass-specific density of air is used, but there should be the molar density of air.
With the mass-specific density $\rho = 1.2 ~\text{kg}/\text{m}^3$ and the molar mass of air $M=28.96 * 10^{-3} ~\text{kg}/\text{mol}$, we have $\rho^{\text{mol}}=\rho/M \approx 41,44 ~\text{mol}/\text{m}^3$
2. The density of air (e.g. [here](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal/problem.hh?ref_type=heads#L231)) for the liquid flux should generally be harmonic averaged if CCFV is used with TPFA and arithmetic averaged for box method (as flux for liquid phase is purely diffusive and we do upwind just for advective processes)
3. The comments for "gas flux in/out" ([here](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal/problem.hh?ref_type=heads#L246)) should be switched.
4. For the energy exchange the harmonic mean of the effective heat conductivity within the porous medium and the heat conductivity within the free-flow should be taken. (Note, that applying the same harmonic averaging for the diffusion coefficient is counter-productive as the effective diffusion coefficient, using Millington-Quirk, is small for highly water-saturated porous media. This would lead to a lower evaporation rate for highly water saturated porous-media in comparison to high evaporation rates for almost dried-out porous media. Hence, only the pure binary diffusion coefficient is taken - It could be scaled e.g. linearly with the porosity)https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/issues/1301[porousmediumflow][2pncmin] Use correct time step size for problem file2023-12-11T14:53:06ZAnna Mareike Kostelecky[porousmediumflow][2pncmin] Use correct time step size for problem fileIn the [2pncmin](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal) test the time step size is used in the [problem](https://git.iws.uni-stuttgart.de/dumux-repositories/du...In the [2pncmin](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal) test the time step size is used in the [problem](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal/problem.hh?ref_type=heads#L331) for calculating the amount of precipitating salt per time. For this the time step is set in the [main file](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/2pncmin/nonisothermal/main.cc?ref_type=heads#L140) at the beginning of each new time step. For this case this works so far.
However, @Simon Grether pointed out that for simulations where the [newton solver](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/nonlinear/newtonsolver.hh?ref_type=heads#L340) does not converge and hence reduces the time step, this is not correctly implemented. This modification of the time step is not accounted for in the problem file, when just setting the time step once in the time loop.
Hence this would be nice to adapt already in the 2pncmin test, such that if this test case is copied and gets modified there is one possible error source less.3.9