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 , IMATVIS ,
39 . NUVAR ,IFUNC ,MAXFUNC ,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
68C-----------------------------------------------
69C I m p l i c i t T y p e s
70C-----------------------------------------------
71#include "implicit_f.inc"
72C-----------------------------------------------
73C C o m m o n B l o c k s
74C-----------------------------------------------
75#include "units_c.inc"
76#include "param_c.inc"
77C-----------------------------------------------
78C D u m m y A r g u m e n t s
79C-----------------------------------------------
80 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
81 my_real, DIMENSION(NPROPM),INTENT(INOUT) :: PM
82 my_real, DIMENSION(100),INTENT(INOUT) :: PARMAT
83 my_real, DIMENSION(MAXUPARAM) ,INTENT(INOUT) :: uparam
84 INTEGER, DIMENSION(NPROPMI),INTENT(INOUT) :: IPM
85 INTEGER, DIMENSION(MAXFUNC),INTENT(INOUT) :: IFUNC
86 INTEGER, INTENT(INOUT) :: ISRATE,IMATVIS,NFUNC,MAXFUNC,MAXUPARAM,NUPARAM,NUVAR
87 TYPE(mlaw_tag_),INTENT(INOUT) :: MTAG
88 INTEGER,INTENT(IN) :: MAT_ID
89 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
90 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(NSUBMOD)
91 TYPE(matparam_struct_) ,INTENT(INOUT) :: MATPARAM
92C-----------------------------------------------
93C L o c a l V a r i a b l e s
94C-----------------------------------------------
95 my_real :: e,nu,c,pstar,amax,g, delta,stifint,pmin,bid,phi_deg
96 my_real :: a0,a1,a2,rho0,rhor
97
98 CHARACTER(LEN=NCHARFIELD) :: STRING, KEYNET
99 CHARACTER(LEN=NCHARKEY) :: KEY
100
101 INTEGER :: IFORM
102
103 DOUBLE PRECISION :: PHI,K,ALPHA
104
105 LOGICAL :: IS_ENCRYPTED,IS_AVAILABLE
106
107 CHARACTER*64 :: CHAIN
108C-----------------------------------------------
109C S o u r c e L i n e s
110C-----------------------------------------------
111 is_encrypted = .false.
112 is_available = .false.
113 k = 0.0d0
114
115 CALL hm_option_is_encrypted(is_encrypted)
116
117 CALL hm_get_intv ('IFORM',iform ,is_available, lsubmodel)
118
119 CALL hm_get_floatv('MAT_RHO' ,rho0 ,is_available, lsubmodel, unitab)
120
121 CALL hm_get_floatv('MAT_E' ,e ,is_available, lsubmodel, unitab)
122 CALL hm_get_floatv('MAT_NU' ,nu ,is_available, lsubmodel, unitab)
123
124 CALL hm_get_floatv('MAT102_C' ,c ,is_available, lsubmodel, unitab)
125 CALL hm_get_floatv('MAT102_PHI' ,phi ,is_available, lsubmodel, unitab)
126 CALL hm_get_floatv('MAT102_AMAX' ,amax ,is_available, lsubmodel, unitab)
127
128 CALL hm_get_floatv('MAT102_PMIN' ,pmin ,is_available, lsubmodel, unitab)
129
130 ! C : Mohr-Coulomb cohesion (intercept) (in Pa)
131 ! PHI : Mohr-Coulomb angle of internal friction (angle, degree)
132 ! Iform : Formulation Flag (circumscribed,inscribed,middle)
133
134C-----------------------------------------------
135C UNITS
136C-----------------------------------------------
137 phi_deg = phi
138 phi = phi*3.141592653589793238d00/180.d00
139C-----------------------------------------------
140C DEFAULTS
141C-----------------------------------------------
142 IF(iform<=0 .OR. iform>=4)iform=2
143C-----------------------------------------------
144C YIELD PARAMETERS
145C-----------------------------------------------
146 g=e/two/(one+nu)
147 SELECT CASE(iform)
148 CASE(1)
149 k = six*c*cos(phi)/sqrt(three)/(three-sin(phi))
150 alpha = two*sin(phi)/sqrt(three)/(three-sin(phi))
151 CASE(2)
152 k = six*c*cos(phi)/sqrt(three)/(three+sin(phi))
153 alpha = two*sin(phi)/sqrt(three)/(three+sin(phi))
154 CASE(3)
155 k = three*c*cos(phi)/sqrt(nine+three*sin(phi)*sin(phi))
156 alpha = sin(phi)/sqrt(nine+three*sin(phi)*sin(phi))
157 END SELECT
158 a0 = k*k
159 a1 = six*k*alpha
160 a2 = nine*alpha*alpha
161
162 IF(e<=zero)THEN
163 chain='YOUNG MODULUS 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 IF(nu<=zero)THEN
168 chain='POISSON RATIO MUST BE DEFINED '
169 CALL ancmsg(msgid=829, msgtype=msgerror, anmode=aninfo, i1=10, i2=mat_id, c1='ERROR', c2=titr, c3=chain)
170 ENDIF
171
172 pstar = -infinity
173 IF(a2==zero .AND. a1/=zero)THEN
174 pstar=-a0/a1
175 ELSEIF(a2/=zero)THEN
176 delta = a1*a1-four*a0*a2
177 !Si intersection avec l'axe
178 IF(delta >= zero)THEN
179 delta=sqrt(delta)
180 pstar = (-a1+delta)/two/a2
181
182 ELSE
183 pstar = -a1/two/a2 ! extremum
184 ! chain='FITTED YIELD FUNCTION HAS NO ROOT. CHECK INPUT PARAMETER '
185 ! CALL ANCMSG( MSGID=829, MSGTYPE=MSGWARNING, ANMODE=ANINFO, I1=10, I2=MAT_ID, C1='WARNING', C2=TITR, C3=chain)
186 ENDIF
187 ELSE
188 !do nothing let user do what he wants
189 pstar = -infinity
190 ENDIF
191C
192 IF(amax==zero) amax = infinity
193 IF(pmin==zero) pmin =-infinity
194
195 rhor=rho0
196 pm(1) = rhor
197 pm(89)= rho0
198 pm(37)= pmin
199
200 israte=0
201
202C-----------------------------------------------
203C USER MATERIAL PARAMETERS DEFINITION
204C-----------------------------------------------
205 nuparam = 11
206 uparam(1) = c
207 uparam(2) = phi
208 uparam(3) = pstar
209 uparam(4) = a0
210 uparam(5) = a1
211 uparam(6) = a2
212 uparam(7) = amax
213 uparam(8) = g
214 uparam(9) = iform
215 uparam(10)= e
216 uparam(11)= nu
217 nuvar = 0
218 nfunc = 0
219 stifint = e
220 parmat(1) = stifint/three !
221 parmat(2) = stifint
222 parmat(3) = nu
223c---------------------------
224 mtag%G_PLA = 1
225 mtag%L_PLA = 1
226!---------------------------------------------------------
227 !MATPARAM keywords
228 matparam%IEOS = 18 ! Linear EOS is used by default
229 ipm(4) = 18
230 pm(32) = e / three/(one - two*nu) ! Bulk modulus for default EOS
231!---------------------------------------------------------
232
233 CALL init_mat_keyword(matparam,"ELASTO_PLASTIC")
234
235 ! Material compatibility with /EOS option
236 CALL init_mat_keyword(matparam,"EOS")
237
238 ! EOS/Thermo keyword for pressure treatment in elements
239 CALL init_mat_keyword(matparam,"HYDRO_EOS")
240
241 ! Properties compatibility
242 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
243 CALL init_mat_keyword(matparam,"SPH")
244C-------------------------------------------------
245C LISTING OUTPUT
246C-------------------------------------------------
247 WRITE(iout,1001) trim(titr),mat_id,102
248 WRITE(iout,1000)
249 IF(is_encrypted)THEN
250 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
251 ELSE
252 WRITE(iout,1002)rho0,rhor
253 WRITE(iout,1100)e,nu,c,phi_deg,pmin
254 WRITE(iout,1200)iform
255 SELECT CASE(iform)
256 CASE(1)
257 WRITE(iout,1201)
258 CASE(2)
259 WRITE(iout,1202)
260 CASE(3)
261 WRITE(iout,1203)
262 CASE(4)
263 WRITE(iout,1204)
264 END SELECT
265 WRITE(iout,1300)a0,a1,a2,amax,pstar
266 ENDIF
267C
268 1000 FORMAT(
269 & 5x,' EXTENDED DRUCKER-PRAGER MATERIAL (DPRAG2) ',/,
270 & 5x,' ----------------------------------------- ')
271 1001 FORMAT(/
272 & 5x,a,/,
273 & 5x,'MATERIAL NUMBER . . . . . . . . . . . .=',i10/,
274 & 5x,'MATERIAL LAW. . . . . . . . . . . . . .=',i10/)
275 1002 FORMAT(
276 & 5x,'INITIAL DENSITY . . . . . . . . . . . .=',1pg20.13/,
277 & 5x,'REFERENCE DENSITY . . . . . . . . . . .=',1pg20.13/)
278 1100 FORMAT(
279 & 5x,'YOUNG MODULUS . . . . . . . . . . . . .=',1pg20.13/
280 & 5x,'POISSON RATIO . . . . . . . . . . . . .=',1pg20.13/
281 & 5x,'COHESION. . . . . . . . . . . . . . . .=',1pg20.13/
282 & 5x,'ANGLE OF INTERNAL FRICTION. . . . . . .=',1pg20.13/
283 & 5x,'MINIMUM PRESSURE. . . . . . . . . . . .=',1pg20.13)
284 1200 FORMAT(
285 & 5x,'DRUCKER-PRAGER MATERIAL CRITERION DEFINED FROM MOHR-COULOMB PARAMETERS',/,
286 & 5x,'FORMULATION FLAG. . . . . . . . . . . .=',i10)
287 1201 FORMAT(
288 & 5x,'-> CIRCUMBSCRIBED CRITERIA')
289 1202 FORMAT(
290 & 5x,'-> MIDDLE CRITERIA')
291 1203 FORMAT(
292 & 5x,'-> INSCRIBED CRITERIA')
293 1204 FORMAT(
294 & 5x,'-> ORIGINAL MOHR-COULOMB CRITERIA')
295 1300 FORMAT(
296 & 5x,'PARAMETERS USED TO DEFINE CRITERIA',/,
297 & 5x,'A0. . . . . . . . . . . . . . . . . . .=',1pg20.13/
298 & 5x,'A1. . . . . . . . . . . . . . . . . . .=',1pg20.13/
299 & 5x,'A2. . . . . . . . . . . . . . . . . . .=',1pg20.13/
300 & 5x,'AMAX. . . . . . . . . . . . . . . . . .=',1pg20.13/
301 & 5x,'YIELD FUNCTION PRESSURE ROOT. . . . . .=',1pg20.13//)
302
303 RETURN
304 END
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, imatvis, nuvar, ifunc, maxfunc, 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:889