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

Go to the source code of this file.

Functions/Subroutines

subroutine calcgammat (nface, ielfa, vel, gradtel, gamma, xlet, xxn, xxj, ipnei, betam, nef, flux)
 

Function/Subroutine Documentation

◆ calcgammat()

subroutine calcgammat ( integer  nface,
integer, dimension(4,*)  ielfa,
real*8, dimension(nef,0:7)  vel,
real*8, dimension(3,*)  gradtel,
real*8, dimension(*)  gamma,
real*8, dimension(*)  xlet,
real*8, dimension(3,*)  xxn,
real*8, dimension(3,*)  xxj,
integer, dimension(*)  ipnei,
real*8  betam,
integer  nef,
real*8, dimension(*)  flux 
)
21 !
22 ! determine gamma for the temperature:
23 ! upwind difference: gamma=0
24 ! central difference: gamma=1
25 !
26  implicit none
27 !
28  integer nface,ielfa(4,*),i,j,indexf,ipnei(*),iel1,iel2,nef
29 !
30  real*8 vel(nef,0:7),gradtel(3,*),xxn(3,*),xxj(3,*),vud,vcd,
31  & gamma(*),phic,xlet(*),betam,flux(*)
32 !
33  do i=1,nface
34  iel2=ielfa(2,i)
35 !
36 ! faces with only one neighbor need not be treated
37 !
38  if(iel2.le.0) cycle
39  iel1=ielfa(1,i)
40  j=ielfa(4,i)
41  indexf=ipnei(iel1)+j
42 !
43  vcd=vel(iel2,0)-vel(iel1,0)
44  if(dabs(vcd).lt.1.d-3*dabs(vel(iel1,0))) vcd=0.d0
45 !
46  if(flux(indexf).ge.0.d0) then
47  vud=2.d0*xlet(indexf)*
48  & (gradtel(1,iel1)*xxj(1,indexf)+
49  & gradtel(2,iel1)*xxj(2,indexf)+
50  & gradtel(3,iel1)*xxj(3,indexf))
51  else
52  vud=2.d0*xlet(indexf)*
53  & (gradtel(1,iel2)*xxj(1,indexf)+
54  & gradtel(2,iel2)*xxj(2,indexf)+
55  & gradtel(3,iel2)*xxj(3,indexf))
56  endif
57 !
58  if(dabs(vud).lt.1.d-20) then
59  gamma(i)=0.d0
60  cycle
61  endif
62 !
63  phic=1.d0-vcd/vud
64 !
65  if(phic.ge.1.d0) then
66  gamma(i)=0.d0
67  elseif(phic.le.0.d0) then
68  gamma(i)=0.d0
69  elseif(betam.le.phic) then
70  gamma(i)=1.d0
71  else
72  gamma(i)=phic/betam
73  endif
74 c write(*,*) 'calcgammat',i,gamma(i)
75  enddo
76 !
77  return
subroutine flux(node1, node2, nodem, nelem, lakon, kon, ipkon, nactdog, identity, ielprop, prop, kflag, v, xflow, f, nodef, idirf, df, cp, R, rho, physcon, g, co, dvi, numf, vold, set, shcon, nshcon, rhcon, nrhcon, ntmat_, mi, ider, ttime, time, iaxial)
Definition: flux.f:24
Hosted by OpenAircraft.com, (Michigan UAV, LLC)