OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_ebcs.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| read_ebcs ../starter/source/boundary_conditions/ebcs/read_ebcs.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
30!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
31!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
32!|| hm_read_ebcs_fluxout ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_fluxout.F
33!|| hm_read_ebcs_gradp0 ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_gradp0.F
34!|| hm_read_ebcs_inip ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_inip.F
35!|| hm_read_ebcs_iniv ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_iniv.F
36!|| hm_read_ebcs_inlet ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_inlet.F
37!|| hm_read_ebcs_monvol ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_monvol.F
38!|| hm_read_ebcs_normv ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_normv.F
39!|| hm_read_ebcs_nrf ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_nrf.F
40!|| hm_read_ebcs_pres ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_pres.F
41!|| hm_read_ebcs_propellant ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_propellant.F90
42!|| hm_read_ebcs_valvin ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_valvin.F
43!|| hm_read_ebcs_valvout ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_valvout.F
44!|| hm_read_ebcs_vel ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_vel.F
45!|| ifrontplus ../starter/source/spmd/node/frontplus.F
46!||--- uses -----------------------------------------------------
47!|| front_mod ../starter/share/modules1/front_mod.F
48!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
49!|| message_mod ../starter/share/message_module/message_mod.F
50!|| restmod ../starter/share/modules1/restart_mod.F
51!|| submodel_mod ../starter/share/modules1/submodel_mod.F
52!|| table_mod ../starter/share/modules1/table_mod.F
53!||====================================================================
54 SUBROUTINE read_ebcs(IGRSURF,MULTI_FVM,NPC1,LSUBMODEL,EBCS_TAB)
55C-----------------------------------------------
56C M o d u l e s
57C-----------------------------------------------
58 USE front_mod
59 USE unitab_mod
60 USE message_mod
61 USE multi_fvm_mod
62 USE groupdef_mod
63 USE restmod
64 USE table_mod
65 USE submodel_mod
66 USE ale_ebcs_mod
67 USE ebcs_mod
70C-----------------------------------------------
71C I m p l i c i t T y p e s
72C-----------------------------------------------
73#include "implicit_f.inc"
74C-----------------------------------------------
75C C o m m o n B l o c k s
76C-----------------------------------------------
77#include "units_c.inc"
78#include "com04_c.inc"
79#include "titr_c.inc"
80C-----------------------------------------------
81C D u m m y A r g u m e n t s
82C-----------------------------------------------
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
88C-----------------------------------------------
89C L o c a l V a r i a b l e s
90C-----------------------------------------------
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
97C-----------------------------------------------
98C S o u r c e L i n e s
99C-----------------------------------------------
100
101 IF (nebcs > 0) THEN
102 WRITE(iout,1000)
103 WRITE(istdo,'(A)')titre(69)
104 CALL ebcs_tab%CREATE(nebcs) ! Create structure for collecting ebcs
105 CALL hm_option_start('/EBCS') ! Prepare data structures
106 ENDIF
107
108
109 DO ii = 1, nebcs
110 local_id = ii
111 CALL hm_option_read_key(lsubmodel, option_id = id, unit_id = uid, option_titr = titr,
112 . keyword2 = key, keyword3 = key2, submodel_index = sub_index)
113! Allocate type
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)
121 CALL hm_read_ebcs_gradp0(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
130 CALL hm_read_ebcs_pres(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
139 CALL hm_read_ebcs_valvin(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
148 CALL hm_read_ebcs_valvout( igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
157 CALL hm_read_ebcs_vel(igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
167 CALL hm_read_ebcs_normv( igrsurf, npc1, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
176 CALL hm_read_ebcs_inip(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
185 CALL hm_read_ebcs_iniv(igrsurf, multi_fvm, unitab, id, titr, lsubmodel, twf)
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)
203 CALL hm_read_ebcs_fluxout(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, twf)
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)
212 CALL hm_read_ebcs_nrf(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, twf)
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)
230 CALL hm_read_ebcs_monvol(igrsurf,multi_fvm,unitab, id, titr, uid, lsubmodel, twf)
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 ! Get surface id
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 ! error
273 ENDIF
274
275 ENDDO
276
277 RETURN
278 1000 FORMAT(
279 & 5x,' ELEMENTARY BOUNDARY CONDITIONS'/,
280 & 5x,' ------------------------------')
281 END SUBROUTINE
subroutine ifrontplus(n, p)
Definition frontplus.F:100
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 nebcs
integer, dimension(:), allocatable flagkin
Definition front_mod.F:105
integer, parameter nchartitle
integer, parameter ncharkey
type(unit_type_) unitab
subroutine read_ebcs(igrsurf, multi_fvm, npc1, lsubmodel, ebcs_tab)
Definition read_ebcs.F:55
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:889