OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
law88_upd.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!|| law88_upd ../starter/source/materials/mat/mat088/law88_upd.F
25!||--- called by ------------------------------------------------------
26!|| updmat ../starter/source/materials/updmat.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| arret ../starter/source/system/arret.F
30!|| func_inters ../starter/source/tools/curve/func_inters.F
31!|| func_inters_c ../starter/source/tools/curve/func_inters.F
32!|| func_slope ../starter/source/tools/curve/func_slope.F
33!||--- uses -----------------------------------------------------
34!|| message_mod ../starter/share/message_module/message_mod.F
35!|| table_mod ../starter/share/modules1/table_mod.F
36!||====================================================================
37 SUBROUTINE law88_upd(IOUT ,TITR ,UPARAM ,NPC ,PLD ,
38 . NFUNC ,IFUNC ,MAT_ID ,FUNC_ID,PM ,
39 . NFUNCT )
40 USE message_mod
41C-----------------------------------------------
42C M o d u l e s
43C-----------------------------------------------
44 USE message_mod
45 USE table_mod
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "param_c.inc"
55C-----------------------------------------------
56C D u m m y A r g u m e n t s
57C-----------------------------------------------
58 CHARACTER(LEN=NCHARTITLE) :: TITR
59 INTEGER MAT_ID,IOUT
60 INTEGER ,INTENT(IN) :: NFUNC
61 INTEGER ,INTENT(IN) :: NFUNCT
62 INTEGER NPC(*), FUNC_ID(NFUNCT),IFUNC(NFUNC)
63 my_real uparam(*),pld(*)
64 my_real , DIMENSION(NPROPM), INTENT(INOUT) :: pm
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER I,J,K,FUNC,FUND,PN,IOK,NL,IUNL_FOR,ICASE,NV,
69 . IC1,IC2,NOGD,II,JJ,ICHECK,ITENS
70 my_real kc,kt,kfc,kft,gmax,deri,stiff,stiffmin,stiffini,
71 . stiffmax,stiffavg,xint1,yint1,xint2,yint2,fac,fac1,fac2,
72 . dx,dy, xinc,yinc,xint,yint
73 my_real
74 . emax, emin,eini,scalefac,e0,ec_max,nu,gs
75 my_real , DIMENSION(:), ALLOCATABLE :: stress,stretch
76C=======================================================================
77C----------------------------
78 DO j = 1, nfunc
79 k = ifunc(j)
80 ic1 = npc(k)
81 ic2 = npc(k+1)
82 nogd = (ic2-ic1)/2
83 ALLOCATE (stretch(nogd), stress(nogd))
84 jj = 0
85 icheck = 0
86 DO ii = ic1,ic2-2,2
87 jj=jj+1
88 stretch(jj) = pld(ii) + one
89 stress(jj) = pld(ii + 1)
90 IF(pld(ii) <= - one) THEN
91 CALL ancmsg(msgid=3085,
92 . msgtype=msgwarning,
93 . anmode=aninfo,
94 . i1=mat_id,
95 . c1=titr,
96 . i2=func_id(k)) ! Id_function
97 ENDIF
98 !! check if the curve don't have (0,0) point.
99 IF( pld(ii) == zero .AND. pld(ii + 1) == zero )icheck = 1
100 ENDDO
101 IF(icheck == 0 ) THEN
102 ! Error message
103 CALL ancmsg(msgid=1896,
104 . msgtype=msgerror,
105 . anmode=aninfo,
106 . i1=mat_id,
107 . c1=titr,
108 . i2=func_id(k)) ! Id_function
109 CALL arret(2)
110 ENDIF
111C check if the curve is monotonic
112 DO jj =1,nogd - 1
113 dx = stretch(jj + 1) - stretch(jj)
114 dy = stress(jj + 1) - stress(jj)
115 IF(dx * dy < zero) THEN
116 CALL ancmsg(msgid=1176,
117 . msgtype=msgerror,
118 . anmode=aninfo,
119 . i1=mat_id,
120 . c1=titr,
121 . i2=func_id(k))
122 ENDIF
123 ENDDO
124 DEALLOCATE( stretch,stress)
125 ENDDO ! NFUNC
126c
127c Intersection - quasistatic curve and unloading curve but is not used
128c
129 nl = int(uparam(4))
130 iunl_for = nint(uparam(5))
131 itens = nint(uparam(8))
132 icase = nint(uparam(9))
133 nv = 9 + 2*nfunc
134c
135 xinc = zero
136 yinc = zero
137 xint = zero
138 yint = zero
139 func = ifunc(1)
140 IF(nfunc > nl ) THEN
141 fund = ifunc(nl + 1)
142 fac1 = uparam(11 )
143 fac2 = uparam(11 + 2*nl )
144C intersection pt of tension if existing
145 uparam(nv + 1) = 0 ! not existing
146 IF(func /= 0 .AND. fund /= 0) THEN
147 CALL func_inters(titr ,mat_id ,func ,fund ,fac1 ,
148 . fac2 ,npc ,pld ,xint ,yint )
149 uparam(nv + 2) = xint
150 uparam(nv + 3) = yint
151 IF(xint*yint /= zero)uparam(nv + 1) = 1 ! only tension
152C intersection pt of compression if existing
153 CALL func_inters_c(titr ,mat_id ,func ,fund ,fac1 ,
154 . fac2 ,npc ,pld ,xinc ,yinc )
155 uparam(nv + 4) = xinc
156 uparam(nv + 5) = yinc
157 IF(xinc*yinc /= zero ) THEN
158 IF(int(uparam(nv + 1)) == 0 )THEN
159 uparam(nv + 1) = -1 ! only compression
160 ELSE
161 uparam(nv + 1) = 2 ! tension & compression
162 ENDIF
163 ENDIF
164 ENDIF
165 ENDIF
166 WRITE(iout,1000)
167 IF(xint*yint > zero) WRITE(iout,1600) xint,yint
168 IF(xinc*yinc > zero) WRITE(iout,1700) xinc,yinc
169C-----check E_MAX
170 emax = zero
171 emin = ep20
172 eini = zero
173 DO j = 1, nfunc
174 scalefac= uparam(9 + 2*j )
175 CALL func_slope(ifunc(j),scalefac,npc,pld,stiffmin,stiffmax,stiffini,stiffavg)
176 emax = max(emax, stiffmax )
177 emin = min(emin, stiffmin)
178 eini = max(eini, stiffini)
179 ENDDO ! NFUNC
180 nu =uparam(2)
181 gs =uparam(3)
182 e0 = two*gs*(one + nu)
183 ec_max = max(e0,emax)
184 pm(24) = ec_max
185 WRITE(iout,1003) ec_max
186c----- ------
187 1000 FORMAT
188 & (5x,'TABULATED OGDEN LAW',/,
189 & 5x,'-------------',//)
190 1600 FORMAT
191 & (5x, 'STRAIN TENSION OF INTERSECTION PT BETWEEN QUASISTAIC AND UNLOADING CURVES. . . . . . . .=',1pg20.13/
192 & ,5x, 'STRESS TENSION OF INTERSECTION PT BETWEEN QUASISTAIC AND UNLOADING CURVES. . . . . . . . =',1pg20.13//)
193
194 1700 FORMAT
195 & (5x, 'STRAIN COMPRESSION OF INTERSECTION PT BETWEEN QUASISTAIC AND UNLOADING CURVES. . . . . . . .=',1pg20.13/
196 & ,5x, 'STRESS COMPRESSION OF INTERSECTION PT BETWEEN QUASISTAIC AND UNLOADING CURVES. . . . . . . . =',1pg20.13//)
197 1003 FORMAT(
198 & 5x,'YOUNG''S MODULUS FOR HG COMPUTE . . . .=',1pg20.13/)
199 RETURN
200 END
#define my_real
Definition cppsort.cpp:32
subroutine func_inters(titr, mat_id, func1, func2, fac1, fac2, npc, pld, xint, yint)
Definition func_inters.F:32
subroutine func_inters_c(titr, mat_id, func, fund, fac1, fac2, npc, pld, xinc, yinc)
subroutine func_slope(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition func_slope.F:37
subroutine law88_upd(iout, titr, uparam, npc, pld, nfunc, ifunc, mat_id, func_id, pm, nfunct)
Definition law88_upd.F:40
#define min(a, b)
Definition macros.h:20
#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 arret(nn)
Definition arret.F:87