OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat69.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_mat69 ../starter/source/materials/mat/mat069/hm_read_mat69.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_mat69(UPARAM ,MAXUPARAM,NUPARAM ,ISRATE , IMATVIS,
40 . NUVAR ,IFUNC ,MAXFUNC ,NFUNC , PARMAT,
41 . UNITAB ,ID ,TITR ,MTAG , LSUBMODEL,
42 . PM ,MATPARAM )
43C-----------------------------------------------
44C D e s c r i p t i o n
45C-----------------------------------------------
46C READ MAT LAW59 WITH HM READER ( TO BE COMPLETED )
47C
48C DUMMY ARGUMENTS DESCRIPTION:
49C ===================
50C
51C NAME DESCRIPTION
52C
53C PM MATERIAL ARRAY(REAL)
54C UNITAB UNITS ARRAY
55C 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
65 USE submodel_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, INTENT(INOUT) :: PM(NPROPM),PARMAT(100),UPARAM(MAXUPARAM)
82 INTEGER, INTENT(INOUT) :: ISRATE,IFUNC(MAXFUNC),NFUNC,MAXFUNC,MAXUPARAM,NUPARAM, NUVAR
83 TYPE(mlaw_tag_),INTENT(INOUT) :: MTAG
84 INTEGER,INTENT(IN) :: ID
85 INTEGER,INTENT(INOUT) :: IMATVIS
86 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
87 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(*)
88 TYPE(matparam_struct_) ,INTENT(INOUT) :: MATPARAM
89C-----------------------------------------------
90C L o c a l V a r i a b l e s
91C-----------------------------------------------
92 INTEGER I,BULK_FNCT,NTABLE_,NMUAL,LAWID,ILAW
93 my_real MU(5),AL(5),RHO0,RHOR
94 my_real BULK,TENSCUT,GS,NU,FSCAL,ZEP495,FSCAL_UNIT
95 INTEGER ICHECK, NSTART
96 my_real errtol
97 INTEGER IDUMMY
98 my_real rdummy
99 LOGICAL :: IS_AVAILABLE,IS_ENCRYPTED
100C-----------------------------------------------
101C S o u r c e L i n e s
102C-----------------------------------------------
103 is_encrypted = .false.
104 is_available = .false.
105 idummy = 0
106 nstart = 0
107 errtol = zero
108 ilaw = 69
109 imatvis = 1
110
111 CALL hm_option_is_encrypted(is_encrypted)
112
113 !line-1
114 CALL hm_get_floatv('MAT_RHO' ,rho0 ,is_available, lsubmodel, unitab)
115 CALL hm_get_floatv('Refer_Rho' ,rhor ,is_available, lsubmodel, unitab)
116 !line-2
117 CALL hm_get_intv('MAT_Iflag' ,lawid ,is_available, lsubmodel)
118 CALL hm_get_intv('FUN_A1' ,bulk_fnct ,is_available, lsubmodel)
119 CALL hm_get_floatv('MAT_NU' ,nu ,is_available, lsubmodel, unitab)
120 CALL hm_get_floatv('MAT_FScale' ,fscal ,is_available, lsubmodel, unitab)
121 CALL hm_get_intv('NIP' ,nmual ,is_available, lsubmodel)
122 CALL hm_get_intv('Gflag' ,icheck ,is_available, lsubmodel)
123 !-line3
124 CALL hm_get_intv ('FUN_B1' ,ntable_ ,is_available, lsubmodel)
125
126 !units
127 CALL hm_get_floatv_dim('MAT_FScale' ,fscal_unit ,is_available, lsubmodel, unitab)
128
129C-----------------------------------------------
130 nuparam = 21
131 nfunc = 2
132 nuvar = 9
133C-----------------------------------------------
134 zep495 = zep4 + nine*em02 + five*em03
135 IF(icheck == 0 ) icheck = -3
136 IF(nstart == 0 ) nstart = 100
137 IF(errtol == zero ) errtol = fiveem3
138 IF(nmual == 0 ) nmual = 2
139 IF(fscal == zero ) fscal = one*fscal_unit
140 IF(lawid == 0 ) lawid = -1
141 IF(lawid == -1) THEN
142 icheck = -3
143 nstart = 100
144 errtol = fiveem3
145 nmual = 2
146 ENDIF
147 IF (ntable_ == 0) THEN
148 CALL ancmsg(msgid=894,
149 . msgtype=msgerror,
150 . anmode=aninfo,
151 . i1=id,
152 . c1=titr)
153 ENDIF
154 IF (lawid == 0) lawid = 1
155 IF (lawid /= 1 .AND. lawid /= 2 .AND. lawid /= -1 ) THEN ! New flag (automatic fitting)
156 CALL ancmsg(msgid=882,
157 . msgtype=msgerror,
158 . anmode=aninfo,
159 . i1=id,
160 . c1=titr,i2=lawid)
161 ENDIF
162
163 tenscut = ep20
164 DO i=1,5
165 mu(i)=ten*fscal_unit !pressure
166 al(i)=ten*fscal_unit !pressure
167 ENDDO
168 gs = zero
169 IF (lawid == 1) THEN
170 DO i=1,5
171 gs = gs + mu(i)*al(i)
172 ENDDO
173 ELSEIF (lawid == 2) THEN
174 DO i=1,2
175 gs = gs + mu(i)*al(i)
176 ENDDO
177 ENDIF
178C---
179 IF (nu == zero ) nu = zep495
180 bulk = gs*(one+nu)/max(em20,three*(one-two*nu))
181 ifunc(1) = bulk_fnct
182 ifunc(2) = ntable_
183 parmat(1)= gs
184 parmat(2)= gs*(one+nu)
185 parmat(3)= nu
186 parmat(6)= bulk
187 mu = gs/two
188C---
189 IF (rhor == zero) rhor=rho0
190 pm(1) = rhor
191 pm(2) = gs
192 pm(89) = rho0
193 pm(100)= bulk
194
195 uparam(1) = mu(1)
196 uparam(2) = mu(2)
197 uparam(3) = mu(3)
198 uparam(4) = mu(4)
199 uparam(5) = mu(5)
200 uparam(6) = al(1)
201 uparam(7) = al(2)
202 uparam(8) = al(3)
203 uparam(9) = al(4)
204 uparam(10)= al(5)
205 uparam(11)= bulk
206 uparam(12)= tenscut
207 uparam(13)= lawid
208 uparam(14)= nu
209 uparam(15)= fscal
210 uparam(17)= gs
211 uparam(18)= nmual
212 uparam(19)= icheck
213 uparam(20)= nstart
214 uparam(21) = zero
215 IF(is_encrypted)uparam(21)= one
216c-----------------
217 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
218 CALL init_mat_keyword(matparam,"TOTAL")
219 CALL init_mat_keyword(matparam,"HOOK")
220 ! Properties compatibility
221 CALL init_mat_keyword(matparam,"SHELL_ISOTROPIC")
222 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
223c-----------------
224 WRITE(iout,1100) trim(titr),id,69
225 WRITE(iout,1000)
226 IF(is_encrypted)THEN
227 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
228 ELSE
229 WRITE(iout,1200) rho0
230 IF (ntable_ /= 0) THEN
231 WRITE(iout,'(5X,A,//)')'HYPERELASTIC MATERIAL CONSTANTS WILL BE DETERMINED BY NONLINEAR LEAST SQUARE FITTING '
232 WRITE(iout,1300) nu,lawid,bulk_fnct,fscal,nmual,icheck
233 ENDIF
234 ENDIF
235C-----
236 RETURN
237C---------------------------------------------------------------
238 1000 FORMAT
239 & (5x,29h tabulated hyper-elastic law,/,
240 & 5x,29h ---------------------------,//)
241 1100 FORMAT(/
242 & 5x,a,/,
243 & 5x,'MATERIAL NUMBER . . . . . . . . . . . .=',i10/,
244 & 5x,'MATERIAL LAW. . . . . . . . . . . . . .=',i10/)
245 1200 FORMAT(
246 & 5x,'INITIAL DENSITY . . . . . . . . . . . .=',1pg20.13/)
247 1300 FORMAT
248 &(5x,'POISSON RATIO . . . . . . . . . . . . .=',1pg20.13/
249 &,5x,'LAW TYPE. . . . . . . . . . . . . . . .=',i10/
250 &,5x,'BULK FUNCTION ID. . . . . . . . . . . .=',i10/
251 &,5x,'SCALE FACTOR FOR BULK FUNCTION. . . . .=',1pg20.13/
252 &,5x,'FIT ORDER . . . . . . . . . . . . . . .=',i10/
253 &,5x,'ICHECK = ', i10//)
254C---------------------------------------------------------------
255 END SUBROUTINE hm_read_mat69
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_mat69(uparam, maxuparam, nuparam, israte, imatvis, nuvar, ifunc, maxfunc, nfunc, parmat, unitab, id, titr, mtag, lsubmodel, pm, 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
subroutine tabulated(iflag, nel, pm, off, eint, mu, espe, dvol, df, vnew, mat, psh, pnew, dpdm, dpde, npf, tf)
Definition tabulated.F:32