OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_ebcs_nrf.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_nrf ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_nrf.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_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
31!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
32!|| ngr2usr ../starter/source/system/nintrr.F
33!||--- uses -----------------------------------------------------
34!|| message_mod ../starter/share/message_module/message_mod.F
35!|| submodel_mod ../starter/share/modules1/submodel_mod.F
36!||====================================================================
37 SUBROUTINE hm_read_ebcs_nrf(IGRSURF, MULTI_FVM, UNITAB, ID, TITR, UID, LSUBMODEL, EBCS)
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE ebcs_mod
42 USE unitab_mod
43 USE message_mod
44 USE multi_fvm_mod
45 USE groupdef_mod
46 USE submodel_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "units_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 LOGICAL IS_AVAILABLE,IS_ENCRYPTED
67 TYPE(t_ebcs_nrf), INTENT(INOUT) :: EBCS
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 INTEGER ISU,SURF,J,NSEG
72 INTEGER IMAT,IFLAGUNIT
73 my_real tcar_vf,tcar_p
74 INTEGER, DIMENSION(:), POINTER :: INGR2USR
75 INTEGER, EXTERNAL :: NGR2USR
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,i2=uid,i1=id,c1='EBCS',c2='EBCS',c3=titr)
91 ENDIF
92
93 CALL hm_option_is_encrypted(is_encrypted)
94 CALL hm_get_intv('entityid', surf ,is_available,lsubmodel)
95 CALL hm_get_floatv('tcar_p', tcar_p ,is_available,lsubmodel,unitab)
96 CALL hm_get_floatv('tcar_vf', tcar_vf ,is_available,lsubmodel,unitab)
97
98 IF(tcar_vf == zero)tcar_vf = infinity
99
100 ebcs%TITLE = titr
101 ebcs%tcar_p = tcar_p
102 ebcs%tcar_vf = tcar_vf
103 ebcs%HAS_IELEM = .true.
104
105 IF(multi_fvm%IS_USED)THEN
106 ebcs%is_multifluid = .true.
107 ENDIF
108
109 ebcs%fvm_inlet_data%FUNC_VEL(1:3) = -1
110 ebcs%fvm_inlet_data%VAL_VEL(1:3) = zero
111 ebcs%fvm_inlet_data%FORMULATION = 2
112 ebcs%fvm_inlet_data%VECTOR_VELOCITY = 1
113 DO imat = 1, 21 ! MULTI_FVM%NBMAT -> init from NBMAT+1,21 to avoid uninit values transmitted to starter
114 ebcs%fvm_inlet_data%FUNC_ALPHA(imat) = -1
115 ebcs%fvm_inlet_data%FUNC_RHO(imat) = -1
116 ebcs%fvm_inlet_data%FUNC_PRES(imat) = -1
117 ebcs%fvm_inlet_data%VAL_ALPHA(imat) = zero
118 ebcs%fvm_inlet_data%VAL_RHO(imat) = zero
119 ebcs%fvm_inlet_data%VAL_PRES(imat) = zero
120 ENDDO
121
122 isu=0
123 ingr2usr => igrsurf(1:nsurf)%ID
124 IF (surf/=0) isu=ngr2usr(surf,ingr2usr,nsurf)
125 nseg=0
126 IF (isu/=0) nseg=igrsurf(isu)%NSEG
127 IF(surf==0)THEN
128 ierr=ierr+1
129 WRITE(istdo,'(6X,A)')' ** A SURFACE SHOULD BE INPUT'
130 WRITE(iout, '(6X,A)')' ** A SURFACE SHOULD BE INPUT'
131 ELSEIF(isu==0)THEN
132 ierr=ierr+1
133 WRITE(istdo,*)' ** error surface not found, id=',SURF
134 WRITE(IOUT,*) ' ** error surface not found, id=',SURF
135 ELSEIF(NSEG==0)THEN
136 IERR=IERR+1
137 WRITE(ISTDO,*)' ** error empty surface',SURF
138 WRITE(IOUT,*) ' ** error empty surface',SURF
139 ENDIF
140
141 EBCS%nb_elem = NSEG
142
143 WRITE(IOUT,1001)ID, TRIM(TITR)
144 WRITE(IOUT,1118)SURF,NSEG,TCAR_P,TCAR_VF
145
146
147C-----------
148 RETURN
149C-----------
150 1001 FORMAT( //'non-reflecting frontier ebcs number. . . . :',I8,1X,A)
151
152 1118 FORMAT(
153 . ' on surface . . . . . . . . . . . . . . . ',I8,/,
154 . ' number of segments found. . . . . . . . . ',I8,/,
155 . ' tcar_p . . . . . . . . . . . . . . . . . ',E20.12,/,
156 . ' tcat_alpha . . . . . . . . . . . . . . . ',E20.12,/)
157
158 END SUBROUTINE HM_READ_EBCS_NRF
159
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_ebcs_nrf(igrsurf, multi_fvm, unitab, id, titr, uid, lsubmodel, ebcs)
integer, parameter nchartitle
integer, parameter ncharkey
integer function ngr2usr(iu, igr, ngr)
Definition nintrr.F:325
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