MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
hgeoutilmodule Module Reference

General-purpose hydrogeologic functions.

Functions/Subroutines

real(dp) function, public hyeff (k11, k22, k33, ang1, ang2, ang3, vg1, vg2, vg3, iavgmeth)
 Calculate the effective horizontal hydraulic conductivity from an ellipse using a specified direction (unit vector vg1, vg2, vg3) More...
 

Function/Subroutine Documentation

◆ hyeff()

real(dp) function, public hgeoutilmodule::hyeff ( real(dp), intent(in)  k11,
real(dp), intent(in)  k22,
real(dp), intent(in)  k33,
real(dp), intent(in)  ang1,
real(dp), intent(in)  ang2,
real(dp), intent(in)  ang3,
real(dp), intent(in)  vg1,
real(dp), intent(in)  vg2,
real(dp), intent(in)  vg3,
integer(i4b), intent(in)  iavgmeth 
)

k11 is the hydraulic conductivity of the major ellipse axis k22 is the hydraulic conductivity of first minor axis k33 is the hydraulic conductivity of the second minor axis ang1 is the counter-clockwise rotation (radians) of the ellipse in the (x, y) plane ang2 is the rotation of the conductivity ellipsoid upward or downward from the (x, y) plane ang3 is the rotation of the conductivity ellipsoid about the major axis vg1, vg2, and vg3 are the components of a unit vector in model coordinates in the direction of the connection between cell n and m iavgmeth is the averaging method. If zero, then use harmonic averaging. if one, then use arithmetic averaging.

Definition at line 29 of file HGeoUtil.f90.

31  ! -- return
32  real(DP) :: K
33  ! -- dummy
34  real(DP), intent(in) :: k11
35  real(DP), intent(in) :: k22
36  real(DP), intent(in) :: k33
37  real(DP), intent(in) :: ang1
38  real(DP), intent(in) :: ang2
39  real(DP), intent(in) :: ang3
40  real(DP), intent(in) :: vg1
41  real(DP), intent(in) :: vg2
42  real(DP), intent(in) :: vg3
43  integer(I4B), intent(in) :: iavgmeth
44  ! -- local
45  real(DP) :: s1, s2, s3, c1, c2, c3
46  real(DP), dimension(3, 3) :: r
47  real(DP) :: ve1, ve2, ve3
48  real(DP) :: denom, dnum, d1, d2, d3
49  !
50  ! -- Sin and cos of angles
51  s1 = sin(ang1)
52  c1 = cos(ang1)
53  s2 = sin(ang2)
54  c2 = cos(ang2)
55  s3 = sin(ang3)
56  c3 = cos(ang3)
57  !
58  ! -- Rotation matrix
59  r(1, 1) = c1 * c2
60  r(1, 2) = c1 * s2 * s3 - s1 * c3
61  r(1, 3) = -c1 * s2 * c3 - s1 * s3
62  r(2, 1) = s1 * c2
63  r(2, 2) = s1 * s2 * s3 + c1 * c3
64  r(2, 3) = -s1 * s2 * c3 + c1 * s3
65  r(3, 1) = s2
66  r(3, 2) = -c2 * s3
67  r(3, 3) = c2 * c3
68  !
69  ! -- Unit vector in direction of n-m connection in a local coordinate
70  ! system aligned with the ellipse axes
71  ve1 = r(1, 1) * vg1 + r(2, 1) * vg2 + r(3, 1) * vg3
72  ve2 = r(1, 2) * vg1 + r(2, 2) * vg2 + r(3, 2) * vg3
73  ve3 = r(1, 3) * vg1 + r(2, 3) * vg2 + r(3, 3) * vg3
74  !
75  ! -- Effective hydraulic conductivity calculated using harmonic (1)
76  ! or arithmetic (2) weighting
77  k = dzero
78  if (iavgmeth == 0) then
79  !
80  ! -- Arithmetic weighting. If principal direction corresponds exactly with
81  ! unit vector then set to principal direction. Otherwise weight it.
82  dnum = done
83  d1 = ve1**2
84  d2 = ve2**2
85  d3 = ve3**2
86  if (ve1 /= dzero) then
87  dnum = dnum * k11
88  d2 = d2 * k11
89  d3 = d3 * k11
90  end if
91  if (ve2 /= dzero) then
92  dnum = dnum * k22
93  d1 = d1 * k22
94  d3 = d3 * k22
95  end if
96  if (ve3 /= dzero) then
97  dnum = dnum * k33
98  d1 = d1 * k33
99  d2 = d2 * k33
100  end if
101  denom = d1 + d2 + d3
102  if (denom > dzero) k = dnum / denom
103  else if (iavgmeth == 1) then
104  ! -- arithmetic
105  k = ve1**2 * k11 + ve2**2 * k22 + ve3**2 * k33
106  end if
107 
Here is the caller graph for this function: