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

Go to the source code of this file.

Functions/Subroutines

subroutine hcrit (xflow, rho, b, theta, dg, sqrts0, hk)
 

Function/Subroutine Documentation

◆ hcrit()

subroutine hcrit ( real*8  xflow,
real*8  rho,
real*8  b,
real*8  theta,
real*8  dg,
real*8  sqrts0,
real*8  hk 
)
20 !
21 ! determine the critical depth
22 !
23  implicit none
24 !
25  real*8 xflow,rho,b,dg,sqrts0,hk,theta,tth,c1,xflow2,
26  & a,dbbdh,dadh,bb,dhk
27 !
28  hk=((xflow/(rho*b))**2/(dg*sqrts0))**(1.d0/3.d0)
29 !
30  if(dabs(theta).lt.1.d-10) return
31 !
32 ! critical depth for trapezoid, non-rectangular cross section
33 !
34  tth=dtan(theta)
35  c1=rho*rho*dg*sqrts0
36  xflow2=xflow*xflow
37 !
38  do
39  a=hk*(b+hk*tth)
40  dbbdh=2.d0*tth
41  dadh=b+hk*dbbdh
42  bb=dadh
43  dhk=(xflow2*bb-c1*a**3)/(xflow2*dbbdh-3.d0*c1*a*a*dadh)
44  if(dabs(dhk)/dhk.lt.1.d-3) exit
45  hk=hk-dhk
46  enddo
47 !
48  return
static double * c1
Definition: mafillvcompmain.c:30
Hosted by OpenAircraft.com, (Michigan UAV, LLC)