# Dupuit #2330

Merged
merged 12 commits into from Aug 2, 2019
+1,262 −67

## Conversation

Member

### TomFischer commented Jan 23, 2019 • edited

 Implementation of Dupuit permeability relation. Changelog entry documentation tests / benchmarks Update Later PR: storage model

# Codecov Report

Merging #2330 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2330   +/-   ##
=======================================
Coverage   32.21%   32.21%
=======================================
Files         574      574
Lines       21246    21246
Branches     9984     9984
=======================================
Hits         6844     6844
Misses      10916    10916
Partials     3486     3486

Δ = absolute <relative> (impact), ø = not affected, ? = missing data

Member Author

### TomFischer commented May 14, 2019

 2019-05-14: rebased

Member

### Thomas-TK commented Jun 18, 2019

 @TomFischer documentation and 4 benchmark tests are prepared. We would need now a place to upload them. I would call the headline "Dupuit assumption" or "unconfined groundwater flow".
Member

### Thomas-TK commented Jun 18, 2019

 Just wondering while looking at the benchmark documentation: if we have a headline called elliptic, why don't we have parabolic as well?
Member

### Thomas-TK commented Jun 18, 2019

 . . I guess I found the answer: web\content\docs\benchmarks. To be prepared with markdown. The web-folder contains a readme :-)

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

 const double variable, const double temperature) const override { _intrinsic_permeability_tensor =

#### endJunction Jul 26, 2019

Member

Why storing a value which is recomputed every time?

Suggested change
 _intrinsic_permeability_tensor = return

Member

?

#### TomFischer Jul 30, 2019

Author Member

Tried the suggested change. It crashes the benchmarks. Don't know why.

#### TomFischer Jul 31, 2019

Author Member

Removing _intrinsic_permeability_tensor leads to the compiler warning:

 Permeability.h:60:16: warning: returning reference to local temporary object [-Wreturn-stack-address]
return Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic,


### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 26, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 30, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 30, 2019

Show resolved Hide resolved

### endJunction reviewed Jul 30, 2019

 @@ -68,7 +69,7 @@ class Permeability return _intrinsic_permeability_tensor; } private: protected: ParameterLib::Parameter const& _permeability_parameter; int const _dimension; mutable Eigen::MatrixXd _intrinsic_permeability_tensor;

#### endJunction Jul 30, 2019

Member

Try to remove this member. I don't see where it is used. In two getValue functions the tensor is computed every time.

Member

### wenqing left a comment

 I think there is no need to change the permeability model. The problem is a special case of groundwater problem, which has large horizontal spatial size and is simplified as 2D problem. Theoretically, the hydraulic head has to be used as primary variable. One can use the pore pressure as the primary variable but the gravity term can not be ignored because h = H-z, where H is the pressure head given by p/(rho*g), and z is the relative vertical coordinate. Besides, grad (K h grad h) gives high non-linearity, its weak form can be expanded as _b - _D. This expression says that it is not adequate to add a new permeability model. Based on the above points, I suggest to derived a class from the local assembler of GroundwaterFlow to assemble Jacobian for the problem, and at the end solve the problem by the Newton-Raphson method.
Member

### wenqing commented Aug 1, 2019

 One can set mu=1, rho=0 in the LiquidFlow to use pressure as head. Then one has to keep in mind that the permeability variable keeps the value of hydraulic conductivity. This would cause some sort of confusion.
Member

### endJunction commented Aug 1, 2019

 @wenqing Would this also be applicable to HT, for example? As I understood it, the "permeability model" can be used in other processes too.
Member

### wenqing commented Aug 1, 2019

 @endJunction I think it is only for a groundwater model. As far as I could understand that this PR wants to handle hK in \beta h = grad (h K grad h) for large spatial groundwater problem by introducing a permeability model of hK. You can see h K cannot be considered as hydraulic conductivity. The problem is just how to deal with unknowns. Furthermore the nonlinearity of grad (h K grad h) has to be dealt properly (better use Newton-Raphson) for the solution accuracy.
Member

### wenqing commented Aug 1, 2019 • edited

 I have checked that the implementation of the unconfined equation is correct with the Picard non-linear solver. As discussed that there should be explanation in the documentation of DupuitPermeability that DupuitPermeability provides h *K for unconfined flow equation, and its name is meaningless for such case.

### TomFischer and others added some commits Jul 31, 2019

 [Material] Remove member of Permeability class. 
 bae0199 
 Permeability; Return matrix by value. 
This avoids the mutable member. The data is computed
on every call anyway.
 f003c3c 

Member Author

### TomFischer commented Aug 2, 2019

 @wenqing Please, could you check the changed documentation of DupuitPermeability class.

### wenqing approved these changes Aug 2, 2019

 { /// The purpose of the class DupuitPermeability is the implementation of the /// special diffusion coefficient \f$h K(h)\f$, where \f$h\f$ is the hydraulic /// head and \f$K\f$ is the hydraulic conductivity. The diffusion coefficient is

#### wenqing Aug 2, 2019 • edited by TomFischer

Member

... the hydraulic head and ... -->... the hydraulic head of the previous non-linear iteration and ... ✔️

### TomFischer and others added some commits Oct 7, 2018

 Dupuit first version. 
 2e4361d 
 [T] Simple Dupuit test example. 
 3315b6d 
 [T] Tests for Dupuit implementation. 
 193a2ba 
 [PL] Enable arbitrary perm. laws in LiquidFlow. 
 ebd443d 
 [web] Documentation for the Dupuit implementation. 
 a7960cd 
 [T] Enable BC_BC Dupuit test. 
 d8fb279 
 [T] Enable BC_BC_RECHARGE Dupuit test. 
 790efb6 
 [T] Enable BC_BC_RECHARGE2 Dupuit test. 
 d0efe27 
 [T] Enable BC_BC_STORAGE Dupuit test. 
 6ca337f 
 [Material] Improve getValue() documentation. 
 6860313 

### TomFischer merged commit 8800c64 into ufz:master Aug 2, 2019 1 of 3 checks passed

#### 1 of 3 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
ufz.ogs in progress
Details