OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat151.F File Reference
#include "implicit_f.inc"
#include "units_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_mat151 (mtag, pm, ipm, id, titr, multi_fvm, unitab, lsubmodel, matparam)

Function/Subroutine Documentation

◆ hm_read_mat151()

subroutine hm_read_mat151 ( type(mlaw_tag_), intent(inout) mtag,
dimension(npropm), intent(inout) pm,
integer, dimension(npropmi), intent(inout) ipm,
integer, intent(in) id,
character(len=nchartitle), intent(in) titr,
type(multi_fvm_struct), intent(inout) multi_fvm,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
type(matparam_struct_), intent(inout) matparam )

Definition at line 39 of file hm_read_mat151.F.

40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE unitab_mod
44 USE elbuftag_mod
45 USE message_mod
46 USE multi_fvm_mod
47 USE submodel_mod
49 USE matparam_def_mod, ONLY : matparam_struct_
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55C-----------------------------------------------
56C C o m m o n B l o c k s
57C-----------------------------------------------
58#include "units_c.inc"
59#include "param_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
64 INTEGER,INTENT(INOUT) :: IPM(NPROPMI)
65 INTEGER,INTENT(IN) :: ID
66 my_real,INTENT(INOUT) :: pm(npropm)
67 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
68 TYPE(MLAW_TAG_),INTENT(INOUT) :: MTAG
69 TYPE(MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
70 TYPE(SUBMODEL_DATA),INTENT(IN) :: LSUBMODEL(NSUBMOD)
71 TYPE(MATPARAM_STRUCT_) ,INTENT(INOUT) :: MATPARAM
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 LOGICAL :: IS_AVAILABLE
76 INTEGER :: NBMAT, MAT_ID ! Number of declared materials
77 INTEGER :: II
78 my_real :: frac_vol, sum_frac_vol
79 my_real :: vfrac(21)
80 INTEGER :: IMID(21)
81C-----------------------------------------------
82C B o d y
83C-----------------------------------------------
84 is_available = .false.
85 nbmat = 0
86 CALL hm_get_intv('NIP',nbmat,is_available,lsubmodel)
87 multi_fvm%NBMAT = max(multi_fvm%NBMAT, nbmat)
88
89 IF (nbmat > 21) THEN
90 !! Limitation to 20 material
91 CALL ancmsg(msgid = 87, msgtype = msgerror, anmode = aninfo)
92 ENDIF
93
94 ! Storing number of materials
95 ipm(20) = nbmat
96 pm(20) = nbmat + em01
97 matparam%MULTIMAT%NB = nbmat
98 ! Multimaterial data
99 IF(.NOT.ALLOCATED(matparam%multimat%vfrac))ALLOCATE(matparam%multimat%vfrac(nbmat))
100 IF(.NOT.ALLOCATED(matparam%multimat%mid)) ALLOCATE(matparam%multimat%mid(nbmat))
101
102 ! Reading submaterial IDS and corresponding volumic fractions
103 sum_frac_vol = zero
104 DO ii = 1, nbmat
105 CALL hm_get_int_array_index('MAT_ID_ARRAY',mat_id,ii,is_available,lsubmodel)
106 CALL hm_get_float_array_index('VOL_FRAC_ARRAY',frac_vol,ii,is_available,lsubmodel,unitab)
107 ipm(20 + ii) = mat_id
108 pm(20 + ii) = frac_vol
109 imid(ii) = mat_id
110 vfrac(ii) = frac_vol
111 sum_frac_vol = sum_frac_vol + frac_vol
112 IF (frac_vol < zero .OR. frac_vol > one) THEN
113 IF (num_inivol == 0) THEN
114 CALL ancmsg(msgid = 1511, msgtype = msgerror, anmode = aninfo, c1 = "ERROR", i1 = id, i2 = mat_id, r1 = frac_vol)
115 ELSE
116 CALL ancmsg(msgid = 1511, msgtype = msgwarning, anmode = aninfo, c1 = "WARNING", i1 = id, i2 = mat_id, r1 = frac_vol)
117 ENDIF
118 ENDIF
119 ENDDO
120
121 ! Warning and Error messages
122 IF (sum_frac_vol /= one) THEN
123 IF (num_inivol == 0) THEN
124 CALL ancmsg(msgid = 1512, msgtype = msgerror, anmode = aninfo, c1 = "ERROR", i1 = id, r1 = sum_frac_vol)
125 ELSE
126 CALL ancmsg(msgid = 1512, msgtype = msgwarning, anmode = aninfo, c1 = "WARNING", i1 = id, r1 = sum_frac_vol)
127 IF(sum_frac_vol == zero)THEN
128 pm(20 + 1) = one !default submaterial is submat #1
129 vfrac(1) = one
130 ENDIF
131 ENDIF
132 ENDIF
133
134 ! Material Buffer
135 mtag%L_FRAC = 1
136 mtag%G_DELTAX = 1
137 mtag%L_DELTAX = 1
138 mtag%G_RHO = 1
139 mtag%L_RHO = 1
140
141 ! MATPARAM keywords
142 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
143
144 ! Material compatibility with /EOS option
145 CALL init_mat_keyword(matparam,"EOS")
146
147 ! EOS/Thermo keyword for pressure treatment in elements
148 CALL init_mat_keyword(matparam,"HYDRO_EOS")
149
150 ! Properties compatibility
151 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
152
153 ! Multimaterial data
154 matparam%multimat%vfrac(1:nbmat) = vfrac(1:nbmat)
155 matparam%multimat%mid(1:nbmat) = imid(1:nbmat)
156
157 ! Starter listing output
158 WRITE(iout,1000) nbmat
159 DO ii = 1, nbmat
160 WRITE(iout, 1010) matparam%multimat%mid(ii), matparam%multimat%vfrac(ii)
161 ENDDO
162
163 1000 FORMAT(
164 & 5x,' MULTIFLUID LAW ',/,
165 & 5x,' -------------- ',/,
166 & 5x,' NUMBER OF MATERIALS. . . . . . .=',i8//)
167 1010 FORMAT(
168 & 5x,' MATERIAL ID', i8, ' ; VOLUME FRACTION',1pg20.13/)
169 RETURN
170
171C-----------------------------------------------
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_float_array_index(name, rval, index, is_available, lsubmodel, unitab)
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine init_mat_keyword(matparam, keyword)
#define max(a, b)
Definition macros.h:21
initmumps id
integer num_inivol
Definition inivol_mod.F:85
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