OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_visc.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_visc ../starter/source/materials/visc/hm_read_visc.F
25!||--- called by ------------------------------------------------------
26!|| read_material_models ../starter/source/materials/read_material_models.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.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_visc_lprony ../starter/source/materials/visc/hm_read_visc_lprony.F
33!|| hm_read_visc_plas ../starter/source/materials/visc/hm_read_visc_plas.F90
34!|| hm_read_visc_prony ../starter/source/materials/visc/hm_read_visc_prony.F
35!|| init_mat_keyword ../starter/source/materials/mat/init_mat_keyword.F
36!||--- uses -----------------------------------------------------
37!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
38!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
39!|| hm_read_visc_plas_mod ../starter/source/materials/visc/hm_read_visc_plas.F90
40!|| message_mod ../starter/share/message_module/message_mod.F
41!|| submodel_mod ../starter/share/modules1/submodel_mod.F
42!|| table_mod ../starter/share/modules1/table_mod.F
43!||====================================================================
44 SUBROUTINE hm_read_visc(MAT_PARAM ,IPM ,BUFMAT ,
45 . UNITAB ,LSUBMODEL ,TABLE )
46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE unitab_mod
50 USE elbuftag_mod
51 USE matparam_def_mod
52 USE message_mod
53 USE submodel_mod
55 USE table_mod
57 USE hm_read_visc_plas_mod
58C============================================================================
59C I m p l i c i t T y p e s
60C-----------------------------------------------
61#include "implicit_f.inc"
62C-----------------------------------------------
63C C o m m o n B l o c k s
64C-----------------------------------------------
65#include "com04_c.inc"
66#include "param_c.inc"
67#include "units_c.inc"
68#include "tablen_c.inc"
69C-----------------------------------------------
70C D u m m y A r g u m e n t s
71C-----------------------------------------------
72 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
73 INTEGER ,DIMENSION(NPROPMI,NUMMAT) ,INTENT(INOUT) :: IPM
74 my_real ,DIMENSION(*) ,INTENT(INOUT) :: bufmat
75 TYPE(submodel_data) ,DIMENSION(*) ,INTENT(IN) :: LSUBMODEL
76 TYPE(ttable) TABLE(NTABLE)
77 TYPE(matparam_struct_) ,DIMENSION(NUMMAT) ,INTENT(INOUT) :: MAT_PARAM
78C-----------------------------------------------
79C L o c a l V a r i a b l e s
80C-----------------------------------------------
81 INTEGER I,NV,IMAT,MAT_ID,IMID,ILAW,IVISC,UID,IUNIT,FLAGUNIT,
82 . n_net,iadd,hm_nvisc,flagmat,imatvis
83 CHARACTER(LEN=NCHARKEY)::KEY
84c======================================================================-
85c COUNT VISCOSITY MODELS USING CFG FILES
86c--------------------------------------------------
87c
88 CALL hm_option_count('/VISC',hm_nvisc)
89c
90c--------------------------------------------------
91c START BROWSING VISCOSITY MODELS
92c--------------------------------------------------
93c
94 CALL hm_option_start('/VISC')
95c
96c--------------------------------------------------
97c
98 DO nv = 1,hm_nvisc
99c
100 CALL hm_option_read_key(lsubmodel,
101 . option_id = mat_id ,
102 . unit_id = uid ,
103 . keyword2 = key )
104c
105c--------------------------------------------------
106c Check MAT_Id
107c--------------------------------------------------
108 flagmat = 0
109 DO imat=1,nummat-1
110 imid = ipm(1,imat)
111 IF (imid == mat_id) THEN
112 flagmat = 1
113 EXIT
114 ENDIF
115 ENDDO
116 IF (mat_id > 0 .AND. flagmat == 0) THEN
117 CALL ancmsg(msgid=1663,anmode=aninfo,msgtype=msgerror,
118 . i1= mat_id,
119 . c1='VISCOSITY',
120 . c2= key,
121 . c3='')
122 ENDIF
123c--------------------------------------------------
124c Check Unit_ID
125c--------------------------------------------------
126 flagunit = 0
127 DO iunit=1,unitab%NUNITS
128 IF (unitab%UNIT_ID(iunit) == uid) THEN
129 flagunit = 1
130 EXIT
131 ENDIF
132 ENDDO
133 IF (uid > 0 .AND. flagunit == 0) THEN
134 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,
135 . i1= mat_id,
136 . i2= uid,
137 . c1='MATERIAL',
138 . c2='VISCOSITY MODEL',
139 . c3='')
140 ENDIF
141c--------------------------------------------------
142c Read Viscosity models
143c--------------------------------------------
144 DO i=1,nummat-1
145 imid = ipm(1,i)
146 ilaw = ipm(2,i)
147 IF (imid == mat_id) THEN
148 WRITE(iout,1000) trim(key),mat_id
149c
150 imatvis = ipm(216,i)
151 CALL init_mat_keyword(mat_param(imat),"VISC") ! flag compatibility
152c--------------------------------------------
153 IF (key(1:5) == 'PRONY')THEN
154c -----------------------------------
155 ivisc = 1
157 . mat_param(imat)%VISC,ivisc ,
158 . ntable ,table ,mat_id ,unitab ,lsubmodel)
159
160 IF (imatvis > 0) THEN
161 imatvis = 3
162 ELSE
163 imatvis = 1
164 END IF
165c -----------------------------------
166 ELSE IF (key(1:6) == 'LPRONY') THEN
167c -----------------------------------
168 ivisc = 2
170 . mat_param(imat)%VISC,ivisc ,mat_id ,unitab ,lsubmodel)
171c
172 ELSE IF (key(1:6) == 'PLAS') THEN
173c -----------------------------------
174 ivisc = 3
175 CALL hm_read_visc_plas(
176 . mat_param(imat)%VISC,ivisc ,iout, unitab ,lsubmodel)
177 END IF ! visc model
178c-------------------------
179 mat_param(imat)%IVISC = ivisc
180c
181 IF (ivisc == 1 .AND. ilaw == 100) THEN
182 iadd = ipm(7,i) ! number of networks in law 100
183 n_net = nint(bufmat(iadd) )
184 IF (n_net /= 0) CALL ancmsg(msgid=1568 ,msgtype=msgerror,
185 . anmode=aninfo_blind_2, i1=imid )
186 ENDIF
187c-----------------------------
188c duplicate storage for compatibility with old code and output until cleaning
189c-----------------------------
190 ipm(216 ,i) = imatvis ! hourglass treatment flag specific for viscoelastic maaterials
191! IPM(222 ,I) = IVISC
192! ipm(225 ,i) = mat_param(imat)%VISC%NUVAR
193c--------------------------------------------------
194 ENDIF !IMID == MAT_ID
195c--------------------------------------------------
196 END DO ! NUMMAT
197c--------------------------------------------------
198c
199 ENDDO ! HM_NVISC
200c-----------
201 RETURN
202c--------------------------------------------------
203 1000 FORMAT(//
204 & 5x,'VISCOSITY MODEL: ',5x,a,/,
205 & 5x,'MATERIAL ID . . . . . . . . . . . .=',i10/)
206c-----------
207 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
subroutine hm_read_visc(mat_param, ipm, bufmat, unitab, lsubmodel, table)
subroutine hm_read_visc_lprony(visc, ivisc, mat_id, unitab, lsubmodel)
subroutine hm_read_visc_prony(visc, ivisc, ntable, table, mat_id, unitab, lsubmodel)
subroutine init_mat_keyword(matparam, keyword)
integer, parameter ncharkey
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