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

Go to the source code of this file.

Functions/Subroutines

subroutine postinitialnet (ieg, lakon, v, ipkon, kon, nflow, prop, ielprop, ielmat, ntmat_, shcon, nshcon, rhcon, nrhcon, mi, iponoel, inoel, itg, ntg)
 

Function/Subroutine Documentation

◆ postinitialnet()

subroutine postinitialnet ( integer, dimension(*)  ieg,
character*8, dimension(*)  lakon,
real*8, dimension(0:mi(2),*)  v,
integer, dimension(*)  ipkon,
integer, dimension(*)  kon,
integer  nflow,
real*8, dimension(*)  prop,
integer, dimension(*)  ielprop,
integer, dimension(mi(3),*)  ielmat,
integer  ntmat_,
real*8, dimension(0:3,ntmat_,*)  shcon,
integer, dimension(*)  nshcon,
real*8, dimension(0:1,ntmat_,*)  rhcon,
integer, dimension(*)  nrhcon,
integer, dimension(*)  mi,
integer, dimension(*)  iponoel,
integer, dimension(2,*)  inoel,
integer, dimension(*)  itg,
integer  ntg 
)
22 !
23 ! this routine only applies to compressible networks
24 !
25 ! determination of initial values based on the boundary conditions
26 ! and the initial values given by the user by propagating these
27 ! through the network (using information on the mass flow direction
28 ! derived from unidirectional network elements or mass flow given
29 ! by the user (boundary conditions or initial conditions))
30 !
31 ! it is assumed that mass flows cannot
32 ! be identically zero (a zero mass flow leads to convergence problems).
33 !
34 ! This routine is used for elements in which the pressure gradient
35 ! does not allow to determine the mass flow, e.g. the free vortex
36 ! and the forced vortex
37 !
38  implicit none
39 !
40  character*8 lakon(*)
41 !
42  integer mi(*),ieg(*),nflow,i,ielmat(mi(3),*),ntmat_,node1,node2,
43  & nelem,index,nshcon(*),ipkon(*),kon(*),nodem,imat,ielprop(*),
44  & nrhcon(*),neighbor,ichange,iponoel(*),inoel(2,*),indexe,
45  & itg(*),ntg,j
46 !
47  real*8 prop(*),shcon(0:3,ntmat_,*),xflow,v(0:mi(2),*),cp,r,
48  & dvi,rho,rhcon(0:1,ntmat_,*),kappa,cti,ti,ri,ro,p1zp2,omega,
49  & p2zp1
50 !
51 c write(*,*) 'postinitialnet '
52 c do i=1,ntg
53 c write(*,'(i10,3(1x,e11.4))') itg(i),(v(j,itg(i)),j=0,2)
54 c enddo
55 !
56  do
57  ichange=0
58 !
59 ! propagation of the mass flow through the network
60 !
61  do i=1,nflow
62  nelem=ieg(i)
63  indexe=ipkon(nelem)
64  nodem=kon(indexe+2)
65 !
66  if(dabs(v(1,nodem)).le.0.d0) then
67 !
68 ! no initial mass flow given yet
69 ! check neighbors for mass flow (only if not
70 ! branch nor joint)
71 !
72 ! first end node
73 !
74  node1=kon(indexe+1)
75 !
76  if(node1.ne.0) then
77  index=iponoel(node1)
78 !
79  if(inoel(2,inoel(2,index)).eq.0) then
80 !
81 ! no branch nor joint; determine neighboring element
82 !
83  if(inoel(1,index).eq.nelem) then
84  neighbor=inoel(1,inoel(2,index))
85  else
86  neighbor=inoel(1,index)
87  endif
88 !
89 ! initial mass flow in neighboring element
90 !
91  xflow=v(1,kon(ipkon(neighbor)+2))
92 !
93  if(dabs(v(1,nodem)).gt.0.d0) then
94 !
95 ! propagate initial mass flow
96 !
97  if(dabs(xflow).gt.0.d0) then
98  v(1,nodem)=xflow
99  ichange=1
100  cycle
101  endif
102  else
103 !
104 ! propagate only the sign of the mass flow
105 !
106  if(dabs(xflow).gt.0.d0) then
107  v(1,nodem)=xflow
108  ichange=1
109  cycle
110  endif
111  endif
112  endif
113  endif
114 !
115 ! second end node
116 !
117  node2=kon(indexe+3)
118 !
119  if(node2.ne.0) then
120  index=iponoel(node2)
121 !
122  if(inoel(2,inoel(2,index)).eq.0) then
123 !
124 ! no branch nor joint; determine neighboring element
125 !
126  if(inoel(1,index).eq.nelem) then
127  neighbor=inoel(1,inoel(2,index))
128  else
129  neighbor=inoel(1,index)
130  endif
131 !
132 ! initial mass flow in neighboring element
133 !
134  xflow=v(1,kon(ipkon(neighbor)+2))
135 !
136  if(dabs(v(1,nodem)).gt.0.d0) then
137 !
138 ! propagate initial mass flow
139 !
140  if(dabs(xflow).gt.0.d0) then
141  v(1,nodem)=xflow
142  ichange=1
143  cycle
144  endif
145  else
146 !
147 ! propagate only the sign of the mass flow
148 !
149  if(dabs(xflow).gt.0.d0) then
150  v(1,nodem)=xflow
151  ichange=1
152  cycle
153  endif
154  endif
155  endif
156  endif
157  endif
158  enddo
159 c write(*,*) 'postinitialnet '
160 c do i=1,ntg
161 c write(*,'(i10,3(1x,e11.4))') itg(i),(v(j,itg(i)),j=0,2)
162 c enddo
163  if(ichange.eq.0) exit
164  enddo
165 !
166  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)