OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_ebcs_monvol.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!|| hm_read_ebcs_monvol ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_monvol.F
25!||--- called by ------------------------------------------------------
26!|| read_ebcs ../starter/source/boundary_conditions/ebcs/read_ebcs.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_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
31!|| ngr2usr ../starter/source/system/nintrr.F
32!||--- uses -----------------------------------------------------
33!|| message_mod ../starter/share/message_module/message_mod.F
34!|| submodel_mod ../starter/share/modules1/submodel_mod.F
35!||====================================================================
36 SUBROUTINE hm_read_ebcs_monvol(IGRSURF,MULTI_FVM, UNITAB, ID, TITR, UID, LSUBMODEL, EBCS)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE unitab_mod
41 USE message_mod
42 USE multi_fvm_mod
43 USE groupdef_mod
44 USE submodel_mod
45 USE ebcs_mod
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "units_c.inc"
55#include "com01_c.inc"
56#include "com04_c.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
61 INTEGER ID,UID
62 TYPE (MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
63 TYPE (SURF_) ,TARGET, DIMENSION(NSURF) :: IGRSURF
64 CHARACTER(LEN=NCHARTITLE), INTENT(IN) :: TITR
65 TYPE(SUBMODEL_DATA) LSUBMODEL(NSUBMOD)
66 TYPE(t_ebcs_monvol), INTENT(INOUT) :: EBCS
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER NGR2USR,ISU,NSEG
71 INTEGER SURF,SENS,MONVOL
72 EXTERNAL ngr2usr
73 LOGICAL IS_AVAILABLE,IS_ENCRYPTED
74 INTEGER, DIMENSION(:), POINTER :: INGR2USR
75 INTEGER IFLAGUNIT,J
76C-----------------------------------------------
77C S o u r c e L i n e s
78C-----------------------------------------------
79
80 ebcs%title = trim(titr)
81
82 iflagunit=0
83 DO j=1,unitab%NUNITS
84 IF (unitab%UNIT_ID(j) == uid) THEN
85 iflagunit = 1
86 EXIT
87 ENDIF
88 ENDDO
89 IF (uid/=0.AND.iflagunit==0) THEN
90 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,
91 . i2=uid,
92 . i1=id,
93 . c1='EBCS',
94 . c2='EBCS',
95 . c3=titr)
96 ENDIF
97
98 CALL hm_option_is_encrypted(is_encrypted)
99 CALL hm_get_intv('entityid', surf ,is_available,lsubmodel)
100 CALL hm_get_intv('sensorid', sens ,is_available,lsubmodel)
101 CALL hm_get_intv('monvol_ID', monvol ,is_available,lsubmodel)
102! CALL HM_GET_FLOATV('Fscale', FSCALE ,IS_AVAILABLE,LSUBMODEL,UNITAB)
103 isu=0
104 ingr2usr => igrsurf(1:nsurf)%ID
105 IF (surf/=0) isu=ngr2usr(surf,ingr2usr,nsurf)
106 nseg=0
107 IF (isu/=0) nseg=igrsurf(isu)%NSEG
108 IF (surf==0)THEN
109 ierr=ierr+1
110 WRITE(istdo,'(6X,A)')' ** A SURFACE SHOULD BE INPUT'
111 WRITE(iout, '(6X,A)')' ** A SURFACE SHOULD BE INPUT'
112 ELSEIF(isu==0)THEN
113 ierr=ierr+1
114 WRITE(istdo,*)' ** ERROR SURFACE NOT FOUND, ID=',surf
115 WRITE(iout,*) ' ** ERROR SURFACE NOT FOUND, ID=',surf
116 ELSEIF(nseg==0)THEN
117 ierr=ierr+1
118 WRITE(istdo,*)' ** ERROR EMPTY SURFACE, ID=',surf
119 WRITE(iout,*) ' ** ERROR EMPTY SURFACE, ID=',surf
120 ELSE
121 WRITE(iout,1008)id,trim(titr),monvol,surf,sens,nseg
122 ENDIF
123
124 ebcs%title = titr
125 ebcs%monvol_id = monvol
126 ebcs%sensor_id = sens
127
128 IF (multi_fvm%IS_USED) THEN
129 CALL ancmsg(msgid = 1602, msgtype = msgerror, anmode = aninfo,
130 . i1 = id, c1 = trim(titr), c2 = "NOT COMPATIBLE WITH LAW 151")
131 ENDIF
132
133 IF(nspmd > 1 ) THEN
134 CALL ancmsg(msgid=755,msgtype=msgerror,anmode=aninfo,c1='ELEMENTARY BOUNDARY CONDITIONS')
135 ENDIF
136
137C-----------
138 RETURN
139C-----------
140
141 1008 FORMAT(//
142 . 'EBCS NUMBER :',i8,1x,a,/,
143 . ' CONNECTION TO MONITORED VOLUME. . . . . . ',i8,/,
144 . ' THROUGH SURFACE . . . . . . . . . . . . . ',i8,/,
145 . ' ACTIVATED BY SENSOR . . . . . . . . . . . ',i8,/,
146 . ' NUMBER OF SEGMENTS FOUND. . . . . . . . . ',i8,/)
147
148 END
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_ebcs_monvol(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, ebcs)
integer, parameter nchartitle
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