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

Go to the source code of this file.

Functions/Subroutines

subroutine postview (ntr, sideload, nelemload, kontri, ntri, nloadtr, tenv, adview, auview, area, fenv, jqrad, irowrad, nzsrad)
 

Function/Subroutine Documentation

◆ postview()

subroutine postview ( integer  ntr,
character*20, dimension(*)  sideload,
integer, dimension(2,*)  nelemload,
integer, dimension(4,*)  kontri,
integer  ntri,
integer, dimension(*)  nloadtr,
real*8, dimension(*)  tenv,
real*8, dimension(*)  adview,
real*8, dimension(*)  auview,
real*8, dimension(*)  area,
real*8, dimension(*)  fenv,
integer, dimension(*)  jqrad,
integer, dimension(*)  irowrad,
integer  nzsrad 
)
28 !
29  implicit none
30 !
31 ! change following line if nlabel is increased
32 !
33  character*20 sideload(*)
34 !
35  integer ntr,iptri,irowrad(*),jqrad(*),nzsrad,nloadtr(*),
36  & nelemload(2,*),i,j,ntri,kontri(4,*)
37 !
38  real*8 area(*),fenv(*),auview(*),adview(*),tenv(*),pi,
39  & totarea
40 !
41  pi=4.d0*datan(1.d0)
42 !
43 ! division through total area and through pi
44 !
45  iptri=1
46  do i=1,ntr
47  totarea=0.d0
48  do
49  if(iptri.gt.ntri) exit
50  if(kontri(4,iptri).ne.i) exit
51  totarea=totarea+area(iptri)
52  iptri=iptri+1
53  enddo
54 c
55 c if(i.lt.ntr) then
56 c do j=iptri(i),iptri(i+1)-1
57 c totarea=totarea+area(j)
58 c enddo
59 c else
60 c do j=iptri(i),ntri
61 c totarea=totarea+area(j)
62 c enddo
63 c endif
64  totarea=totarea*pi
65 !
66 ! auxiliary field
67 !
68  fenv(i)=totarea
69  enddo
70 !
71 ! diagonal entries
72 !
73  do i=1,ntr
74  adview(i)=adview(i)/fenv(i)
75  enddo
76 !
77 ! lower triangular entries
78 !
79  do i=1,nzsrad
80  auview(i)=auview(i)/fenv(irowrad(i))
81  enddo
82 !
83 ! upper triangular entries
84 !
85  do i=1,ntr
86  do j=nzsrad+jqrad(i),nzsrad+jqrad(i+1)-1
87  auview(j)=auview(j)/fenv(i)
88  enddo
89  enddo
90 !
91 ! checking whether the sum of the viewfactors does not
92 ! exceed 1 (summing the rows of the viewfactor matrix)
93 !
94 ! diagonal entries
95 !
96  do i=1,ntr
97  fenv(i)=adview(i)
98  enddo
99 !
100 ! lower triangular entries
101 
102  do i=1,nzsrad
103  fenv(irowrad(i))=fenv(irowrad(i))+auview(i)
104  enddo
105 !
106 ! upper triangular entries
107 !
108  do i=1,ntr
109  do j=nzsrad+jqrad(i),nzsrad+jqrad(i+1)-1
110  fenv(i)=fenv(i)+auview(j)
111  enddo
112  enddo
113 !
114 ! if fenv exceeds 1 or if the user explicitly asked
115 ! for a scaling to 1 (negative environmental temperature)
116 ! -> scale to 1 (only if fenv exceeds 0)
117 !
118 ! diagonal entries
119 !
120  do i=1,ntr
121  if((fenv(i).gt.0.d0).and.
122  & ((fenv(i).gt.1.d0).or.(tenv(i).lt.0)))
123  & adview(i)=adview(i)/fenv(i)
124  enddo
125 !
126 ! lower triangular entries
127 !
128  do i=1,nzsrad
129  if((fenv(irowrad(i)).gt.0.d0).and.
130  & ((fenv(irowrad(i)).gt.1.d0).or.(tenv(irowrad(i)).lt.0)))
131  & auview(i)=auview(i)/fenv(irowrad(i))
132  enddo
133 !
134 ! upper triangular entries
135 !
136  do i=1,ntr
137  if((fenv(i).gt.0.d0).and.
138  & ((fenv(i).gt.1.d0).or.(tenv(i).lt.0))) then
139  do j=nzsrad+jqrad(i),nzsrad+jqrad(i+1)-1
140  auview(j)=auview(j)/fenv(i)
141  enddo
142  endif
143  enddo
144 !
145 ! updating fenv accordingly
146 !
147  do i=1,ntr
148  if((fenv(i).gt.1.d0).or.(tenv(i).lt.0)) then
149  if(fenv(i).gt.0.d0) then
150  fenv(i)=1.d0
151  else
152  write(*,*) '*WARNING in radmatrix: viewfactors'
153  write(*,*) ' for 3D-face''',
154  & sideload(nloadtr(i)),''''
155  write(*,*) ' of element',
156  & nelemload(1,nloadtr(i))
157  write(*,*) ' cannot be scaled since they are'
158  write(*,*) ' all zero'
159  write(*,*)
160  endif
161  endif
162 c write(*,*) 'postview ',i,nelemload(1,nloadtr(i)),
163 c & sideload(nloadtr(i)),fenv(i)
164  fenv(i)=1.d0-fenv(i)
165  enddo
166 !
167  return
static double * adview
Definition: radflowload.c:42
static double * auview
Definition: radflowload.c:42
Hosted by OpenAircraft.com, (Michigan UAV, LLC)