CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
changeplastics.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine changeplastics (inpc, textpart, imat, ntmat_, npmat_, plicon, nplicon, plkcon, nplkcon, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc, nelcon)
 

Function/Subroutine Documentation

◆ changeplastics()

subroutine changeplastics ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  imat,
integer  ntmat_,
integer  npmat_,
real*8, dimension(0:2*npmat_,ntmat_,*)  plicon,
integer, dimension(0:ntmat_,*)  nplicon,
real*8, dimension(0:2*npmat_,ntmat_,*)  plkcon,
integer, dimension(0:ntmat_,*)  nplkcon,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc,
integer, dimension(2,*)  nelcon 
)
22 !
23 ! reading the input deck: *CHANGE PLASTIC
24 !
25  implicit none
26 !
27  logical iso
28 !
29  character*1 inpc(*)
30  character*132 textpart(16)
31 !
32  integer imat,ntmat_,ntmat,npmat_,npmat,istep,nelcon(2,*),
33  & n,key,i,nplicon(0:ntmat_,*),nplkcon(0:ntmat_,*),istat,
34  & iline,ipol,inl,ipoinp(2,*),inp(3,*),ipoinpc(0:*)
35 !
36  real*8 plicon(0:2*npmat_,ntmat_,*),plkcon(0:2*npmat_,ntmat_,*),
37  & temperature
38 !
39  iso=.true.
40 !
41  ntmat=0
42  npmat=0
43 !
44  if(istep.lt.1) then
45  write(*,*) '*ERROR reading *CHANGE PLASTIC: *CHANGE PLASTIC'
46  write(*,*) ' should only be used within a STEP'
47  call exit(201)
48  endif
49 !
50  if((nelcon(1,imat).ne.-51).and.
51  & (nelcon(1,imat).ne.-52)) then
52  write(*,*) '*ERROR reading *CHANGE PLASTIC: *CHANGE PLASTIC'
53  write(*,*) ' can only be used to change the plastic'
54  write(*,*) ' definition of an elastically isotropic'
55  write(*,*) ' material with *PLASTIC data'
56  call exit(201)
57  endif
58 !
59  do i=2,n
60  if(textpart(i)(1:10).eq.'HARDENING=') then
61  if(textpart(i)(11:19).eq.'KINEMATIC') then
62  iso=.false.
63  elseif(textpart(i)(11:18).eq.'COMBINED') then
64  write(*,*) '*ERROR reading *CHANGE PLASTIC'
65  write(*,*) ' combined hardening is not allowed'
66  call exit(201)
67  elseif(textpart(i)(11:14).eq.'USER') then
68  write(*,*) '*ERROR reading *CHANGE PLASTIC'
69  write(*,*) ' parameter USER is not allowed'
70  call exit(201)
71  endif
72  exit
73  else
74  write(*,*)
75  & '*WARNING reading *CHANGE PLASTIC: parameter not recognized:'
76  write(*,*) ' ',
77  & textpart(i)(1:index(textpart(i),' ')-1)
78  call inputwarning(inpc,ipoinpc,iline,
79  &"*CHANGE PLASTIC%")
80  endif
81  enddo
82 !
83  if(iso) then
84 !
85 ! isotropic hardening coefficients
86 !
87  do
88  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
89  & ipoinp,inp,ipoinpc)
90  if((istat.lt.0).or.(key.eq.1)) exit
91  read(textpart(3)(1:20),'(f20.0)',iostat=istat) temperature
92  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
93  &"*CHANGE PLASTIC%")
94 !
95 ! first temperature
96 !
97  if(ntmat.eq.0) then
98  npmat=0
99  ntmat=ntmat+1
100  if(ntmat.gt.ntmat_) then
101  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
102  write(*,*) ' more temperature data points'
103  write(*,*) ' than underneath the *PLASTIC card'
104  call exit(201)
105  endif
106  nplicon(0,imat)=ntmat
107  plicon(0,ntmat,imat)=temperature
108 !
109 ! new temperature
110 !
111  elseif(plicon(0,ntmat,imat).ne.temperature) then
112  npmat=0
113  ntmat=ntmat+1
114  if(ntmat.gt.ntmat_) then
115  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
116  write(*,*) ' more temperature data points'
117  write(*,*) ' than underneath the *PLASTIC card'
118  call exit(201)
119  endif
120  nplicon(0,imat)=ntmat
121  plicon(0,ntmat,imat)=temperature
122  endif
123  do i=1,2
124  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
125  & plicon(2*npmat+i,ntmat,imat)
126  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
127  &"*CHANGE PLASTIC%")
128  enddo
129  npmat=npmat+1
130  if(npmat.gt.npmat_) then
131  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
132  write(*,*) ' more stress versus equivalent'
133  write(*,*) ' plastic strain data points'
134  write(*,*) ' than underneath the *PLASTIC card'
135  call exit(201)
136  endif
137  nplicon(ntmat,imat)=npmat
138  enddo
139  else
140 !
141 ! kinematic hardening coefficients
142 !
143  do
144  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
145  & ipoinp,inp,ipoinpc)
146  if((istat.lt.0).or.(key.eq.1)) exit
147  read(textpart(3)(1:20),'(f20.0)',iostat=istat) temperature
148  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
149  &"*CHANGE PLASTIC%")
150 !
151 ! first temperature
152 !
153  if(ntmat.eq.0) then
154  npmat=0
155  ntmat=ntmat+1
156  if(ntmat.gt.ntmat_) then
157  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
158  write(*,*) ' more temperature data points'
159  write(*,*) ' than underneath the *PLASTIC card'
160  call exit(201)
161  endif
162  nplkcon(0,imat)=ntmat
163  plkcon(0,ntmat,imat)=temperature
164 !
165 ! new temperature
166 !
167  elseif(plkcon(0,ntmat,imat).ne.temperature) then
168  npmat=0
169  ntmat=ntmat+1
170  if(ntmat.gt.ntmat_) then
171  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
172  write(*,*) ' more temperature data points'
173  write(*,*) ' than underneath the *PLASTIC card'
174  call exit(201)
175  endif
176  nplkcon(0,imat)=ntmat
177  plkcon(0,ntmat,imat)=temperature
178  endif
179  do i=1,2
180  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
181  & plkcon(2*npmat+i,ntmat,imat)
182  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
183  &"*CHANGE PLASTIC%")
184  enddo
185  npmat=npmat+1
186  if(npmat.gt.npmat_) then
187  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
188  write(*,*) ' more stress versus equivalent'
189  write(*,*) ' plastic strain data points'
190  write(*,*) ' than underneath the *PLASTIC card'
191  call exit(201)
192  endif
193  nplkcon(ntmat,imat)=npmat
194  enddo
195  endif
196 !
197  if(ntmat.eq.0) then
198  write(*,*) '*ERROR reading *CHANGE PLASTIC:'
199  write(*,*) ' *CHANGE PLASTIC card without data'
200  call exit(201)
201  endif
202 !
203  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)