1!
2!     CalculiX - A 3-dimensional finite element program
3!     Copyright (C) 1998-2021 Guido Dhondt
4!
5!     This program is free software; you can redistribute it and/or
6!     modify it under the terms of the GNU General Public License as
7!     published by the Free Software Foundation(version 2);
8!
9!
10!     This program is distributed in the hope that it will be useful,
11!     but WITHOUT ANY WARRANTY; without even the implied warranty of
12!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13!     GNU General Public License for more details.
14!     You should have received a copy of the GNU General Public License
15!     along with this program; if not, write to the Free Software
16!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17!
18!     This subroutine enables to calculate the correction factor for a labyrinth seal
19!     wit a honeycomb stator
20!     s= gap, hl= width of a honeycomb cell
21!     the correction factors are interpolated from a table
22!
23!     H.Zimmermann and K.h. Wolff
24!     "Air system correlations part 1 Labyrinth seals"
25!     asme 98-GT-206
26!
27!     author: Yannick Muller
28!
29      subroutine cd_lab_honeycomb(s,lc,cd_honeycomb)
30!
31      implicit none
32!
33      integer id,n11
34!
35      real*8 s,lc,cd_honeycomb,szlc
36!
37!     lc=1/8 inch
38!
39      real*8 szl(11)
40      data szl
41     &     /0.05d0,0.06d0,0.075d0,0.081d0,0.1d0,0.13d0,0.15d0,0.16d0,
42     &      0.20d0,0.30d0,0.40d0/
43!
44      real*8 deltamp(11)
45      data deltamp
46     &     /97.1d0,40d0,32d0,23d0,20d0,0d0,-3.3d0,-5.7d0,-8.5d0,
47     &      -11.43d0,-12d0/
48!
49      data n11 /11/
50!
51! extrapolation
52      szlc=s/lc
53!      if (szlc.gt.0.40d0) then
54!         cd_honeycomb=deltamp(11)
55!      endif
56!
57!     intrapolation
58!
59          call ident(szl,szlc,n11,id)
60!     call ident(yz,q,11,idy)
61            if(id.eq.1) then
62              cd_honeycomb=deltamp(1)
63            elseif(id.eq.11) then
64               cd_honeycomb=deltamp(11)
65            else
66               cd_honeycomb=deltamp(id)+(deltamp(id+1)-deltamp(id))
67     &              *(szlc-szl(id))/(szl(id+1)-szl(id))
68            endif
69!
70            return
71!
72            end
73