Page 120 - Basic Structured Grid Generation
P. 120

Structured grid generation – algebraic methods  109

                        4.6.1 Subdirectory: Book/univariate.gds


                        1. File: linear.f
                           This program simply generates a one-dimensional grid on a straight line based on
                           the linear interpolation

                                               x = (1 − ξ)x 0 + ξx 1 ,  0   ξ   1.
                        2. File: Eriksson.f
                           This generates a one-dimensional grid on a straight line using the Eriksson stretching
                           function
                                                            β
                                              x = (e βξ  − 1)/(e − 1),  0   ξ   1.
                           Here the constant β controls the degree of clustering near x = 0.
                        3. File: Compress1.f
                           This generates another grid on a straight line using the stretching function
                                                   kb     1/b    k
                                             x = (p   + cξ)  − p ,   0   ξ   1,           (4.123)
                                                                 k
                                                                      b
                                                                           kb
                           where p, k,and b are constants, with c = (p + 1) − p .
                        4. File: Compress2.f
                           This generates a grid on a straight line with the stretching function

                                                        tanh[Q(1 − ξ)]
                                   x = Pξ + (1 − P) 1 −               ,  0   ξ   1,       (4.124)
                                                           tanh Q
                           mentioned above. For example, when the parameters P and Q take the values
                           P = 1.8, Q = 2.0, an equally spaced set of points in the ξ computational domain
                           maps into a set of points in the physical x domain with clustering near x = 1.
                           When P = 0.9, Q = 2.0, a fairly equally spaced set of points in physical space is
                           obtained, while the choice P = 0.1, Q = 2.0 gives clustering near x = 0.


                        4.6.2 Subdirectory: Book/Algebra


                        1. File: Algebraic1.f
                           This generates a two-dimensional planar boundary-conforming grid using the co-
                           ordinate transformation given by eqn (4.98), where the functions h 1 (x) and h 2 (x)
                           are specified by the user. The program calculates the so-called metrics of the trans-
                           formation, given by the partial derivatives ∂ξ/∂x, ∂ξ/∂y, ∂η/∂x, ∂η/∂y, which are
                           required in transforming the hosted partial differential equations to be solved.
                           In this example we can show that

                                  ∂ξ        ∂ξ       ∂η



                                     = 1,      = 0,     =[h (x)h 1 (x) − h (x)h 2 (x) − yh (x)]
                                                                        1
                                                                                     2
                                                            2
                                  ∂x        ∂y       ∂x
                                                                         −2
                                                          ×[h 2 (x) − h 1 (x)]  ,
                                                     ∂η                 −1
                                                        =[h 2 (x) − h 1 (x)]  .
                                                     ∂y
   115   116   117   118   119   120   121   122   123   124   125