Page 119 - Basic Structured Grid Generation
P. 119

108  Basic Structured Grid Generation

                        then called to adjust the positions of grid-nodes on the intermediate curves, denoted
                        by r 2 and r 3 , so as to enforce orthogonality of the grid at the inner and outer
                        boundaries.
                          If we consider a typical grid node R with co-ordinates (x 1 ,y 1 ) on the inner boundary
                        r 1 , at which the gradient of the boundary is calculated to be m 1 , then the straight line
                        normal to the boundary through R has equation

                                                             1
                                                  y − y 1 =−   (x − x 1 ).                (4.118)
                                                            m 1
                                                                                            i
                          Suppose that the corresponding node S on the linearly interpolated curve r has
                                                                                            2
                                     i
                                                                                     i
                                        i
                        co-ordinates (x ,y ) and that we can estimate the gradient of the curve r at this point
                                     2  2                                            2
                                                     i
                        as m 2 . The tangent to the curve r at this node has equation
                                                     2
                                                   y − y 2 = m 2 (x − x 2 ).              (4.119)
                          A better position for S should be at the intersection of these two straight lines; the
                        subroutine calculates the new co-ordinates. A similar procedure is applied to points on
                        the outer boundary r 4 and the linearly interpolated curve r 3 . Having now constructed
                        new intermediate curves r 2 and r 3 such that grid-lines are orthogonal at inner and
                        outer boundaries, we can employ the multisurface transformation formula (4.114),
                        with a chosen value of a, in the form
                                                 2
                                                                               2
                                   r(ξ, η) = (1 − h) (1 − a 1 h)r 1 (ξ) + (2 + a 1 )h(1 − h) r 2 (ξ)
                                                                    2
                                              2
                                           +h (1 − h)(2 + a 2 )r 3 (ξ) + h (1 − a 2 + a 2 h)r 4 (ξ),  (4.120)
                        where we define h in terms of a linear interpolation between the two stretching
                        functions,
                                                 h = h AF + ξ(h CD − h AF ).              (4.121)
                          The program Two-boundary.f is essentially a modification of Multisurface.f.The
                        subroutine orthogonality is removed, and instead Hermite interpolation is used in a
                        modified form of eqn (4.105),

                            
                                                                         dy AB         dy DC
                            x(ξ, η) =   1 (h)x AB (ξ) +   2 (h)x DC (ξ) + T 1   3 (h)  + T 2   4 (h)
                            
                                                                          dξ            dξ
                            
                                                                        dx AB         dx DC
                             y(ξ, η) =   1 (h)y AB (ξ) +   2 (h)y DC (ξ) − T 1   3 (h)  − T 2   4 (h)  ,
                            
                            
                                                                          dξ            dξ
                                                                                          (4.122)
                        with h given by (4.121).
                           4.6 Website programs

                        Here we list the programs in the directory Book contained on the companion website
                        (www.bh.com/companions/0750650583) that are relevant to the material in this chapter.
                        First the subdirectories are specified and then the names of the files with a description
                        are given.
   114   115   116   117   118   119   120   121   122   123   124