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

Go to the source code of this file.

Functions/Subroutines

subroutine objective_stress (nodeset, istartset, iendset, ialset, nk, idesvarc, iobject, mi, g0, nobject, stn, objectset)
 

Function/Subroutine Documentation

◆ objective_stress()

subroutine objective_stress ( integer  nodeset,
integer, dimension(*)  istartset,
integer, dimension(*)  iendset,
integer, dimension(*)  ialset,
integer  nk,
integer  idesvarc,
integer  iobject,
integer, dimension(*)  mi,
real*8, dimension(nobject)  g0,
integer  nobject,
real*8, dimension(6,*)  stn,
character*81, dimension(4,*)  objectset 
)
21 !
22 ! calculates the sum of the square of the von Mises stress of a node
23 ! set
24 !
25  implicit none
26 !
27  character*81 objectset(4,*)
28 !
29  integer nk,istartset(*),iendset(*),ialset(*),nodeset,idir,
30  & idesvarc,iobject,mi(*),j,k,nobject,idesvar
31 !
32  real*8 g0(nobject),stn(6,*),p,rho,xstress
33 !
34  idesvar=idesvarc+1
35 !
36 ! reading rho and the mean stress for the Kreisselmeier-Steinhauser
37 ! function
38 !
39  read(objectset(2,iobject)(41:60),'(f20.0)') rho
40  read(objectset(2,iobject)(61:80),'(f20.0)') xstress
41 !
42  g0(iobject)=0.d0
43 !
44 ! check for the existence of a set, else take the complete mesh
45 !
46  if(nodeset.eq.0) then
47  do j=1,nk
48  p=-(stn(1,j)+stn(2,j)+stn(3,j))/3.d0
49  g0(iobject)=g0(iobject)+dexp(rho*dsqrt(1.5d0*
50  & ((stn(1,j)+p)**2+(stn(2,j)+p)**2+(stn(3,j)+p)**2+
51  & 2.d0*(stn(4,j)**2+stn(5,j)**2+stn(6,j)**2)))/xstress)
52  enddo
53  g0(iobject)=dlog(g0(iobject))/rho
54  else
55  do j=istartset(nodeset),iendset(nodeset)
56  if(ialset(j).gt.0) then
57  k=ialset(j)
58  p=-(stn(1,k)+stn(2,k)+stn(3,k))/3.d0
59  g0(iobject)=g0(iobject)+dexp(rho*dsqrt(1.5d0*
60  & ((stn(1,k)+p)**2+
61  & (stn(2,k)+p)**2+
62  & (stn(3,k)+p)**2+
63  & 2.d0*(stn(4,k)**2+
64  & stn(5,k)**2+
65  & stn(6,k)**2)))/xstress)
66  else
67  k=ialset(j-2)
68  do
69  k=k-ialset(j)
70  if(k.ge.ialset(j-1)) exit
71  p=-(stn(1,k)+stn(2,k)+stn(3,k))/3.d0
72  g0(iobject)=g0(iobject)+dexp(rho*dsqrt(1.5d0*
73  & ((stn(1,k)+p)**2+
74  & (stn(2,k)+p)**2+
75  & (stn(3,k)+p)**2+
76  & 2.d0*(stn(4,k)**2+
77  & stn(5,k)**2+
78  & stn(6,k)**2)))/xstress)
79  enddo
80  endif
81  enddo
82  g0(iobject)=dlog(g0(iobject))/rho
83  endif
84 !
85  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)