OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_ebcs.F File Reference
#include "implicit_f.inc"
#include "units_c.inc"
#include "com04_c.inc"
#include "titr_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine read_ebcs (igrsurf, multi_fvm, npc1, lsubmodel, ebcs_tab, n2d)

Function/Subroutine Documentation

◆ read_ebcs()

subroutine read_ebcs ( type (surf_), dimension(nsurf), intent(in), target igrsurf,
type (multi_fvm_struct), intent(inout) multi_fvm,
integer, intent(in) npc1,
type(submodel_data), dimension(nsubmod) lsubmodel,
type(t_ebcs_tab), intent(inout) ebcs_tab,
integer, intent(in) n2d )

Definition at line 57 of file read_ebcs.F.

58C-----------------------------------------------
59C M o d u l e s
60C-----------------------------------------------
61 USE front_mod
62 USE unitab_mod
63 USE message_mod
64 USE multi_fvm_mod
65 USE groupdef_mod
66 USE restmod
67 USE table_mod
68 USE submodel_mod
69 USE ale_ebcs_mod
70 USE ebcs_mod
73 use hm_read_ebcs_propellant_mod, only : hm_read_ebcs_propellant
74 use hm_read_ebcs_cyclic_mod, only : hm_read_ebcs_cyclic
75C-----------------------------------------------
76C I m p l i c i t T y p e s
77C-----------------------------------------------
78#include "implicit_f.inc"
79C-----------------------------------------------
80C C o m m o n B l o c k s
81C-----------------------------------------------
82#include "units_c.inc"
83#include "com04_c.inc"
84#include "titr_c.inc"
85C-----------------------------------------------
86C D u m m y A r g u m e n t s
87C-----------------------------------------------
88 TYPE (SURF_), DIMENSION(NSURF), TARGET, INTENT(IN) :: IGRSURF
89 TYPE (MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
90 INTEGER, INTENT(IN) :: NPC1
91 TYPE(SUBMODEL_DATA) LSUBMODEL(NSUBMOD)
92 TYPE(T_EBCS_TAB), INTENT(INOUT) :: EBCS_TAB
93 INTEGER,INTENT(IN) :: N2D
94C-----------------------------------------------
95C L o c a l V a r i a b l e s
96C-----------------------------------------------
97 INTEGER :: LOCAL_ID
98 INTEGER :: ID,TYP,UID,SURF_ID2
99 INTEGER :: II, SURF_ID, JJ, SUB_INDEX
100 CHARACTER(LEN=NCHARTITLE) :: TITR
101 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
102 LOGICAL :: IS_AVAILABLE, IS_EBCS_PARALLEL
103C-----------------------------------------------
104C S o u r c e L i n e s
105C-----------------------------------------------
106
107 IF (nebcs > 0) THEN
108 WRITE(iout,1000)
109 WRITE(istdo,'(A)')titre(69)
110 CALL ebcs_tab%CREATE(nebcs) ! Create structure for collecting ebcs
111 CALL hm_option_start('/EBCS') ! Prepare data structures
112 ENDIF
113
114
115 DO ii = 1, nebcs
116 local_id = ii
117 CALL hm_option_read_key(lsubmodel, option_id = id, unit_id = uid, option_titr = titr,
118 . keyword2 = key, keyword3 = key2, submodel_index = sub_index)
119! Allocate type
120 SELECT CASE(key(1:len_trim(key)))
121 CASE ('GRADP0')
122
123 typ = 0
124 allocate (t_ebcs_gradp0 :: ebcs_tab%tab(ii)%poly)
125 select type (twf => ebcs_tab%tab(ii)%poly)
126 type is (t_ebcs_gradp0)
127 CALL hm_read_ebcs_gradp0(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
128 end select
129
130 CASE ('PRES')
131
132 typ = 1
133 allocate (t_ebcs_pres :: ebcs_tab%tab(ii)%poly)
134 select type (twf => ebcs_tab%tab(ii)%poly)
135 type is (t_ebcs_pres)
136 CALL hm_read_ebcs_pres(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
137 end select
138
139 CASE ('VALVIN')
140
141 typ = 2
142 allocate (t_ebcs_valvin :: ebcs_tab%tab(ii)%poly)
143 select type (twf => ebcs_tab%tab(ii)%poly)
144 type is (t_ebcs_valvin)
145 CALL hm_read_ebcs_valvin(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
146 end select
147
148 CASE ('VALVOUT')
149
150 typ = 3
151 allocate (t_ebcs_valvout :: ebcs_tab%tab(ii)%poly)
152 select type (twf => ebcs_tab%tab(ii)%poly)
153 type is (t_ebcs_valvout)
154 CALL hm_read_ebcs_valvout( igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
155 end select
156
157 CASE ('VEL')
158
159 typ = 4
160 allocate (t_ebcs_vel :: ebcs_tab%tab(ii)%poly)
161 select type (twf => ebcs_tab%tab(ii)%poly)
162 type is (t_ebcs_vel)
163 CALL hm_read_ebcs_vel(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
164 end select
165
166 CASE ('NORMV')
167
168 typ = 5
169 allocate (t_ebcs_normv :: ebcs_tab%tab(ii)%poly)
170 select type (twf => ebcs_tab%tab(ii)%poly)
171
172 type is (t_ebcs_normv)
173 CALL hm_read_ebcs_normv( igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
174 end select
175
176 CASE ('INIP')
177
178 typ = 6
179 allocate (t_ebcs_inip :: ebcs_tab%tab(ii)%poly)
180 select type (twf => ebcs_tab%tab(ii)%poly)
181 type is (t_ebcs_inip)
182 CALL hm_read_ebcs_inip(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, twf)
183 end select
184
185 CASE ('INIV')
186
187 typ = 7
188 allocate (t_ebcs_iniv :: ebcs_tab%tab(ii)%poly)
189 select type (twf => ebcs_tab%tab(ii)%poly)
190 type is (t_ebcs_iniv)
191 CALL hm_read_ebcs_iniv(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, twf)
192 end select
193
194 CASE ('INLET')
195
196 typ = 8
197 allocate (t_ebcs_inlet :: ebcs_tab%tab(ii)%poly)
198 select type (twf => ebcs_tab%tab(ii)%poly)
199 type is (t_ebcs_inlet)
200 CALL hm_read_ebcs_inlet(igrsurf, npc1, multi_fvm, unitab, id, titr, uid, lsubmodel, key2, sub_index, twf)
201 end select
202
203 CASE ('FLUXOUT')
204
205 typ = 9
206 allocate (t_ebcs_fluxout :: ebcs_tab%tab(ii)%poly)
207 select type (twf => ebcs_tab%tab(ii)%poly)
208 type is (t_ebcs_fluxout)
209 CALL hm_read_ebcs_fluxout(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, twf)
210 end select
211
212 CASE ('NRF')
213
214 typ = 10
215 allocate (t_ebcs_nrf :: ebcs_tab%tab(ii)%poly)
216 select type (twf => ebcs_tab%tab(ii)%poly)
217 type is (t_ebcs_nrf)
218 CALL hm_read_ebcs_nrf(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, twf)
219 end select
220
221 CASE ('PROPELLANT')
222
223 typ = 11
224 allocate (t_ebcs_propellant :: ebcs_tab%tab(ii)%poly)
225 select type (twf => ebcs_tab%tab(ii)%poly)
226 type is (t_ebcs_propellant)
227 CALL hm_read_ebcs_propellant(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel,nsurf, twf)
228 end select
229
230 CASE ('CYCLIC')
231
232 typ = 12
233 allocate (t_ebcs_cyclic :: ebcs_tab%tab(ii)%poly)
234 select type (twf => ebcs_tab%tab(ii)%poly)
235 type is (t_ebcs_cyclic)
236 CALL hm_read_ebcs_cyclic(igrsurf, multi_fvm, id, titr, lsubmodel,nsurf, twf, n2d, numnod, itab )
237 end select
238
239 CASE ('MONVOL')
240
241 typ = 100
242 allocate (t_ebcs_monvol :: ebcs_tab%tab(ii)%poly)
243 select type (twf => ebcs_tab%tab(ii)%poly)
244 type is (t_ebcs_monvol)
245 CALL hm_read_ebcs_monvol(igrsurf,multi_fvm,unitab, id, titr, uid, lsubmodel, twf)
246 end select
247
248 CASE DEFAULT
249 typ = 0
250 CALL ancmsg(msgid = 1602, msgtype = msgerror, anmode = aninfo,
251 . i1 = id, c1 = trim(titr), c2 = "\'"//trim(key)//"\'"//" IS NOT A VALID KEYWORD FOR EBCS OPTIONS")
252 END SELECT
253
254 ebcs_tab%tab(ii)%poly%type = typ
255 ebcs_tab%tab(ii)%poly%ebcs_id = id
256 ! Get surface ID
257 CALL hm_get_intv('entityid', surf_id, is_available, lsubmodel)
258 jj = -huge(jj)
259 IF (surf_id > 0) THEN
260 ebcs_tab%tab(ii)%poly%surf_id = 0
261 DO jj = 1, nsurf
262 IF (igrsurf(jj)%ID == surf_id) THEN
263 ebcs_tab%tab(ii)%poly%surf_id = jj
264 EXIT
265 ENDIF
266 ENDDO
267 ENDIF
268 IF (ebcs_tab%tab(ii)%poly%surf_id > 0) THEN
269 CALL ebcs_tab%tab(ii)%poly%set_nodes_elems(igrsurf(jj)%NSEG, numnod, igrsurf(jj)%NODES)
270 !secondary surface with EBCS/CYCLIC
271 IF(ebcs_tab%tab(ii)%poly%type == 12)then
272 surf_id2 = ebcs_tab%tab(ii)%poly%surf_id2
273 CALL ebcs_tab%tab(ii)%poly%set_nodes_elems_secondary_surface(igrsurf(surf_id2)%NSEG, numnod, igrsurf(surf_id2)%NODES)
274 endif
275
276 is_ebcs_parallel = .false.
277 IF(ebcs_tab%tab(ii)%poly%type == 10 .OR. ebcs_tab%tab(ii)%poly%type == 11)THEN
278 is_ebcs_parallel = .true.
279 ENDIF
280
281 IF(.NOT. is_ebcs_parallel) THEN
282 DO jj = 1, ebcs_tab%tab(ii)%poly%nb_node
283 CALL ifrontplus(ebcs_tab%tab(ii)%poly%node_list(jj), 1)
284 ENDDO
285 ENDIF
286
287 DO jj = 1, ebcs_tab%tab(ii)%poly%nb_node
288 flagkin(ebcs_tab%tab(ii)%poly%node_list(jj)) = 1
289 ENDDO
290
291 ELSE
292 ! error
293 ENDIF
294
295 ENDDO
296
297 RETURN
298 1000 FORMAT(
299 & 5x,' ELEMENTARY BOUNDARY CONDITIONS'/,
300 & 5x,' ------------------------------')
subroutine ifrontplus(n, p)
Definition frontplus.F:101
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)
initmumps id
integer nebcs
integer, dimension(:), allocatable flagkin
Definition front_mod.F:105
integer, parameter nchartitle
integer, parameter ncharkey
type(unit_type_) unitab
integer, dimension(:), allocatable itab
Definition restart_mod.F:60
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)
Definition message.F:895