26 propsedge, vcomp, vmag, flowareaja)
30 real(dp),
intent(in),
dimension(:) :: flowja
31 integer(I4B),
intent(in),
optional :: nedges
32 integer(I4B),
dimension(:),
intent(in),
optional :: nodedge
33 real(dp),
dimension(:, :),
intent(in),
optional :: propsedge
34 real(dp),
dimension(:, :),
intent(inout),
optional :: vcomp
35 real(dp),
dimension(:),
intent(inout),
optional :: vmag
36 real(dp),
intent(in),
dimension(:),
optional :: flowareaja
41 integer(I4B) :: isympos
67 real(dp),
allocatable,
dimension(:) :: vi
68 real(dp),
allocatable,
dimension(:) :: di
69 real(dp),
allocatable,
dimension(:) :: viz
70 real(dp),
allocatable,
dimension(:) :: diz
71 real(dp),
allocatable,
dimension(:) :: nix
72 real(dp),
allocatable,
dimension(:) :: niy
73 real(dp),
allocatable,
dimension(:) :: wix
74 real(dp),
allocatable,
dimension(:) :: wiy
75 real(dp),
allocatable,
dimension(:) :: wiz
76 real(dp),
allocatable,
dimension(:) :: bix
77 real(dp),
allocatable,
dimension(:) :: biy
78 logical :: nozee = .true.
93 ic = dis%con%ia(n + 1) - dis%con%ia(n) - 1
96 if (
present(nedges))
then
98 if (nodedge(m) == n)
then
134 do ipos = dis%con%ia(n) + 1, dis%con%ia(n + 1) - 1
136 isympos = dis%con%jas(ipos)
141 call dis%connection_normal(n, m, ihc, xn, yn, zn, ipos)
145 call dis%connection_vector(n, m, nozee,
done,
done, &
146 ihc, xc, yc, zc, dltot)
150 cl1 = dis%con%cl1(isympos)
151 cl2 = dis%con%cl2(isympos)
153 cl1 = dis%con%cl2(isympos)
154 cl2 = dis%con%cl1(isympos)
158 ooclsum =
done / (cl1 + cl2)
161 di(ic) = dltot * cl1 * ooclsum
170 if (
present(flowareaja))
then
171 area = flowareaja(isympos)
172 if (area >
dzero)
then
173 vi(ic) = vi(ic) / area
183 if (
present(nedges))
then
185 if (nodedge(m) == n)
then
187 nix(ic) = -propsedge(3, m)
188 niy(ic) = -propsedge(4, m)
189 di(ic) = propsedge(5, m)
190 vi(ic) = propsedge(1, m)
191 if (
present(flowareaja))
then
192 area = propsedge(2, m)
193 if (area >
dzero)
then
194 vi(ic) = vi(ic) / area
212 wix(ic) = di(ic) * abs(nix(ic))
213 wiy(ic) = di(ic) * abs(niy(ic))
214 dsumx = dsumx + wix(ic)
215 dsumy = dsumy + wiy(ic)
222 dsumx = dsumx +
dem10 * dsumx
223 dsumy = dsumy +
dem10 * dsumy
225 wix(ic) = (dsumx - wix(ic)) * abs(nix(ic))
226 wiy(ic) = (dsumy - wiy(ic)) * abs(niy(ic))
233 bix(ic) = wix(ic) * sign(
done, nix(ic))
234 biy(ic) = wiy(ic) * sign(
done, niy(ic))
235 dsumx = dsumx + wix(ic) * abs(nix(ic))
236 dsumy = dsumy + wiy(ic) * abs(niy(ic))
243 bix(ic) = bix(ic) * dsumx
244 biy(ic) = biy(ic) * dsumy
245 axy = axy + bix(ic) * niy(ic)
246 ayx = ayx + biy(ic) * nix(ic)
259 vx = vx + (bix(ic) - axy * biy(ic)) * vi(ic)
260 vy = vy + (biy(ic) - ayx * bix(ic)) * vi(ic)
262 denom =
done - axy * ayx
263 if (denom /=
dzero)
then
269 if (
present(vcomp))
then
276 if (
present(vmag))
then
277 vmag(n) = sqrt(vx**2 + vy**2 + vz**2)
This module contains simulation constants.
real(dp), parameter dem10
real constant 1e-10
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
This module defines variable data types.
subroutine, public vector_interpolation_2d(dis, flowja, nedges, nodedge, propsedge, vcomp, vmag, flowareaja)
Interpolate 2D vector components at cell center.