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

Go to the source code of this file.

Functions/Subroutines

subroutine calcguesstincf (nface, dmin, vfa, umfa, cvfa, hcfa, ithermal, tincfguess, compressible)
 

Function/Subroutine Documentation

◆ calcguesstincf()

subroutine calcguesstincf ( integer  nface,
real*8  dmin,
real*8, dimension(0:7,*)  vfa,
real*8, dimension(*)  umfa,
real*8, dimension(*)  cvfa,
real*8, dimension(*)  hcfa,
integer  ithermal,
real*8  tincfguess,
integer  compressible 
)
21 !
22 ! calculates a guess for tincf based on the minimum of:
23 ! dmin/(local velocity)
24 ! density*dmin**2/(2*dynamic_viscosity)
25 !
26 ! dmin is the smallest edge length of the mesh
27 !
28  implicit none
29 !
30  integer nface,i,ithermal,compressible
31 !
32  real*8 vfa(0:7,*),umax,dmin,umfa(*),tincfguess,cvfa(*),hcfa(*)
33 !
34  tincfguess=1.d30
35  do i=1,nface
36 !
37 ! convection
38 !
39  umax=dsqrt(vfa(1,i)*vfa(1,i)+
40  & vfa(2,i)*vfa(2,i)+
41  & vfa(3,i)*vfa(3,i))
42  if(umax.gt.1.d-30) tincfguess=min(tincfguess,dmin/umax)
43 !
44 ! viscous diffusion
45 !
46  if((umfa(i).gt.0.d0).and.(vfa(5,i).gt.0.d0)) then
47  tincfguess=min(tincfguess,vfa(5,i)*dmin*dmin/
48  & (2.d0*umfa(i)))
49  endif
50 !
51 ! thermal diffusion
52 !
53  if(ithermal.gt.0) then
54  if((hcfa(i).gt.0.d0).and.(cvfa(i).gt.0.d0).and.
55  & (vfa(5,i).gt.0.d0)) then
56  tincfguess=min(tincfguess,vfa(5,i)*cvfa(i)*dmin*dmin/
57  & (2.d0*hcfa(i)))
58  endif
59  endif
60  enddo
61 !
62  return
#define min(a, b)
Definition: cascade.c:31
Hosted by OpenAircraft.com, (Michigan UAV, LLC)