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 my_real :: fac
81 INTEGER :: IMID(21)
82C-----------------------------------------------
83C B o d y
84C-----------------------------------------------
85 is_available = .false.
86 nbmat = 0
87 CALL hm_get_intv('NIP',nbmat,is_available,lsubmodel)
88 multi_fvm%NBMAT = max(multi_fvm%NBMAT, nbmat)
89
90 IF (nbmat > 21) THEN
91 !! Limitation to 20 material
92 CALL ancmsg(msgid = 87, msgtype = msgerror, anmode = aninfo)
93 ENDIF
94
95 ! Storing number of materials
96 ipm(20) = nbmat
97 pm(20) = nbmat + em01
98 matparam%MULTIMAT%NB = nbmat
99 ! Multimaterial data
100 IF(.NOT.ALLOCATED(matparam%multimat%vfrac))ALLOCATE(matparam%multimat%vfrac(nbmat))
101 IF(.NOT.ALLOCATED(matparam%multimat%mid)) ALLOCATE(matparam%multimat%mid(nbmat))
102
103 ! Reading submaterial IDS and corresponding volumic fractions
104 sum_frac_vol = zero
105 DO ii = 1, nbmat
106 CALL hm_get_int_array_index('MAT_ID_ARRAY',mat_id,ii,is_available,lsubmodel)
107 CALL hm_get_float_array_index('VOL_FRAC_ARRAY',frac_vol,ii,is_available,lsubmodel,unitab)
108 ipm(20 + ii) = mat_id
109 pm(20 + ii) = frac_vol
110 imid(ii) = mat_id
111 vfrac(ii) = frac_vol
112 sum_frac_vol = sum_frac_vol + frac_vol
113 IF (frac_vol < zero .OR. frac_vol > one) THEN
114 IF (num_inivol == 0) THEN
115 CALL ancmsg(msgid = 1511, msgtype = msgerror, anmode = aninfo, c1 = "ERROR", i1 = id, i2 = mat_id, r1 = frac_vol)
116 ELSE
117 CALL ancmsg(msgid = 1511, msgtype = msgwarning, anmode = aninfo, c1 = "WARNING", i1 = id, i2 = mat_id, r1 = frac_vol)
118 ENDIF
119 ENDIF
120 ENDDO
121
122 ! Warning and Error messages SUM_FRAC_VOL /= 1.0
123 IF (abs(one-sum_frac_vol) > em14) THEN
124 IF (num_inivol == 0) THEN
125 CALL ancmsg(msgid = 1512, msgtype = msgerror, anmode = aninfo, c1 = "ERROR", i1 = id, r1 = sum_frac_vol)
126 ELSE
127 CALL ancmsg(msgid = 1512, msgtype = msgwarning, anmode = aninfo, c1 = "WARNING", i1 = id, r1 = sum_frac_vol)
128 IF(sum_frac_vol == zero)THEN
129 pm(20 + 1) = one !default submaterial is submat #1
130 vfrac(1) = one
131 ENDIF
132 ENDIF
133 ENDIF
134
135 ! Material Buffer
136 mtag%L_FRAC = 1
137 mtag%G_DELTAX = 1
138 mtag%L_DELTAX = 1
139 mtag%G_RHO = 1
140 mtag%L_RHO = 1
141
142 ! MATPARAM keywords
143 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
144
145 ! Material compatibility with /EOS option
146 CALL init_mat_keyword(matparam,"EOS")
147
148 ! EOS/Thermo keyword for pressure treatment in elements
149 CALL init_mat_keyword(matparam,"HYDRO_EOS")
150
151 ! Properties compatibility
152 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
153
154 ! Multimaterial data
155 matparam%multimat%vfrac(1:nbmat) = vfrac(1:nbmat)
156 matparam%multimat%mid(1:nbmat) = imid(1:nbmat)
157
158 ! Starter listing output
159 WRITE(iout,1000) nbmat
160 DO ii = 1, nbmat
161 WRITE(iout, 1010) matparam%multimat%mid(ii), matparam%multimat%vfrac(ii)
162 ENDDO
163
164 1000 FORMAT(
165 & 5x,' MULTIFLUID LAW ',/,
166 & 5x,' -------------- ',/,
167 & 5x,' NUMBER OF MATERIALS. . . . . . .=',i8//)
168 1010 FORMAT(
169 & 5x,' MATERIAL ID', i8, ' ; VOLUME FRACTION',1pg20.13/)
170 RETURN
171
172C-----------------------------------------------
#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:895