implicit real*8(a-h,o-z)
dimension x(315500),y(315500),z(315500),e66(6,6),b(3,3)&
&,mesh(300000,8),meshkou(300000,8)
b1=1.0d0
h1=1.0d0
ell=5.0d1
!要素分割
nx1=14
ny1=14
nz=500
nitimen=(nx1+1)*(ny1+1)
!荷重設定は下で
p=-1.00d0
!ヤング率
ezz=206.0d3!z軸方向
exx=ezz/25.0d0!x軸
eyy=ezz/25.0d0!y軸
!ポアソン比
poixy=0.016d0
poixz=poixy
poiyx=poixy
poiyz=poixy
poizx=0.4d0
poizy=poizx
!せん断弾性係数の入力
gxy=ezz/15.0d0
gxz=gxy
gyz=gxy
!1つあたりの要素の長さ?
xn1=b1/nx1
yn1=h1/ny1
zn=ell/nz
!節点番号ごとの節点座標!i~mで始まるのがdoで使える
!真ん中部分の鋼材の節点
do k=0,nz
do j=0,ny1
do i=1,nx1+1
nset=i+j*(nx1+1)+k*nitimen
x(nset)=(i-1)*xn1
y(nset)=j*yn1
z(nset)=k*zn
end do
end do
end do
!i5~6が整数,aが文字,f9,6が小数.1peとかはeの＊乗
!接点番号と座標の出力
print'("*NODE, NSET=NALL")'
do i=1,(nz+1)*nitimen
print'(i6,a,f9.6,a,f9.6,a,f9.6)',&
&i,',',x(i),',',y(i),',',z(i)
end do
!要素番号とその要素の8接点の接点番号
nyou=0
do k=0,nz-1
do j=0,ny1-1
do i=1,nx1
nyou=nyou+1
mesh(nyou,1)=i+j*(nx1+1)+k*nitimen
mesh(nyou,2)=mesh(nyou,1)+nx1+1
mesh(nyou,3)=mesh(nyou,2)+nitimen
mesh(nyou,4)=mesh(nyou,1)+nitimen
mesh(nyou,5)=mesh(nyou,1)+1
mesh(nyou,6)=mesh(nyou,2)+1
mesh(nyou,7)=mesh(nyou,3)+1
mesh(nyou,8)=mesh(nyou,4)+1
end do
end do
end do
print'("*ELEMENT, TYPE=C3D8, ELSET=Ekou")'
do i=1,nz*(nx1*ny1)
print'(i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6)',&
&i,',',&
&mesh(i,1),',',&
&mesh(i,2),',',&
&mesh(i,3),',',&
&mesh(i,4),',',&
&mesh(i,5),',',&
&mesh(i,6),',',&
&mesh(i,7),',',&
&mesh(i,8)
end do
nyousosuu=nz*nitimen
!載荷接点、拘束接点の設定
!cgxでやるのめんどいので節点指定
print'("*NSET,NSET=kousoku")'
do i=1,nitimen
nkousoku=i
print'(i6,a)',nkousoku,','
end do
print'("*NSET,NSET=saika4")'
do l=0,1
do i=0,1
nsaika4=(nx1+1)*(ny1+1)*nz+1+i*nx1+l*(nx1+1)*ny1
print'(i6,a)',nsaika4,','
end do
end do
print'("*NSET,NSET=saika2")'!上と下
do j=0,1
do i=1,nx1-1
nsaika2=(nx1+1)*(ny1+1)*nz+1+i+j*(nx1+1)*ny1
print'(i6,a)',nsaika2,','
end do
end do
print'("*NSET,NSET=saika3")'!左右
do l=0,1
do j=0,ny1-2
nsaika3=(nx1+1)*(ny1+1)*nz+(nx1+1)+1+j*(nx1+1)+l*(nx1)
print'(i6,a)',nsaika3,','
end do
end do
print'("*NSET,NSET=saikap")'!Pかかる点
do j=0,ny1-2
do i=1,nx1-1
nsaikap=(nx1+1)*(ny1+1)*nz+(nx1+1)+1+i+j*(nx1+1)
print'(i6,a)',nsaikap,','
end do
end do
nsaika4suu=4
nsaikapsuu=(ny1-1)*(nx1-1)
nsaika2suu=nitimen-nsaikapsuu-nsaika4suu
!
nsaikasettensuu=nsaika4suu/4+nsaika2suu/2+nsaikapsuu
ptou=p/nsaikasettensuu
p2=ptou/2
p4=ptou/4
!一応
print'("**settensuu")'
print'(A,a,i6)','**saikapsuu',',',nsaikapsuu
print'(A,a,i6)','**saika4suu',',',nsaika4suu
print'(A,a,i6)','**saika2suu',',',nsaika2suu
! 境界条件
print'("*BOUNDARY")'
print'("kousoku,1,3")'
print'("*MATERIAL,NAME=ELkou")'
print'("*ELASTIC")'
print'("206.d3, 0.3")'
print'("*SOLID SECTION,ELSET=Ekou,MATERIAL=ELkou")'
! 載荷条件
print'("*STEP")'
print'("*STATIC,SOLVER=SPOOLES")'
print'("*CLOAD")'
print'(A,a,i6,a,1pe13.5)','saika4',',',3,',',p4
print'(A,a,i6,a,1pe13.5)','saika2',',',3,',',p2
print'(A,a,i6,a,1pe13.5)','saika3',',',3,',',p2
print'(A,a,i6,a,1pe13.5)','saikap',',',3,',',ptou
! datのオプション
print'("*NODE PRINT,NSET=Nall")'
print'("U")'
print'("*NODE FILE")'
print'("U")'
print'("*END STEP")'
!
!
!
end
