OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_ebcs_fluxout.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_fluxout ../starter/source/boundary_conditions/ebcs/hm_read_ebcs_fluxout.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_fluxout( 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 "com04_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
60 INTEGER ID,UID
61 TYPE (MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
62 TYPE (SURF_) ,TARGET, DIMENSION(NSURF) :: IGRSURF
63 CHARACTER(len=nchartitle), INTENT(IN) :: TITR
64 TYPE(submodel_data) LSUBMODEL(NSUBMOD)
65 TYPE(t_ebcs_fluxout), INTENT(INOUT) :: EBCS
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER ISU,SURF,NGR2USR,J,NSEG
70 INTEGER IMAT,IFLAGUNIT
71 EXTERNAL ngr2usr
72 LOGICAL IS_AVAILABLE,IS_ENCRYPTED
73 INTEGER, DIMENSION(:), POINTER :: INGR2USR
74C-----------------------------------------------
75C S o u r c e L i n e s
76C-----------------------------------------------
77 ebcs%title = trim(titr)
78
79 ebcs%TITLE = titr
80 ebcs%IS_MULTIFLUID = .true.
81 ebcs%HAS_IELEM = .true.
82 ebcs%FVM_INLET_DATA%FORMULATION = -1
83 ebcs%FVM_INLET_DATA%VECTOR_VELOCITY = 0
84 ebcs%FVM_INLET_DATA%FUNC_VEL(1:3) = 0
85 ebcs%FVM_INLET_DATA%FUNC_ALPHA(1:21) = 0
86 ebcs%FVM_INLET_DATA%FUNC_RHO(1:21) = 0
87 ebcs%FVM_INLET_DATA%FUNC_PRES(1:21) = 0
88 ebcs%FVM_INLET_DATA%VAL_VEL(1:3) = zero
89 ebcs%FVM_INLET_DATA%VAL_ALPHA(1:21) = zero
90 ebcs%FVM_INLET_DATA%VAL_RHO(1:21) = zero
91 ebcs%FVM_INLET_DATA%VAL_PRES(1:21) = zero
92 iflagunit=0
93 DO j=1,unitab%NUNITS
94 IF (unitab%UNIT_ID(j) == uid) THEN
95 iflagunit = 1
96 EXIT
97 ENDIF
98 ENDDO
99 IF (uid/=0.AND.iflagunit==0) THEN
100 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,i2=uid,i1=id,c1='EBCS',c2='EBCS',c3=titr)
101 ENDIF
102
103 CALL hm_option_is_encrypted(is_encrypted)
104 CALL hm_get_intv('entityid', surf ,is_available,lsubmodel)
105
106 isu=0
107 ingr2usr => igrsurf(1:nsurf)%ID
108 IF (surf/=0) isu=ngr2usr(surf,ingr2usr,nsurf)
109 nseg=0
110 IF (isu/=0) nseg=igrsurf(isu)%NSEG
111 IF(surf==0)THEN
112 ierr=ierr+1
113 WRITE(istdo,'(6X,A)')' ** A SURFACE SHOULD BE INPUT'
114 WRITE(iout, '(6X,A)')' ** A SURFACE SHOULD BE INPUT'
115 ELSEIF(isu==0)THEN
116 ierr=ierr+1
117 WRITE(istdo,*)' ** ERROR SURFACE NOT FOUND, ID=',surf
118 WRITE(iout,*) ' ** ERROR SURFACE NOT FOUND, ID=',surf
119 ELSEIF(nseg==0)THEN
120 ierr=ierr+1
121 WRITE(istdo,*)' ** ERROR EMPTY SURFACE',surf
122 WRITE(iout,*) ' ** ERROR EMPTY SURFACE',surf
123 ENDIF
124
125
126 WRITE(iout,1019)id,trim(titr)
127 ebcs%fvm_inlet_data%FUNC_VEL(1) = -1
128 ebcs%fvm_inlet_data%VAL_VEL(1) = zero
129 ebcs%fvm_inlet_data%FUNC_VEL(2) = -1
130 ebcs%fvm_inlet_data%VAL_VEL(2) = zero
131 ebcs%fvm_inlet_data%FUNC_VEL(3) = -1
132 ebcs%fvm_inlet_data%VAL_VEL(3) = zero
133 ebcs%fvm_inlet_data%FORMULATION = 2
134 ebcs%fvm_inlet_data%VECTOR_VELOCITY = 1
135 DO imat = 1, multi_fvm%NBMAT
136 ebcs%fvm_inlet_data%FUNC_ALPHA(imat) = -1
137 ebcs%fvm_inlet_data%FUNC_RHO(imat) = -1
138 ebcs%fvm_inlet_data%FUNC_PRES(imat) = -1
139 ebcs%fvm_inlet_data%VAL_ALPHA(imat) = zero
140 ebcs%fvm_inlet_data%VAL_RHO(imat) = zero
141 ebcs%fvm_inlet_data%VAL_PRES(imat) = zero
142 ENDDO
143
144
145 WRITE(iout,1118)surf,nseg
146 IF (.NOT. multi_fvm%IS_USED) THEN
147 CALL ancmsg(msgid=1602,msgtype=msgerror,anmode=aninfo,
148 . i1 = id,c1 = trim(titr), c2 = "ONLY COMPATIBLE WITH LAW 151")
149 ENDIF
150
151C-----------
152 RETURN
153C-----------
154 1019 FORMAT( //'FLUX OUT EBCS NUMBER . . . . . . . . . :',i8,1x,a)
155 1118 FORMAT(
156 . ' ON SURFACE . . . . . . . . . . . . . . . ',i8,/,
157 . ' NUMBER OF SEGMENTS FOUND. . . . . . . . . ',i8,/)
158
159 END SUBROUTINE hm_read_ebcs_fluxout
160
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_ebcs_fluxout(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
program starter
Definition starter.F:39