program main
implicit none
integer,parameter::NP = SELECTED_REAL_KIND(8)
real(Kind = NP)::emod,nu
real(Kind = NP),dimension(6)::destrain,dstress
real(Kind = NP),dimension(6,6)::dompl
!=====================================================
emod=70000.0
nu=0.15
dompl=0.0
dompl(1,1)=(emod*(1.0-nu))/((1+nu)*(1.0-2.0*nu))
dompl(2,2)=(emod*(1.0-nu))/((1+nu)*(1.0-2.0*nu))
dompl(3,3)=(emod*(1.0-nu))/((1+nu)*(1.0-2.0*nu))
dompl(1,2)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(2,1)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(2,3)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(3,2)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(1,3)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(3,1)=(emod*nu)/((1.0+nu)*(1.0-2.0*nu))
dompl(4,4)=emod/(1.0+nu)
dompl(5,5)=emod/(1.0+nu)
dompl(6,6)=emod/(1.0+nu)
destrain(1)=-0.000005
destrain(2)=-nu*destrain(1)
destrain(3)=-nu*destrain(1)
destrain(4)=0.0
destrain(5)=0.0
destrain(6)=0.0
dstress=matmul(dompl,destrain)
write(*,*) dstress
end program
22.png (124.65 KB, 下载次数: 274)
dompl
11.png (15.83 KB, 下载次数: 257)
结果
风平老涡 发表于 2021-5-22 00:37
因为在你的计算中有两个相近数值大小的数相减,产生的计算误差。
以下是6×6的矩阵乘以6×1的矩阵求和之前 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |