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

Go to the source code of this file.

Functions/Subroutines

subroutine cd_pk_ms (rad, d, xl, reynolds, p2, p1, beta, kappa, cd, u, T1, R)
 

Function/Subroutine Documentation

◆ cd_pk_ms()

subroutine cd_pk_ms ( real*8  rad,
real*8  d,
real*8  xl,
real*8  reynolds,
real*8  p2,
real*8  p1,
real*8  beta,
real*8  kappa,
real*8  cd,
real*8  u,
real*8  T1,
real*8  R 
)
21 !
22 ! This subroutines enable to calculate the compressible discharge
23 ! coefficient for thin and long orifices with corner radiusing;
24 !
25 ! author: Yannick Muller
26 !
27  implicit none
28 !
29  real*8 rad,d,xl,lqd,rqd,reynolds,p2,p1,p2p1,beta,beta_cor,kappa,
30  & cd,cdc_cl1,cdc_cl3,rldb,r,u,t1,c1,c2,
31  & c3,ms_cdr,rv,vid
32 !
33  p2p1=p2/p1
34  rqd=rad/d
35  lqd=xl/d
36  rldb=max(lqd,0.d0)
37 !
38 ! the method of cd calculation for a sharp edged aperture is only valid
39 ! for beta comprised between 0 and 0.7
40 !
41  if (beta.gt.0.7d0) then
42  beta_cor=0.7d0
43  else
44  beta_cor=beta
45  endif
46 !
47 ! differences between class1 or class2 or class3
48 !
49  if (lqd.eq.rqd) then
50 !
51 ! class1
52 !
53  call pk_cdc_cl1(lqd,reynolds,p2p1,beta_cor,kappa,cdc_cl1)
54  cd=cdc_cl1
55  else
56 !
57 ! class2 or class3 (clas2 is a sub class of class3 )
58 !
59  call pk_cdc_cl3(lqd,rqd,reynolds,p2p1,beta_cor,kappa,cdc_cl3)
60  cd=cdc_cl3
61  endif
62 !
63 ! if rotating orifice with Mac Greehan & Scotch
64 ! The decription of the method can be found in :
65 ! "Flow characteristics of long orifices with rotation and
66 ! corner radiusing" ASME 87-GT-16
67 !
68 ! rotating case eq 17
69 
70  if (u.ne.0) then
71  vid=dsqrt(2.d0*kappa/(kappa-1.d0)*r*t1*
72  & (1.d0-(p2/p1)**((kappa-1.d0)/kappa)))
73  rv=u/vid*(cd/0.6)**(-3)
74  c1=exp(-rv**1.2d0)
75  c2=0.5d0*rv**0.6d0*dsqrt(0.6/cd)
76  c3=exp(-0.5*rv**0.9d0)
77  ms_cdr=cd*(c1+c2*c3)
78  cd=ms_cdr
79  cd=min(max(cd,0.d0),1.d0)
80 
81 ! vid=dsqrt(2.d0*kappa/(kappa-1.d0)*R*T1*
82 ! & (1.d0-p2/p1**((kappa-1.d0)/kappa)))
83 ! rv=1000*u/vid*(cd/0.6)**(-3)
84 ! c1=exp(-rv**1.2d0)
85 ! c2=0.5*rv**(0.6d0)*(cd/0.6)**(-0.5d0)
86 ! c3=exp(-0.5d0*rv**0.9d0)
87 ! ms_cdr=cd*(c1+c2*c3)
88 ! cd=ms_cdr
89  endif
90 !
91  return
#define max(a, b)
Definition: cascade.c:32
#define min(a, b)
Definition: cascade.c:31
static double * c1
Definition: mafillvcompmain.c:30
subroutine pk_cdc_cl3(lqd, rqd, reynolds, p2p1, beta, kappa, cdc_cl3)
Definition: pk_cdc_cl3.f:24
subroutine pk_cdc_cl1(lqd, reynolds, p2p1, beta, kappa, cdc_cl1)
Definition: pk_cdc_cl1.f:24
Hosted by OpenAircraft.com, (Michigan UAV, LLC)