OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat06.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_mat06 ../starter/source/materials/mat/mat006/hm_read_mat06.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_mat ../starter/source/materials/mat/hm_read_mat.F90
27!||--- calls -----------------------------------------------------
28!|| hm_get_boolv ../starter/source/devtools/hm_reader/hm_get_boolv.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_mat06(
39 . LSUBMODEL ,MTAG6 ,UNITAB ,IPM ,PM,
40 . MAT_ID ,TITR ,ISRATE,
41 . ITYP ,MTAG17 ,MATPARAM )
42C-----------------------------------------------
43C M o d u l e s
44C-----------------------------------------------
45 USE unitab_mod
46 USE elbuftag_mod !MAXEOS
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 "scr03_c.inc"
70#include "units_c.inc"
71#include "param_c.inc"
72C-----------------------------------------------
73C D u m m y A r g u m e n t s
74C-----------------------------------------------
75 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
76 INTEGER, INTENT(INOUT) :: MAT_ID
77 INTEGER, INTENT(INOUT) :: ISRATE
78 INTEGER, DIMENSION(NPROPMI) ,INTENT(INOUT) :: IPM
79 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
80 my_real, DIMENSION(NPROPM) ,INTENT(INOUT) :: pm
81 TYPE(submodel_data), DIMENSION(*),INTENT(IN) :: LSUBMODEL
82 TYPE(mlaw_tag_), INTENT(INOUT) :: MTAG6,MTAG17
83 INTEGER,INTENT(IN) :: ITYP
84 TYPE(matparam_struct_),INTENT(INOUT) :: MATPARAM
85C-----------------------------------------------
86C L o c a l V a r i a b l e s
87C-----------------------------------------------
88 LOGICAL :: IS_AVAILABLE,IS_ENCRYPTED,IS_EOS
89 INTEGER JTUR, I, EMPTY_LINE,COUNT,IEOS,LAW6_OPT
90 my_real
91 . rho0, vis, bid, psh, c0, c1, c2, c3, c4, c5, pmin, e0, rk0,
92 . ssl, ctm, sk, se, rpr, ct1, ct2, ct3, ak, e, a, b, yp0, yp1,
93 . mu,rhor
94C-----------------------------------------------
95C S o u r c e L i n e s
96C-----------------------------------------------
97 count = 0
98 is_eos=.false.
99 pmin=zero
100 rhor=zero
101 is_encrypted=.false.
102!---
103 CALL hm_option_is_encrypted(is_encrypted)
104!
105 CALL hm_get_intv ('line_count' ,COUNT ,IS_AVAILABLE, LSUBMODEL)
106 CALL HM_GET_FLOATV('mat_rho' ,RHO0 ,IS_AVAILABLE, LSUBMODEL, UNITAB)
107 CALL HM_GET_FLOATV('refer_rho' ,RHOR ,IS_AVAILABLE, LSUBMODEL, UNITAB)
108 CALL HM_GET_BOOLV ('eos_data_exist' ,IS_EOS ,IS_AVAILABLE)
109 CALL HM_GET_INTV ('law6_opt' ,LAW6_OPT ,IS_AVAILABLE, LSUBMODEL) !1:HYD_VISC,2:HYDRO,3:K-EPS
110 CALL HM_GET_FLOATV('damp1' ,VIS ,IS_AVAILABLE, LSUBMODEL, UNITAB)
111 CALL HM_GET_FLOATV('mat_pc' ,PMIN ,IS_AVAILABLE, LSUBMODEL, UNITAB)
112
113 IF(COUNT==3)IS_EOS=.TRUE. !EoS no longer embedded since format 2018, but still compatible
114 IF(INVERS_INIT<2018)IS_EOS=.TRUE. !no embedded EoS before up to format 2017
115
116 IF (IS_EOS) THEN
117 IEOS = 1 ! polynomial EOS
118 CALL HM_GET_FLOATV('mat_c0' ,C0 ,IS_AVAILABLE, LSUBMODEL, UNITAB)
119 CALL HM_GET_FLOATV('mat_c1' ,c1 ,is_available, lsubmodel, unitab)
120 CALL hm_get_floatv('MAT_C2' ,c2 ,is_available, lsubmodel, unitab)
121 CALL hm_get_floatv('MAT_C3' ,c3 ,is_available, lsubmodel, unitab)
122 CALL hm_get_floatv('MAT_C4' ,c4 ,is_available, lsubmodel, unitab)
123 CALL hm_get_floatv('MAT_C5' ,c5 ,is_available, lsubmodel, unitab)
124 CALL hm_get_floatv('MAT_EA' ,e0 ,is_available, lsubmodel, unitab)
125 CALL hm_get_floatv('MAT_PSH' ,psh ,is_available, lsubmodel, unitab)
126 ELSE
127 e0 = zero
128 c0 = zero
129 c1 = zero
130 c2 = zero
131 c3 = zero
132 c4 = zero
133 c5 = zero
134 psh =zero
135 ieos = 0
136 ENDIF
137
138 IF (pmin == zero) pmin=-infinity
139 IF (rhor == zero) rhor=rho0
140 pm(1) = rhor
141 pm(89)= rho0
142
143 pm(23)=e0
144 pm(24)=vis
145
146 IF(rhor /= zero) THEN
147 mu = rho0/rhor-one
148 ELSE
149 mu = zero ! RHOR=0.0 => error 683 will be displayed in hm_read_mat.F
150 ENDIf
151 IF(mu < zero)THEN
152 pm(31) = -psh + c0+c1*mu+ c3*mu**3+(c4+c5*mu)*e0
153 ELSE
154 pm(31) = -psh + c0+c1*mu+c2*mu**2+c3*mu**3+(c4+c5*mu)*e0
155 ENDIF
156
157 pm(32)=c1
158 pm(33)=c2
159 pm(34)=c3
160 pm(35)=c4
161 pm(36)=c5
162 pm(37)=pmin
163 pm(80)=infinity
164 pm(88)=psh
165 pm(104)=c0 - psh
166
167!-------------------------------------------------------------
168 matparam%IEOS = ieos ! linear by default
169 ipm(4) = ieos ! keep this temporarily for output and fluid sections
170
171 ! Material compatibility with /EOS option
172 CALL init_mat_keyword(matparam,"EOS")
173
174 ! EOS/Thermo keyword for pressure treatment in elements
175 CALL init_mat_keyword(matparam,"HYDRO_EOS")
176
177 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
178
179 ! Properties compatibility
180 CALL init_mat_keyword(matparam,"SOLID_POROUS")
181 CALL init_mat_keyword(matparam,"SPH")
182C-----
183
184 WRITE(iout,2001) trim(titr),mat_id,6
185 WRITE(iout,1000)
186
187 IF(is_encrypted)THEN
188 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
189 ELSEIF (is_eos) THEN
190 WRITE(iout,2002)rho0,rhor
191 WRITE(iout,1300)vis
192 WRITE(iout,1400)psh
193 WRITE(iout,1500)c0,c1,c2,c3,c4,c5,pmin,pm(31),e0
194 ELSE
195 WRITE(iout,2002)rho0,rhor
196 WRITE(iout,1300)vis
197 WRITE(iout,1501)pmin
198 ENDIF
199
200
201c
202C---- Definition des variables internes (stockage elementaire)
203c
204 mtag6%G_RK = 1
205 mtag6%G_RE = 1
206 mtag6%L_RK = 1
207 mtag6%L_RE = 1
208 mtag6%L_VK = 1
209 mtag6%G_TEMP = 1
210 mtag6%L_TEMP = 1
211c
212 mtag17%G_RK = 1
213 mtag17%G_RE = 1
214 mtag17%L_RK = 1
215 mtag17%L_RE = 1
216 mtag17%L_VK = 1
217 mtag17%G_TEMP = 1
218 mtag17%L_TEMP = 1
219C--------------------------------
220 1000 FORMAT(
221 & 5x,' VISCOUS FLUID ',/,
222 & 5x,' -------------- ',//)
223 1300 FORMAT(
224 & 5x,'VISCOSITY . . . . . . . . . . . . . . .=',1pg20.13)
225 1400 FORMAT(
226 & 5x,'PSH PRESSURE SHIFT. . . . . . . . . . .=',1pg20.13/)
227 1500 FORMAT(
228 & 5x,'C0. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
229 & 5x,'C1. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
230 & 5x,'C2. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
231 & 5x,'C3. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
232 & 5x,'C4. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
233 & 5x,'C5. . . . . . . . . . . . . . . . . . .=',1pg20.13/,
234 & 5x,'PRESSURE CUTOFF . . . . . . . . . . . .=',1pg20.13/,
235 & 5x,'INITIAL PRESSURE. . . . . . . . . . . .=',1pg20.13/,
236 & 5x,'INITIAL INTERNAL ENERGY PER UNIT VOLUME=',1pg20.13//)
237 1501 FORMAT(
238 & 5x,'PRESSURE CUTOFF . . . . . . . . . . . .=',1pg20.13//)
239 2001 FORMAT(/
240 & 5x,a,/,
241 & 5x,'MATERIAL NUMBER . . . . . . . . . . . .=',i10/,
242 & 5x,'MATERIAL LAW. . . . . . . . . . . . . .=',i10/)
243 2002 FORMAT(
244 & 5x,'INITIAL DENSITY . . . . . . . . . . . .=',1pg20.13/,
245 & 5x,'REFERENCE DENSITY . . . . . . . . . . .=',1pg20.13)
246
247C--------------------------------
248C-----------
249 RETURN
250 END
#define my_real
Definition cppsort.cpp:32
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_mat06(lsubmodel, mtag6, unitab, ipm, pm, mat_id, titr, israte, ityp, mtag17, matparam)
subroutine init_mat_keyword(matparam, keyword)
integer, parameter nchartitle