8.8 KB, 下载次数: 19
Read (linp, '(A)') dummy
Read (linp, '(A)') title
Read (linp, '(A)') dummy
Read (linp, *) nn, ne, nm, ndim, nen, ndn
Read (linp, '(A)') dummy
Read (linp, *) nd, nl, nmpc
部分代码:
Dimension x(200, 2), noc(300, 3), mat(300), pm(10, 3),ehs(300), nu(100), u(100), f(400), bt(2, 3), s(400, 95)
Character *16 file1, file2, file3
Character *81 dummy, title
Print *, '***************************************'
Print *, '* PROGRAM HEAT2D *'
Print *, '* HEAT 2-D WITH 3-NODED TRIANGLES *'
Print *, '* T.R.Chandrupatla and A.D.Belegundu *'
Print *, '***************************************'
!c imax = first dimension of the s - matrix, ix = 1 st dim . of x - matrix, etc .
imax = 400
ix = 200
inoc = 300
ipm = 10
Print *, 'Input Data File Name <DOS file name>'
Read '(A)', file1
linp = 10
Open (Unit=10, File=file1, Status='UNKNOWN')
Print *, 'Output Data File Name <DOS file name>'
Read '(A)', file2
lout = 11
Open (Unit=11, File=file2, Status='UNKNOWN')
Read (linp, '(A)') dummy
Read (linp, '(A)') title
Read (linp, '(A)') dummy
Read (linp, *) nn, ne, nm, ndim, nen, ndn
Read (linp, '(A)') dummy
Read (linp, *) nd, nl, nmpc
!c - - -material property thermal conductivity
npr = 1
nmpc = 0
ndn = 1
ndim = 2
nen = 3
!c element heat source, ehs(i), i = 1, . . ., ne
!c - - -nd = no . of specified temperatures
!c - - -nl = no . of nodal heat sources
!c - - -npr = 1(thermal conductivity) and nmpc = 0
Print *, 'PLOT CHOICE'
Print *, ' 1) No Plot Data'
Print *, ' 2) Create Data File for Temperatures'
Print *, 'Choose 1 or 2 '
Read (5, *) ipl
If (ipl<1 .Or. ipl>2) ipl = 1
!c - - -default is no data
If (ipl>1) Then
Print *, 'Give File Name for Plot Data'
Read '(A)', file3
lout2 = 12
Open (Unit=12, File=file3, Status='UNKNOWN')
End If
!c - - - - -coordinates
Read (linp, '(A)') dummy
Do i = 1, nn
Read (linp, *) n, (x(n,j), j=1, ndim)
End Do
pasuka 发表于 2017-3-9 10:07
建议lz不要将宝贵的青春浪费在这类祖传代码上面,除非开发这个祖传代码的祖师爷愿意收lz做关门弟子继承衣钵 ...
大头鼹鼠 发表于 2017-3-9 11:08
如果不是有特别的要求建议使用成熟的软件,热传导的程序是所有有限差分或者有限元中最简单 找一本数很快就 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |