50
51
52
58
59
60
61#include "implicit_f.inc"
62
63
64
65
66#include "com04_c.inc"
67
68
69#include "param_c.inc"
70
71#include "units_c.inc"
72
73
74
75 TYPE(UNIT_TYPE_), INTENT(IN) :: UNITAB
76 INTEGER, INTENT(IN) :: LUID
77 INTEGER, INTENT(IN) :: ITAB(*), IXC(NIXC, *), IXTG(NIXTG, *)
78 my_real,
INTENT(IN) :: x(3, *), geo(npropg, *), pm(npropm, *)
79 TYPE (SURF_), INTENT(INOUT), DIMENSION(NSURF) :: IGRSURF
80 TYPE(MONVOL_STRUCT_), INTENT(INOUT) :: T_MONVOLN
81 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
82
83
84
85 INTEGER :: II
86 INTEGER :: SURFID
87 my_real :: fac_m, fac_l, fac_t, fac_c
88 my_real :: scal_t, scal_p, scal_s, scal_a, scal_d
89 LOGICAL :: FOUND
90 my_real :: sa, rot, vol, vmin, veps, amu, sv
91 LOGICAL :: IS_AVAILABLE
92
93
94
95
96 is_available = .false.
97
98
99
100
101 CALL hm_get_intv(
'surf_IDex', surfid, is_available, lsubmodel)
102
103
104
105
106 t_monvoln%IVOLU(4) = 0
107 found = .false.
108 DO ii = 1, nsurf
109 IF (surfid == igrsurf(ii)%ID) THEN
110 t_monvoln%IVOLU(4) = ii
111 t_monvoln%EXT_SURFID = ii
112 found = .true.
113 EXIT
114 ENDIF
115 ENDDO
116 IF (.NOT. found) THEN
118 ELSEIF (igrsurf(t_monvoln%IVOLU(4))%ISH4N3N == 0) THEN
119 CALL ancmsg(msgid = 18, anmode = aninfo, msgtype = msgerror,
120 . i1 = t_monvoln%ID, c1 = t_monvoln%TITLE, i2 = surfid)
122 ENDIF
123
124
126
128 . igrsurf(t_monvoln%EXT_SURFID),ixc, ixtg, x, 1)
129
130 CALL monvol_compute_volume(t_monvoln, t_monvoln%TITLE, t_monvoln%IVOLU, igrsurf(t_monvoln%EXT_SURFID),
131 . itab, x, pm, geo, ixc, ixtg,
132 . sa, rot, vol, vmin, veps, sv)
133
135 . igrsurf(t_monvoln%EXT_SURFID),ixc,ixtg,vol, x, 1)
136
137
138
139
140 fac_m = unitab%FAC_M(luid)
141 fac_l = unitab%FAC_L(luid)
142 fac_t = unitab%FAC_T(luid)
143 fac_c = fac_m / (fac_l * fac_t * fac_t)
144
145
146 scal_t = one * fac_t
147 scal_p = one * fac_c
148 scal_s = one * fac_l * fac_l
149 scal_a = one
150 scal_d = one * fac_l
151
152
153
154
155 t_monvoln%RVOLU(26) = one / scal_t
156 t_monvoln%RVOLU(27) = one / scal_p
157 t_monvoln%RVOLU(28) = one / scal_s
158 t_monvoln%RVOLU(29) = one / scal_a
159 t_monvoln%RVOLU(30) = one / scal_d
160
161 amu = zero
162 t_monvoln%RVOLU(2) = amu
163 t_monvoln%RVOLU(16) = vol + veps
164 t_monvoln%RVOLU(18) = sa
165 t_monvoln%RVOLU(21) = rot
166 t_monvoln%RVOLU(22:24) = zero
167
168
169
170
171 WRITE(iout, 1005) surfid
172 WRITE(iout, 1003) scal_t, scal_p, scal_s, scal_a, scal_d
173 WRITE(iout, 1002) sa, sv, vol
174
175
176
177
178 RETURN
179 1002 FORMAT(
180 . /5x,'INITIAL SURFACE OF MONITORED VOLUME . .=',1pg20.13,
181 . /5x,'SURFACE ERROR(NE.0 FOR NON CLOSED SURF)=',1pg20.13,
182 . /5x,'INITIAL VOLUME OF MONITORED VOLUME. . .=',1pg20.13)
183 1003 FORMAT(
184 . 5x,'UNIT SCALE FOR TIME FUNCTIONS =',1pg20.13,
185 . /5x,'UNIT SCALE FOR PRESSURE FUNCTIONS =',1pg20.13,
186 . /5x,'UNIT SCALE FOR AREA FUNCTIONS =',1pg20.13,
187 . /5x,'UNIT SCALE FOR ANGLE FUNCTIONS =',1pg20.13,
188 . /5x,'UNIT SCALE FOR DISTANCE FUNCTIONS =',1pg20.13)
189 1005 FORMAT( 5x,'EXTERNAL SURFACE ID . . . . . . . . . .=',i10)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine monvol_compute_volume(t_monvoln, title, ivolu, surf, itab, node_coord, pm, geo, ixc, ixtg, sa, rot, vol, vmin, veps, sv)
subroutine monvol_check_surfclose(t_monvoln, itab, surf, x)
subroutine monvol_orient_surf(t_monvoln, title, ivolu, itab, surf, ixc, ixtg, x, itype)
subroutine monvol_reverse_normals(t_monvoln, title, ivolu, itab, surf, ixc, ixtg, vol, x, itype)
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)