Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tests/Testarruda.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 
55 ! xlf90 -qsuffix=f=f90 -c v3d10_nl_arruda_boyce.f90
56 ! xlf90 -qsuffix=f=f90 -c arruda_boyce.f90
57 ! xlf90 -qsuffix=f=f90 Testarruda.f90 v3d10_nl_arruda_boyce.o arruda_boyce.o
58 
59  INTEGER,parameter :: numnp = 10
60  INTEGER,parameter :: numel = 1
61  integer,parameter :: numat_vol = 1
62  integer, dimension(1:numat_vol) :: matcstet
63  REAL*8, dimension(1:3,1:NumNP) :: coor
64  integer, dimension(1:10,NumEL) :: conn
65  REAL*8, dimension(1:3*NumNP) :: r_in, disp
66  REAL*8, dimension(1:4,1:NumEL) :: s11,s22,s33,s12,s23,s13
67 
68  REAL*8 :: stretch = 0.0001d0
69 
70 
71  integer,parameter :: nstatev = 1
72  integer,parameter :: nmatrix = 3
73  integer,parameter :: nparticle = 4
74  integer,parameter :: nparticletype = 2
75  integer,parameter :: ninterfac = 3
76 
77  real*8, dimension(1:NSTATEV) :: statev
78  real*8, dimension(1:NMATRIX) :: matrix
79  real*8, dimension(1:NPARTICLE,1:NPARTICLETYPE) :: particle
80  real*8, dimension(1:NINTERFAC) :: interfac
81 
82  real*8, dimension(1:1) :: xmu,xkappa
83 
84 
85  real*8 :: time, dt, strain
86 
87  real*8 :: xnu, e, dir
88  statev = 0.d0
89 
90  matrix(1) = 1.e6 ! : YOUNG'S MODULUS OF THE MATRIX
91  matrix(2) = .499 ! : POISSON'S RATIO OF THE MATRIX
92  matrix(3) = .073 ! : VOLUME FRACTION OF THE MATRIX
93 
94  particle(1,1) = 14.23e9 ! : YOUNG'S MODULUS OF TYPE-I PARTICLES
95  particle(2,1) = .31 ! : POISSON'S RATIO OF TYPE-I PARTICLES
96  particle(3,1) = .695 ! : VOLUME FRACTION OF TYPE-I PARTICLES
97  particle(4,1) =125.0e-6 ! : RADIUS OF TYPE-I PARTICLES
98 
99  particle(1,2) = 14.23e9 ! : YOUNG'S MODULUS OF TYPE-I PARTICLES
100  particle(2,2) = .31 ! : POISSON'S RATIO OF TYPE-I PARTICLES
101  particle(3,2) = .232 ! : VOLUME FRACTION OF TYPE-I PARTICLES
102  particle(4,2) = 4.0e-6 ! : RADIUS OF TYPE-I PARTICLES
103 
104  interfac(1) = 1.7e6 ! : STRENGTH OF THE INTERFACE
105  interfac(2) = 1550000000.0e6 ! : LINEAR MODULUS OF THE INTERFACE
106  interfac(3) = 15000.0e6 ! : SOFTENING MODULUS OF THE INTERFACE
107 
108 
109 
110 
111 
112  conn(1,1) = 1
113  conn(2,1) = 3
114  conn(3,1) = 2
115  conn(4,1) = 4
116  conn(5,1) = 5
117  conn(6,1) = 6
118  conn(7,1) = 7
119  conn(8,1) = 8
120  conn(9,1) = 9
121  conn(10,1) =10
122 
123 
124  coor(1,1) = 0.000000000e+0; coor(2,1) = 1.000000000e+0; coor(3,1) =0.000000000e+0
125 
126  coor(1,2) = 1.000000000e+0; coor(2,2) = 1.000000000e+0; coor(3,2) =1.000000000e+0
127 
128  coor(1,3) = 1.000000000e+0; coor(2,3) = 0.000000000e+0; coor(3,3) =0.000000000e+0
129 
130  coor(1,4) = 0.000000000e+0; coor(2,4) = 0.000000000e+0; coor(3,4) =1.000000000e+0
131 
132  coor(1,5) = 5.000000000e-1; coor(2,5) = 5.000000000e-1; coor(3,5) =0.000000000e+0
133 
134  coor(1,6) = 1.000000000e+0; coor(2,6) = 5.000000000e-1; coor(3,6) =5.000000000e-1
135 
136  coor(1,7) = 5.000000000e-1; coor(2,7) = 1.000000000e+0; coor(3,7) =5.000000000e-1
137 
138  coor(1,8) = 0.000000000e+0; coor(2,8) = 5.000000000e-1; coor(3,8) =5.000000000e-1
139 
140  coor(1,9) = 5.000000000e-1; coor(2,9) = 0.000000000e+0; coor(3,9) =5.000000000e-1
141 
142  coor(1,10) = 5.000000000e-1; coor(2,10) = 5.000000000e-1; coor(3,10) =1.000000000e+0
143 
144  dt = .01d0
145  time = 0.d0
146 
147 
148  disp(:) = 0.d0
149 
150  matcstet(1) = 1
151 
152  xnu = .499
153  e = 6.585e6
154 
155 
156  xmu(1) = e/( 2.d0 * (1.d0 + xnu) )
157  xkappa(1) = e/( 3.d0*(1.d0-2.d0*xnu) )
158 
159  dir = 1.d0
160 
161  DO i = 1, 50000
162 
163  time = time + dt
164  print*,i
165 
166  disp(1*3-2) = -dir*stretch*REAL(i)
167  disp(1*3-1) = dir*stretch*REAL(i)
168  disp(1*3 ) = -dir*stretch*REAL(i)
169 
170  disp(2*3-2) = dir*stretch*REAL(i)
171  disp(2*3-1) = dir*stretch*REAL(i)
172  disp(2*3 ) = dir*stretch*REAL(i)
173 
174  disp(3*3-2) = dir*stretch*REAL(i)
175  disp(3*3-1) = -dir*stretch*REAL(i)
176  disp(3*3 ) = -dir*stretch*REAL(i)
177 
178  disp(4*3-2) = -dir*stretch*REAL(i)
179  disp(4*3-1) = -dir*stretch*REAL(i)
180  disp(4*3 ) = dir*stretch*REAL(i)
181 
182  disp(5*3-2) = 0.5d0*( disp(1*3-2) + disp(3*3-2))
183  disp(5*3-1) = 0.5d0*( disp(1*3-1) + disp(3*3-1))
184  disp(5*3 ) = 0.5d0*( disp(1*3 ) + disp(3*3 ))
185 
186  disp(6*3-2) = 0.5d0*( disp(2*3-2) + disp(3*3-2))
187  disp(6*3-1) = 0.5d0*( disp(2*3-1) + disp(3*3-1))
188  disp(6*3 ) = 0.5d0*( disp(2*3 ) + disp(3*3 ))
189 
190  disp(7*3-2) = 0.5d0*( disp(2*3-2) + disp(1*3-2))
191  disp(7*3-1) = 0.5d0*( disp(2*3-1) + disp(1*3-1))
192  disp(7*3 ) = 0.5d0*( disp(2*3 ) + disp(1*3 ))
193 
194  disp(8*3-2) = 0.5d0*( disp(4*3-2) + disp(1*3-2))
195  disp(8*3-1) = 0.5d0*( disp(4*3-1) + disp(1*3-1))
196  disp(8*3 ) = 0.5d0*( disp(4*3 ) + disp(1*3 ))
197 
198  disp(9*3-2) = 0.5d0*( disp(4*3-2) + disp(3*3-2))
199  disp(9*3-1) = 0.5d0*( disp(4*3-1) + disp(3*3-1))
200  disp(9*3 ) = 0.5d0*( disp(4*3 ) + disp(3*3 ))
201 
202  disp(10*3-2) = 0.5d0*( disp(4*3-2) + disp(2*3-2))
203  disp(10*3-1) = 0.5d0*( disp(4*3-1) + disp(2*3-1))
204  disp(10*3 ) = 0.5d0*( disp(4*3 ) + disp(2*3 ))
205 
206 
207  r_in = 0.d0
208 
209 
210 !!$ CALL V3D10_NL_HUANG(coor,matcstet,Conn,R_in,disp,&
211 !!$ S11,S22,S33,S12,S23,S13,strain, &
212 !!$ numnp,1,1,NumEl,numat_vol,&
213 !!$ STATEV,NSTATEV,MATRIX,NMATRIX, &
214 !!$ PARTICLE,NPARTICLE,NPARTICLETYPE,INTERFAC,NINTERFAC)
215 
216  CALL v3d10_nl_arruda_boyce(coor,matcstet,conn,r_in,disp, &
217  s11,s22,s33,s12,s23,s13, &
218  numnp,1,1,numel,nummatvol, &
219  xmu,xkappa, strain)
220 
221 
222 
223 !!$ PRINT*,'time=',time
224 !!$ print*,S11(1:4,1)
225 !!$ print*,S22(1:4,1)
226 !!$ print*,S33(1:4,1)
227 !!$ print*,S12(1:4,1)
228 !!$ print*,S13(1:4,1)
229 !!$ print*,S23(1:4,1)
230 
231  write(12,*) strain, s11(1,1)
232 
233 
234 
235  ENDDO
236 
237 
238 end PROGRAM testconst
239 
subroutine v3d10_nl_arruda_boyce(coor, matcstet, lmcstet, R_in, d, S11, S22, S33, S12, S23, S13, numnp, nstart, nend, numcstet, numat_vol, mu, kappa)
program testconst
blockLoc i
Definition: read.cpp:79
CImg< T > & matrix()
Realign pixel values of the instance image as a square matrix.
Definition: CImg.h:13343
virtual std::ostream & print(std::ostream &os) const
vector3d dir(void) const
Definition: vector3d.h:144