740
743
744 class(GwtDspType) :: this
745
746 integer(I4B) :: nodes, n, m, idiag, ipos
747 real(DP) :: clnm, clmn, dn, dm
748 real(DP) :: vg1, vg2, vg3
749 integer(I4B) :: ihc, isympos
750 integer(I4B) :: iavgmeth
751 real(DP) :: satn, satm, topn, topm, botn, botm
752 real(DP) :: hwva, cond, cn, cm, denom
753 real(DP) :: anm, amn, thksatn, thksatm
754
755
756 iavgmeth = 1
757
758
759 nodes = size(this%d11)
760 do n = 1, nodes
761 if (this%fmi%ibdgwfsat0(n) == 0) cycle
762 idiag = this%dis%con%ia(n)
763 do ipos = this%dis%con%ia(n) + 1, this%dis%con%ia(n + 1) - 1
764
765
766 m = this%dis%con%ja(ipos)
767
768
769 if (m < n) cycle
770 isympos = this%dis%con%jas(ipos)
771 this%dispcoef(isympos) = dzero
772 if (this%fmi%ibdgwfsat0(m) == 0) cycle
773
774
775 hwva = this%dis%con%hwva(isympos)
776 clnm = this%dis%con%cl1(isympos)
777 clmn = this%dis%con%cl2(isympos)
778 ihc = this%dis%con%ihc(isympos)
779 topn = this%dis%top(n)
780 topm = this%dis%top(m)
781 botn = this%dis%bot(n)
782 botm = this%dis%bot(m)
783
784
785 satn = this%fmi%gwfsat(n)
786 satm = this%fmi%gwfsat(m)
787
788
789
790
791 call this%dis%connection_normal(n, m, ihc, vg1, vg2, vg3, ipos)
792 dn =
hyeff(this%d11(n), this%d22(n), this%d33(n), &
793 this%angle1(n), this%angle2(n), this%angle3(n), &
794 vg1, vg2, vg3, iavgmeth)
795 dm =
hyeff(this%d11(m), this%d22(m), this%d33(m), &
796 this%angle1(m), this%angle2(m), this%angle3(m), &
797 vg1, vg2, vg3, iavgmeth)
798
799
800
801 if (ihc == 0) then
802 clnm = satn * (topn - botn) * dhalf
803 clmn = satm * (topm - botm) * dhalf
804 anm = hwva
805
806
807 if (satn == dzero) then
808 anm = dzero
809 else if (n > m .and. satn < done) then
810 anm = dzero
811 end if
812
813
814 if (satm == dzero) then
815 anm = dzero
816 else if (m > n .and. satm < done) then
817 anm = dzero
818 end if
819
820
821 amn = anm
822
823 else
824
825
826
827
828 if (ihc == 2) then
831 else
832 thksatn = (topn - botn) * satn
833 thksatm = (topm - botm) * satm
834 end if
835
836
837 anm = thksatn * hwva
838 amn = thksatm * hwva
839
840
841 if (satn == dzero .or. satm == dzero) then
842 anm = dzero
843 amn = dzero
844 end if
845
846 end if
847
848
849 cn = dzero
850 if (clnm > dzero) cn = dn * anm / clnm
851 cm = dzero
852 if (clmn > dzero) cm = dm * amn / clmn
853 denom = cn + cm
854 if (denom > dzero) then
855 cond = cn * cm / denom
856 else
857 cond = dzero
858 end if
859
860
861 this%dispcoef(isympos) = cond
862
863 end do
864 end do
This module contains stateless conductance functions.
real(dp) function, public staggered_thkfrac(top, bot, sat, topc, botc)
Calculate the thickness fraction for staggered grids.
General-purpose hydrogeologic functions.
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...