Mathematical Physics - Volume II - Numerical Methods
3.6 Program for solving of elliptical problems
101
& maxband=25) COMMON /ccon / nnode , nelem , nmat , nbce , nbcn , npoint , & nband COMMON /cnode / x(2,maxn) , u(maxn) COMMON /celem / ne(maxe) , mat(maxe) , nodes(9,maxe) COMMON /cbc / nodbc(maxbce) , vbce(maxbce) , nelbc(maxbcn) , & nside(maxbcn) , vbcn(2,maxbcn) , npt(maxpt) , & vpt(maxpt)
COMMON /cmatrx/ gk(maxn,maxband) , gf(maxn) DIMENSION nod(3) , xbc(2,3) , pe(3,3) , game(3) PRINT * , ’applying boundary conditions ...’
c applay point loads
IF ( npoint.NE.0 ) THEN DO 50 i = 1 , npoint n = npt(i)
gf(n) = gf(n) + vpt(i)
50
CONTINUE
ENDIF c applay essential boundary conditions IF ( nbce.NE.0 ) THEN big = 1.E30 DO 100 i = 1 , nbce
n = nodbc(i) gk(n,1) = big gf(n) = big*vbce(i)
100 CONTINUE ENDIF c applay natural boundary condition IF ( nbcn.NE.0 ) THEN DO 150 i = 1 , nbcn c pick out nodes on side of element
nel = nelbc(i) ns = nside(i) nc = 4 IF ( ne(nel).EQ.6 ) nc = 3 nod(1) = ns nod(2) = ns + nc nod(3) = ns + 1 IF ( ns.EQ.nc ) nod(3) = 1 pick out nodal coordinates DO 120 j = 1 , 3 nj = nod(j) nod(j) = nodes(nj,nel) nj = nod(j)
c
xbc(1,j) = x(1,nj) xbc(2,j) = x(2,nj)
120
CONTINUE
c
call bcint to calculate boundary integrals pe and game CALL bcint(vbcn(1,i),vbcn(2,i),xbc,pe,game)
Made with FlippingBook flipbook maker