Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MP/Source/TestConstit.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 PROGRAM testconst
54 ! xlf90 -qsuffix=f=f90 -c v3d10_nl_huang.f90
55 ! xlf90 -qsuffix=f=f90 -c HUANG_Const_Model.f90
56 ! xlf90 -qsuffix=f=f90 TestConstit.f90 HUANG_Const_Model.o v3d10_nl_huang.o
57 
58  INTEGER,parameter :: numnp = 10
59  INTEGER,parameter :: numel = 1
60  integer,parameter :: numat_vol = 1
61  integer, dimension(1:numat_vol) :: matcstet
62  REAL*8, dimension(1:3,1:NumNP) :: coor
63  integer, dimension(1:10,NumEL) :: conn
64  REAL*8, dimension(1:3*NumNP) :: r_in, disp
65  REAL*8, dimension(1:4,1:NumEL) :: s11,s22,s33,s12,s23,s13
66 
67  REAL*8 :: stretch = 0.001d0
68 
69 
70  integer,parameter :: nstatev = 1
71  integer,parameter :: nmatrix = 3
72  integer,parameter :: nparticle = 4
73  integer,parameter :: nparticletype = 2
74  integer,parameter :: ninterfac = 3
75 
76  real*8, dimension(1:NSTATEV) :: statev
77  real*8, dimension(1:NMATRIX) :: matrix
78  real*8, dimension(1:NPARTICLE,1:NPARTICLETYPE) :: particle
79  real*8, dimension(1:NINTERFAC) :: interfac
80 
81 
82  real*8 :: time, dt, strain
83 
84 
85  statev = 0.d0
86 
87  matrix(1) = 1.e6 ! : YOUNG'S MODULUS OF THE MATRIX
88  matrix(2) = .499 ! : POISSON'S RATIO OF THE MATRIX
89  matrix(3) = .073 ! : VOLUME FRACTION OF THE MATRIX
90 
91  particle(1,1) = 14.23e9 ! : YOUNG'S MODULUS OF TYPE-I PARTICLES
92  particle(2,1) = .31 ! : POISSON'S RATIO OF TYPE-I PARTICLES
93  particle(3,1) = .695 ! : VOLUME FRACTION OF TYPE-I PARTICLES
94  particle(4,1) =125.0e-6 ! : RADIUS OF TYPE-I PARTICLES
95 
96  particle(1,2) = 14.23e9 ! : YOUNG'S MODULUS OF TYPE-I PARTICLES
97  particle(2,2) = .31 ! : POISSON'S RATIO OF TYPE-I PARTICLES
98  particle(3,2) = .232 ! : VOLUME FRACTION OF TYPE-I PARTICLES
99  particle(4,2) = 4.0e-6 ! : RADIUS OF TYPE-I PARTICLES
100 
101  interfac(1) = 1.7e6 ! : STRENGTH OF THE INTERFACE
102  interfac(2) = 1550000000.0e6 ! : LINEAR MODULUS OF THE INTERFACE
103  interfac(3) = 15000.0e6 ! : SOFTENING MODULUS OF THE INTERFACE
104 
105 
106  conn(1,1) = 1
107  conn(2,1) = 3
108  conn(3,1) = 2
109  conn(4,1) = 4
110  conn(5,1) = 5
111  conn(6,1) = 6
112  conn(7,1) = 7
113  conn(8,1) = 8
114  conn(9,1) = 9
115  conn(10,1) =10
116 
117 
118  coor(1,1) = 0.000000000e+0; coor(2,1) = 1.000000000e+0; coor(3,1) =0.000000000e+0
119 
120  coor(1,2) = 1.000000000e+0; coor(2,2) = 1.000000000e+0; coor(3,2) =1.000000000e+0
121 
122  coor(1,3) = 1.000000000e+0; coor(2,3) = 0.000000000e+0; coor(3,3) =0.000000000e+0
123 
124  coor(1,4) = 0.000000000e+0; coor(2,4) = 0.000000000e+0; coor(3,4) =1.000000000e+0
125 
126  coor(1,5) = 5.000000000e-1; coor(2,5) = 5.000000000e-1; coor(3,5) =0.000000000e+0
127 
128  coor(1,6) = 1.000000000e+0; coor(2,6) = 5.000000000e-1; coor(3,6) =5.000000000e-1
129 
130  coor(1,7) = 5.000000000e-1; coor(2,7) = 1.000000000e+0; coor(3,7) =5.000000000e-1
131 
132  coor(1,8) = 0.000000000e+0; coor(2,8) = 5.000000000e-1; coor(3,8) =5.000000000e-1
133 
134  coor(1,9) = 5.000000000e-1; coor(2,9) = 0.000000000e+0; coor(3,9) =5.000000000e-1
135 
136  coor(1,10) = 5.000000000e-1; coor(2,10) = 5.000000000e-1; coor(3,10) =1.000000000e+0
137 
138  dt = .01d0
139  time = 0.d0
140 
141 
142  disp(:) = 0.d0
143 
144  matcstet(1) = 1
145 
146  DO i = 1, 800
147 
148  time = time + dt
149 
150 
151  disp(1*3-2) = -stretch*REAL(i)
152  disp(1*3-1) = stretch*REAL(i)
153  disp(1*3 ) = -stretch*REAL(i)
154 
155  disp(2*3-2) = stretch*REAL(i)
156  disp(2*3-1) = stretch*REAL(i)
157  disp(2*3 ) = stretch*REAL(i)
158 
159  disp(3*3-2) = stretch*REAL(i)
160  disp(3*3-1) = -stretch*REAL(i)
161  disp(3*3 ) = -stretch*REAL(i)
162 
163  disp(4*3-2) = -stretch*REAL(i)
164  disp(4*3-1) = -stretch*REAL(i)
165  disp(4*3 ) = stretch*REAL(i)
166 
167  disp(5*3-2) = 0.5d0*( disp(1*3-2) + disp(3*3-2))
168  disp(5*3-1) = 0.5d0*( disp(1*3-1) + disp(3*3-1))
169  disp(5*3 ) = 0.5d0*( disp(1*3 ) + disp(3*3 ))
170 
171  disp(6*3-2) = 0.5d0*( disp(2*3-2) + disp(3*3-2))
172  disp(6*3-1) = 0.5d0*( disp(2*3-1) + disp(3*3-1))
173  disp(6*3 ) = 0.5d0*( disp(2*3 ) + disp(3*3 ))
174 
175  disp(7*3-2) = 0.5d0*( disp(2*3-2) + disp(1*3-2))
176  disp(7*3-1) = 0.5d0*( disp(2*3-1) + disp(1*3-1))
177  disp(7*3 ) = 0.5d0*( disp(2*3 ) + disp(1*3 ))
178 
179  disp(8*3-2) = 0.5d0*( disp(4*3-2) + disp(1*3-2))
180  disp(8*3-1) = 0.5d0*( disp(4*3-1) + disp(1*3-1))
181  disp(8*3 ) = 0.5d0*( disp(4*3 ) + disp(1*3 ))
182 
183  disp(9*3-2) = 0.5d0*( disp(4*3-2) + disp(3*3-2))
184  disp(9*3-1) = 0.5d0*( disp(4*3-1) + disp(3*3-1))
185  disp(9*3 ) = 0.5d0*( disp(4*3 ) + disp(3*3 ))
186 
187  disp(10*3-2) = 0.5d0*( disp(4*3-2) + disp(2*3-2))
188  disp(10*3-1) = 0.5d0*( disp(4*3-1) + disp(2*3-1))
189  disp(10*3 ) = 0.5d0*( disp(4*3 ) + disp(2*3 ))
190 
191 
192  r_in = 0.d0
193  CALL v3d10_nl_huang(coor,matcstet,conn,r_in,disp,&
194  s11,s22,s33,s12,s23,s13,strain, &
195  numnp,1,1,numel,numat_vol,&
196  statev,nstatev,matrix,nmatrix, &
197  particle,nparticle,nparticletype,interfac,ninterfac)
198 
199 !!$ PRINT*,'time=',time
200 !!$ print*,S11(1:4,1)
201 !!$ print*,S22(1:4,1)
202 !!$ print*,S33(1:4,1)
203 !!$ print*,S12(1:4,1)
204 !!$ print*,S13(1:4,1)
205 !!$ print*,S23(1:4,1)
206 
207  write(12,*) strain, s11(1,1)
208 
209 
210 
211  ENDDO
212 
213 
214 end PROGRAM testconst
215 
program testconst
subroutine v3d10_nl_huang(coor, matcstet, lmcstet, R_in, d, S11, S22, S33, S12, S23, S13, numnp, nstart, nend, numcstet, numat_vol, STATEV_Part1, STATEV_Part2, NSTATEV, MATRIX, NMATRIX, PARTICLE, NPARTICLE, NPARTICLETYPE, INTERFAC, NINTERFAC, StrainTrace)
blockLoc i
Definition: read.cpp:79
CImg< T > & matrix()
Realign pixel values of the instance image as a square matrix.
Definition: CImg.h:13343