OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat21.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_mat21 ../starter/source/materials/mat/mat021/hm_read_mat21.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_mat ../starter/source/materials/mat/hm_read_mat.F90
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_floatv_dim ../starter/source/devtools/hm_reader/hm_get_floatv_dim.F
31!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
32!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
33!|| init_mat_keyword ../starter/source/materials/mat/init_mat_keyword.F
34!||--- uses -----------------------------------------------------
35!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
36!|| message_mod ../starter/share/message_module/message_mod.F
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!||====================================================================
39 SUBROUTINE hm_read_mat21(
40 . LSUBMODEL ,MTAG ,UNITAB ,IPM ,PM,
41 . MAT_ID ,TITR ,MATPARAM )
42C-----------------------------------------------
43C M o d u l e s
44C-----------------------------------------------
45 USE unitab_mod
46 USE elbuftag_mod
47 USE message_mod
48 USE submodel_mod
49 USE matparam_def_mod
51C-----------------------------------------------
52C ROUTINE DESCRIPTION :
53C ===================
54C READ MAT LAW21 WITH HM READER
55C-----------------------------------------------
56C DUMMY ARGUMENTS DESCRIPTION:
57C ===================
58C UNITAB UNITS ARRAY
59C MAT_ID MATERIAL ID(INTEGER)
60C TITR MATERIAL TITLE
61C LSUBMODEL SUBMODEL STRUCTURE
62C-----------------------------------------------
63C I m p l i c i t T y p e s
64C-----------------------------------------------
65#include "implicit_f.inc"
66C-----------------------------------------------
67C C o m m o n B l o c k s
68C-----------------------------------------------
69#include "units_c.inc"
70#include "param_c.inc"
71C-----------------------------------------------
72C D u m m y A r g u m e n t s
73C-----------------------------------------------
74 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
75 INTEGER, INTENT(IN) :: MAT_ID
76 INTEGER, DIMENSION(NPROPMI) ,INTENT(INOUT) :: IPM
77 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
78 my_real, DIMENSION(NPROPM) ,INTENT(INOUT) :: pm
79 TYPE(submodel_data), DIMENSION(*),INTENT(IN) :: LSUBMODEL
80 TYPE(mlaw_tag_), INTENT(INOUT) :: MTAG
81 TYPE(matparam_struct_) ,INTENT(INOUT) :: MATPARAM
82C-----------------------------------------------
83C L o c a l V a r i a b l e s
84C-----------------------------------------------
85 LOGICAL :: IS_AVAILABLE,IS_ENCRYPTED
86 INTEGER :: I,ILAW,IFUNC
87 my_real :: rho0,rhor,e,nu,a0,a1,a2,amx,c1,fac_y,pmin,pext,bunl,xmumx,e0,g,pstar,delta,fscal_unit
88 CHARACTER*64 :: chain
89C=======================================================================
90 is_encrypted = .false.
91 is_available = .false.
92 ilaw = 21
93 pstar = -infinity
94!---
95 CALL hm_option_is_encrypted(is_encrypted)
96!
97 CALL hm_get_floatv('MAT_RHO' ,rho0 ,is_available, lsubmodel, unitab)
98 CALL hm_get_floatv('Refer_Rho' ,rhor ,is_available, lsubmodel, unitab)
99 CALL hm_get_floatv('MAT_E' ,e ,is_available, lsubmodel, unitab)
100 CALL hm_get_floatv('MAT_NU' ,nu ,is_available, lsubmodel, unitab)
101 CALL hm_get_floatv('MAT_A0' ,a0 ,is_available, lsubmodel, unitab)
102 CALL hm_get_floatv('MAT_A1' ,a1 ,is_available, lsubmodel, unitab)
103 CALL hm_get_floatv('MAT_A2' ,a2 ,is_available, lsubmodel, unitab)
104 CALL hm_get_floatv('MAT_AMAX' ,amx ,is_available, lsubmodel, unitab)
105 CALL hm_get_intv ('FUN_A1' ,ifunc ,is_available,lsubmodel)
106 CALL hm_get_floatv('MAT_BULK' ,c1 ,is_available, lsubmodel, unitab)
107 CALL hm_get_floatv('PFscale' ,fac_y ,is_available, lsubmodel, unitab)
108 CALL hm_get_floatv('MAT_PC' ,pmin ,is_available, lsubmodel, unitab)
109 CALL hm_get_floatv('PEXT' ,pext ,is_available, lsubmodel, unitab)
110 CALL hm_get_floatv('MAT_K_UNLOAD' ,bunl ,is_available, lsubmodel, unitab)
111 CALL hm_get_floatv('MAT_SIG' ,xmumx ,is_available, lsubmodel, unitab)
112 CALL hm_get_floatv_dim('PFscale' ,fscal_unit ,is_available, lsubmodel, unitab)
113!---
114 IF (rhor==zero) rhor=rho0
115 pm(1) = rhor
116 pm(89)= rho0
117!
118 e0=zero
119 IF(pmin==zero) pmin =-infinity
120
121 IF(bunl==zero) bunl = c1
122 IF(amx==zero) amx = ep20
123 IF(xmumx == zero)xmumx=ep20
124
125 IF(a1 < zero .AND. a2 == zero)THEN
126 chain='INVERTED YIELD SURFACE. CHECK A1 SIGN. '
127 CALL ancmsg(msgid=829, msgtype=msgwarning, anmode=aninfo, i1=21, i2=mat_id, c1='WARNING', c2=titr, c3=chain)
128 ENDIF
129
130 IF(a2 < zero)THEN
131 chain='UNTYPICAL YIELD SURFACE. CHECK A2 SIGN. '
132 CALL ancmsg(msgid=829, msgtype=msgwarning, anmode=aninfo, i1=21, i2=mat_id, c1='WARNING', c2=titr, c3=chain)
133 ENDIF
134
135 IF(c1<=zero) THEN
136 chain='TENSILE BULK MODULUS IS LOWER OR EQUAL TO 0. '
137 CALL ancmsg(msgid=829, msgtype=msgerror, anmode=aninfo, i1=21, i2=mat_id, c1='ERROR', c2=titr, c3=chain)
138 END IF
139
140 IF(bunl==zero) THEN
141 chain='UNLOADING BULK MODULUS HAS NO USER VALUE. IT IS SET TO C1'
142 bunl = c1
143 CALL ancmsg(msgid=829, msgtype=msgwarning, anmode=aninfo, i1=21, i2=mat_id, c1='WARNING', c2=titr, c3=chain)
144 ENDIF
145
146 IF(a2==zero.AND.a1/=zero)THEN !(A2=A1=ZERO => error message)
147 pstar=-a0/a1
148 ELSEIF(a2/=zero)THEN
149 delta = a1*a1-four*a0*a2
150 !Si intersection avec l'axe
151 IF(delta >= zero)THEN
152 delta=sqrt(delta)
153 pstar = (-a1+delta)/two/a2
154 ELSE
155 ! PSTAR = -A1/TWO/A2 !no let user do what he wants
156 pstar = -infinity
157 chain='YIELD SURFACE HAS NO ROOT. '
158 CALL ancmsg(msgid=829, msgtype=msgwarning, anmode=aninfo, i1=21, i2=mat_id, c1='WARNING', c2=titr, c3=chain)
159 ENDIF
160 ELSE
161 !do nothing let user do what he wants
162 ENDIF
163C
164 IF (fac_y == zero) fac_y = one*fscal_unit
165 g=e/(two*(one + nu))
166C
167 pm(20)=e
168 pm(21)=nu
169 pm(22)=g
170 pm(23)=e0
171 pm(31)=zero
172 pm(32)=c1
173 pm(33)=zero
174 pm(34)=zero
175 pm(35)=bunl
176 pm(36)=xmumx
177 pm(37)=pmin
178 pm(38)=a0
179 pm(39)=a1
180 pm(40)=a2
181 pm(41)=amx
182 pm(42)=fac_y
183 pm(43)=pext
184 pm(44)=pstar
185 ipm(11)=ifunc
186C-----------
187C Formulation for solid elements time step computation.
188 ipm(252)= 2
189 pm(105) = two*g/(c1+four_over_3*g) ! =(1-2*Nu)/(1-Nu)
190c-------------------
191 WRITE(iout,1100) trim(titr),mat_id,21
192 WRITE(iout,1000)
193 IF (is_encrypted) THEN
194 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
195 ELSE
196 WRITE(iout,1200) rho0,rhor
197 WRITE(iout,1300)e,nu,g
198 WRITE(iout,1400)a0,a1,a2,amx
199 WRITE(iout,1500)ifunc,fac_y,c1,bunl,xmumx,pmin,pext,pstar
200 ENDIF
201C
202C---- Definition des variables internes (stockage elementaire)
203c
204 mtag%G_PLA = 1
205 mtag%G_EPSQ = 1
206 mtag%G_MU = 1 !unloading history (volumetric plastic strain)
207c
208 mtag%L_PLA = 1 ! /TH(VPLA)
209 mtag%L_EPSQ = 1 ! /TH(EPSP)
210 mtag%L_MU = 1 !unloading history
211c
212 ! MATPARAM keywords
213 CALL init_mat_keyword(matparam,"ELASTO_PLASTIC")
214
215 ! Material compatibility with /EOS option
216 CALL init_mat_keyword(matparam,"EOS")
217
218 ! EOS/Thermo keyword for pressure treatment in elements
219 CALL init_mat_keyword(matparam,"HYDRO_EOS")
220c
221 ! Properties compatibility
222 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
223 CALL init_mat_keyword(matparam,"SPH")
224c
225c-------------------
226 RETURN
227c-------------------
228 1000 FORMAT(
229 & 5x,40h soil & concrete ,/,
230 & 5x,40h --------------- ,//)
231 1100 FORMAT(/
232 & 5x,a,/,
233 & 5x,'MATERIAL NUMBER . . . . . . . . . . . .=',i10/,
234 & 5x,'MATERIAL LAW. . . . . . . . . . . . . .=',i10/)
235 1200 FORMAT(
236 & 5x,'INITIAL DENSITY . . . . . . . . . . . .=',1pg20.13/,
237 & 5x,'REFERENCE DENSITY . . . . . . . . . .=',1pg20.13/)
238 1300 FORMAT(
239 & 5x,40hyoung'S MODULUS . . . . . . . . . . . .=,E12.4/,
240 & 5X,40HPOISSON's ratio . . . . . . . . . . . .=,e12.4/,
241 & 5x,40hshear modulus . . . . . . . . . . . . .=,e12.4//)
242 1400 FORMAT(
243 & 5x,40hyield coefficient a0. . . . . . . . . .=,e12.4/,
244 & 5x,40hyield coefficient a1. . . . . . . . . .=,e12.4/,
245 & 5x,40hyield coefficient a2. . . . . . . . . .=,e12.4/,
246 & 5x,40ha-max . . . . . . . . . . . . . . . . .=,e12.4//)
247 1500 FORMAT(
248 & 5x,40hpressure FUNCTION number. . . . . . . .=,i8/,
249 & 5x,40hpressure FUNCTION scale factor. . . . .=,e12.4/,
250 & 5x,40htensile bulk. . . . . . . . . . . . . .=,e12.4/,
251 & 5x,40hunloading bulk. . . . . . . . . . . . .=,e12.4/,
252 & 5x,40hmax volumic compression . . . . . . . .=,e12.4/,
253 & 5x,40hfracture pressure . . . . . . . . . . .=,e12.4/,
254 & 5x,40hexternal pressure . . . . . . . . . . .=,e12.4/,
255 & 5x,40hyield surface pressure root . . . . . .=,e12.4//)
256c-------------------
257 RETURN
258 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_floatv_dim(name, dim_fac, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_mat21(lsubmodel, mtag, unitab, ipm, pm, mat_id, titr, matparam)
subroutine init_mat_keyword(matparam, keyword)
#define max(a, b)
Definition macros.h:21
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