OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat20.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_mat20 ../starter/source/materials/mat/mat020/hm_read_mat20.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_mat20(
39 . IPM ,PM ,UNITAB ,MAT_ID ,TITR ,
40 . LSUBMODEL,MTAG ,MATPARAM )
41C-----------------------------------------------
42C D e s c r i p t i o n
43C-----------------------------------------------
44C READ MAT LAW20 WITH HM READER
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE unitab_mod
49 USE elbuftag_mod
50 USE message_mod
51 USE submodel_mod
52 USE matparam_def_mod
54 USE multimat_param_mod , ONLY : m20_discrete_fill
55C-----------------------------------------------
56C I m p l i c i t T y p e s
57C-----------------------------------------------
58#include "implicit_f.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "units_c.inc"
63#include "com01_c.inc"
64#include "param_c.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
69 INTEGER, INTENT(INOUT) :: IPM(NPROPMI)
70 INTEGER, INTENT(IN) :: MAT_ID
71 my_real, INTENT(INOUT) :: pm(npropm)
72 TYPE(mlaw_tag_), INTENT(INOUT) :: MTAG
73 CHARACTER(LEN=NCHARTITLE),INTENT(IN) :: TITR
74 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(*)
75 TYPE(matparam_struct_) ,INTENT(INOUT) :: MATPARAM
76C-----------------------------------------------
77C L o c a l V a r i a b l e s
78C-----------------------------------------------
79 INTEGER MAT(5), I, NMAT
80 my_real AMAT(5)
81 INTEGER CMAT(5)
82 DATA cmat/0,0,0,0,0/
83 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
84C-----------------------------------------------
85C S o u r c e
86C-----------------------------------------------
87 is_encrypted = .false.
88 is_available = .false.
89
90 CALL hm_option_is_encrypted(is_encrypted)
91
92C Number of material (it's always 2...)
93 nmat = 2
94C
95 CALL hm_get_intv('MAT1', mat(1), is_available, lsubmodel)
96 CALL hm_get_intv('MAT2', mat(2), is_available, lsubmodel)
97 CALL hm_get_intv('IC1', cmat(1), is_available, lsubmodel)
98 CALL hm_get_intv('IC2', cmat(2), is_available, lsubmodel)
99 CALL hm_get_intv('IDISCRETE', cmat(3), is_available, lsubmodel)
100C Material proportions
101 CALL hm_get_floatv('MAT_ALPHA1', amat(1), is_available, lsubmodel, unitab)
102 CALL hm_get_floatv('MAT_ALPHA2', amat(2), is_available, lsubmodel, unitab)
103
104 DO i=1,2
105 pm(20 + i) = mat(i) + em01
106 pm(30 + i) = amat(i)
107 pm(185 + i) = cmat(i)
108 ENDDO
109 pm(20)=nmat+em01
110 nmult=max(nmult,nmat)
111
112 ! Multimaterial data
113 matparam%multimat%nb = 2
114 IF(.NOT.ALLOCATED(matparam%multimat%vfrac))ALLOCATE(matparam%multimat%vfrac(2))
115 IF(.NOT.ALLOCATED(matparam%multimat%mid)) ALLOCATE(matparam%multimat%mid(2))
116 matparam%multimat%nb = 2
117 matparam%multimat%vfrac(1:2) = amat(1:2)
118 matparam%multimat%mid(1:2) = mat(1:2)
119
120 ! output
121 WRITE(iout, 900) trim(titr),mat_id,20
122 WRITE(iout,1000)
123 IF(is_encrypted)THEN
124 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
125 ELSE
126 WRITE(iout,1300)(mat(i),amat(i),cmat(i),i=1,nmat)
127 ENDIF
128C
129 IF(cmat(3)>=one)m20_discrete_fill=.true.
130
131 IF(nspmd > 1) THEN
132 CALL ancmsg(msgid=755,
133 . msgtype=msgerror,
134 . anmode=aninfo,
135 . c1='LAW20/2D MULTIMATERIAL')
136 ENDIF
137C----- Definition des variables internes (stockage elementaire)
138 mtag%L_FRAC = 1 ! pourcentage de phase
139C-----------
140 ! MATPARAM keywords
141 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
142 ! Properties compatibility
143 CALL init_mat_keyword(matparam,"SOLID_ORTHOTROPIC")
144C-----------
145 RETURN
146C--------------------------------
147 900 FORMAT(/
148 & 5x,a,/,
149 & 5x,'MATERIAL NUMBER. . . . . . . . . . . . . . .=',i10/,
150 & 5x,'MATERIAL LAW . . . . . . . . . . . . . . . .=',i10/)
151 1000 FORMAT(
152 & 5x,40h /mat/law20 : 2d bi-material law ,/,
153 & 5x,40h ------------------------------- ,//)
154 1300 FORMAT(
155 & 5x,40hreferenced material number. . . . . . .=,i5/,
156 & 5x,40hfilling ratio . . . . . . . . . . . . .=,e12.4/,
157 & 5x,40hincoming phasis control flag. . . . . .=,i5)
158C-----------
159 RETURN
160 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_mat20(ipm, pm, unitab, mat_id, titr, lsubmodel, mtag, 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
program starter
Definition starter.F:39