OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat102.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_mat102 ../starter/source/materials/mat/mat102/hm_read_mat102.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_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!|| init_mat_keyword ../starter/source/materials/mat/init_mat_keyword.F
33!||--- uses -----------------------------------------------------
34!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
35!|| message_mod ../starter/share/message_module/message_mod.F
36!|| submodel_mod ../starter/share/modules1/submodel_mod.F
37!||====================================================================
38 SUBROUTINE hm_read_mat102(UPARAM ,MAXUPARAM,NUPARAM ,ISRATE ,
39 . NUVAR ,NFUNC ,PARMAT ,
40 . UNITAB ,MAT_ID ,TITR ,MTAG , LSUBMODEL,
41 . PM ,IPM ,MATPARAM )
42C-----------------------------------------------
43C D e s c r i p t i o n
44C-----------------------------------------------
45C READ MAT LAW102 WITH HM READER ( TO BE COMPLETED )
46C
47C DUMMY ARGUMENTS DESCRIPTION:
48C ===================
49C
50C NAME DESCRIPTION
51C
52C IPM MATERIAL ARRAY(INTEGER)
53C PM MATERIAL ARRAY(REAL)
54C UNITAB UNITS ARRAY
55C MAT_ID MATERIAL ID(INTEGER)
56C TITR MATERIAL TITLE
57C LSUBMODEL SUBMODEL STRUCTURE
58C
59C-----------------------------------------------
60C M o d u l e s
61C-----------------------------------------------
62 USE unitab_mod
63 USE elbuftag_mod
64 USE message_mod
66 USE matparam_def_mod
68 USE constant_mod , ONLY : pi, hundred80, four, zero, infinity, nine, one, six, three, two
69 USE precision_mod , ONLY : wp
70
71C-----------------------------------------------
72C I m p l i c i t T y p e s
73C-----------------------------------------------
74 IMPLICIT NONE
75C-----------------------------------------------
76C C o m m o n B l o c k s
77C-----------------------------------------------
78#include "units_c.inc"
79#include "param_c.inc"
80C-----------------------------------------------
81C D u m m y A r g u m e n t s
82C-----------------------------------------------
83 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
84 REAL(KIND=WP), DIMENSION(NPROPM),INTENT(INOUT) :: PM
85 REAL(KIND=WP), DIMENSION(100),INTENT(INOUT) :: PARMAT
86 REAL(KIND=wp), DIMENSION(MAXUPARAM) ,INTENT(INOUT) :: uparam
87 INTEGER, DIMENSION(NPROPMI),INTENT(INOUT) :: IPM
88 INTEGER, INTENT(INOUT) :: ISRATE,NFUNC,MAXUPARAM,NUPARAM,NUVAR
89 TYPE(mlaw_tag_),INTENT(INOUT) :: MTAG
90 INTEGER,INTENT(IN) :: MAT_ID
91 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
92 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(NSUBMOD)
93 TYPE(matparam_struct_) ,INTENT(INOUT) :: MATPARAM
94C-----------------------------------------------
95C L o c a l V a r i a b l e s
96C-----------------------------------------------
97 REAL(KIND=wp) :: e,nu,c,pstar,amax,g, delta,stifint,pmin,phi_deg
98 REAL(KIND=wp) :: a0,a1,a2,rho0,rhor
99 INTEGER :: IFORM
100 REAL(KIND=wp) :: phi,k,alpha
101 LOGICAL :: IS_ENCRYPTED,IS_AVAILABLE
102 CHARACTER*64 :: CHAIN
103C-----------------------------------------------
104C S o u r c e L i n e s
105C-----------------------------------------------
106 is_encrypted = .false.
107 is_available = .false.
108 k = 0.0d0
109
110 CALL hm_option_is_encrypted(is_encrypted)
111
112 CALL hm_get_intv ('IFORM',iform ,is_available, lsubmodel)
113
114 CALL hm_get_floatv('MAT_RHO' ,rho0 ,is_available, lsubmodel, unitab)
115
116 CALL hm_get_floatv('MAT_E' ,e ,is_available, lsubmodel, unitab)
117 CALL hm_get_floatv('MAT_NU' ,nu ,is_available, lsubmodel, unitab)
118
119 CALL hm_get_floatv('MAT102_C' ,c ,is_available, lsubmodel, unitab)
120 CALL hm_get_floatv('MAT102_PHI' ,phi ,is_available, lsubmodel, unitab)
121 CALL hm_get_floatv('MAT102_AMAX' ,amax ,is_available, lsubmodel, unitab)
122
123 CALL hm_get_floatv('MAT102_PMIN' ,pmin ,is_available, lsubmodel, unitab)
124
125 ! C : Mohr-Coulomb cohesion (intercept) (in Pa)
126 ! PHI : Mohr-Coulomb angle of internal friction (angle, degree)
127 ! Iform : Formulation Flag (circumscribed,inscribed,middle)
128
129C-----------------------------------------------
130C UNITS
131C-----------------------------------------------
132 phi_deg = phi
133 phi = phi*pi/hundred80
134C-----------------------------------------------
135C DEFAULTS
136C-----------------------------------------------
137 IF(iform<=0 .OR. iform>=4)iform=2
138C-----------------------------------------------
139C YIELD PARAMETERS
140C-----------------------------------------------
141 g=e/two/(one+nu)
142 SELECT CASE(iform)
143 CASE(1)
144 k = six*c*cos(phi)/sqrt(three)/(three-sin(phi))
145 alpha = two*sin(phi)/sqrt(three)/(three-sin(phi))
146 CASE(2)
147 k = six*c*cos(phi)/sqrt(three)/(three+sin(phi))
148 alpha = two*sin(phi)/sqrt(three)/(three+sin(phi))
149 CASE(3)
150 k = three*c*cos(phi)/sqrt(nine+three*sin(phi)*sin(phi))
151 alpha = sin(phi)/sqrt(nine+three*sin(phi)*sin(phi))
152 END SELECT
153 a0 = k*k
154 a1 = six*k*alpha
155 a2 = nine*alpha*alpha
156
157 IF(e<=zero)THEN
158 chain='YOUNG MODULUS MUST BE DEFINED '
159 CALL ancmsg(msgid=829, msgtype=msgerror, anmode=aninfo, i1=10, i2=mat_id, c1='ERROR', c2=titr, c3=chain)
160 ENDIF
161
162 IF(nu<=zero)THEN
163 chain='POISSON RATIO MUST BE DEFINED '
164 CALL ancmsg(msgid=829, msgtype=msgerror, anmode=aninfo, i1=10, i2=mat_id, c1='ERROR', c2=titr, c3=chain)
165 ENDIF
166
167 pstar = -infinity
168 IF(a2==zero .AND. a1/=zero)THEN
169 pstar=-a0/a1
170 ELSEIF(a2/=zero)THEN
171 delta = a1*a1-four*a0*a2
172 !If intersection with the axis
173 IF(delta >= zero)THEN
174 delta=sqrt(delta)
175 pstar = (-a1+delta)/two/a2
176
177 ELSE
178 pstar = -a1/two/a2 ! extremum
179 ! chain='FITTED YIELD FUNCTION HAS NO ROOT. CHECK INPUT PARAMETER '
180 ! CALL ANCMSG( MSGID=829, MSGTYPE=MSGWARNING, ANMODE=ANINFO, I1=10, I2=MAT_ID, C1='WARNING', C2=TITR, C3=chain)
181 ENDIF
182 ELSE
183 !do nothing let user do what he wants
184 pstar = -infinity
185 ENDIF
186C
187 IF(amax==zero) amax = infinity
188 IF(pmin==zero) pmin =-infinity
189
190 rhor=rho0
191 pm(1) = rhor
192 pm(89)= rho0
193 pm(37)= pmin
194
195 israte=0
196
197C-----------------------------------------------
198C USER MATERIAL PARAMETERS DEFINITION
199C-----------------------------------------------
200 nuparam = 11
201 uparam(1) = c
202 uparam(2) = phi
203 uparam(3) = pstar
204 uparam(4) = a0
205 uparam(5) = a1
206 uparam(6) = a2
207 uparam(7) = amax
208 uparam(8) = g
209 uparam(9) = iform
210 uparam(10)= e
211 uparam(11)= nu
212 nuvar = 0
213 nfunc = 0
214 stifint = e
215 parmat(1) = stifint/three !
216 parmat(2) = stifint
217 parmat(3) = nu
218c---------------------------
219 mtag%G_PLA = 1
220 mtag%L_PLA = 1
221!---------------------------------------------------------
222 !MATPARAM keywords
223 matparam%IEOS = 18 ! Linear EOS is used by default
224 ipm(4) = 18
225 pm(32) = e / three/(one - two*nu) ! Bulk modulus for default EOS
226!---------------------------------------------------------
227
228 CALL init_mat_keyword(matparam,"elasto_plastic")
229
230 ! Material compatibility with /EOS option
231 CALL INIT_MAT_KEYWORD(MATPARAM,"eos")
232
233 ! EOS/Thermo keyword for pressure treatment in elements
234 CALL INIT_MAT_KEYWORD(MATPARAM,"hydro_eos")
235
236 ! Properties compatibility
237 CALL INIT_MAT_KEYWORD(MATPARAM,"solid_isotropic")
238 CALL INIT_MAT_KEYWORD(MATPARAM,"sph")
239C-------------------------------------------------
240C LISTING OUTPUT
241C-------------------------------------------------
242 WRITE(IOUT,1001) TRIM(TITR),MAT_ID,102
243 WRITE(IOUT,1000)
244 IF(IS_ENCRYPTED)THEN
245 WRITE(IOUT,'(5X,A,//)')'CONFIDENTIAL DATA'
246 ELSE
247 WRITE(IOUT,1002)RHO0,RHOR
248 WRITE(IOUT,1100)E,NU,C,PHI_DEG,PMIN
249 WRITE(IOUT,1200)IFORM
250 SELECT CASE(IFORM)
251 CASE(1)
252 WRITE(IOUT,1201)
253 CASE(2)
254 WRITE(IOUT,1202)
255 CASE(3)
256 WRITE(IOUT,1203)
257 CASE(4)
258 WRITE(IOUT,1204)
259 END SELECT
260 WRITE(IOUT,1300)A0,A1,A2,AMAX,PSTAR
261 ENDIF
262C
263 1000 FORMAT(
264 & 5X,' EXTENDED DRUCKER-PRAGER MATERIAL (DPRAG2) ',/,
265 & 5X,' ----------------------------------------- ')
266 1001 FORMAT(/
267 & 5X,A,/,
268 & 5X,'MATERIAL NUMBER . . . . . . . . . . . .=',I10/,
269 & 5X,'MATERIAL LAW. . . . . . . . . . . . . .=',I10/)
270 1002 FORMAT(
271 & 5X,'INITIAL DENSITY . . . . . . . . . . . .=',1PG20.13/,
272 & 5X,'REFERENCE DENSITY . . . . . . . . . . .=',1PG20.13/)
273 1100 FORMAT(
274 & 5X,'YOUNG MODULUS . . . . . . . . . . . . .=',1PG20.13/
275 & 5X,'POISSON RATIO . . . . . . . . . . . . .=',1PG20.13/
276 & 5X,'COHESION. . . . . . . . . . . . . . . .=',1PG20.13/
277 & 5X,'ANGLE OF INTERNAL FRICTION. . . . . . .=',1PG20.13/
278 & 5X,'MINIMUM PRESSURE. . . . . . . . . . . .=',1PG20.13)
279 1200 FORMAT(
280 & 5X,'DRUCKER-PRAGER MATERIAL CRITERION DEFINED FROM MOHR-COULOMB PARAMETERS',/,
281 & 5X,'FORMULATION FLAG. . . . . . . . . . . .=',I10)
282 1201 FORMAT(
283 & 5X,'-> CIRCUMBSCRIBED CRITERIA')
284 1202 FORMAT(
285 & 5X,'-> MIDDLE CRITERIA')
286 1203 FORMAT(
287 & 5X,'-> INSCRIBED CRITERIA')
288 1204 FORMAT(
289 & 5X,'-> ORIGINAL MOHR-COULOMB CRITERIA')
290 1300 FORMAT(
291 & 5X,'PARAMETERS USED TO DEFINE CRITERIA',/,
292 & 5X,'A0. . . . . . . . . . . . . . . . . . .=',1PG20.13/
293 & 5X,'A1. . . . . . . . . . . . . . . . . . .=',1PG20.13/
294 & 5X,'A2. . . . . . . . . . . . . . . . . . .=',1PG20.13/
295 & 5X,'AMAX. . . . . . . . . . . . . . . . . .=',1PG20.13/
296 & 5X,'YIELD FUNCTION PRESSURE ROOT. . . . . .=',1PG20.13//)
297
298 RETURN
299 END
#define alpha
Definition eval.h:35
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_mat102(uparam, maxuparam, nuparam, israte, nuvar, nfunc, parmat, unitab, mat_id, titr, mtag, lsubmodel, pm, ipm, matparam)
subroutine init_mat_keyword(matparam, keyword)
integer, parameter nchartitle
integer, parameter ncharkey
integer, parameter ncharfield
integer nsubmod
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:895