55
56
57
61 USE multi_fvm_mod
67 USE ebcs_mod
70
71
72
73#include "implicit_f.inc"
74
75
76
77#include "units_c.inc"
78#include "com04_c.inc"
79#include "titr_c.inc"
80
81
82
83 TYPE (SURF_), DIMENSION(NSURF), TARGET, INTENT(IN) :: IGRSURF
84 TYPE (MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
85 INTEGER, INTENT(IN) :: NPC1
86 TYPE(SUBMODEL_DATA) LSUBMODEL(NSUBMOD)
87 TYPE(T_EBCS_TAB), INTENT(INOUT) :: EBCS_TAB
88
89
90
91 INTEGER :: LOCAL_ID
92 INTEGER :: ID,TYP,UID
93 INTEGER :: II, SURF_ID, JJ, SUB_INDEX
94 CHARACTER(LEN=NCHARTITLE) :: TITR
95 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
96 LOGICAL :: IS_AVAILABLE, IS_EBCS_PARALLEL
97
98
99
100
102 WRITE(iout,1000)
103 WRITE(istdo,'(A)')titre(69)
104 CALL ebcs_tab%CREATE(
nebcs)
106 ENDIF
107
108
110 local_id = ii
112 . keyword2 = key, keyword3 = key2, submodel_index = sub_index)
113
114 SELECT CASE(key(1:len_trim(key)))
115 CASE ('GRADP0')
116
117 typ = 0
118 allocate (t_ebcs_gradp0 :: ebcs_tab%tab(ii)%poly)
119 select type (twf => ebcs_tab%tab(ii)%poly)
120 type is (t_ebcs_gradp0)
122 end select
123
124 CASE ('PRES')
125
126 typ = 1
127 allocate (t_ebcs_pres :: ebcs_tab%tab(ii)%poly)
128 select type (twf => ebcs_tab%tab(ii)%poly)
129 type is (t_ebcs_pres)
131 end select
132
133 CASE ('VALVIN')
134
135 typ = 2
136 allocate (t_ebcs_valvin :: ebcs_tab%tab(ii)%poly)
137 select type (twf => ebcs_tab%tab(ii)%poly)
138 type is (t_ebcs_valvin)
140 end select
141
142 CASE ('VALVOUT')
143
144 typ = 3
145 allocate (t_ebcs_valvout :: ebcs_tab%tab(ii)%poly)
146 select type (twf => ebcs_tab%tab(ii)%poly)
147 type is (t_ebcs_valvout)
149 end select
150
151 CASE ('VEL')
152
153 typ = 4
154 allocate (t_ebcs_vel :: ebcs_tab%tab(ii)%poly)
155 select type (twf => ebcs_tab%tab(ii)%poly)
156 type is (t_ebcs_vel)
158 end select
159
160 CASE ('NORMV')
161
162 typ = 5
163 allocate (t_ebcs_normv :: ebcs_tab%tab(ii)%poly)
164 select type (twf => ebcs_tab%tab(ii)%poly)
165
166 type is (t_ebcs_normv)
168 end select
169
170 CASE ('INIP')
171
172 typ = 6
173 allocate (t_ebcs_inip :: ebcs_tab%tab(ii)%poly)
174 select type (twf => ebcs_tab%tab(ii)%poly)
175 type is (t_ebcs_inip)
177 end select
178
179 CASE ('INIV')
180
181 typ = 7
182 allocate (t_ebcs_iniv :: ebcs_tab%tab(ii)%poly)
183 select type (twf => ebcs_tab%tab(ii)%poly)
184 type is (t_ebcs_iniv)
186 end select
187
188 CASE ('INLET')
189
190 typ = 8
191 allocate (t_ebcs_inlet :: ebcs_tab%tab(ii)%poly)
192 select type (twf => ebcs_tab%tab(ii)%poly)
193 type is (t_ebcs_inlet)
194 CALL hm_read_ebcs_inlet(igrsurf, npc1, multi_fvm,
unitab,
id, titr, uid, lsubmodel, key2, sub_index, twf)
195 end select
196
197 CASE ('FLUXOUT')
198
199 typ = 9
200 allocate (t_ebcs_fluxout :: ebcs_tab%tab(ii)%poly)
201 select type (twf => ebcs_tab%tab(ii)%poly)
202 type is (t_ebcs_fluxout)
204 end select
205
206 CASE ('NRF')
207
208 typ = 10
209 allocate (t_ebcs_nrf :: ebcs_tab%tab(ii)%poly)
210 select type (twf => ebcs_tab%tab(ii)%poly)
211 type is (t_ebcs_nrf)
213 end select
214
215 CASE ('PROPELLANT')
216
217 typ = 11
218 allocate (t_ebcs_propellant :: ebcs_tab%tab(ii)%poly)
219 select type (twf => ebcs_tab%tab(ii)%poly)
220 type is (t_ebcs_propellant)
221 CALL hm_read_ebcs_propellant(igrsurf, multi_fvm,
unitab,
id, titr, uid, lsubmodel,nsurf, twf)
222 end select
223
224 CASE ('MONVOL')
225
226 typ = 100
227 allocate (t_ebcs_monvol :: ebcs_tab%tab(ii)%poly)
228 select type (twf => ebcs_tab%tab(ii)%poly)
229 type is (t_ebcs_monvol)
231 end select
232
233 CASE DEFAULT
234 typ = 0
235 CALL ancmsg(msgid = 1602, msgtype = msgerror, anmode = aninfo,
236 . i1 =
id, c1 = trim(titr), c2 =
"\'"//trim(key)//
"\'"//
" IS NOT A VALID KEYWORD FOR EBCS OPTIONS")
237 END SELECT
238
239 ebcs_tab%tab(ii)%poly%type = typ
240 ebcs_tab%tab(ii)%poly%ebcs_id =
id
241
242 CALL hm_get_intv(
'entityid', surf_id, is_available, lsubmodel)
243 jj = -huge(jj)
244 IF (surf_id > 0) THEN
245 ebcs_tab%tab(ii)%poly%surf_id = 0
246 DO jj = 1, nsurf
247 IF (igrsurf(jj)%ID == surf_id) THEN
248 ebcs_tab%tab(ii)%poly%surf_id = jj
249 EXIT
250 ENDIF
251 ENDDO
252 ENDIF
253 IF (ebcs_tab%tab(ii)%poly%surf_id > 0) THEN
254 CALL ebcs_tab%tab(ii)%poly%set_nodes_elems(igrsurf(jj)%NSEG, numnod, igrsurf(jj)%NODES)
255
256 is_ebcs_parallel = .false.
257 IF(ebcs_tab%tab(ii)%poly%type == 10 .OR. ebcs_tab%tab(ii)%poly%type == 11)THEN
258 is_ebcs_parallel = .true.
259 ENDIF
260
261 IF(.NOT. is_ebcs_parallel) THEN
262 DO jj = 1, ebcs_tab%tab(ii)%poly%nb_node
263 CALL ifrontplus(ebcs_tab%tab(ii)%poly%node_list(jj), 1)
264 ENDDO
265 ENDIF
266
267 DO jj = 1, ebcs_tab%tab(ii)%poly%nb_node
268 flagkin(ebcs_tab%tab(ii)%poly%node_list(jj)) = 1
269 ENDDO
270
271 ELSE
272
273 ENDIF
274
275 ENDDO
276
277 RETURN
278 1000 FORMAT(
279 & 5x,' ELEMENTARY BOUNDARY CONDITIONS'
280 & 5x,' ------------------------------')
subroutine ifrontplus(n, p)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
subroutine hm_read_ebcs_fluxout(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, ebcs)
subroutine hm_read_ebcs_gradp0(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_inip(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_iniv(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_inlet(igrsurf, npc, multi_fvm, unitab, id, titr, uid, lsubmodel, key2, sub_index, ebcs)
subroutine hm_read_ebcs_monvol(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, ebcs)
subroutine hm_read_ebcs_normv(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_nrf(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, ebcs)
subroutine hm_read_ebcs_pres(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_valvin(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_valvout(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
subroutine hm_read_ebcs_vel(igrsurf, npc, multi_fvm, unitab, id, titr, lsubmodel, ebcs)
integer, dimension(:), allocatable flagkin
integer, parameter nchartitle
integer, parameter ncharkey
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)