Fundamentals of Grid Generation [1 ed.] 0849389879, 9780849389870

Fundamentals of Grid Generation is an outstanding text/reference designed to introduce students in applied mathematics,

319 63 2MB

English Pages 304 [289] Year 1993

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Power Quality Improvement by Using Statcom Control Scheme in Wind Energy Generation Interface to Grid
Power Quality Improvement by Using Statcom Control Scheme in Wind Energy Generation Interface to Grid

Electric Power Quality (EPQ) is a term that refers to maintaining the near sinusoidal waveform of power distribution bus voltages and currents at rated magnitude and frequency.” Today customers are more aware of the seriousness that the power quality possesses, this prompts the utilities to assure good quality of power to their customer. The power quality is basically customer-centric. The increased focus on utilities toward to maintaining reliable power supply by employing power quality improvement tools has reduced the power outages and blackout considerably. Good power quality is the characteristic of reliable power supply. Low power factor, harmonic pollution, load imbalance, fast voltage variations are some common parameters which are used to define the power quality. If the power quality issues are not checked, i.e., the parameters that define power quality doesn't fall within the predefined standards than it will lead to high electricity bill, high running cost in industries, malfunctioning of equipments, challenges in connecting renewables. Capacitor banks, FACTS devices, harmonic filters, SVC’s, STATCOM are the solutions to achieve the power quality. The performance of Wind turbine generators is affected by poor quality power, at the same time these wind power generating plant affects the power quality negatively. This paper presents the STATCOM system with the BESS and studies the impact on the power quality in a system which consist of wind turbine generator, nonlinear load, hysteresis controller for controlling the operation of STATCOM and grid. The model is simulated in the MATLAB/Simulink. This scheme mitigates the power quality issues, improves voltage profile and also reduces harmonic distortion of the waveforms. BESS level out the imbalances caused by real power due to intermittent nature of wind power available due to varying wind speeds. JOURNAL OF CONTEMPORARY URBAN AFFAIRS (2017) 1(3), 31-37. https://doi.org/10.25034/ijcua.2018.3676

0 0 1MB Read more

Fundamentals of Grid Generation [1 ed.]
 0849389879, 9780849389870

Citation preview

THE FUNDAMENTALS OF GRID GENERATION Patri k M. Knupp and Stanly Steinberg

1992 by Patri k M. Knupp Printed September 8, 2002

Grid for the Continental Shelf of the Gulf of Mexi o



1992 by P.M. Knupp, September 8, 2002

To a Sense of Spa e, Montana.

i

Contents 1 Preliminaries 1.1 1.2 1.3 1.4 1.5

The Goals of Grid Generation . The Tools of Grid Generation . Mappings and Invertibility . . Spe ial Coordinate Systems . . Trans nite Interpolation . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

Transformation of the 1D Hosted Equation . . Dis retization of the 1D Transformed Equation Transformation of the 2D Hosted Equation . . Dis retization of the 2D Transformed Equation Summary . . . . . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

4.1 Ve tor Cal ulus . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Ve tor Geometry of Curves . . . . . . . . . . . . . . . . 4.1.2 Ve tor Geometry of Surfa es . . . . . . . . . . . . . . . 4.1.3 Normals and Gradients on Impli it Surfa es and Curves 4.2 General Coordinate Relationships . . . . . . . . . . . . . . . . 4.2.1 Coordinate Relationships In One Dimension . . . . . . . 4.2.2 Coordinate Relationships In Two Dimensions . . . . . . 4.2.3 Coordinate Relationships In Three Dimensions . . . . . 4.2.4 Coordinate Relationships On Curves and Surfa es . . . 4.3 Elementary Di erential Geometry . . . . . . . . . . . . . . . . 4.4 Ve tor Cal ulus and Di erential Geometry in the Plane . . . . 4.4.1 First-Order Relationships . . . . . . . . . . . . . . . . . 4.4.2 Se ond-Order Relationships . . . . . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

2 Appli ation to Hosted Equations 2.1 2.2 2.3 2.4 2.5

3 Grid Generation on the Line 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9

Introdu tion . . . . . . . . . . . . . . . . . . Generators that Control Grid Spa ing . . . 1-D Poisson Grid Generators . . . . . . . . Numeri al Implementation . . . . . . . . . . Minimization Problems . . . . . . . . . . . The Cal ulus of Variations . . . . . . . . . . A Fourth-Order Grid Generation Equation Feature-Adaptive Moving Grids . . . . . . Summary . . . . . . . . . . . . . . . . . . .

4 Ve tor Cal ulus and Di erential Geometry

ii

. . . . . . . . .

. . . . . . . . .

1

1 3 3 9 17

23 24 26 30 33 39

41 41 42 46 48 50 53 54 56 57

59 59 61 62 65 65 66 67 70 74 74 77 77 79



iii

1992 by P.M. Knupp, September 8, 2002

5 Classi al Planar Grid Generation

5.1 Introdu tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 The Planar Grid-Generation Problem . . . . . . . . . . . . . 5.3 Non-Ellipti Grid Generators . . . . . . . . . . . . . . . . . . 5.3.1 Algebrai Grid Generation . . . . . . . . . . . . . . . . 5.3.2 Conformal and Quasi-Conformal Mapping Te hniques 5.3.3 Orthogonal Grid Generation . . . . . . . . . . . . . . 5.3.4 Hyperboli and Paraboli Grid Generation . . . . . . 5.3.5 Biharmoni Grid Generation . . . . . . . . . . . . . . 5.4 Ellipti Grid Generation . . . . . . . . . . . . . . . . . . . . . 5.4.1 The Simplest Ellipti Generator (Length) . . . . . . . 5.4.2 The Winslow or Smoothness Grid Generator . . . . . 5.4.3 Trun ation Error in Grid Generation: A Case Study . 5.5 The Inhomogeneous TTM Grid Generator . . . . . . . . . . . 5.6 Controlling the Grid Near the Boundary . . . . . . . . . . . . 5.6.1 The Neumann Boundary Condition . . . . . . . . . . . 5.6.2 The Steger-Sorenson Approa h . . . . . . . . . . . . . 5.7 Solution-Adaptive Algorithms . . . . . . . . . . . . . . . . . . 5.7.1 Grid Adaption with Inhomogeneous TTM . . . . . . 5.7.2 The Deformation Method . . . . . . . . . . . . . . . .

6 Variational Planar Grid Generation

6.1 Introdu tion . . . . . . . . . . . . . . . . . . . . . . . 6.2 The Cal ulus of Variations . . . . . . . . . . . . . . . 6.2.1 Minimization Theory . . . . . . . . . . . . . . 6.2.2 Ellipti ity . . . . . . . . . . . . . . . . . . . . 6.3 Variational Grid Generation in the Plane . . . . . . 6.3.1 The Length Fun tional . . . . . . . . . . . . . 6.3.2 The Area Fun tional . . . . . . . . . . . . . . 6.3.3 The Orthogonality Fun tional . . . . . . . . . 6.3.4 Combinations of Fun tionals . . . . . . . . . 6.3.5 The AO Fun tional . . . . . . . . . . . . . . . 6.3.6 The Referen e Grid and the Repli ation Idea 6.4 Numeri al Algorithms for Variational Generators . . 6.5 The Dire t Optimization Method . . . . . . . . . .

7 Tensor Analysis and Transformation Relationships 7.1 Introdu tion . . . . . . . . . . . . 7.2 Tensor Analysis . . . . . . . . . . . 7.2.1 The Tra e of a Tensor . . . 7.2.2 The Gradient of a Ve tor . 7.2.3 The Divergen e of a Tensor 7.2.4 The Gradient of a Tensor . 7.2.5 Curl and Lapla ian . . . . 7.2.6 The Tensor Produ t . . . . 7.3 Transformation Relations . . . . . 7.3.1 Gradient . . . . . . . . . . . 7.3.2 Divergen e . . . . . . . . . 7.3.3 Curl . . . . . . . . . . . . . 7.3.4 Lapla ian . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

82

82 83 84 84 88 89 90 93 93 94 95 97 98 102 102 104 106 106 107

109

109 110 113 116 117 119 121 122 123 124 125 127 128

131

131 131 132 132 133 134 135 135 137 138 139 140 140



iv

1992 by P.M. Knupp, September 8, 2002

7.3.5 Derivation of the Winslow Equations . . . . . . . . . . . . . . . 141 7.3.6 Type Invarian e of the Hosted Equation . . . . . . . . . . . . . 142 7.3.7 Transformation of the Time Derivative . . . . . . . . . . . . . 142

8 Advan ed Planar Variational Grid Generation

8.1 Introdu tion . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Variational Prin iples . . . . . . . . . . . . . . . . . . . . 8.2.1 Fun tionals of the Metri Tensor . . . . . . . . . . 8.2.2 Rigid Body Transformations of the Domain . . . . 8.3 The Euler-Lagrange Equations . . . . . . . . . . . . . . . 8.3.1 The General Planar Euler-Lagrange Equations . . 8.3.2 The Euler-Lagrange Equations for the Prin iple I4 8.3.3 Numeri al Implementation . . . . . . . . . . . . . 8.3.4 The Covariant Proje tions . . . . . . . . . . . . . 8.3.5 Tensor Form of the Euler-Lagrange Equations . . 8.3.6 Logi al Spa e Weighting . . . . . . . . . . . . . . 8.4 The Se ond Variation . . . . . . . . . . . . . . . . . . . . 8.5 Inverse Mapping Approa h . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

9.1 Volume Di erential Geometry . . . . . . . . . . . . . . . . . . . 9.2 Approa hes to Three-dimensional Grid Generation . . . . . . . . 9.2.1 The Volume Grid-Generation Problem . . . . . . . . . . . 9.2.2 3D Trans nite Interpolation . . . . . . . . . . . . . . . . 9.2.3 3D Thompson-Thames-Mastin . . . . . . . . . . . . . . . 9.3 The Variational Method . . . . . . . . . . . . . . . . . . . . . . . 9.3.1 3D Variational Prin iples . . . . . . . . . . . . . . . . . . 9.3.2 The 3D Euler-Lagrange Equations . . . . . . . . . . . . . 9.3.3 A Variational Approa h to the Steger-Sorenson Algorithm

. . . . . . . .

. . . . . . . . .

. . . . . . . . .

9 Grid Generation in Three Dimensions

10 Variational Grid Generation on Curves and Surfa es

10.1 Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1.1 Di erential Geometry of Curves . . . . . . . . . . . . . . . . . 10.1.2 Transformation Relations on a Curve . . . . . . . . . . . . . . 10.1.3 Parametri Approa h to Variational Curve Grid Generation . 10.1.4 Lagrange Multiplier Approa h to Variational Curve Grid Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Surfa es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.1 Di erential Geometry of Surfa es . . . . . . . . . . . . . . . . 10.2.2 Transformation Relations on a Surfa e . . . . . . . . . . . . . 10.2.3 Parametri Approa h to Variational Surfa e Grid Generation . 10.2.4 Lagrange Multiplier Approa h to Variational Surfa e Grid Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.5 The Surfa e Covariant Proje tions . . . . . . . . . . . . . . . .

145

145 146 146 149 150 150 152 154 156 157 160 160 162

165

166 168 168 170 171 172 172 173 176

177

177 177 179 181 184 189 189 191 194 197 199

11 Contravariant Fun tionals: Alignment, Diagonalization, and Rotation 201 11.1 Fun tionals Based on the Ellipti Norm . . . . . . . . . 11.1.1 The Alignment Fun tional . . . . . . . . . . . . 11.1.2 The Diagonalization Fun tionals . . . . . . . . . 11.2 Non-Symmetri Form of the Diagonalization Equations

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

202 203 204 206



v

1992 by P.M. Knupp, September 8, 2002

11.3 Winslow's Variable Di usion Generator . . . . . . . . . . . . . . . . . 207 11.4 Lo al Condition with Non-Symmetri Matri es . . . . . . . . . . . . 208 11.5 Alignment with an Ellipti Generator . . . . . . . . . . . . . . . . . . 212

A Tensor CoeÆ ients

A.1 Planar Tensor CoeÆ ients . . . . . . . . . . . . . A.1.1 Covariant Form . . . . . . . . . . . . . . . A.1.2 Contravariant Form . . . . . . . . . . . . A.2 Volume Tensor CoeÆ ients . . . . . . . . . . . . A.2.1 Mixed Covariant and Contravariant Form

B Fortran Code Dire tory

B.1 Analyti Grid Generators . . . . . . . . . B.1.1 Program linear . . . . . . . . . . . B.1.2 Program oned . . . . . . . . . . . . B.1.3 Program bilinear . . . . . . . . . . B.1.4 Program twod . . . . . . . . . . . B.2 Trans nite Interpolation (TFI) . . . . . . B.3 Hosted Equations . . . . . . . . . . . . . . B.3.1 One-D-Programs . . . . . . . . . . B.3.2 Two-D Programs . . . . . . . . . . B.4 LINE GENERATORS . . . . . . . . . . . B.5 Hyperboli Grid Generator . . . . . . . . B.6 TTM Generator . . . . . . . . . . . . . . B.7 Variational Generators . . . . . . . . . . . B.7.1 Length Fun tional . . . . . . . . . B.7.2 Weighted Combination Fun tional B.7.3 Metri Elements Fun tional . . . .

C A Rogue's Gallery of Grids

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

230

230 230 231 232 232

234

234 234 234 235 235 235 236 236 236 237 237 237 237 237 238 238

239

List of Figures 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15

Transformation, map, or oordinate system A grid . . . . . . . . . . . . . . . . . . . . . Boundary topology . . . . . . . . . . . . . . A bilinear map . . . . . . . . . . . . . . . . Polar oordinates . . . . . . . . . . . . . . Paraboli ylinder oordinates . . . . . . . Ellipti ylinder oordinates . . . . . . . . Horseshoe . . . . . . . . . . . . . . . . . . . Modi ed horseshoe . . . . . . . . . . . . . . Bipolar oordinates . . . . . . . . . . . . . Spheri al oordinates . . . . . . . . . . . . Boundaries of planar regions . . . . . . . . TFI Grid on the horseshoe . . . . . . . . . TFI Grid on the Swan . . . . . . . . . . . TFI Grid on the Chevron . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

2 2 7 10 13 14 14 15 16 16 18 18 20 21 21

2.1 2.2 2.3 2.4 2.5

Solution of the BVP . . . . . . . Central di eren es and averages One-dimensional dis retization . Grid points . . . . . . . . . . . . Two-dimensional sten il . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

25 27 28 34 35

3.1 One-dimensional grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Nonlinear iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42 49

4.1 4.2 4.3 4.4 4.5 4.6

Parametri urve . . . . . . . . Parametri surfa e . . . . . . . Impli it urve . . . . . . . . . . Coordinate lines . . . . . . . . Coordinate urves and surfa e . Parallel Tangents . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

61 63 66 68 71 81

5.1 5.2 5.3 5.4 5.5

Algebrai grid generation using multiple urves Riemann Mapping Theorem . . . . . . . . . . . Hyperboli grid . . . . . . . . . . . . . . . . . . Horseshoe region . . . . . . . . . . . . . . . . . Inhomogeneous-TTM grids . . . . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. 85 . 89 . 92 . 99 . 101

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . .

. . . . . .

. . . . . .

6.1 Convex fun tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 6.2 Referen e spa e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 vi



vii

1992 by P.M. Knupp, September 8, 2002

8.1 Lo ation of the entries of B . . . . . . . . . . . . . . . . . . . . . . . . 154 9.1 The volume grid-generation problem . . . . . . . . . . . . . . . . . . . 169 10.1 Curve parameterization . . . . . . . . . . . . . . . . . . . . . . . . . . 182 10.2 Geometry of urve-grid trun ation errors . . . . . . . . . . . . . . . . 187 10.3 Surfa e parameter spa e . . . . . . . . . . . . . . . . . . . . . . . . . . 195 C.1 Unit square grids C.2 Trapezoid grids . C.3 Annulus grids . . C.4 Horseshoe grids . C.5 Swan grids . . . C.6 Chevron grids . . C.7 Airfoil grids . . . C.8 Dome grids . . . C.9 Valley grids . . . C.10 Ba kstep grids . C.11 Plow grids . . . . C.12 C grids . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

240 243 246 249 252 254 257 259 262 265 267 269

List of Tables 1.1 Logi al spa e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Coordinate maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Consisten y onditions . . . . . . . . . . . . . . . . . . . . . . . . . .

4 5 19

2.1 Grid points (i; j  0) . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.1 4.2 4.3 4.4 4.5

67 68 70 71 78

Coordinate urves . . . . . . . . . Coordinate surfa es . . . . . . . . Coordinate urves . . . . . . . . . Coordinate surfa es . . . . . . . . Planar inner produ t relationships

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

7.1 Summary of an operator's domain and range . . . . . . . . . . . . . . 132 7.2 Covariant tangent tensor produ t properties . . . . . . . . . . . . . . . 136 8.1 Unweighted Variational Prin iples . . . . . . . . . . . . . . . . . . . . 147 8.2 First partial derivatives of the variational prin iples . . . . . . . . . . 153 8.3 Covariant proje tions of the planar Euler-Lagrange equations . . . . . 157 9.1 3D Variational Prin iples . . . . . . . . . . . . . . . . . . . . . . . . . 173 10.1 Properties of the Ja obian matrix and its generalized inverse . . . . . 192

viii



1992 by P.M. Knupp, September 8, 2002

ix

PREFACE This book has two parts, re e ting the fa t that the authors have two major goals. The rst part of this book, Chapters One through Five, is intended to be used as a textbook for a ourse overing the mathemati al fundamentals, the basi algorithms, and some appli ations of stru tured grid generation. The se ond part, Chapters Six through Eleven, presents results from the authors' original resear h in grid generation. The two parts of the book are written in the same style and the transition from textbook to monograph is gradual. Chapters One through Five provide a uniform mathemati al treatment of fundamental grid generation algorithms. The mathemati al orientation of the book is a result of our desire to provide the rst systemati treatment of this material in textbook form. Although mathemati ally oriented, the book proves few theorems so as to keep the book a

essible to a large audien e. Chapters One through Five should bene t engineers and other users of grid generation software by providing a simple explanation of urrent algorithms. It should also be of interest to mathemati ians, who will be qui k to note gaps in the underlying mathemati al theory. The se ond part of this book (Chapters Six through Eleven) turns to more theoreti al aspe ts of grid generation, primarily of interest to those who do resear h on the algorithms of grid generation. These later hapters summarize the authors' original resear h results. This part is not onsidered de nitive sin e a tive resear h into both the pra ti al and theoreti al aspe ts of grid generation is urrently underway. Certain approa hes and algorithms are emphasized over others, re e ting the authors' orientation. Sin e grid generation is an open resear h topi , it is understandable that others having di erent obje tives may disagree with the emphases and interpretations given. For example, generation of grids as solutions to partial di erential equations is emphasized more than algebrai methods even though the latter ertainly onstitutes an e e tive approa h to grid generation. Similarly, variational grid generation is emphasized over more lassi al partial di erential equation te hniques. It is hoped that in the long run, the mathemati al approa h to the subje t will help identify truly robust methods that will serve as the basis of a nal solution to the problem of grid generation on ompli ated obje ts. The book does not introdu e readers to the pra ti al details of generating grids on ompli ated obje ts requiring pat hing of multiple blo ks, unstru tured grids, intera tive grid generation, et . Adequate dis ussion of these important topi s would double the size of this book and arry us far a eld from the basi ideas we wish to present; a separate book on these pra ti al matters would be a useful ompanion to the present volume. In re ent times, there has been onsiderable interest in unstru tured grids (see Carey, 1993, [24℄). For very omplex geometries, satisfa tory unstru tured grids are easier to generate than stru tured grids. On the other hand, the unstru tured approa h has limitations. For example, there is a nontrivial omputational ost in using unstru tured grids. The EÆ ien y Note on page 44 (in Se tion 5.1.3) of the Thinking Ma hines FORTRAN manual (Thinking, 1992, [203℄) makes lear that, for the CM5, programs using stru tured grids are more eÆ ient than ones using unstru tured grids. For problems involving relatively simple geometries, stru tured grid algorithms may be preferable. There has also been skepti ism on erning the appli ability of unstru tured meshes to problems of vis ous ow (Mavriplis, 1992, [134℄). To be onsistent with the goal of being an introdu tion to grid generation, this book is restri ted to regular quadrilateral meshes and simply onne ted domains.



1992 by P.M. Knupp, September 8, 2002

x

Most of the key ideas of stru tured grid generation are met within this restri tion; generalizations to omposite meshes and unstru tured grids require some additional ideas. The ba kground needed to understand the rst part of this book is matrix theory, ve tor al ulus, the elementary theory of partial di erential equations, introdu tory nite-di eren e te hniques, and elementary numeri al programming te hniques. The only advan ed mathemati al tools used are the al ulus of variations and di erential geometry. SuÆ ient ba kground material for the advan ed tools is provided in this book. However, reading additional material from an applied text will help the reader. A symbol manipulator su h as Derive, MACSYMA, Maple, Mathemati a, or Redu e will be useful for doing some of the more omplex algebrai manipulations (see Steinberg, 1988, [192℄). This book is not intended as a text on nite-di eren e methods, so the reader not familiar with this topi will need to do some ba kground reading. For example, the reader should be able to as ertain if ertain approximations have se ond-order trun ation error. Any of the textbooks, Birkho and Lyn h, 1984, [19℄, Celia and Gray, 1992, [35℄, Flet her, 1988, [72℄, Forsythe and Wasow, 1960, [75℄, Golub and Ortega, 1991, [84℄, Hall and Pors hing, 1990, [88℄, Peyret and Taylor, 1983, [148℄, Sod, 1985, [177℄, or Strikwerda, 1989, [198℄ provide an introdu tion to nite di eren e methods. Exer ises form an integral part of the text and provide important extensions of the material in the narrative. After studying the rst part of this book, the reader will be able to generate grids on a wide range of geometri regions and solve di erential equations de ned on those regions using the generated grids. To in rease the utility of the book, omputer odes implementing the basi algorithms are provided on the

oppy disk in luded with this book.

CHAPTER SUMMARIES We believe a highly satisfa tory solution to the problem of organizing the many inter-related ideas of grid generation has been found for this book, but it is re ognized that other presentations of the material may seem more logi al to some readers. Grids are viewed in this book as dis retized transformations and, therefore, Chapter 1, Preliminaries, introdu es the on ept of transformation and dis usses the invertibility of transformations, a property riti al to their use in generating grids. Examples of transformations that an be used to generate grids are given; these in lude transformations su h as polar and spheri al oordinates. The most useful and fastest general grid generator, trans nite interpolation, is introdu ed. Chapter 2, Appli ation to Hosted Equations, shows how to use boundary tted grids to solve steady-state boundary-value problems for di erential equations in one and two dimensions. To use a grid to solve a di erential equation, the di erential equation is transformed to general oordinates and then dis retized. The di erential equations that des ribe physi al problems are alled hosted equations. The type of a partial di erential equation determines the kind of physi s that it des ribes. It is important that the transformation being used to generate a grid have a positive Ja obian; in parti ular, the type of a di erential equation is preserved by transformations with positive Ja obian. This hapter ends with a proje t to solve a nontrivial boundary-value problem in two dimensions using grid-generation te hniques. The solution of this problem using other te hniques su h as those des ribed in Birkho and Lyn h, 1984 [19℄ is nontrivial and more diÆ ult than using grid-



1992 by P.M. Knupp, September 8, 2002

xi

generation te hniques. Chapter 3, Grid Generation on the Line, dis usses one-dimensional grid generation. This rather simple problem provides a ontext for introdu ing many of the ideas that are riti al to the rest of the book. A fundamental problem is to generate a grid whi h has spe i ed lengths of segments between nodes. This problem is ompletely solved for the one-dimension ase; the problem is onsiderably more diÆ ult in higher dimensions. The most important lassi al generators use Lapla e or Poisson partial di erential equations to generate the grid, so the one-dimensional analogs of these generators are des ribed. The next goal is to introdu e variational ideas to generate grids with spe i ed segment lengths. In one-dimension, all of the des ribed grid generators are intimately related, so these relationships are des ribed. Numeri al algorithms for the one dimensional generators is given in detail, as this provides a model for solving higher-dimensional problems. The hapter ends with a dis ussion of how to used the weighted grid generator to reate solution-adapted grids. Before pro eeding to higher-dimensions, a short detour away from grid generation is taken in Chapter 4, Ve tor Cal ulus and Di erential Geometry, so that basi geometri ideas an be presented. Tangent ve tors to oordinate urves and normal ve tors to oordinate surfa es are introdu ed. Coordinate relationships between maps and their inverse are presented. Con epts from elementary di erential geometry su h as the metri tensor are de ned. In Chapter 5, Classi al Planar Grid Generation, important non-variational planar grid generators are des ribed. These generators form the ore of most stru tured grid generation software urrently in use. The material is divided into two parts: non-ellipti and ellipti generators. The non-ellipti generators in lude algebrai te hniques, onformal and quasi- onformal mappings and orthogonal, hyperboli , paraboli , and biharmoni partial di erential equation methods. Two standard ellipti generators, introdu ed by Amsden and Hirt, 1973, [3℄, and by Winslow, 1967, [231℄, are des ribed. Inhomogeneous grid generation with ellipti grid generators to provide interior ontrol and a more re ned te hnique for ontrolling the grid near the boundary are dis ussed. Planar solution-adaptive grid generation is outlined, and nally, a novel non- lassi al approa h to adaptive grid generation is des ribed. In Chapter 6, Variational Planar Grid Generation, the Steinberg-Roa he variational theory of grid generation is des ribed. This is pre eded by an introdu tion to methods from the al ulus of variations. Length, Area, Orthogonality, and

ombinations of these fun tionals are given. The idea of the referen e grid is presented for use in inhomogeneous grid generation. A numeri al algorithm for nding solutions to the Euler-Lagrange equations is given. The hapter loses with a brief presentation of the Dire t Optimization Method. In Chapter 7, Tensor Analysis and Transformation Relationships, the reader is introdu ed to on epts from ontinuum me hani s, su h as the divergen e of a tensor, whi h prove useful in unifying and extending variational grid generation algorithms. In addition, these on epts are dire tly appli able to the problem of transforming hosted equations to general oordinate frames. General relationships for the gradient, divergen e, url, and Lapla ian are given in onservative and non onservative forms. Appli ations to grid generation, su h as a derivation of the inverted Winslow equations is given. General expressions for time derivatives are also noted. In Chapter 8, Advan ed Planar Variational Grid Generation, the planar variational prin iple is assumed to be a fun tion of the elements of the metri tensor



1992 by P.M. Knupp, September 8, 2002

xii

and the determinant of the Ja obian. This assumption permits a general derivation of the Euler-Lagrange equations in onservative form for this lass of fun tionals; the equations are related to a variational prin iple for the model hosted equation. A numeri al algorithm for the general variational prin iple is given. An entirely new form of the grid generation equations, the ovariant proje tion, is given and shown to be related to the Euler-Lagrange equations resulting from the Bra kbill-Saltzman approa h to variational grid generation. Conne tions between the Steinberg-Roa he and Bra kbill-Saltzman theories are outlined. A non- onservative form of the general Euler-Lagrange equations is derived. In Chapter 9, Grid Generation in Three Dimensions , ideas from Chapters 5 and 8 are extended to three dimensions. In Chapter 10, Variational Grid Generation on Curves and Surfa es, a general variational theory of urve and surfa e grid generation is presented. Two approa hes to the problem of onstraining grid points to the manifold are des ribed, the parametri approa h and the Lagrange Multiplier approa h. Classi al results from di erential geometry and on epts from tensor analysis are used to derive the EulerLagrange equations for the urve and surfa e grid generators. The bifur ation problem is des ribed and two approa hes whi h avoid this problem (both essentially involving the ovariant proje tion) are given. The on ept of O -Obje t trun ation error is introdu ed in a dis ussion of numeri al approa hes to solving the Lagrange Multiplier form of the equations. In Chapter 11, Contravariant Fun tionals, we dis uss ontravariant fun tionals based on an ellipti norm; the fun tionals are designed to perform either grid alignment with a given ve tor eld or tensor diagonalization by appropriate hoi e of oordinate system. The latter permits an unambiguous interpretation of the weight fun tions in terms of stated lo al onditions on the grid tangents. Two spe ial ases are of interest: the Winslow variable di usion generator and the orthogonal/ ell-aspe t ratio grid generator. From a mathemati al point of view, the Winslow variable di usion generator is the proper weighted generalization of the homogeneous ThompsonThames-Mastin generator in that it gives a lear interpretation of the weights and falls within the theory of harmoni mappings. In Appendix A, Tensor CoeÆ ients, detailed formulas for the matrix

oeÆ ients of the non onservative form of the Euler-Lagrange equations are given. Appendix B, Fortran Code Dire tory, is a guide to the software on the oppy disk. Appendix C, A Rogue's Gallery of Grids, gives a large sample of grids that illustrate the performan e of the important grid generators on a sele tion of basi planar regions.

ACKNOWLEDGMENTS Thanks to the rst lass to use this text and orre ted many errors and typos: A. Farhat; L. James; S. Weber. Thanks to Frank Hat eld for his help with the gures, to T. Larkin for his omments and orre tions, and nally to Patri k J. Roa he for his support and en ouragement.



1992 by P.M. Knupp, September 8, 2002

xiii

Notation Symbol

Explanation

En

Eu lidean spa e of dimension n

x; y; z

Physi al spa e oordinates

; ; 

Logi al spa e oordinates

Uk ; Uk

Logi al spa e of dimension k and its boundary

nk ;  nk

k-dimensional obje t in n-dimensional spa e and its boundary

Xkn Xkn

Transformation from logi al spa e to physi al spa e, or their boundaries

J; JT

The Ja obian matrix and its transpose

J

Determinant of the Ja obian matrix

C

Auxiliary Ja obian matrix

x ; x ; x Coordinate line tangents Cj

Spa e of fun tions that have j ontinuous derivatives

rx r

Gradient operator with respe t to physi al variables

det

Determinant

tr

Tra e operator

I

Identity matrix

Gradient operator with respe t to logi al variables



1992 by P.M. Knupp, September 8, 2002

Symbol Explanation

G pg

Metri Tensor

gi;j

Elements of the metri tensor

gi;j x?

Elements of the inverse metri tensor

B

Beltrami operator

k ij

Determinant of Ja obian matrix

Ve tor perpendi ular to the ve tor x Surfa e or Spa e Christo el Symbols

[ij; k℄

Spa e Christo el Symbol of the rst kind

P ; P

Algebrai proje tion operators

 r2 ; r2x QH x

Dire t sum operator

I [x℄

Variational prin iple

D I [x℄ D 2 I [x℄

First variation of variational prin iple

Tij

Matrix oeÆ ients in Euler-Lagrange equation

Lapla e operators with respe t to logi al and physi al variables Grid generation operator

Se ond variation of variational prin iple

xiv



1992 by P.M. Knupp, September 8, 2002

xv

Symbol

Explanation

div ; divx

Divergen e operators with respe t to logi al and physi al variables

[rS ℄T

Contra tion of the tensors S and T

url ; urlx

Curl operators with respe t to logi al and physi al variables

 

Tensor produ t operation

Df=Dt

Material or substantial derivative of f with respe t to t



Logi al spa e weight fun tion

w

Physi al spa e weight fun tion

H

Integrand of variational prin iple

; 

Curvature and torsion

n^; ^t; b^

Unit ve tors for urve (moving-trihedron)

W

Curvature tensor

Inner produ t operation Ve tor ross produ t operation

Chapter 1

Preliminaries 1.1 The Goals of Grid Generation Numeri al grid generation arose from the need to ompute solutions to the partial di erential equations of uid dynami s on physi al regions with omplex geometry (see the pi ture on the over for an example). By transforming a physi al region to a simpler region, one removes the ompli ation of the shape of the physi al region from the problem. Su h transformations an be viewed as a general

urvilinear oordinate system for the physi al region. The lassi al te hniques of transforming problems to polar, ylindri al, or spheri al oordinates are spe ial ases of grid generation. A ost of using su h oordinate systems is an in rease in the

omplexity of the transformed hosted equations, i.e., those equations modeling the physi al problem to be solved. An advantage of this te hnique is that the boundary

onditions be ome easier to approximate a

urately. In many appli ations, it is possible to transform the physi al region to a square in two dimensions or a ube in three dimensions in su h a manner that the boundary of the square or ube orresponds to the boundary of the physi al region (see Figure 1.1). The square or ube is alled the logi al region and the transformation gives rise to a boundary onforming oordinate system. The oordinate lines in this oordinate system are given by the images of uniform oordinate lines in the logi al region. In su h oordinate systems, it is relatively easy to make a

urate implementations of numeri al boundary onditions. The terminology in this subje t is exible. For example the physi al region is also alled the physi al spa e, the physi al domain, or the physi al obje t, with similar terminology for the logi al region, spa e or domain (obje t is not used here). Transformations are also alled maps. In this development, the Ja obian of the transformation is required to be nonzero, and onsequently the transformation has an inverse, that is, logi al spa e is mapped to physi al spa e (see Figure 1.1). If a set of points is hosen in logi al spa e, then the inverse transformation arries these points to points in physi al spa e, where they form a grid (see Figure 1.2). If the points in logi al spa e are reated by dividing the square into identi al re tangles or the ube into identi al re tangular boxes, then the grid is logi ally re tangular; the dis ussion in this book is on ned to logi ally re tangular grids. Be ause grids are rst hosen in logi al spa e and then mapped to physi al spa e, it is natural to view the transformation as a mapping from logi al to physi al spa e. In addition, when algorithms are implemented in omputer odes, 1



2

1992 by P.M. Knupp, September 8, 2002

η

y

transformation

inverse transformation ξ

x

logical space

physical space

Figure 1.1: Transformation, map, or oordinate system η

y

ξ

x

logical space

physical space

Figure 1.2: A grid the omputations are done in logi al spa e and onsequently if is helpful to view the transformation as being from logi al to physi al spa e. Also, the reader familiar with nite-element theory should realize that the master element notion from that theory is a simple variant of the notion of logi al spa e. As is well known (Epstein, [70℄), if the Ja obian of the transformation is ever zero, the transformation fails to preserve the essential physi al and mathemati al properties of the hosted equations. Transformations ontaining a point with zero Ja obian are

alled folded; avoiding a folded transformation is a major obje tive of grid-generation algorithms. Also, it is well known that the error of approximations of the hosted equations depends not only on the derivatives of the solution of the hosted equations and the grid spa ing, but also on the rate-of- hange of grid spa ing and the departure of the grid from orthogonality ( Mastin, [130℄, or Thompson and Mastin, [213℄). For a given grid spa ing, smooth, orthogonal grids usually result in the smallest error in simple problems. Thus another major goal of grid-generation algorithms is to produ e smooth grids, that is, grids where the spa ing varies smoothly and the angles between grid lines do not be ome too small. It turns out that it is not pra ti al to generate orthogonal grids for a wide range of problems. If the solution of the hosted equations varies rapidly in some part of the physi al region, then it is reasonable to hoose a ner grid in that part of the region to redu e the error in the numeri al solution. Su h a grid is alled solution adapted; it is



1992 by P.M. Knupp, September 8, 2002

3

important to be able to generate solution-adapted grids. The main advantage of modern grid-generation algorithms is that these algorithms

an be used to eÆ iently generate large grids, ontaining tens of thousands to a few million points, and the resulting grids allow the redu tion of error and the simpli ed treatment of boundary onditions. Grid-generation algorithms have been applied to many problems in omputational uid dynami s, in luding aerodynami s, tidal and estuary ow, plasma physi s, ele tromagneti s and stru tures. Grid generation has been the subje t of several onferen es (Smith, [174℄, Thompson, [210℄, Ghia and Ghia, [79℄, Hauser and Taylor, [89℄, Sengupta et al., [167℄, Castillo, [32℄, and Ar illa et al., [9℄); the pro eedings of these onferen es are an ex ellent sour e of information about both algorithms and appli ations. The textbook by Thompson et al., [215℄, des ribes a wide range of algorithms (the reader needs a solid ba kground in di erential geometry and tensor al ulus). The following textbooks over some aspe ts of the material in this text: George, [78℄, (mostly unstru tured grids), Celia and Gray, [35℄, Se tion 2.7.2; Flet her, [72℄, Volume II, Chapters 12 and 13; and Peyret and Taylor, [148℄, Se tion 11.4. The new text by Carey, [24℄, provides an ex ellent survey of related material, with emphasis on appli ations to nite elements.

1.2 The Tools of Grid Generation It is important to understand some ba kground information before starting to generate ompli ated grids. In this text, pra ti al algorithms are emphasized; many of these algorithms an be understood and implemented without a omplete understanding of the underlying mathemati al results. However, the design of the algorithms and the predi tion of the shape of the grids the algorithms generate

riti ally rely on the underlying mathemati s. It is assumed that the reader is familiar with elementary matrix theory and ve tor al ulus; however, the most frequently used results are reviewed. One of the best ways to assess the quality of a grid-generation algorithm is to test it on a number of diÆ ult problems. This has been done for many of the algorithms in this text; the grids the algorithms generate are ompared in Appendix C, The Rogue's Gallery of Grids. In the next se tion, a standard notation is set up to des ribe transformations and their Ja obians. It is riti al, as will be dis ussed later in this hapter, that the transformation be invertible. The onne tion between the invertibility of the transformation and the Ja obian is dis ussed in detail. Next, some lassi al transformations, su h as polar oordinates, are introdu ed and used to generate grids. At this stage the reader needs to know a s ienti programming language, su h as FORTRAN, Pas al, basi , or C, to omplete the exer ises. It is also important to have

omputer graphi s software and hardware appropriate for plotting grids. Next, a fast method of generating grids on simple regions, known as trans nite interpolation, is introdu ed. An exer ise requires the reader to build a useful grid-generation ode based on trans nite interpolation.

1.3 Mappings and Invertibility This book is primarily on erned with mappings from one geometri obje t to another. The domain of the mapping is referred to as the logi al spa e, while the range of the mapping is referred to as the physi al spa e. In keeping with the pra ti al



4

1992 by P.M. Knupp, September 8, 2002

n logi al spa e 1 U1 = f 2 E 1 ; 0    1g 2 U2 = f(; ) 2 E 2 ; 0  ;   1g 3 U3 = f(; ;  ) 2 E 3 ; 0  ; ;   1g

boundary Ukn 2 points 4 segments 4 points 6 fa es 12 segments 8 points

Table 1.1: Logi al spa e origins of this subje t, these spa es are limited to subsets of the Eu lidean Spa es E n with n = 1, 2, or, 3. The variables x, y, and z are used as oordinates in physi al spa e, while the variables  , , and  are used as oordinates in logi al spa e. For the des ription of some algorithms, it is helpful to have oordinates with indi es, that is, using standard ve tor notation. Thus, in logi al spa e  = (1 ; 2 ;    ; k ) is used, while in physi al spa e x = (x1 ; x2 ;    ; xn ) is used, with the onvention that 1 =  , 2 = , 3 =  , and x1 = x, x2 = y, x3 = z . Logi al spa e is hosen as follows: as the unit interval U1 in E 1 ; as the unit square U2 in E 2 ; as the unit ube U3 in E 3 (see Table 1.1). The boundary of both the physi al region and logi al region play an important role in numeri al omputations. In one dimension the boundary of logi al spa e onsists of two points; in two dimensions it onsists of four open segments and four orner points; while in three dimensions it

onsists of six open fa es, twelve open segments and eight orner points (see Table 1.1). The situation in physi al spa e is a bit more ompli ated: in three dimensions it is ne essary to pla e grids on regions, surfa es, and urves. The dimensions of these obje ts are, respe tively, three, two, and one. In two dimensions it is ne essary to pla e grids on regions and urves, and the dimensions of these obje ts are, respe tively, two and one. In one dimension, only intervals need to have grids pla ed on them. The dimension of the obje t is an important parameter: intervals and urves are onedimensional obje ts; planar regions and surfa es are two-dimensional obje ts; while the only three-dimensional obje ts of interest are regions in three dimensions. Obje ts in physi al spa e have two important parameters asso iated with them; the dimension of the obje t k; and the dimension of physi al spa e n. A k-dimensional obje t in n-dimensional physi al spa e is labelled nk and is assumed bounded (does not extend to in nity). Maps or transformations from logi al to physi al obje ts give a system of general oordinates on the physi al obje t. Su h maps have two important parameters; the dimension of the obje t k, and the dimensions of physi al spa e n. Thus they are labelled Xkn : Xkn : Uk ! nk : (1.1) It is assumed that 0 < n  3 and 0 < k  n. In general, su h maps an be written

x = x( ) ;

(1.2)

the spe ial notation given in Table 1.2 is used when the dimension is spe i ed. The

oordinate lines in the general oordinate system in physi al spa e are the images of



5

1992 by P.M. Knupp, September 8, 2002

map X11 X12 X13 X22 X23 X33

oordinates x = x( ) x = x( ); y = y( ) x = x( ); y = y( ); z = z ( ) x = x(; ); y = y(; ) x = x(; ); y = y(; ); z = z (; ) x = x(; ;  ); y = y(; ;  ); z = z (; ;  )

from interval interval interval square square

ube

to interval

urve

urve region surfa e volume

Table 1.2: Coordinate maps the oordinate lines in logi al spa e and are thus given by the urves where one of the

omponents of  varies and all other omponents are held onstant. In addition, it is assumed that the boundary of the physi al region is the image of the boundary of the logi al region under the map and, onsequently, the boundary of physi al spa e has the same stru ture as the boundary of logi al spa e (see Table 1.1). These oordinates are alled boundary onforming. Su h maps an be used to generate grids by

hoosing a uniform grid in logi al spa e and then transforming the grid to physi al spa e (examples are given in the Se tion 1.4). To summarize, a map or transformation from logi al spa e to physi al spa e produ es a natural grid in physi al spa e. However, this grid depends on the parameterization of the map: di erent parameterizations produ e di erent grids. Thus grid generation an be viewed as nding useful parameterizations of maps. The next few hapters are devoted to studying maps and the grids they generate. In Chapter 3, the simplest possible grids are studied, namely grids on intervals whi h are given by maps X11 from the unit interval to an interval. The next most ompli ated grids are those on planar regions whi h are given by maps X22 from the unit square to a planar domain; these are studied in Chapters 5 and 6. Maps X33 from the unit

ube to a volume in three-dimensional spa e are studied in Chapter 9. Grids on urves are given by maps X12 from the unit interval to the plane, or by maps X13 , from the unit interval to three-dimensional spa e, while grids on surfa es are given by maps X23 from the unit square to the three-dimensional spa e; su h grids are studied in Chapter 10. Within the ontext of ea h of these hapters, it is onvenient to drop the indi es, referring to the map X : U ! . Before a grid an be generated, a physi al obje t must be spe i ed mathemati ally; this an be done by spe ifying its boundary. The boundary of an obje t an be given in three fundamentally-di erent ways: parametri ally, impli itly, or numeri ally. For example, the boundary of the unit disk in the plane an be given parametri ally using polar oordinates,

x = os() ; y = sin() ; 0    2 ; (1.3) or impli itly by the equation x2 + y 2 = 1 : (1.4) If a physi al obje t is given parametri ally, then a dis rete set of points on the obje t

an be hosen on the obje t by dis retizing the parameter: 2i ; 0iM: (1.5) xi = os(i ) ; yi = sin(i ) ; i = M



1992 by P.M. Knupp, September 8, 2002

6

Numeri ally spe i ed boundaries an be onverted to parametri ally spe i ed boundaries by using interpolation (see Lan aster, [119℄). Interpolation of dis rete grids on realisti obje ts an pose serious diÆ ulties.

Exer ise 1.3.1 The surfa e of the unit sphere is given impli itly by x2 + y2 + z 2 = 1. Use spheri al oordinates to obtain a parametri des ription of this surfa e. Change this parameterization of the sphere to one where the unit square is mapped to the sphere. What hange is needed to obtain a hemi-sphere? x

It is required that the maps used for generating grids arry the boundary Uk of the logi al region Uk to the boundary  nk of the physi al region nk . This an be done by rst giving the boundary parametri ally using a map Xkn,

Xkn : Uk !  nk ;

(1.6)

and then extending this map to the interior of the region Uk . Thus, if an obje t is given impli itly, a parametri des ription of the boundary must be found (most

al ulus books have a dis ussion of this point in se tions on the parameterization of

urves and surfa es). For many simple obje ts, it is easy to nd a parameterization of the boundary. However, the parameterization may not use values of the parameters restri ted to logi al spa e. Typi ally, a proper map of the logi al boundary to physi al boundary an be found by res aling the parameters. In some ases, it is important to re-parameterize the boundary before starting on the grid generation problem (this is also dis ussed in most al ulus books). Many examples of parameterizations and re-parameterization are given in this book. It is assumed that the physi al region is onne ted, that is, made up of a single pie e. Te hni ally, the physi al region is assumed to be a domain, that is, the physi al region is the losure of an open onne ted set. In one dimension, this means the region is an interval. In two dimensions, onne ted regions an be more ompli ated; for example, an annulus is onne ted (an annulus is the region between two on entri

ir les). In this book, it is also assumed that all regions are simply onne ted. Intuitively, a region is not simply onne ted if it has a hole in it. The de nition of simply onne ted is given in most texts on topology (see Armstrong, [13℄). It is easy to see that the logi al region is simply onne ted. In one dimension, only intervals are simply onne ted. In the plane, a onne ted region is simply onne ted if its

ompliment is onne ted. Thus, the annulus is not simply onne ted. The situation in three dimensions is even more ompli ated. For example the region between two

on entri spheres or that within a torus (doughnut) are not simply onne ted. It is possible to extend the te hniques presented in the book to non-simply

onne ted regions. The number and type of holes in a region gives the topologi al stru ture of the region. It is important to realize that logi al spa e is simply onne ted and that the topologi al stru ture of logi al spa e is preserved by the maps, be ause it is assumed that the maps are smooth and nonsingular on all of logi al spa e, in luding the boundaries. Moreover, su h maps are orientation preserving and onsequently the parts of the boundary of physi al spa e must bear the same relationship to ea h other and the interior of the region as do the parts of the boundary of logi al spa e. Figure 1.3 gives an example of both permissible and non-permissible arrangements in the plane. The basi problem of grid generation is: if the boundary of the physi al obje t is given by a nonsingular parametri map

Xkn : Uk !  nk ;

(1.7)



7

1992 by P.M. Knupp, September 8, 2002

η

3 4

2 1

ξ

logical space permissable

non−permissable

y

y 4

1 2

3

1

3

4

2

x

x

physical space

physical space

Figure 1.3: Boundary topology then extend this map to a map

Xkn : Uk ! nk

(1.8)

from the interior of logi al spa e to the interior of the physi al obje t. Su h a mapping is termed a boundary- onforming map and the map generates a boundary onforming ontinuum grid. A ontinuum grid an be used to generate a dis rete grid by hoosing a uniform dis rete grid in logi al spa e and then evaluating the ontinuum map at the points in the logi al-spa e grid to give the grid points in physi al spa e. Two undesirable situations an arise: (i) a point in logi al spa e is mapped to a point outside of the physi al obje t (this is referred to as spillover or folding); or (ii) two or more points in logi al spa e are mapped to the same point on the physi al obje t. It is of paramount importan e to perform the extension of the boundary map in su h a way that ea h point in logi al spa e is mapped to a unique point in physi al spa e (the map is one-to-one) and that ea h point in physi al spa e is the image of a point in logi al spa e (the map is onto). That is, to every point  2 Uk , there

orresponds a unique point x 2 nk and to every point x 2 nk there orresponds a unique point  2 Uk . The map Xkn is generally required to be smooth, that is, ea h of the oordinate fun tions xi ( ) must be ontinuous and have ontinuous derivatives as fun tions of ea h i on Uk . Note that Uk is de ned to be a losed obje t, that is, it in ludes its boundary, so this means that the map must be smooth both in the interior of Uk and on the boundary Uk of Uk . In parti ular, this implies that the orners of logi al spa e must map to orners of the physi al obje t. Mathemati ally, the spa e of fun tions that have j ontinuous derivatives is written Cj ; the notation Cj will also be used for maps whose oordinates are in Cj . Thus, in general, it will be assumed that Xkn 2 C1 . If Xkn : Uk ! nk is one-to-one and onto, and Xkn 2 C1 , then the



8

1992 by P.M. Knupp, September 8, 2002

map is termed a di eomorphism. If the map Xkn is restri ted to the boundary Uk of Uk then it is labelled Xkn. The boundary mapping Xkn is assumed to be a di eomorphism. In some ir umstan es this assumption an be relaxed, parti ularly at a nite number of points. In other ir umstan es this assumption needs to be strengthened. The basi problem of grid generation an be rephrased: extend a given boundary di eomorphism Xkn to a di eomorphism Xkn of Uk to nk . The most useful obje t for studying mappings is the Ja obian matrix J . Sin e it has been assumed that Xkn 2 C1 , the partial derivatives xi =j are de ned and

onsequently the elements of J , i ; i = 1; : : : ; n ; j = 1; : : : ; k (1.9) Jij = x j

are de ned. Note that, in general, J is not a square matrix. For example, a surfa e has a Ja obian matrix of the form 0

J

x  B y =   z 

x 1 0 x  y C =  y A   z z  

x y z

1 A

:

(1.10)

In the ase n = k, the matrix is square and then the determinant of J is de ned and referred to as the Ja obian J of the map Xkk :

J = det(J ) :

(1.11)

Exer ise 1.3.2 For the parameterization of the sphere found in Exer ise 1.3.1, show that rank of the Ja obian matrix is not maximal at the poles of the sphere. x Exer ise 1.3.3 Write out the Ja obian matrix for the maps X11 , X12 , X22 , X13, 3 X2 , and X33. x The Inverse Mapping Theorem is an important result relating the notion of one-to-one to the rank of the Ja obian matrix. The theorem is stated using the

on ept of lo al. Lo al means for all points near a given point. The proof is beyond the s ope of this text.

THEOREM 1.1 (Inverse Mapping Theorem) Assume Xkn 2 C1 . Then Xkn is

lo ally one-to-one at  in the interior of Uk , if and only if the rank of J is maximal (equals k) at  . A mapping whose Ja obian matrix has maximal rank at  is referred to as a

nonsingular map at  .

Exer ise 1.3.4 Show that the map x = os(4   ) ; y = sin(4   ) ; 0    1 ; is lo ally one-to-one but not globally one-to-one.

(1.12)

x

If the dimension of the physi al obje t equals the dimension of physi al spa e (the obje t is not a urve or surfa e) the Ja obian matrix is square. Square matri es have maximal rank if and only if their determinants are nonzero.

COROLLARY 1.2 Assume Xnn 2 C1 . Then Xnn is lo ally one-to-one at  if and

only if J ( ) 6= 0.



9

1992 by P.M. Knupp, September 8, 2002

For a proof of this orollary see Corwin, [41℄. There are always in nitely many di eomorphisms from the logi al domain to the physi al domain, so additional riteria may be applied to sele t superior grids. One su h riterion is to require that the map have positive Ja obian, J > 0 on Uk ; another is to require that the map be as smooth as possible, for example, belong to C1 ; another is to require orthogonality and yet another is to require uniformity of the areas of the grid ells. It is relatively easy to generate grids in onvex regions. Re all that a region is

onvex if, when it ontains two points, it ontains the line segment joining the two points. Convexity an be de ned more formally: 2 E n is onvex if and only if for every pair of points x1 and x2 in , the point x = (1  ) x1 +  x2 belongs to

provided 0    1. Note that the logi al domains Uk are onvex. The reader should note that most of the physi al regions used in this text are not onvex (see Appendix C).

1.4 Spe ial Coordinate Systems The simplest maps of substantial interest are the bilinear maps ommonly used in nite-element methods where they are referred to as isoparametri maps on a quadrilateral. If physi al spa e is one dimensional, that is, an interval [x0 ; x1 ℄, then the bilinear (in this ase, a tually linear) map is given by

x = (1  ) x0 +  x1 ; 0    1 :

(1.13)

For a bilinear map in two dimensions, the physi al region must be a quadrilateral de ned by four points: x0;0 , x1;0 , x0;1 , x1;1 , where the ve tor notation means xi;j = (xi;j ; yi;j ). Then the map from U2 to the quadrilateral in E 2 is given, in ve tor notation, by

x(; ) = (1  ) (1 ) x0;0 + (1  )  x0;1 +  (1 ) x1;0 +   x1;1 ;

(1.14)

or in oordinate notation by

x(; ) = (1  ) (1 + (1 y(; ) = (1  ) (1 +  (1

) x0;0 + (1  )  x0;1 ) x1;0 +   x1;1 ; ) y0;0 + (1  )  y0;1 ) y1;0 +   y1;1 :

(1.15)

Re all that if  is xed and  varies, then a oordinate line in logi al spa e is generated. The image of this oordinate line is the urve x( ) whi h is a line in physi al spa e. The same holds if  is xed and  varies. Thus oordinate urves for the bilinear map are straight lines. In parti ular, the boundary of the physi al region must be given by straight lines that are linearly parameterized. An example of a planar bilinear map for the orner points (1; 1), (2; 2), (1; 5), and ( 1; 3) is given in Figure 1.4

Exer ise 1.4.1 Write out the general trilinear map of the ube U3 in E 3 to a

region de ned by eight points in physi al spa e.

x

Computer odes for plotting one-dimensional grids are based on dis retizing logi al spa e and then mapping the logi al grid to physi al spa e. Thus if x = x( ) is an



1992 by P.M. Knupp, September 8, 2002

10

Figure 1.4: A bilinear map analyti transformation from U1 = [0; 1℄ to physi al spa e and if M is a positive integer then set i i = ; xi = x(i ) ; 0  i  M ; (1.16) M to produ e the grid xi .

Exer ise 1.4.2 Write a omputer ode for plotting linear grids in one dimension and use that ode to display the points for the several linear maps. There is a sample

ode in Appendix B.1 x Exer ise 1.4.3 Compute the Ja obian J = det(J ) of the bilinear map (1.14). Let Jij be the Ja obian at ea h of the four orners. Show that J11 + J00 J10 J01 = 0. Show that the physi al domain is onvex if and only if J is positive at the four orners. Finally, show that J is positive everywhere in logi al spa e if and only if J is positive at the four orners (the orner test). x The answers to the previous exer ise an be found in (Knupp, [109℄). Moreover, this paper onsiders trilinear isoparametri maps from U3 to a hexahedron in E 3 similar in form to (1.14) (see Exer ise 1.4.1). Unlike the bilinear map, the orner Ja obian test for a positive Ja obian fails for the trilinear map.

Exer ise 1.4.4 Show that for the two-dimensional bilinear map (1.14) 2 x =  x = 0  

(1.17)

if and only if the quadrilateral is a parallelogram. As usual, the derivatives of a ve tor is given by x = (x ; y ). x There are many other oordinate systems that are used to assist in solving partial di erential equations. One dimensional transformations that exponentially stret h a



11

1992 by P.M. Knupp, September 8, 2002

grid near a point are used in the study of boundary layers. A grid is said to be exponentially stret hed if the ratio xi+1 xi (1.18) xi x i 1

is a onstant not equal to one or zero. For example, for  6= 0, the transformation

e 1 x( ) =  e 1 generates an exponentially stret hed grid.

(1.19)

Exer ise 1.4.5 Compute the ratio (1.18) for the transformation (1.19) and show that it's a onstant. Consider the ases  > 0 and  < 0. Is this transformation singular? x Note that the fun tion x = 1  maps the unit interval to the unit interval and has a negative Ja obian. This means that the map reverses the order of the points. Now if in (1.19),  is repla ed by 1  the same grid results, but it is now in reverse order. This is just a reparameterization of the interval. However, if in (1.19), x is repla ed by 1 x, then a grid that is stret hed at the opposite end of the unit interval is obtained.

Exer ise 1.4.6 The transformation x = 21 1=

(1.20)

maps the unit interval logi al spa e to the unit interval in physi al spa e. However, the transformation fails to satisfy one of the hypothesis ne essary for the generation of a proper grid. Show that the Ja obian of the transformation given in (1.20) is positive for  > 0 and that the transformation is singular for  = 0. x Another useful stret hing transformation is  x = tan(  ) : 2

(1.21)

This transformation maps logi al spa e onto half of the real line E 1 , sending one of the boundary points in logi al spa e to in nity in physi al spa e. Note that this violates the assumption that the physi al obje t is bounded while the transformation given in Equation (1.20) violates the ondition that the Ja obian must be bounded. DiÆ ulties may arise at points where a transformation violates one of the basi assumptions. The transformations may still be useful, but spe ial are must be taken when using them. Other stret hing transformations are dis ussed in Vinokur, [218℄.

Exer ise 1.4.7 Plot a few sample grids for the transformations given in (1.19), (1.20), and (1.21) (see Appendix B.1). The plots should give an interval with the grid points lo ated on it. It is also illuminating to plot the fun tion x = x( ) as a urve in the x- plane. x In two dimensions, there are many transformations that are useful for generating boundary- onforming oordinate systems; their use predates grid generation. For example, polar oordinates are useful in problems with ir ular symmetry. Similarly,



12

1992 by P.M. Knupp, September 8, 2002

in three dimensions, spheri al oordinates are useful in problems with spheri al symmetry. These transformations usually entail analyti formulas and are restri ted to xed physi al domains with xed boundary parameterizations. The most elementary of su h oordinate systems in the plane is, of ourse, the Cartesian system,

x(; ) =  ; y(; ) =  ;

(1.22)

whi h uniformly parameterizes the unit square. Most planar grid generators should generate this oordinate system when the identity boundary parameterization is spe i ed on a physi al domain, that is, the unit square; this provides a good elementary test of the algorithm. The algorithm for generating grids in two dimensions assumes that two fun tions x = x(; ) and y = y(; ) de ned for 0  ;   1 are given and that M and N are program parameters. The points in the grid are given by (xi;j ; yi;j ) where

i j ; ); 0  i  M ; M N i j yi;j = y( ; ) ; 0  j  N : (1.23) M N It an be very illuminating to plot the oordinate urves. They are given by drawing line segments joining ertain points: the  urves are given by the segments xi;j = x(

[(xi;j ; yi;j ) ; (xi+1;j ; yi;j )℄ ; 0  i  M

1; 0  j  N ;

(1.24)

while the  urves are given by the segments [(xi;j ; yi;j ) ; (xi;j ; yi;j+1 )℄ ; 0  i  M ; 0  j  N

1:

(1.25)

Exer ise 1.4.8 Plot some examples of bilinear maps given by Equation (1.14)

(see Appendix B.1).

x

Four types of analyti oordinate systems for the plane are now des ribed. Polar Coordinates: The most famous spe ial oordinate system is polar

oordinates whi h an be used to parameterize a ir le or, more generally, a se tor of an annulus. Given two radii 0  r0 < r1 and two angles 0  0 < 1  2 , the se tor of the annulus between the two radii and between the two angles is given by

x(; ) = r os() ; y(; ) = r sin() ;

(1.26)

where

 = 1 + (0 1 )  ; r = r0 + (r1 r0 )  : (1.27) If either the domain or the boundary parameterization is hanged, even slightly, this polar oordinate system is rendered useless, showing the limitations of analyti transformations. One of the main goals of grid generation is to es ape this limitation. Of ourse, when these spe ial transformations apply, they generally should be used sin e they involve analyti expressions for orthogonal oordinate systems. Grid points and grid lines for an annular se tor are given in Figure 1.5.

Exer ise 1.4.9 Show that for the polar transformation given in (1.26), the 0 ) (r1 r0 ). Note that J > 0 if r0 > 0. x

Ja obian is J = r (1



1992 by P.M. Knupp, September 8, 2002

13

Figure 1.5: Polar oordinates As with polar oordinates, the lassi al oordinate systems do not make use of the idea of a logi al region. To make use of this idea, it is usually ne essary to res ale the variables in the lassi al transformation as was done in polar oordinates by going from  and r to  and  variables. Paraboli Cylinder Coordinates: Paraboli ylinder oordinates on the region in Figure 1.6 are given by the mapping 1 x(; ) = (r2 s2 ) ; y(; ) = r s ; 2

(1.28)

where

r =1+; s = 1+: (1.29) Of ourse, altering the de nitions of r and s will vary the physi al region. Ellipti Cylinder Coordinates: Ellipti ylinder oordinates on the region shown in Figure 1.7 are given by the mapping x(; ) = a osh(r) os(s) ; y(; ) = a sinh(r) sin(s) ;

(1.30)

where

r = 1+; s = : (1.31) This results in the physi al domain onsisting of on entri ellipses of radius a > 0. Horseshoe Domains: Horseshoe-shaped domains often provide diÆ ult test problems for grid generators. Several su h domains are used in the literature. Three su h domains, in luding the ellipti ylinder region above, are presented here. Another horseshoe shaped region is shown in Figure 1.8 and is given by x(; ) =  r os() ; y(; ) = r sin() ;

(1.32)



1992 by P.M. Knupp, September 8, 2002

Figure 1.6: Paraboli ylinder oordinates

Figure 1.7: Ellipti ylinder oordinates

14



1992 by P.M. Knupp, September 8, 2002

15

Figure 1.8: Horseshoe where  > 0 is the aspe t ratio of the major to minor axes of the ellipses that generate the horseshoe, 0 < b0 < b1 , and  (1.33) r = b0 + (b1 b0 )  ;  = (1 2  ) : 2 The next example, alled the Modi ed Horseshoe, is shown in Figure 1.9, and is given by

x(; ) = (1 + ) os(  ) ; y(; ) = [1 + (2 R 1) ℄ sin(  ) ;

(1.34)

where R  1 is the aspe t ratio. Bipolar Coordinates: Bipolar oordinates for the physi al domain shown in Figure 1.10 are given by the mapping

x(; ) = where

a sinh(r) a sin(s) ; y(; ) = ;

osh(r) + os(s)

osh(r) + os(s)

(1.35)

1 ); (1.36) 2 The quantity a > 0 is a parameter that determines the height of the domain.

r =  ; s =  (

Exer ise 1.4.10 Make some plots of the physi al regions, grids, and grid lines generated by the previously des ribed oordinate systems. Vary the parameters in the map to give an idea of the range of physi al regions that an be obtained with these maps. x In three dimensions, there are two well-known oordinate systems, ylindri al and spheri al oordinates. Cylindri al Coordinates: Cylindri al oordinates are essentially polar oordinates and an be used to parameterize ylindri al shells. Given two radii 0  r0 < r1 ,



1992 by P.M. Knupp, September 8, 2002

Figure 1.9: Modi ed horseshoe

Figure 1.10: Bipolar oordinates

16



17

1992 by P.M. Knupp, September 8, 2002

two angles 0  0 < 1  2 , and the limits on the axial variable, z0 < z1 , a ylindri al body is given by

x(; ;  ) = r os() ; y(; ;  ) = r sin() ; z (; ;  ) = w ;

(1.37)

where

 = 1 + (0 1 )  ; r = r0 + (r1

r0 )  ; w = z0 + (z1 z0 )  :

(1.38)

Exer ise 1.4.11 Show that for the ylindri al oordinates given in (1.37) that

the Ja obian is

J = r (1 0 ) (r1 r0 ) (z1 z0) :

x

(1.39)

Exer ise 1.4.12 Write a omputer ode that an plot oordinate surfa es; that is, x one of the variables  , , or  at some value between 0 and 1 and vary the other two variables, then plot the resulting surfa e. Plot the full surfa e and then use a hidden surfa e algorithm. Can you plot the full grid? x Spheri al Coordinates: Spheri al oordinates are used to des ribe parts of spheres. Given two radii 0  r0 < r1 , two equatorial angles 0  0 < 1  2 , and two polar angles 0  0 < 1  , a spheri al wedge is given by x(; ;  ) = r os() sin() ; y(; ;  ) = r sin() sin() ; z (; ;  ) = r os() ;

(1.40)

where

 = 1 + (0 1 )  ; r = r0 + (r1 r0 )  ;  = 1 + (0 1 )  : (1.41) Figure 1.11 shows some oordinate surfa es for the spheri al oordinate system.

Exer ise 1.4.13 Look up some onformal mappings of the unit square to some other region in a book on omplex fun tion theory and plot some grids generated by the mappings. x

1.5 Trans nite Interpolation Grid generation methods based on interpolation have been extensively developed to take advantage of their two main strengths: rapid omputation of the grids

ompared to the partial di erential equation methods that will be studied later in this text; and dire t ontrol over grid point lo ations. These advantages are somewhat o set by the fa t that interpolation methods may not generate smooth grids (see the TFI gures in the Rogue's Gallery, Appendix C), in parti ular, boundary-slope dis ontinuities propagate into the interior. Interpolation methods are frequently alled algebrai methods. The standard method of algebrai grid generation is known as trans nite interpolation (TFI) (Gordon and Hall, [85℄). In the one-dimensional

ase, trans nite interpolation is the same as linear interpolation, so the interesting

ases begin with planar regions. Any planar grid-generation problem begins with a des ription of the boundary of the region, that is, four parametri equations,

xb ( ) ; xt ( ) ; 0    1 ; xl () ; xr () ; 0    1 ;

(1.42)



18

1992 by P.M. Knupp, September 8, 2002

z r φ

y

θ x

Figure 1.11: Spheri al oordinates

η

y 3

4

3

left

4

2

left

right

1 1

right

top

top

2

bottom logical space

ξ

bottom x (0) = x (0) b l x

physical space

Figure 1.12: Boundaries of planar regions



1992 by P.M. Knupp, September 8, 2002

(i) (ii) (iii) (iv)

19

xb (0) = xl (0) ; xb (1) = xr (0) ; xr (1) = xt (1) ; xl (1) = xt (0) :

Table 1.3: Consisten y onditions are needed to des ribe ea h part of the boundary (see Figure (1.12)). The subs ripts on x stand for bottom, top, left, and right boundaries of the logi al domain. The simplest example of su h a parameterization is the identity map, that is, where the physi al region is the unit square just like the logi al region. This parameterization is given by

xb ( ) = (; 0) ; 0    1 ; xt ( ) = (; 1) ; 0    1 ; xl () = (0; ) ; 0    1 ; xr () = (1; ) ; 0    1 :

(1.43)

This ve tor notation needs to be onverted to omponents for use in omputer programs, for example,

xb ( ) =  ; 0    1 ; yb ( ) = 0 ; 0    1 ; xl () = 0 ; 0    1 ; yl () =  ; 0    1 :

(1.44)

There are four important onsisten y he ks for the boundary formulas, namely, that the four orners of the region are onsistently des ribed (see Table 1.3 and Figure 1.12). Any omputer ode for planar grid generation should he k these onditions and give an informative error message if they are not satis ed. In a omputer ode, there are a tually eight things to he k be ause ea h of the four orner points has two

omponents.

Exer ise 1.5.1 Che k the onsisten y onditions for the identity boundary parameterization (1.43). x The rst degree Lagrange polynomials 1  ,  , 1 , and  are used as blending fun tions in the basi trans nite interpolation formula. The trans nite interpolation (TFI) formula is:

x(; ) = (1 ) xb ( ) +  xt ( ) + (1  ) xl () +  xr () f  xt (1) +  (1 ) xb (1) +  (1  ) xt (0) + (1  ) (1 ) xb (0)g :

(1.45)

Exer ise 1.5.2 Verify that x(; ) in (1.45) mat hes the given boundary fun tions, that is, x(; 0) = xb ( ) and so forth. x The following three examples of TFI show both the power of the method and its limitations. The three examples are the Modi ed Horseshoe, Swan, and Chevron.



1992 by P.M. Knupp, September 8, 2002

20

TFI on Horseshoe

Figure 1.13: TFI Grid on the horseshoe All are non onvex regions and onsequently diÆ ult to grid ni ely. The two distin t parameters  and  used in (1.42) are not ne essary, so they are repla ed by a single parameter s satisfying 0  s  1. Additional examples of trans nite interpolation grids are given in the Rogue's Gallery in Appendix C. A TFI grid for the Horseshoe is shown in Figure (1.13); the TFI grid is smooth and unfolded. The parameter R  1 determines the e

entri ity of the outer ellipse. The boundary parameterizations are obtained from (1.32): Bottom boundary:   (1.46) xb (s) = b0 osf (1 2s)g ; yb (s) = b0 sinf (1 2s)g 2 2 Top boundary:   xt (s) = b1 osf (1 2s)g ; yt (s) = b1 sinf (1 2s)g (1.47) 2 2 Left boundary: xl (s) = 0 ; yl (s) = b0 + (b1 b0 )s (1.48) Right boundary: xr (s) = 0 ; yr (s) = yl (s) (1.49) The TFI grid for the Swan, shown in Figure (1.14), is folded. The boundary parameterizations are as follows.



1992 by P.M. Knupp, September 8, 2002

21

TFI on Swan

Figure 1.14: TFI Grid on the Swan TFI on Chevron

Figure 1.15: TFI Grid on the Chevron Bottom boundary: Top boundary: Left boundary: Right boundary:

xb (s) = s ; yb (s) = 0

(1.50)

xt (s) = s ; yt (s) = 1 3s + 3s2

(1.51)

xl (s) = 0 ; yl (s) = s

(1.52)

xr (s) = 1 + 2s 2s2 ; yr (s) = s (1.53) The TFI grid for the Chevron is shown in Figure (1.15); the slope dis ontinuity on the boundary of the Chevron is propagated into the interior of the physi al region by TFI. The boundary parameterizations are as follows. Bottom boundary:   21 xb (s) = s ; yb (s) = s 1s;; ss > (1.54) 1 2 Top boundary:  s  12 (1.55) xt (s) = s ; yt (s) = 1 s; s; s > 12



1992 by P.M. Knupp, September 8, 2002

Left boundary: Right boundary:

22

xl (s) = 0 ; yl (s) = s

(1.56)

xr (s) = 1 ; yr (s) = s

(1.57)

Exer ise 1.5.3 Write a omputer ode (see Appendix B) to use trans nite interpolation to generate grids on a variety of planar regions. Be sure to in lude a omputer-graphi s display. x Trans nite interpolation produ es ex ellent grids on many regions in luding the Square, Trapezoid, Annulus, Modi ed Horseshoe, Dome, and Valley but is inadequate on the Swan, Airfoil, Chevron (la ks smoothness), Ba kstep, Plow, and C. The main disadvantages of Trans nite Interpolation are la k of smoothness and a tenden y to fold grids on omplex domains. Two other planar methods of algebrai grid generation are Gilding, [82℄, and Intrinsi (Knupp, [110℄). TFI an be extended in several ways. The easiest extension is to break up the region in several parts and then interpolate ea h part. However, there will typi ally be slope dis ontinuities at the interior boundaries of the parts. Also, TFI an be extended to use higher-order polynomials as blending fun tions. For example, the

ubi Hermite polynomials an be used to mat h slopes and onsequently remove the slope dis ontinuities aused by breaking the region into parts. The full potential of algebrai grid generation is explored in Gordon, [85, 86℄ Eiseman, [58, 59, 60, 61, 68℄, Shih, [169℄, and Smith, [175, 176℄. Algebrai grid generation is further dis ussed in Se tion 5.3.1 and in Chapter 9.

Chapter 2

Appli ation to Hosted Equations This hapter is intended to motivate study of the grid generation algorithms presented in this book by illustrating the use of su h grids in solving partial di erential equations on irregularly-shaped regions. Suppose a partial di erential equation representing some physi al phenomenon su h as uid ow, ele tromagneti potential, or heat

ondu tion is to be solved. Su h an equation is termed the hosted equation; if the domain on whi h the hosted equation is to be solved is irregularly-shaped, then a grid must be generated and the boundary onditions handled a

ordingly. Thus, grid generation equations may be required in addition to the hosted equation. There are several basi approa hes to solving partial di erential equations on irregular regions. For example, re tangular grids an be used to over the region (see Birkho and Lyn h, [19℄). This approa h avoids the need to transform the hosted equation, but requires major revisions to the omputer program if the region is hanged. It is diÆ ult to implement the boundary onditions with se ond-order a

ura y be ause the nodes of the grid do not oin ide with the boundary. Other approa hes in lude unstru tured meshes as in nite elements (see George, [78℄), nite di eren es in physi al spa e (see Heinri h, [94℄, Samarskii, et al., [163, 164℄, or nite di eren es in logi al spa e (see Steinberg and Roa he, [194℄). The latter approa h is used in this book be ause it is simple and e e tive for a wide range of problems. It requires the partial di erential equation to be transformed to logi al oordinates. An important fa t about su h transformations is that the type of the hosted equation is invariant under a general non-singular oordinate transformation (i.e., the physi s is preserved). Se ond-order partial di erential equations in two variables are lassi ed as one of three types: ellipti , paraboli , or hyperboli (see Epstein, [70℄, for more information). Ellipti equations des ribe the steady-states of di usion pro esses, paraboli equations des ribe transient di usion pro esses, while hyperboli equations des ribe wave motion. The physi al behavior modeled by a di erential equation is not preserved using general transformations if the type of the transformed equation is not the same as the original equation. Only transformations that preserve type will be onsidered in this book. The type of a linear partial di erential equation is determined by putting the di erential equation in a anoni al form and then omputing the dis riminant D. The type is determined by the sign of the dis riminant: (1) if D > 0 then the equation is ellipti ; (2) if D = 0 then the equation is paraboli ; while (3) if D < 0 then the equation is hyperboli . 23



24

1992 by P.M. Knupp, September 8, 2002

The type-invarian e of the model hosted equation is returned to later in Se tion 7.3.6. For illustration, the logi al-spa e approa h is applied to steady-state (ellipti ) boundary-value problems in one and two spatial dimensions. In Se tion 2.1, a onedimensional hosted equation is transformed to general oordinates. In Se tion 2.2, it is shown how to dis retize this equation to obtain symmetri sten ils and se ond-order a

ura y (an explanation of the reasons for the hoi e of di eren ing is beyond the s ope of this book). The resulting system of dis rete algebrai equations is linearized and solved using a standard linear equation solver. The two-dimensional hosted equation is transformed to general oordinates in 2.3 and then dis retized in 2.4. Expressions for the gradient, divergen e, url, and Lapla ian operators in general

oordinates are studied in Se tion 7.3; other extensions and appli ations an be found in Steinberg and Roa he, [194℄. By the end of this hapter the reader will be able to solve boundary-value problems on non-trivial regions. The method des ribed in this text an be used to write a single program for solving problems on a wide range of regions and the boundary onditions are, essentially automati ally, se ond order a

urate. A wide range of assumptions

an be made; the parti ular method used in this hapter was hosen be ause it is appli able to dis retizing variational grid-generation equations.

2.1 Transformation of the 1D Hosted Equation Let a, A, b, and B be given real numbers and g = g(x) be a given fun tion. Then solving the one-dimensional boundary-value problem

fxx = g ; f (a) = A ; f (b) = B ; a < x < b ;

(2.1)

(fxx = d2 f=dx2 ) for f = f (x) provides an elementary example illustrating the use of grids for solving boundary-value problems. Assume that a one-to-one transformation x = x( ) from the unit interval U1 to the interval [a; b℄ is given. The Ja obian matrix of this transformation is the trivial one-by-one matrix, ); (2.2) J = (x ) = ( dx d and the Ja obian of this transformation is the determinant of this matrix, whi h is simply the entry in the matrix:

J = J ( ) = x =

dx : d

(2.3)

The assumption that the transformation is one-to-one implies that J 6= 0. If the Ja obian is negative, then the transformation an be repla ed by the new transformation x = x(1  ) whose Ja obian is x and thus is positive. From now on, the Ja obian will be assumed positive, J > 0. The fun tions f and g in the di erential equation (2.1) are transformed to fun tions f~ and g~ de ned on logi al spa e using

f~( ) = f (x( )) ; g~( ) = g(x( )) :

(2.4)

The derivatives of f an be transformed to logi al spa e using the hain rule:

f~ = fx x :

(2.5)



25

1992 by P.M. Knupp, September 8, 2002

f

B

f(x)

A

x a

b

Figure 2.1: Solution of the BVP Although the Ja obian is trivial in this ase, it is retained in the one-dimensional formulas, so that the latter an be easily ompared to the formulas in the higherdimensional ases. Writing J = x and then dividing gives

f~ fx =  : J Next, Equation (2.6) applied twi e gives

(2.6)

1 f~ x ~ 1 f : (2.7) ( ) = f~ J J  J 2  J 3  The last expression is the non-symmetri form of the se ond derivative. Observe that the transformation produ es a lower-order term in f , a phenomena that o

urs in higher dimensions as well. The rst part of Equation (2.7) gives

fxx = (fx )x =

f~ J fxx = (  ) : J This is the symmetri form of the se ond derivative. To summarize, if 1 ; f^( ) = f~( ) ; g^( ) = J ( ) g~( ) ; ^( ) = J ( )

(2.8)

(2.9)

then the transformed boundary-value problem in symmetri form is (^ f^ ) = g^ ; f^(0) = A ; f^(1) = B ; 0 <  < 1 :

(2.10)



26

1992 by P.M. Knupp, September 8, 2002

Comparing the hosted equation (2.1) to the transformed equation shows that the latter has an additional oeÆ ient ^, a right-hand-side whi h in ludes J , and holds over the logi al, instead of the physi al domain. If, at some point, J = 0 or J = 1 then the transformed di erential equation is singular. This is one of the reasons that the Ja obian is assumed nonzero; the smoothness assumptions imply that the Ja obian is not in nite.

Exer ise 2.1.1 In addition to the assumptions given at the beginning of this se tion, assume that = (x) is a smooth fun tion and that ~( ) = (x( )). Show that the boundary-value problem ( fx)x = g ; f (a) = A ; f (b) = B ; a < x < b ;

(2.11)

is transformed to the boundary value problem (2.10) where

^( ) =

~ ( ) : J ( )

(2.12)

The di erential equation in (2.11) appears in applied problems with variable material properties. The boundary-value problem (2.11) is said to be invariant be ause its form does not hange under a general hange of independent variables. x

Exer ise 2.1.2 Show that the solution of the boundary-value problem (2.1) is

given by

f (x) = where

Z x

a

(x y) g(y) dy + K (x a) + A ; Z

b 1 B A (b y) g(y) dy : b a b a a What is the solution to the boundary-value problem (2.11)? x

K=

(2.13) (2.14)

2.2 Dis retization of the 1D Transformed Equation The goal of this se tion is to dis retize the transformed equation (2.10) to ompute numeri al solutions. Two additional obje tives are desired. First, the dis retization must be se ond-order a

urate (in luding the boundary onditions). Se ond, the sten ils should be symmetri . If f~( ) is a smooth fun tion, then its derivative is approximated to se ond-order at the enter of an small interval of length  by the entral di eren e

f~( + 2 ) f~( f~ ( )  

 ) 2 :

(2.15)

while the value of f~ at the enter of the interval an be approximated to se ond order by the entral average

f~( + 2 ) + f~( 2 ) : (2.16) f~( )  2 Figure 2.2 illustrates the entral-di eren e formula. The slope of the tangent is given by the left hand side of (2.15) while slope of the se ant line is given by the right



27

1992 by P.M. Knupp, September 8, 2002

y tangent

f( ξ+∆ξ/2 ) f(ξ)

secant

f( ξ−∆ξ/2 )

ξ ξ−∆ξ/2

ξ

ξ+∆ξ/2

Figure 2.2: Central di eren es and averages hand side of (2.15). The left-hand side of (2.16) gives the value of the fun tion at the midpoint of the interval, while the right-hand side gives the height of the midpoint of the se ant. Assume that a grid in physi al spa e has been reated (methods for doing so are the subje t of the next hapter) and has been onstru ted so that the uniform grid with M + 1, M > 0 points is set up in logi al spa e: 1 ; i = i  ; 0  i  M : M The mid-points of the intervals  =

(2.17)

1 (2.18) i+ 21 = (i + )  ; 0  i  M 1 : 2 are also needed; the half indi es are 1=2; 3=2;    M 1=2. If a transformation x( ) is given, then the logi al-spa e grid indu es a grid in physi al spa e given by

xi = x(i ) ; 0  i  M :

(2.19)

The dis retization also indu es dis rete values for all of the transformed variables f~, g~, and ~, for example

f~i = f~(i ) = f (x(i )) = f (xi ) = fi ; 0  i  M ;

(2.20)

with similar formulas for g~i = gi and ~i = i (see Figure 2.3). These formulas, in turn, provide dis rete values for the variables in the di erential equation (2.10). The transformed variables are found by applying (2.9) and using formula (2.12) for the



28

1992 by P.M. Knupp, September 8, 2002

~ f

f

B

B

A

A ξ0

ξ1

ξ2

ξ3

ξ4

ξ

ξ5

0

x x1

x0 a

1 logical space

x2

x3 x4 x 5 b

physical space

Figure 2.3: One-dimensional dis retization

oeÆ ient:

f^i = fi ; 0  i  M ; g^i = Ji gi ; 1  i  M ^i = i ; 0  i  M ; Ji

1; (2.21)

where

Ji = (x )i : (2.22) The points at whi h these values are needed are determined by the di eren ing, as is seen below. The di erential equation (2.10) is di eren ed using the entral di eren es given in (2.15) twi e: 



i



(^ f^ )i+ 12



(^ f^ )

(^ f^ )i 21 ;  f^ f^ ^i+ 12 i+1 i :  (^ f^ )i+ 21

(2.23) (2.24)

Substitute these approximations into the di erential equation (2.10) to obtain a di eren e equation of the form (2.25) Li f^i 1 + Ci f^i + Ri f^i+1 = g^i ; 1  i  M 1 ; where and

f^0 = A ; f^M = B ;

(2.26)

^i 12 ;  2 Ci = (Li + Ri ) ;

(2.27)

Li =

(2.28)



1992 by P.M. Knupp, September 8, 2002

Ri =

^i+ 12 :  2

29 (2.29)

In the one-dimensional setting, the Ja obian is the same as the derivative: Ji = (x )i ; Ji+ 21 = (x )i+ 12 : (2.30) Now g^i = Ji gi ; 1  i  M 1 ; (2.31) and 1 ^i+ 12 = i+ 2 ; 0  i  M 1 : (2.32) Ji+ 12 The values of f^i are to be omputed for integer i, so the values of g^i are needed for integer i, while the values of ^ are needed for half-integer i. Sin e values of g^ are needed at integer points, derivatives of the transformation (i.e., J ) are omputed at integer points using the entral-di eren e formula (2.15) with  repla ed by 2  : x x (2.33) (x )i = i+1 i 1 ; 1  i  M 1 ; 2  (an interval of width 2  is needed be ause it is assumed that the grid is not given at the half-integer points). Sin e ^ is required at the half-integer points, derivatives of the transformation are also needed at the half-integer points; use the entral-di eren e formula (2.15) with i repla ed by i + 1=2: x x (2.34) (x )i+ 12  i+1 i ; 0  i  M 1 :  It is assumed that the oeÆ ient, , may be dire tly omputed using an analyti expression or is expli itly given at the half-integer points, i.e., there is no need for interpolation. If this is the ase, then the dis retization given here is se ond-order a

urate. Additional theory for the ase in whi h the oeÆ ient must be interpolated is given in Steinberg and Roa he, [194℄. There are M 1 unknowns in this problem, fi = f^i , 1  i  M 1; formula (2.25) provides M 1 equations for determining these unknowns. The Li , Ci , and Ri are the oeÆ ients of the sten il of the nite-di eren e equation. This algorithm has been implemented in the ode des ribed in Appendix B, Se tion B.3.

Exer ise 2.2.1 Verify the formulas for Li , Ci , and Ri . Verify that the di eren e equations for f^i an be written in matrix form 1 0 1 0 10 ^ f1 G1 C1 R1 C B C B L2 C2 R2 CB f^2 ^2 C B g C B CB C B B C B C B f^3 g ^ L C R C 3 3 3 3 C B B CB C=B (2.35) C B CB . . . . . C .. .. .. .. C B .. C B CB C B C C B  ^M 2 A L M 2 CM 2 R M 2 A B  f^M 2 A  g GM 1 LM 1 CM 1 f^M 1 where

G1 = g^1 L1 f^0 ; GM 1 = g^M 1 RM 1 f^M ;

(2.36) (2.37)



30

1992 by P.M. Knupp, September 8, 2002

and then verify that the oeÆ ient matrix is M 1 by M 1, symmetri , and diagonally dominant but not stri tly diagonally dominant. x

Proje t 2.2.2 Write a omputer ode (see Appendix B) for numeri ally solving boundary-value problems of the form (2.11). A good test problem has e x 1 f (x) =  ;  > 0; e 1 as a solution. To reate su h a problem hoose (x) = 1 + x2

(2.38) (2.39)

and then solve (2.11) for g(x). Use the interval [0; 1℄ for physi al spa e and note that the solution f satis es the boundary onditions f (0) = 0 and f (1) = 1. Use the uniform grid x( ) =  and  = 2. Next, use the stret hed grid 1 (2.40) x( ) = ln[1 + (e 1)  ℄ ;  with  =  = 2. Che k that the stret hed grid is given by a nonsingular transformation (in luding the end points). To he k your ode, perform a onvergen e-rate test for both the uniform and stret hed grids. To do this, rst de ne the error in the approximate solution f^ by

EM = max jf^i f (xi )j : 0iM

(2.41)

Se ond-order di eren e approximations require that

C = lim M 2 EM (2.42) M !1 be a nite non-zero number. For both the uniform grid and the stret hed grid with  = 2, use your ode to ompute a table of the values of CM = M 2 EM where M = 2k , 1  k  10 and then observe that the values in the table be ome onstant as M in reases. Hint: use double pre ision in your ode. x

Proje t 2.2.3 This is a ontinuation of Proje t 2.2.2. Note that when  =  , the solution f and the stret hed transformation are inverses of ea h other and onsequently f~( ) =  . It seems reasonable, but is not true, that hoosing  =  in the stret hed grid would give minimal error. Choose  = 2 and then nd a value of  that is \best" in the sense that the value of C in (2.42) is minimal. Explain why  =  is not the optimal hoi e. x

2.3 Transformation of the 2D Hosted Equation A two-dimensional, se ond-order, steady-state hosted equation is transformed into general oordinates. Let be a region in the physi al plane and  be the boundary of

. Also, let = (x; y), = (x; y), = (x; y), and g = g(x; y) be fun tions de ned in . Then a steady-state f = f (x; y) of a pro ess o

urring in a non-homogeneous media satis es a boundary-value problem of the following form: ( fx )x + ( fx)y + ( fy )x + ( fy )y = g ;

f j = 0:

(2.43)



31

1992 by P.M. Knupp, September 8, 2002

The ondition f j = 0 means that the fun tion f is zero on the boundary  . This is a Diri hlet boundary ondition. More general boundary onditions su h as nonhomogeneous Diri hlet, Neumann, or mixed boundary onditions an be treated as well (see Steinberg and Roa he, [194℄). The di erential equation was hosen to have the form given in Equation (2.43) be ause this is the form that frequently o

urs in physi al problems with variable material properties su h as heat ondu tion, ele tri potential, and uid ow in porous media.

Exer ise 2.3.1 Let T be the symmetri matrix

T

=







;

(2.44)

and show that the di erential equation (2.43) is given by

r  (T rf ) = g ;

(2.45)

that is, the equation is given by the divergen e of the ux (T times the gradient of f ) equals g. For the reader familiar with ve tor al ulus, this gives a dire t physi al interpretation of the partial di erential equation. x Assume that a transformation

x = x(; ) ; y = y(; )

(2.46)

with Ja obian

J = x y x y (2.47) is given. To transform the partial di erential equation to general oordinates, let f~(; ) g~(; ) ~ (; ) ~(; )

~(; )

= = = = =

f (x(; ); y(; )) ; g(x(; ); y(; )) ; (x(; ); y(; )) ; (x(; ); y(; )) ;

(x(; ); y(; )) :

(2.48)

Next, apply the hain rule to the partial derivatives in (2.43) to obtain

f~ = fx x + fy y ; f~ = fx x + fy y :

(2.49)

Be ause the Ja obian J of the map is assumed to be non-zero, the transformation is non-singular and onsequently (2.49) an be inverted: 1 1 (2.50) fx = (f~ y f~ y ) ; fy = (f~ x f~ x ) : J J It is an important observation that, using the produ t rule for derivatives and the identity x = x , Equations (2.50) an be put in the form 1 ~ f(f y ) (f~ y ) g ; fy = J1 f(f~x ) (f~ x ) g : (2.51) J This form is alled the onservative or symmetri form of transformed derivatives.

fx =



32

1992 by P.M. Knupp, September 8, 2002

The relations (2.50) an be used to obtain se ond derivative expressions by substituting ~ fx = (f~ y f~ y ) (2.52) J for f in the Formula (2.51) for fx, and so forth: J ( fx )x = ! ! +f~ y f~ y +f~ y f~ y + ~ ~ (2.53) y y ; J J  

J ( fx)y = ! ~ y f~ y + f x + ~ J  J ( fy )x = ! f~ x + f~ x ~ + y J  J ( fy )y = ! f~ x + f~ x

~ x + J 

!

+f~ y f~ y ~     x ; J 

(2.54)

!

f~ x + f~ x ~     y ; J  !

(2.55)

f~ x + f~ x

~     x : (2.56) J  These are alled the onservative or symmetri form for the se ond derivatives; there are several other forms for these derivatives that are not used here. If the partial di erential equation in (2.43) is multiplied by the Ja obian and then transformed to general oordinates using the formulas in (2.53)-(2.56), then the resulting transformed boundary-value problem is (^ f^ ) + ( ^ f^ ) + ( ^ f^ ) + (^ f^ ) = g^ ; (2.57) with the boundary onditions f^(; 0) = 0 ; f^(; 1) = 0 ; f^(0; ) = 0 ; f^(1; ) = 0 ; (2.58) where f^(; ) = f~(; ) ; g^(; ) = J (; ) g~(; ) ; (2.59) and  1 (2.60) ^ = + +~ y2 2 ~ x y + ~ x2 ; J  1 ^ = +~ y y ~ (x y + x y ) + ~ x x ; (2.61) J  1

^ = + +~ y2 2 ~ x y + ~ x2 : (2.62) J Note the simpli ity of the boundary onditions (2.58) ompared to the statement (2.43). This is one of the advantages of boundary- onforming oordinates. Exer ise 2.3.2 Extend the boundary onditions (2.58) to inhomogeneous Diri hlet onditions. Exer ise 2.3.3 Che k one of the formulas (2.60)-(2.62). x



33

1992 by P.M. Knupp, September 8, 2002

ell orners horizontal edge enters verti al edge enters

ell enters

points (i ; j )  (i + 21 ) ; j   i ; (j + 21 )   (i + 12 ) ; (j + 12 ) 

max i M M 1 M M 1

max j N N N 1 N 1

Table 2.1: Grid points (i; j  0)

2.4 Dis retization of the 2D Transformed Equation The dis retization of the two-dimensional hosted equation is performed to attain se ond-order a

ura y and symmetri sten ils. The rst step in approximating the transformed partial di erential equation (2.57) by nite di eren es is to make a re tangular grid in the logi al region U2 . Let M and N be positive integers and then de ne the grid points (i ; j ) by 1 ; i = i  ; 0  i  M ; (2.63) M 1  = ; j = j  ; 0  j  N : (2.64) N As in the one dimensional ase, grid points with either whole integer i or j or both half integers are used. The geometri al meaning of these points is given in Table 2.1 and Figure 2.4. The grid with integer-indexed points ontains (M + 1) (N + 1) points. The transformation x = x(; ), y = y(; ), arries the logi al-spa e grid to a physi al-spa e grid xi;j = (xi;j ; yi;j ) where  =

xi;j = x(i ; j ) ; yi;j = y(i ; j ) ; 0  i  M ; 0  j  N :

(2.65)

The dis retization also indu es dis rete values for all of the transformed variables in the boundary-value problem. For example,

f~i;j = f~(i ; j ) = f (x(i ; j ); y(i ; j )) = f (xi;j ; yi;j ) = fi;j :

(2.66)

Similar formulas hold for g~i;j = gi;j , ~i;j = i;j , ~i;j = i;j , and ~i;j = i;j ;

onsequently, there is no need to retain the tilde notation. The values of fi;j are needed for all points 0  i  M , 0  j  N . They are spe i ed on the boundary by the boundary onditions: f^0;j = 0 ; f^M;j = 0 ; 0  j  N ; f^i;0 = 0 ; f^i;N = 0 ; 0  i  M : (2.67) The (M 1) (N 1) interior values fi;j , 1  i  M 1, 1  j  N 1, are to be omputed. It is assumed that the values of gi;j , are given for the interior points, 1  i  M 1, 1  j  N 1. The oeÆ ients i;j , i;j , and i;j are needed at lo ations determined by the dis retization of the derivatives (the formulas are derived below).



34

1992 by P.M. Knupp, September 8, 2002

η

ξ cell corners

horizontal edge centers

cell centers

vertical edge centers

Figure 2.4: Grid points The variables that appear in the transformed di erential equation are de ned in terms of the tilde variables, but now the tilde has been eliminated, so f^i;j = fi;j ; 0  i  M ; 0  j  N ; g^i;j = Ji;j gi;j ; 1  i  M 1 ; 1  j  N 1 ; (2.68) The oeÆ ients ^i;j , ^i;j , and ^i;j are de ned below using the Formulas (2.60) through (2.62).

Exer ise 2.4.1 Generalize the above dis ussion to non-homogeneous Diri hlet boundary onditions f j = p. Assume that  is made up of four pie es and that p is made up of fun tions pk , 1  k  4 that are de ned on ea h pie e of the boundary. Algorithms for general mixed boundary onditions an be found in Steinberg and Roa he, [194℄. x As before, the di erential equation is di eren ed using se ond-order entral di eren es. The approximation of the se ond derivative will involve nine neighboring points as shown in Figure 2.5. The rst letter in the words North, East, South, West, and Central are used to label the oeÆ ients of the sten il. The diagonal terms (^ f^ ) and (^ f^ ) are di eren ed in a manner analogous to Formula (2.23), with the sten il oeÆ ients relabelled as in Figure 2.5. Thus 

(^ f^ )



i;j

 Wi;j f^i 1;j + Ci;j f^i;j + Ei;j f^i+1;j ;

where

Wi;j =

^i 21 ;j ;  2

(2.69)

(2.70)



35

1992 by P.M. Knupp, September 8, 2002

NW

N

NE

(i−1, j+1)

(i, j+1)

(i+1, j+1)

W

C

E

(i−1, j)

(i, j)

(i+1, j)

SW

S

SE

(i−1,j−1)

(i, j−1)

(i+1, j−1)

Figure 2.5: Two-dimensional sten il

Ci;j =

(Ei;j + Wi;j ) ; ^i+ 21 ;j Ei;j = :  2 Also, where



(^ f^ )



i;j

(2.71) (2.72)

 Si;j f^i;j 1 + Ci;j f^i;j + Ni;j f^i;j+1 ;

^i;j 12 ; 2 Ci;j = (Ni;j + Si;j ) ;

^ 1 Ni;j = i;j+22 :  Si;j =

The mixed partial derivatives are approximated at ell in 2.16 ), using values at the four enter points: f 1 1 f 1 1 + fi+ 21 ;j 21 (f )i;j  i+ 2 ;j+ 2 i 2 ;j+ 2 2  fi+ 21 ;j+ 21 fi+ 12 ;j 21 + fi 12 ;j+ 21 (f )i;j  2 

(2.73) (2.74) (2.75) (2.76)

orners by averaging (as

fi 21 ;j 21 ; fi 21 ;j 21 :

(2.77)

Repla ing i by i + 12 and j by j + 12 gives a formula for omputing derivatives at ell

enters in terms of values at ell orners, for example,   f f +f f (2.78) ^ f 1 1  ^i+ 21 ;j+ 21 i+1;j+1 i;j+1 i+1;j i;j : 2  i+ 2 ;j + 2



36

1992 by P.M. Knupp, September 8, 2002

Combining (2.78) with (2.77) gives the following sten ils for the mixed partials 

( ^ f^ )





i;j

+ ( ^ f^ )



i;j

 NEi;j f^i+1;j+1 + + + +

NWi;j f^i 1;j+1 SEi;j f^i+1;j 1 SWi;j f^i 1;j 1 Ci;j f^i;j ;

(2.79)

where

^i+ 21 ;j+ 21 4   ^ i 12 ;j+ 21 NWi;j = 4   ^ i+ 21 ;j 21 SEi;j = 4   ^i 21 ;j 21 SWi;j = + 4   NEi;j = +

Ci;j =

;

(2.80)

;

(2.81)

;

(2.82)

;

(2.83)

(NEi;j + NWi;j + SEi;j + SWi;j ) ;

(2.84)

If the previous Formulas (2.69), (2.73), and (2.79) are ombined, then an approximation for the full di erential equation (2.57) is obtained:

Wi;j f^i 1;j Ei;j f^i+1;j Si;j f^i;j 1 Ni;j f^i;j+1 NEi;j f^i+1;j+1 NWi;j f^i 1;j+1 SEi;j f^i+1;j 1 SWi;j f^i 1;j 1 Ci;j f^i;j

+ + + + + + + + = g^i;j :

(2.85)

where the formulas for W and E in Equations (2.70-2.72), for N and S in Equations (2.74-2.76), and for NE , NW , SE , and SW in Equations (2.80)-(2.83) are orre t, while the entral sten il must be rede ned as

Ci;j = (Ni;j + Wi;j + Si;j + Ei;j + NEi;j + NWi;j + SEi;j + SWi;j ) to a

ount for all the simple sten ils being added together. To evaluate Formulas (2.60)- (2.62) for the sten ils, the following are used:

^i 21 ;j = +

1 ( + i 21 ;j (y )2i 21 ;j Ji 12 ;j

(2.86)



37

1992 by P.M. Knupp, September 8, 2002

^i 21 ;j 21 =

2 i 21 ;j (x )i 12 ;j (y )i 12 ;j + i 21 ;j (x )2i 21 ;j ) ;

1

Ji 12 ;j 21

^i;j 12 = +

1

Ji;j 12

(2.87)

( + i 21 ;j 21 (y )i 21 ;j 21 (y )i 12 ;j 21 

i 21 ;j 21 (x )i 21 ;j 21 (y )i 12 ;j 21 +(x )i 12 ;j + i 12 ;j 21 (x )i

21 (y )i 12 ;j 12 ;j 21 (x )i

( + i;j 21 (y )2i;j 21

21



21 ;j 21

2 i;j 21 (x )i;j 12 (y )i;j 21 + i;j 12 (x )2i;j 12 ) :

The formulas needed to ompute the ^ oeÆ ient are: x +x xi 12 ;j = i;j i 1;j ; 2 yi;j + yi 1;j ; yi 12 ;j = 2 x xi 1;j ; (x )i 12 ;j = i;j  x x +x x (x )i 21 ;j = i;j+1 i;j 1 i 1;j+1 i 1;j 1 ; 4  y y (y )i 21 ;j = i;j i 1;j ;  y y +y y (y )i 12 ;j = i;j+1 i;j 1 i 1;j+1 i 1;j 1 ; 4  Ji 12 ;j = (x )i 12 ;j (y )i 21 ;j (y )i 12 ;j (x )i 21 ;j : The formulas needed to ompute the ^ oeÆ ient are: x +x xi;j 21 = i;j i;j 1 ; 2 yi;j + yi;j 1 ; yi;j 12 = 2 x xi 1;j + xi+1;j 1 xi 1;j 1 (x )i;j 12 = i+1;j ; 4  x xi;j 1 (x )i;j 21 = i;j ;  y y +y y (y )i;j 12 = i+1;j i 1;j i+1;j 1 i 1;j 1 ; 4  yi;j yi;j 1 (y )i;j 12 = ;  Ji;j 12 = (x )i;j 12 (y )i;j 21 (y )i;j 12 (x )i;j 21 : The formulas needed to ompute the ^ oeÆ ient are: x +x +x +x xi 21 ;j 21 = i;j i;j 1 i 1;j i 1;j 1 ; 4

(2.88) );

(2.89)

(2.90)

(2.91)



38

1992 by P.M. Knupp, September 8, 2002

y +y yi 21 ;j 21 = i;j i;j x + xi;j (x )i 21 ;j 21 = i;j x xi;j (x )i 21 ;j 21 = i;j y +y (y )i 21 ;j 21 = i;j i;j y y (y )i 21 ;j 21 = i;j i;j Ji 21 ;j 21

1 + yi 1;j + yi 1;j 1 ; 4 1 xi 1;j xi 1;j 1 ; 2  1 + xi 1;j xi 1;j 1 ; 2  1 yi 1;j yi 1;j 1 ; 2  1 + yi 1;j yi 1;j 1 ; 2  = (x )i 12 ;j 21 (y )i 21 ;j 21 ; (y )i 21 ;j 21 (x )i 12 ;j 21 :

The formulas needed to ompute the g^ oeÆ ient are: x xi 1;j ; (x )i;j = i+1;j 2  x x (x )i;j = i;j+1 i;j 1 ; 2  y y (y )i;j = i+1;j i 1;j ; 2  yi;j+1 yi;j 1 (y )i;j = ; 2  Ji;j = (x )i;j (y )i;j (y )i;j (x )i;j :

(2.92)

(2.93)

The di eren e equation (2.85) must hold for all interior points 1  i  M 1, 1  j  N 1. Consequently, there are (M 1)  (N 1) equations for determining the (M 1)  (N 1) unknowns f^i;j = fi;j , 1  i  M 1, 1  j  N 1.

Exer ise 2.4.2 Verify the formulas for NWi;j , SEi;j , and Ci;j . Write the di eren e

equations for f^i;j in matrix form and then verify that the oeÆ ient matrix is (M 1) (N 1) by (M 1) (N 1), is made up of (M 1) (N 1) tridiagonal blo ks, is symmetri , is banded, and has row-sums zero. Note that not all o -diagonal entries of the matrix are ne essarily positive. However, if the entries are all positive, then the row-sums zero ondition implies that the matrix is (not stri tly) diagonally dominant. x The next proje t illustrates the power of the method presented; it is quite diÆ ult to do with other standard methods.

Proje t 2.4.3 Use the ode dis ussed in Appendix B Se tion B.3 to solve the following boundary value problem. Re all that the partial di erential equation an be written (see 2.45) r  (T rf ) = g ; (2.94) where the matrix T is given by

T

=







:

(2.95)

The matrix will be de ned as the rotation of a diagonal matrix:

T

= P 1DP ;

(2.96)



39

1992 by P.M. Knupp, September 8, 2002

where

P=

and



os(t) sin(t) sin(t) os(t)

D=

Here t is a parameter and



d1 0 0 d2





;

:

d1 = 1 + 2 x 2 + y 2 ; d2 = 1 + x 2 + 2 y 2 :

(2.97) (2.98) (2.99)

The region is given by the image of the unit square under the transformation     x =  +  os ( + ) ; y =  +  sin ( + ) ; (2.100) 4 4 where, again,  is a parameter. To reate a test problem, take t = =8 and  = 1=2. Choose

f (x; y) = sin( x) sin( y)

(2.101)

and then al ulate the inhomogeneous term g and the Diri hlet boundary onditions so that f is a solution of (2.45). Note that  = 0 gives a good preliminary test for this

ode. If f (x; y) is the exa t solution of a problem and f^i;j is an approximate solution with 0  i  M , 0  j  N , then the error in the approximate solution is de ned as

EM;N = max jf^i;j

f (xi;j ; yi;j )j ; 0  i  M ; 0  j  N :

(2.102)

For a se ond-order method, the onvergen e rate onstant is de ned by

C = lim M N EM;N : M;N !1

(2.103)

The theory of nite-di eren es requires C to be a nite nonzero number if the method is se ond-order a

urate. Perform a onvergen e-rate test on the resulting program, that is, ompute C . To do this, hoose M = N = 2K for 1  K  7 and ompute CM = M 2 EM;M . A entral point is that the region used in the problem an be hanged by making a few trivial hanges in the ode. x

2.5 Summary Using grid generation for solving partial di erential equations onsists of, rst, two preliminary algebrai steps:

 

transform the PDE to general oordinates (Se tion 2.3 or Se tion 7.3); and dis retize the di erential equation (Se tion 2.4 and Steinberg and Roa he, [194℄),

se ond, three numeri al steps:

 

generate a grid (see the rest of this book); evaluate the sten il oeÆ ients of the dis retized equation;



1992 by P.M. Knupp, September 8, 2002



40

solve the dis retized equation.

The last step is not dis ussed in this hapter; the reader is referred to multigrid, pre onditioned onjugate-gradient, Newton's, and operator splitting methods. These methods an be used to solve grid-generation equations as well (see, for example, Camarero and Younis, [23℄). Note that the oeÆ ients of the hosted equation, the boundary onditions, and the geometri region an be varied with only a few minor hanges in the omputer program that implements this method; no hanges are ne essary in the algorithm. This

exibility is a major bene t of this approa h. Moreover, grid-generation te hniques an be applied to time-dependent problems (see, for example Thomas and Lombard, [204℄, or Pulliam and Steger, [150℄), nonlinear problems, and those with moving boundaries (Yeung and Vaidhyanathan, [233℄). Ea h step in the solution pro ess an be pushed to a mu h higher level. The purpose of this book is to extend the grid generation step, using di erential-geometri and variational ideas, to a powerful set of algorithms apable of generating grids on a wide variety of geometri obje ts. Extensions of the dis retization te hniques and solution methods for the dis retized equations are not pursued further here.

Chapter 3

Grid Generation on the Line 3.1 Introdu tion The goal in this hapter is to present a theory of one-dimensional grid generation on the line to illustrate some of the basi on epts involved in grid-generation algorithms. A major goal of one-dimensional grid-generation algorithms is to reate grids with spe i ed distan es between the grid points, thus the hapter begins with a simple and intuitive geometri argument to show how to produ e se ond-order di erential equations whose solutions are one-dimensional grids with spe i ed segment lengths. This dis ussion provides a rm foundation for developing solution-adaptive grid generators. There are many ways to generate grids in one-dimension; the interest here is in only those methods that generalize to higher dimensions. Two Poisson grid generators are des ribed; the se ond of these generators is of parti ular importan e sin e it is widely used, espe ially in higher dimensions. This is followed by a dis ussion of how to numeri ally implement all one-dimensional generators. One of the obje tives of this text is to present as many grid-generation results as possible within the ontext of lassi al al ulus of variations, following and extending the work of Steinberg and Roa he, [191℄. The one-dimensional problem provides an introdu tion to the geometri basis for hoosing variational prin iples in higher dimensions. A simple dis rete minimization problem is dis ussed rst, then extended to the ontinuum to produ e a variational algorithm for one-dimensional grid generation. Basi results in the lassi al al ulus of variations are reviewed. More details and proofs of relevant lassi al variational results an be found in one of the many texts on this subje t, e.g., Gelfand and Fomin, [77℄. The variational se tion is ompleted by presenting a variational derivation of a higher-order grid generator. Variational ideas are extended to higher dimensions in Chapter 6, Variational Planar Grid Generation. Another alternative is to generate grids as solutions to fourth-order di erential equations. Unfortunately, su h methods are not as general as the weighted variational algorithms. Alternate approa hes to the topi of this hapter have been presented in several other pla es (e.g., Thompson et al., [215℄). The bulk of interest in one-dimensional algorithms stems from their being a model for higher-dimensional grid generation and from their appli ation to solution adaptivity in the numeri al solution of partial di erential equations (e.g., Thompson et al., [215℄, Anderson, [5, 6, 8℄, Dwyer et al., 41



42

1992 by P.M. Knupp, September 8, 2002

a x

b x

0

x i+1

x

i

i+1

x

physical space

ξ

logical space

M

1

0 ξ

x

0

ξ

i+1

ξ

i

ξ

i+1

ξ

M

Figure 3.1: One-dimensional grid [57℄, Ghia and Ghia, [80℄, Nakamura, [143℄). Thus, the hapter loses with a dis ussion of one-dimensional solution-adaptive methods.

3.2 Generators that Control Grid Spa ing The purpose of this se tion is to derive se ond-order di erential equations for generating grids where the length of the segments in the grid are spe i ed by a weight fun tion; weight fun tions that depend on either the logi al variable or the physi al variable are onsidered. The derived di erential equations are losely related to those obtained by variational methods and, onsequently, provide substantial insight into those methods. Consider a weight fun tion ( ) that depends on the logi al-spa e variable  , for  in the interval [0; 1℄. The lengths of the grid intervals are to be positive and proportional to , so it is natural to assume that  = ( ) > 0. If M is a positive integer, then an unfolded grid on the interval [a; b℄, ontaining M + 1 points is given by, xi , 0  i  M , where x0 = a, xM = b, and xi < xi+1 , 0  i  M 1. The problem is to generate a grid so that the lengths of the intervals [xi ; xi+1 ℄ are proportional to the value of  at the midpoint of the interval. More pre isely, nd xi so that   i+1 + i xi+1 xi = K  ; (3.1) 2 where 0  i  M 1 and K is some onstant that is to be found. If the grid is given by a transformation from logi al to physi al spa e, then xi = x(i ) where i = i=M = i . Observe that, if  is ontinuous, then for  going to zero, the left-hand-side of Equation (3.1) goes to zero while the right-handside does not. To x this, set K = C  where C is another onstant and divide Equation (3.1) by  to obtain   i+1 + i x(i+1 ) x(i ) : (3.2) =C  2 Equation (3.2) an be expressed at a general point  2 [0; 1℄ as   x( +  ) x( )  : (3.3) =C +  2 If x is ontinuous, then the limit of Equation (3.3) as  ! 0 yields the ordinary di erential equation x ( ) = C ( ) : (3.4)



43

1992 by P.M. Knupp, September 8, 2002

Dividing (3.4) by  and di erentiating with respe t to  gives 



x = 0:  

(3.5)

Note that the onstant C has been removed from the problem. If  is di erentiable and x is twi e di erentiable, the quotient rule for derivatives and a little algebra gives

x

 x = 0:  

(3.6)

The transformation must satisfy the boundary onditions

x(0) = a ; x(1) = b :

(3.7)

These boundary onditions along with the linear di erential equation given in Equation (3.6) uniquely determine the transformation x. The Ja obian of the map is J = x and a

ording to (3.4), the resulting transformation has the property that

J ( ) = C ( ) ;

(3.8)

whi h is the ontinuum analog of (3.2), whi h says that the segment lengths are proportional to . The di erential equation in (3.5) is a variable oeÆ ient Lapla e equation; it has the by now familiar onservative form of the di erential equation given in Equation (2.11) in Chapter 2 where = 1=. The onservative form (3.5) does not require  to be smooth; it therefore has an advantage over the non- onservative form (3.6) sin e in some appli ations the weight fun tion is onstru ted numeri ally. Either (3.5) or (3.6)

an be dis retized and the boundary onditions (3.7) applied to obtain a numeri al algorithm for one-dimensional grid generation. This is done in Se tion 3.4. The onstant C , and onsequently K , is determined by integrating Equation (3.4) between  = 0 and  = 1 Z 1 1 1 = ( ) d : (3.9) C b a 0 The onstant C does not appear in either (3.5) or (3.6), so it's not needed in the numeri al algorithms; however, the expression for C in (3.9) is useful in the following exer ises.

Exer ise 3.2.1 Show that if   1, then x( ) = (b a)  + a. x Exer ise 3.2.2 Show that the solution to (3.6) and (3.7) is x( ) = a + C where C is given by (3.9).

x

Z 

0

() d ;

(3.10)

Exer ise 3.2.3 Suppose the domain in physi al spa e is translated by a real number s. Find the solution to (3.6) with boundary onditions x(0) = a + s and x(1) = b + s; show that C is invariant to the translation and that the interior points of the grid are translated by s. x



44

1992 by P.M. Knupp, September 8, 2002

Exer ise 3.2.4 Let 0 < 0 < 1 and suppose that 8 < 1 ; 0    0 ; ( ) =

2 ; 0 <   1 : Show that the solution to (3.5) with (3.7) is

x( ) =

:

8 b a > < 2 0

 +a;

0    0 ;

(3.11)

(3.12)

2 (b a) +2 a b 0 ; 0 <   1 : 2 0 Note that x( ) is ontinuous but that x ( ) has a jump at 0 ; x = is di erentiable. x > :

The purpose of the weight fun tion is to modify the basi grid in Exer ise 3.2.1 by adapting towards or away from parti ular lo ations in the physi al domain (see Se tion 3.8 on solution adaptivity). There is a signi ant limitation to the use of logi al-spa e weight fun tions in this regard. Suppose, for example, that one desires to hange the grid spa ing at the point x = x0 in physi al spa e, using the weight in the previous exer ise. Then one must determine 0 in (3.11) from the relation x0 = x(0 ), whi h leads to 2 (x0 a) : (3.13) 0 = x0 + b 2 a For more ompli ated logi al-spa e weight fun tions, it may be diÆ ult or impossible to expli itly determine the values of parameters su h as 0 in the weights to ensure that the stret hing of the grid o

urs at the desired lo ation in physi al spa e. In higher dimensions this diÆ ulty be omes quite annoying. One way to x the problem is through the use of physi al-spa e weighting. A physi al-spa e weight fun tion depends on the dependent variable x. Assume that the weight is given by w = w(x) > 0 whi h is de ned on [a; b℄. As before, the problem is to generate a grid so that the lengths of the intervals [xi ; xi+1 ℄ are given by the value of w at the midpoint of the interval, that is, nd xi so that   xi+1 + xi xi+1 xi = Kw ; (3.14) 2 with 0  i  M 1 and K is some onstant to be found. In the previous dis ussion,

hoose ( ) = w(x( )); then (3.4) implies that x satis es the di erential equation x ( ) =C: (3.15) w(x( )) Di erentiating with respe t to  gives   x ( ) = 0: (3.16) w(x( ))  The quotient rule and some algebra gives wx 2 x x = 0: (3.17) w  Note that this equation is not quite the same as Equation (3.6), but an be put in this form using the hain rule: w x x = 0: (3.18) w 



45

1992 by P.M. Knupp, September 8, 2002

As before, x(0) = a and x(1) = b, so that there are the orre t number of boundary

onditions to solve Equation (3.17) for a fun tion that generates the desired grid. The di erential equation in (3.16) again has the same form as the di erential equation in (2.11) where = 1=w. Now, however, the di erential equation in (3.16) is nonlinear be ause the oeÆ ient is a fun tion of the dependent variable (the equation is a tually quasi-linear). In general, solutions to non-linear equations need not exist and if they exist they may not be unique. Nonlinear equations are signi antly more troublesome to solve numeri ally than linear equations (see Se tion 3.4). The onstant C , and onsequently K , is determined by re-arranging (3.15), giving

d 1 = : dx w(x) Integrating this between x = a and x = b gives C

(3.19)

Z b

dx : (3.20) w a (x) In ontrast to the logi al-spa e weight ase, the general solution to (3.16) annot be expli itly given due to the non-linearity. C=

Exer ise 3.2.5 Suppose a < x0 < b and let w(x) =

8

:

(3.22)

(3.23)

Note that x has a jump at 0 , but that x =w is di erentiable at 0 . The advantage of physi al-spa e weighting is that one does not need to ompute 0 to determine the weight fun tion. Also show that if the physi al domain is translated by s, then the grid is also translated by s, provided x0 ! x0 + s. x To summarize, it is possible to generate one-dimensional grids whose lo al spa ing is proportional to a given weight fun tion. The approa h makes use of se ond-order partial di erential equations; both onservative and non- onservative forms of the equations are used. The weight fun tions an be given in terms of either the logi al or physi al variable. The grid generation equation for a logi al-spa e weight fun tion is linear and translation invariant. The logi al-spa e weight fun tion an be diÆ ult to

onstru t so that the desired e e t o

urs at a predi table lo ation in physi al spa e. On the other hand, the grid generation equation for a physi al-spa e weight fun tion is non-linear, but still translation invariant, provided the weight fun tion is modi ed appropriately. The physi al-spa e weight fun tion is relatively easy to onstru t and permits adaptation at predi table lo ations in physi al spa e.



46

1992 by P.M. Knupp, September 8, 2002

3.3 1-D Poisson Grid Generators Poisson equations are ommonly used by engineers to generate grids in higher dimensions. One-dimensional Poisson grid generators are studied in this se tion; basi properties are noted and the generators are ompared to those in the previous se tion. The Poisson generators are one-dimensional forms of the AH (Amsden and Hirt, [3℄) and the TTM (Thompson, Thames, and Mastin, [208℄) generators. Poisson grids are determined by assuming that the transformation that generates the grid satis es a se ond-order di erential equation known as the Poisson equation. The reason for this assumption is that solutions to Poisson equations are smooth (provided there are suÆ ient restri tions on the smoothness of the inhomogeneous term) - a highly desirable property of nite di eren e grids. The AH generator assumes that the transformation satis es the Poisson equation x = P ( ) ; x(0) = a ; x(1) = b ; (3.24) where P is some given ontinuous fun tion that serves as a logi al-spa e weight. This is a linear boundary-value problem and has the general solution x( ) = (b a)  + a + 

Z

1

0

 P ( ) d



Z

1



P ( ) d

Z 

0

 P ( ) d ;

(3.25)

as an be easily he ked (also, see Equation (2.14)). Equations (3.24)-(3.25) imply that x( ) and its rst two derivatives are ontinuous. In fa t, the solution and its rst derivative make sense and are ontinuous if P is only pie ewise ontinuous. Thus, x is onsiderably smoother than P . This is the main reason that Poisson generators are useful. The Ja obian of (3.25) is

x = b a

Z



1

P ( ) d +

1

Z

0

 P ( ) d ;

(3.26)

whi h shows the main diÆ ulty with this generator; namely, that the relation between the Ja obian (i.e., segment length) and the weight fun tion is non-trivial. For example, even if P > 0, one annot guarantee J > 0. It is not lear that a physi al-spa e weight fun tion P (x) would permit more e e tive ontrol over the grid lengths. The AH generator (3.24) is the same as one of the generators given by (3.6) or (3.17) provided that one of the equalities

w  (3.27) P =  x ; P = x x2 ;  w holds. The latter generators are learly preferable to AH sin e the e e t of their weight fun tion is unambiguous. In two dimensions, a natural generalization of the AH generator produ es folded grids on rather simple regions (see Se tion 5.4.1). The two dimensional generalization of the TTM generator to be des ribed next is onsiderably more robust (see Se tion 5.4.2). The basi idea is to onsider the inverse  =  (x) of the transformation and assume that this fun tion satis es the boundary-value problem xx = P ( ) ;  (a) = 0 ;  (b) = 1 ; where, as before, P is some given ontinuous fun tion.

(3.28)



47

1992 by P.M. Knupp, September 8, 2002

To ompare the TTM generator with the previous generators, transform the di erential equation (3.28) to an equation in logi al spa e. Re all that x( ) and  (x) are inverses of ea h other, so that x( (x)) = x. Di erentiating this with respe t to x gives x x = 1 or x = 1=x , whi h is the standard rule for omputing derivatives of inverse fun tions. The hain rule (2.6) gives 



x 1 1 = 3 : xx = x x  x

(3.29)

This an be used to transform Equation (3.28) to the nonlinear boundary-value problem x + P ( ) x3 = 0 ; x(0) = a ; x(1) = b : (3.30) The transformed equation bears a modest resemblan e to (3.17), but here one has a logi al-spa e weight. The transformed equation an be integrated to give a relation for the Ja obian Z  2 x = 2 P ( ) d : (3.31) Equation (3.31) shows that the relationship between segment lengths and the weight P is not simple and that there is no guarantee that J = x > 0. If P is ontinuous, then (3.31) implies that x is ontinuous and, onsequently, that x is ontinuous. Equation (3.30) then implies that x is ontinuous, that is, x is twi e ontinuously di erentiable. Thus, the 1-D TTM generator with ontinuous weight fun tions produ es smooth grids.

Exer ise 3.3.1 Show that, for either Poisson generator, if P  0 then the grid

is linear:

x( ) = (b a)  + a : x

(3.32)

The 1-D TTM generator (3.30) is the same as either of the generators given by (3.6) or (3.17) provided that one of the equalities

 w P x3 =  x ; P x3 = x x2 ;  w

(3.33)

holds. These equations show how to hoose P in the TTM method to obtain grid spa ing proportional to some weight. For example, if x( ) is generated by  in (3.6), then one an obtain the same transformation by solving (3.30) using

P ( ) =

1  : C 2 3

(3.34)

The equivalen e between the TTM generator and the generators of the previous se tion does not extend to higher dimensions.

Exer ise 3.3.2 An alternate form of the weighted TTM generator is sometimes used (Thompson, Warsi, Mastin, [215℄) xx = x2 P ( ): Invert this equation and ompare the result to (3.6).

(3.35)

x



1992 by P.M. Knupp, September 8, 2002

48

3.4 Numeri al Implementation All of the grid-generation equations presented in this se tion an be approximated using the te hniques des ribed in Se tion 2.2. For onvenien e in omparing the methods and understanding the programs used to generate the grids, di eren e approximations for all generators are now derived. The problem is to ompute xi , 0  i  M where M is a given positive integer and x0 = a and xM = b. The nite-di eren e approximation to ea h of the di erential equations of the previous se tions always results in system of algebrai equations of the form li

r xi 1 + i 2 xi + i 2 xi+1 = gi ; 1  i  M 1 ; (3.36) 2    where

i = (li + ri ) : (3.37) Thus, only ri , li , and gi are needed to spe ify the problem. Note that the notation here di ers from the notation in Se tion 2.2: li = Li  2 , et . Equation (3.5),   x ( ) = 0; (3.38) ( )  is a linear homogeneous symmetri ordinary di erential equation. The sten ils for its di eren e approximation are 1 ri = ; li = ri 1 ; gi = 0 : (3.39) i+1=2

System (3.39) is a symmetri tridiagonal system that an be solved using a symmetri tridiagonal solver. Spe ial treatment of this system may be ne essary at the end points to employ the tridiagonal solver. For example, at i = 1, the sten il equation an be expressed as

1 r l1 x1 + 12 x2 = a; 1  i  M 1; (3.40) 2    2 A

ordingly, the sten il oeÆ ients are modi ed to read: r0 a: (3.41) l1 = 0 ; g1 =  2 A similar modi ation will be ne essary at i = M 1 and in the other numeri al algorithms to follow. The lo ation of FORTRAN ode implementing this algorithm is given in Appendix B.3.1.

Exer ise 3.4.1 Use the material in Se tion 2.2 to derive (3.39). x

Equation (3.6),

 x =0 (3.42)   is also a linear homogeneous symmetri ordinary di erential equation. However it is not written in symmetri form. Centered di eren ing gives   i+1 i 1 ; li = 1 + i+1 i 1 ; gi = 0 : (3.43) ri = 1 4i 4i This di eren e approximation is not symmetri ; thus (3.39) is preferred. However, the system (3.43) is still tridiagonal and an be handled by a standard tridiagonal solver. x



49

1992 by P.M. Knupp, September 8, 2002

   

Begin loop. Evaluate li , i , ri and gi using xold i . Solve the resulting linear system for xi = xnew using a tridiagonal solver. i

Compute Æ = maxi jxnew i

xold i j.

new and loop. { If Æ > tol then set xold i = xi { If Æ  tol then quit.

Figure 3.2: Nonlinear iteration

Exer ise 3.4.2 Use the material in Se tion 2.2 to derive (3.43). x When the weight fun tion depends on the grid, the ordinary di erential equations satis ed by the grid fun tions are nonlinear, but otherwise are the same as the previous two di erential equations. The usual di eren ing of (3.16), 

gives



x ( ) = 0; w(x( )) 

(3.44)

1 ; li = ri 1 ; gi = 0 : (3.45) w(xi+1=2 ) This is a nonlinear system whi h an be solved using a nonlinear iteration. In any problem where the li , i , ri or gi depend on the grid, that is, on the xi , is nonlinear. Su h problems are solved using a nonlinear iteration pro edure. A small toleran e parameter tol that determines the a

ura y of the solution must be given. To start the iteration, an initial grid xold i must be generated, say using linear interpolation. Then the loop des ribed in Figure 3.2 is exe uted. FORTRAN ode implementing this algorithm is des ribed in Appendix B.3.1.

ri =

Exer ise 3.4.3 Use the nonlinear iteration des ribe in Figure 3.2 to solve (3.45). Experiment with values of tol = 10 k for 1  k  8 to see what impa t this has on the resulting grid. x A similar approa h to that used to obtain (3.43) works for the nonlinear Equation (3.18), w x = 0: (3.46) x w  Instead of repeating that dis ussion, it is observed that a di erent algorithm an be applied. The lower-order terms an be evaluated at the old grid to determine the righthand-side of the sten il and the se ond-order terms used to al ulate the left-hand-side sten il oeÆ ients: (w wi 1 ) (xi+1 xi 1 ) : (3.47) ri = li = 1 ; gi = i+1 4 wi  2 Be ause li , i , and ri are onstant, a parti ularly eÆ ient algorithm an be used to solve this problem.



50

1992 by P.M. Knupp, September 8, 2002

Exer ise 3.4.4 Modify the algorithm given in Figure 3.2 to solve the system of equations determined by (3.47) by taking the tridiagonal solve outside the loop. The general algorithm is so fast that it is not worth programming this algorithm in the one-dimensional ase. However, in higher dimensions, this idea has a substantial payo . x Proje t 3.4.5 Write a ode (see Appendix B) to generate the logi al-spa e weighted grid using the sten il oeÆ ients (3.39). Use both the weight in Exer ise (3.2.4) and the weight ( ) = exp( j  0 j) ;  > 0 ;

(3.48)

on [a; b℄ = [ 1; 1℄ and with 0  0  1. Plot the grids in the x- plane. To what point in physi al spa e has the point  = 0 been mapped? To validate the ode, numeri ally ompute x and C (see (3.9)) at ea h point of the mesh. x

Proje t 3.4.6 Write a ode (see Appendix B) to produ e physi al-spa e weighted grids using the sten il oeÆ ients (3.45). Use both the weight in Exer ise (3.2.5) and the weight w(x) = exp( j x x0 j) ;  > 0 ; (3.49) on the interval [a; b℄ = [ 1; 1℄ with 1  x0  1. Plot the grid in the x- plane. To validate the ode, numeri ally ompute x and C (see (3.20)) at ea h point of the mesh. x as

Proje t 3.4.7 Write a ode (see Appendix B) to solve Equation (3.30) di eren ed   xi+1 xi 1 3

: (3.50) 2 Solve the di eren e equation using the nonlinear iteration des ribed for (3.45). Implement the weight fun tion ri = li = 1 ; gi = Pi

P ( ) =

8 > < > :

 +2  ( 0 ) ; A20 e

0   < 0 < 1

2  (

0  0 <  < 1

+ A20 e

0 ) ;

(3.51)

where  > 0 and A0 6= 0. Experiment with the values of A0 , , and 0 . To what point x0 in physi al spa e does 0 map? The weight (3.51) is the 1-D analog of the weight used in the higher-dimensional TTM solvers. x

3.5 Minimization Problems The one-dimensional grid generators in Se tion 3.2 an be derived from variational prin iples. To build intuition, dis rete fun tionals are introdu ed, then the

limit is taken to obtain a ontinuum fun tional. The goal is to nd fun tionals whose minimum is a transformation having the property that the grid spa ing is proportional to a given weight fun tion  > 0. Let the multi-variable fun tion S > 0 from RM to R be de ned by

S=

(xi xi 1 )2 ; i=1 2 i 1=2

M X

(3.52)



51

1992 by P.M. Knupp, September 8, 2002

with i+1=2 = (i+1=2 ). The problem is to minimize S subje t to the onstraints x0 = a and xM = b. At an extremum, the partial derivatives of S with respe t to the grid points must be zero:

S xj xj 1 = xj j 1=2 This is a system of M

xj+1 xj = 0; 1  j  M j+1=2

1:

(3.53)

1 linear equations. Clearly, if

xj

xj 1 =  j 1=2 ; 1  j  M ;

(3.54)

with  some onstant, then the xj are solutions of (3.53), i.e., if the grid spa ing is proportional to the weight then the grid is an extremum of S . To show the onverse, note that if (3.53) is summed for 1  i  k then (this is a \ ollapsing" sum)

xk xk 1 x1 x0 = ; 1kM j 1=2 1=2 that is, with

1;

x x = 1 0; 1=2

(3.55) (3.56)

the grid must satisfy (3.54). To show that this is, in fa t, a minimum, one examines the Hessian matrix Hi;j for (3.52): 8 1 if i = j 1 > j 1 ; > > > > > > > 1 > > < j 1 2

2S = Hi;j = xi xj > > >

2

+ j1+ 1 ; 2

1 j+ 1 ;

> > > > > > > :

2

if i = j if i = j + 1

(3.57)

0; otherwise ; where 1  i; j  M 1. One an readily show that the Hessian is symmetri and positive semi-de nite, so S is onvex (Minoux, [137℄) and must have minimum. Sin e the solution to (3.53) is unique, the minimum must be unique.

Exer ise 3.5.1 Show that Hi;j given in (3.57) is positive semi-de nite. x Exer ise 3.5.2 The rst k of the Equations (3.54) an be summed to give xk = a +  with 1  k  M and that

k X j =1

j 1=2

(3.58)

b a : (3.59) 1 j 1=2 This equation an be thought of as an implied onstraint on the minimization problem. Note that the minimum of S is  (b a)=2 and onsequently the minimum is never zero for b > a. x =

PM



52

1992 by P.M. Knupp, September 8, 2002

The fun tion (3.52) is not the only one that an be minimized in order to obtain the property (3.54). For example, onsider

S^ =

( M X1

i=1

 xi+1 xi 2 i+1=2



 )2 xi xi 1 2 : i 1=2

(3.60)

This fun tion is learly positive or zero; if the grid xi satis es (3.54), the fun tion S^ has the value zero, so the desired grid yields a minimum of the fun tion. The derivatives of S^ in (3.60) are far more ompli ated than the derivatives of S in (3.52). Invoking the prin iple of O kham's Razor, it is best to use the simpler fun tion S sin e it's performan e leaves little to be desired. The approa h to grid generation outlined here is often referred to as the dire t optimization method (see Se tion 6.5 for further dis ussion). One an minimize su h fun tions dire tly using the methods of optimization (see Kennon and Dulikravi h, [107℄, and Castillo, [32℄) to obtain grids in all dimensions. The present goal, however, is merely to motivate the ontinuum fun tionals emphasized in this text. Divide (3.52) by  to get  M  S X xi xi 1 2  = :  i=1  2 i 1=2

(3.61)

If x( ) is di erentiable,  ontinuous, and xi = x(i ), then as  ! 0 the right-handside of the previous equation onverges to

I [x℄ =

1 x2 ( ) d : 0 2 ( )

Z

(3.62)

I [x℄ is alled a fun tional or a fun tional of the fun tion x = x( ). The problem is to minimize I [x℄ over all admissible x, that is, over all x that are ontinuously di erentiable and satisfy x(0) = a and x(1) = b. To al ulate the minimum of I [x℄ de ned in (3.62), introdu e a fun tion ( ) that satis es (0) = (1) = 0. For any  the fun tion x( ) +  ( ) satis es the same boundary onditions as the fun tion x( ). Consequently,  = 0 must be a minimum of the fun tion F : R ! R de ned by Z 1 (x ( ) +   ( ))2 d : (3.63) F () = 2( ) 0 If x( ) is to minimize the integral in (3.62), and then F 0 (0) = 0, that is, Z

1 x ( )

 ( ) d = 0 : 0 ( )

(3.64)

The boundary onditions on and an integration by parts gives

1  x ( ) 

( ) d = 0 : 0 ( ) 

Z

This is true for arbitrary , so





x ( ) = 0; ( ) 

(3.65) (3.66)



1992 by P.M. Knupp, September 8, 2002

53

whi h is the same as Equation (3.5). The di erential equation (3.66) is alled the

Euler-Lagrange equation for the minimization problem. It is re ognized to be

the same as (3.5) and thus all the properties dis ussed there hold for the minimizing transformation. If the weight fun tion depends on the physi al-spa e variable x, that is, if a weight fun tion w = w(x) > 0, de ned on [a; b℄, is onsidered, then, interestingly, it is not possible to take ( ) = w(x( )) in the previous fun tional and get that the spa ing is proportional to w. Instead the spa ing turns out to be proportional to square root of w. Thus, to obtain spa ing proportional to w, take  = w2 in (3.62) to obtain the variational prin iple for physi al weights: minimize I [x℄ over all ontinuously di erentiable x where Z 1 2 x ( ) I [x℄ = d ; (3.67) 0 2 w2 (x) and x is subje t to the onstraints x(0) = a and x(1) = b.

Exer ise 3.5.3 Show that the Euler-Lagrange equation for this minimization problem an be written in the form wx 2 x = 0; (3.68) x w  whi h is the same as Equation (3.17). Also, note that the hain rule implies that (3.68) an be written in the form w x = 0; (3.69) x w  whi h has the same form as (3.18). x This se tion has demonstrated that both the logi al and physi al grid-spa ing generators in Se tion 3.2 an be based upon variational prin iples.

3.6 The Cal ulus of Variations The lassi al al ulus of variations provides the theory for omputing the Euler-Lagrange equations for minimization problems. Let G(r; s; t) be a smooth fun tion of three real variables. The problem is to nd a fun tion x( ) de ned on [0; 1℄ that minimizes the fun tional

I [x℄ =

Z

1

G(; x( ); x ( )) d ; (3.70) 0 subje t to the onstraints x(0) = a and x(1) = b. The Euler-Lagrange equation for the minimizer x of this fun tional is derived as above. Introdu e the fun tion F () = I [x +  ℄ ;

(3.71)

where = ( ) is ontinuously di erentiable and (0) = (1) = 0. Then

F 0 (0) =

1

Z

0

fGs (; x; x ) + Gt (; x; x )  g d = 0 ;

(3.72)



54

1992 by P.M. Knupp, September 8, 2002

and then an integration by parts (using the onstraints, that is, the boundary

onditions on ) gives Z

0

1n

o

Gs (; x; x ) (Gt (; x; x )) d = 0 :

(3.73)

Be ause this must hold for all , it must be that Gs (; x; x ) (Gt (; x; x )) = 0 : (3.74) Applying the hain rule to the  derivative of G gives Gs Grt Gst x Gtt x = 0 : (3.75) This is a se ond-order di erential equation for x. Re all that the onstraints provide two boundary onditions for this di erential equation. It is ommon to write the fun tional in the form

I [x℄ =

Z

0

1

G(; x; x ) d ;

(3.76)

and the Euler-Lagrange equation (3.74) in the form G d G (; x; x ) = 0 : (3.77) (; x; x ) x d x Exer ise 3.6.1 Use the te hniques used in this se tion to derive the EulerLagrange equations for the fun tionals (3.62) and (3.67). x Exer ise 3.6.2 Show that the Euler-Lagrange equations for the minimum of the fun tional # Z 1" x2 d (3.78) I [x℄ = P ( ) x( ) + 2 0 gives (3.24). x Exer ise 3.6.3 An alternate approa h by Bra kbill and Saltzman, [21℄, poses variational prin iples in terms of maps from physi al to logi al spa e. For example, a one-dimensional prin iple of this type is to minimize

I [ ℄ =

Z

0

1

G(x;  (x); x (x))dx

(3.79)

with  (a) = 0 and  (b) = 1. Use the approa h in this se tion to obtain the EulerLagrange equations for this fun tional. Use them to nd a variational prin iple for (3.28). Can you nd one for (3.35)? x

3.7 A Fourth-Order Grid Generation Equation Another 1-D grid generation equation an be obtained by minimizing

I [x℄ =

Z

0

1

(x )2 d

(3.80)

subje t to boundary onditions to be determined shortly. The intuition is that x measures the derivative of the rate of hange of the distan e between grid points, so the minimum of I [x℄ should result in a transformation with the property that the distan e between grid points varies smoothly.



55

1992 by P.M. Knupp, September 8, 2002

Exer ise 3.7.1 Use the methods of the previous se tion to show that the EulerLagrange equation that minimizes the fun tional (3.80) is the fourth-order EulerLagrange equation

x = 0 :

x

(3.81)

The advantage of a fourth-order equation is that four boundary onditions an now be imposed on the grid. A natural set of onditions are

x(0) = a ; x(1) = b ; x (0) = 1 ; x (1) = 2 :

(3.82)

with 1 > 0 and 2 > 0. The last two boundary onditions permit dire t ontrol over the rst and last ell \lengths." The solution to Equation (3.81) is the ubi polynomial

x( ) = 0 + 1  + 2  2 + 3  3 ;

(3.83)

where the oeÆ ients are determined from the boundary onditions (3.82):

0 = a ; 1 = 1 ; 2 = 3 (b a) 2 1 2 ;

(3.84)

and

3 = 1 + 2 2 (b a) : (3.85) Sin e x is a quadrati polynomial in  , it is possible for the grid to be folded even if the derivatives at the end points, 1 and 2 , are positive.

Exer ise 3.7.2 Show that any of the following onditions on the 's are suÆ ient to guarantee an unfolded grid: (i) 3  0, (ii) 3 > 0 and 2 > 0, (iii) 3 > 0 and

2 + 3 3 < 0, or (iv) 3 > 0 and 3 1 3 22 > 0. Note that if 1 = 2 = b a, then

2 = 3 = 0, resulting in the linear unweighted grid. x The fourth-order grid generation equation provides no additional apability beyond that available in the weighted variational generator be ause, given the solution grid x( ) in (3.83) generated by (3.81), hoose ( ) = x = 1 + 2 2 + 3 3  2 and solve (3.66). On the other hand, sin e the solution grid to (3.81) is always a ubi fun tion, there is no way to hoose the four boundary onditions (3.82) to obtain a grid generated by an arbitrary weight ( ). From this viewpoint (3.81) is more limited than (3.66). It is possible to repla e the last two boundary onditions in Equation (3.82) by the onditions x(1 ) = x1 ; x(2 ) = x2 ; (3.86) with 0 < 1 < 2 < 1 and a < x1 < x2 < b to x two internal points of the grid. The solution is still of the form (3.83), but (3.84)-(3.85) does not apply. The oeÆ ients of the polynomial are determined by solving the four equations in four unknowns obtained by applying the new boundary onditions (3.86).

Exer ise 3.7.3 Suppose that (3.80) is hanged to in lude a weight fun tion ( ): Z 1 (x )2 I [x℄ = d (3.87) 0 

minimize

with the boundary onditions (3.82). Show that the Euler-Lagrange equation is 



x = 0:  

(3.88)



1992 by P.M. Knupp, September 8, 2002

56

The general solution of this equation has the form

x = (  +  ) ( )

(3.89)

for some onstants  and  . Use (3.24) and (3.25) to show that Z 1  (  +  ) ( ) d x( ) = (b a)  + a +  0 Z 1 Z   (  +  ) ( ) d  (  +  ) ( ) d (3.90)  0 satis es (3.89) and the rst two boundary onditions in (3.82). Show that if one

hooses the Neumann boundary onditions, Z 1 1 = (b a) +  ( 1) ( ) d ; (3.91) 0 Z 1 2 = (b a) +   ( ) d ; (3.92) 0 where  is arbitrary, then x =  ; (3.93) i.e., the se ond derivative of the transformation is proportional to the given weight. Thus, if one hooses the weight fun tion  and, say, 1 , then  and 2 are determined. This approa h therefore shows how to extend the approa h in (3.24) to obtain ontrol over one of the derivatives of the transformation at the end point. x

3.8 Feature-Adaptive Moving Grids The idea in moving-grid solution-adaptivity is to solve hosted equations by moving the grid points using a weighted grid generator so as to redu e the overall trun ation error in the solution of the hosted equation. All the theory ne essary to do this for one-dimensional steady-state hosted equations is now in pla e ex ept for the determination of the weight fun tion. There are several ways to hoose the weight fun tion. The simplest is the idea of feature-adaptive weights in whi h the weight fun tion depends upon features of the solution su h as the fun tion itself, its gradient, or se ond derivative. In this ase, the weight fun tion is a physi al-spa e weight fun tion of the form w = w(f; fx ; fxx). Consider the one-dimensional steady-state onve tion-di usion equation,

fxx fx = 0 ;

(3.94)

for a model hosted problem. Assume the domain is [a; b℄ and Diri hlet data are f (a) = 0 and f (b) = 1 and that  a parameter representing the ratio of onve tive to di usive terms. When  is large, the solution of this problem will have a boundary layer near one of the boundaries. This means that the solution f hanges very rapidly near the boundary. Adaptive grids an be used to resolve su h boundary layers.

Exer ise 3.8.1 Verify that the solution to (3.94) with  6= 0 is e (x a) 1 : f (x) =  (b a) e 1

(3.95)



57

1992 by P.M. Knupp, September 8, 2002

Plot the solution for large and small values of the parameter, in luding both negative and positive values. This provides a good model problem in that it is learly useful to stret h the grid near the boundary. What is the solution when  = 0? x To solve the hosted equation using a general transformation x( ), one must rst transform the hosted equation to general oordinates. For example, the onve tiondi usion equation (3.94) transforms to

f





x +  x f = 0 x

(3.96)

with f (0) = 0 and f (1) = 1. This equation an be solved on e the grid is known. This

hapter has given several options for the grid generator, but (3.18) is preferred sin e it has the useful property that grid spa ing is proportional to the physi al weight. Before one an pro eed, the weight fun tion must be onstru ted. The most

ommonly used feature-adaptive weight fun tion is gradient-based 1 (3.97) w(x) = p 1 + 2 fx2 with  a non-negative parameter. Note that if the gradient fx is small, the weight will be lose to one while if the gradient is large, then 1 ; (3.98) w(x)   jfxj that is the weight w is proportional to re ipro al of the gradient. Consequently, large gradients will produ e small weights and hen e relatively small ell sizes. The weight fun tion an also be transformed to logi al oordinates to obtain a

omputationally more useful form

w(x( )) =

jx j : 2 x + 2 f2

q

(3.99)

Proje t 3.8.2 Write a ode to numeri ally solve the oupled pair of equations (3.96) and (3.18) using a non-linear iterative s heme. Use the weight (3.99). Compute the trun ation error using the exa t solution (3.95) and experiment with the value of  to minimize the trun ation error. x There are endless variations upon this dis ussion. One an vary the weight fun tion, introdu e more parameters in the weight, smooth the weight, et . The reader is referred to Anderson and Rai, [4℄, Anderson, [7℄, Daripa, [44, 46℄, Dwyer et al., [56, 57℄, Ghia et al., [80℄, Godunov and Prokopov, [83℄, Nakamura, [143℄, Rai and Anderson, [152℄, and Zegeling et al., [234℄.

3.9 Summary A theory of grid generation in one-dimension has been presented. The hoi e of weights fun tions is lear and un ontroversial, even with the Poisson equations (unlike the situation in two dimensions). A grid having the property that segment length is proportional to the given weight is easily obtained by minimizing the proper fun tional. Positive weights guarantee an unfolded ontinuum grid. The Poisson and



1992 by P.M. Knupp, September 8, 2002

58

fourth-order grid generation equations do not provide any additional apability beyond the weighted system. As will be seen, numerous diÆ ulties are en ountered when the one-dimensional theory is extended to two and three dimensions, but, at least, a rm and intuitive foundation has been laid.

Chapter 4

Ve tor Cal ulus and Di erential Geometry Before pro eeding to the study of planar grid generation, a brief pause is made in this hapter to summarize elementary results from ve tor al ulus, general oordinate relationships, and di erential geometry. The lengths of and angles between tangent and normal ve tors are some of the most useful quantities for developing a geometri understanding of grid generation, so the hapter begins with a review of the s alar and ve tor produ ts and their geometri meaning (Se tion 4.1). Next, the tangent to and the ar length of a urve are dis ussed using ve tor al ulus. Tangents and normals to a surfa e are de ned and their relationship to surfa e area are des ribed. The relationship between the gradient of a fun tion that impli itly de nes a surfa e and the surfa e normal ve tor is given. Many grid generators are formulated in terms of the inverse of a general oordinate map, so relationships in one, two, and three-dimensions, between a general oordinate map and its inverse are derived in Se tion (4.2). The entries in the metri tensor are nothing but the length and inner produ t of tangent ve tors to oordinate lines. Thus these entries ontain mu h of the riti al information about grids. Consequently the metri tensor and related on epts are de ned in the se tion on di erential geometry (4.3). The hapter loses with an exposition (Se tion 4.4) on ve tor al ulus relationships whi h pertain to planar grid generation. Any book on multi-dimensional al ulus (e.g., Corwin and Sz zarba, [41℄) will provide a more extensive dis ussion of the material on ve tor al ulus, while Struik, [199℄, and Stoker, [197℄, are good referen es for the se tion on di erential geometry. Ideas from matrix theory are extensively dis ussed in Horn and Johnson, [96℄.

4.1 Ve tor Cal ulus Re all that the s alar produ t (or dot produ t) and ve tor produ t (or ross produ t) of two ve tors u = (u1 ; u2 ; u3 ) and v = (v1 ; v2 ; v3 ) are given by

u  v = u1 v1 + u2 v2 + u3 v3 ;

(4.1)

u  v = (u2 v3 u3 v2 ; u3 v1 u1 v3 ; u1 v2 u2 v1 ) :

(4.2)

59



60

1992 by P.M. Knupp, September 8, 2002

The ve tor produ t is often expressed in terms of the determinant of a matrix: 1

0

i j k u  v = det  u1 u2 u3 A : (4.3) v1 v2 v3 If  is the angle between two ve tors and n is a unit ve tor normal to both u and

v, then these produ ts are also given by u  v = juj jvj os() ; u  v = juj jvj sin() n ; (4.4) provided n points in the dire tion given by the right-hand rule for ross produ ts. The following exer ises review some basi ve tor al ulus that is applied in the subsequent development.

Exer ise 4.1.1 Given two ve tors u and v, show that the area of the parallelogram determined by the two ve tors is given by ju  vj. Begin by making a drawing of the plane that ontains u and v. If  is the angle between the two ve tors then from Equation (4.4)

uv juj jvj ; The area is given by A = juj jvj j sin()j. x

os() =

sin() =

ju  vj : juj jvj

(4.5)

Exer ise 4.1.2 Given three ve tors u, v, and w, show that the volume of the parallelepiped determined by the three ve tors is given by the absolute value of the triple s alar produ t, j [u; v; w℄ j, where [u; v; w℄ = u  v  w :

(4.6)

Make a gure and use the results of Exer ise 4.1.1 to illustrate the following omments. The unit ve tor n, normal to u and v, an be omputed using n = u  v=ju  vj and the angle  between n and w is given by os() = n  w=jwj. Your drawing should make it lear that the volume is

juj jvj jwj j os()j j sin()j ;

(4.7)

translating this ba k to s alar and ve tor produ ts gives the result. Note that the triple s alar produ t an be written in several ways in terms of s alar and ve tor produ ts of u, v, and w. x

x

Exer ise 4.1.3 Prove the following identities: 1 0 u1 u2 u3 u  v  w = det  v1 v2 v3 A ; w1 w2 w3 [u; v; w℄ = [v; w; u℄ = [w; u; v℄ ; (u  v)  (w  r) = (u  w)(v  r) (u  r)(v  w) ; u  (v  w) = (u  w)v (u  v)w:

(4.8) (4.9) (4.10) (4.11)

The ve tor produ t u  v is perpendi ular to both u and v; this follows from (4.9): [u; u; v℄ = u  u  v = 0 ; [v; u; v℄ = v  u  v = 0 : (4.12)



61

1992 by P.M. Knupp, September 8, 2002

z tangent

x(ξ )

x(ξ+∆ξ ) secant

y

x

Figure 4.1: Parametri urve

4.1.1 Ve tor Geometry of Curves This se tion des ribes the tangent ve tor to a urve and then uses it to de ne ar length. Coordinates in three-dimensions are x, y, and z and are written as a ve tor x = (x; y; z ). A urve an be given parametri ally by three fun tions x( ), y( ), and z ( ) de ned for 0    1 (see Figure (4.1)). The fun tions x( ), y( ) and z ( ) are assumed ontinuously di erentiable. The parametri des ription of a urve is also given by the ve tor x = x( ). For example, a ir le of radius a in the plane z = b is de ned by

x = a os(2   ) ; y = a sin(2   ) ; z = b ; 0    1 ;

(4.13)

or in ve tor form

x = x( ) = (a os(2   ); a sin(2   ); b) ; 0    1 :

(4.14)

The parameterization need not be taken on the interval [0; 1℄, i.e., 0    1. However, given any urve parameterized by, say,  for 0    1 , where 0 < 1 are given numbers, the urve an be reparameterized using  2 [0; 1℄ by setting  = 1  + 0 (1  ). Parameterizations on [0; 1℄ are onvenient for grid generation. Relationships for urves in the plane an be obtained from the following results on

urves in spa e by eliminating z , or, equivalently, setting z = 0.

Exer ise 4.1.4 Write omputer programs to plot two and three-dimensional

urves (see Appendix B). Su h programs are useful as subroutines in odes that display grids. Use your program to plot the ir le given in (4.13). Modify the formula for z in (4.13) to read z = 5  and then plot the resulting spiral. x



62

1992 by P.M. Knupp, September 8, 2002

The se ant ve tor between the points x( ) and x( +  ) on a urve is given by the ve tor x( ) = x( +  ) x( ) (4.15) (see Figure 4.1). The derivative of the ve tor fun tion x( ) is de ned by x( ) x ( ) = dx ( ) = lim : !0

d



(4.16)

From Figure 4.1 it is lear that x is a tangent ve tor to the urve. Moreover x( )  x ( )  ;

(4.17)

that is, the se ant ve tor is approximated by the tangent ve tor times  , for  suÆ iently small. The fun tion x( ) maps the interval [;  +  ℄ to the ar of the urve between the points x( ) and x( +  ). The length L of this segment is approximately the length of the se ant ve tor: L  jx( +  ) x( )j ;

(4.18)

and by Equations (4.15) and (4.17), L  jx ( )j  =

q

x2 ( ) + y2 ( ) + z2( )  :

(4.19)

Consequently, the ar length L of the urve is given by

L=

Z

0

1

jx ( )j d :

(4.20)

Note that jx j is approximately the length of a small pie e of a urve in physi al spa e that is the image of a segment of length  in logi al spa e. An important point here is that jx j gives the ratio of length in physi al spa e to the length in the parameter spa e be ause, from (4.17), jx j  jxj= .

Exer ise 4.1.5 Write a omputer ode to numeri ally he k the approximation given in Equation (4.19) for the spiral des ribed in Exer ise 4.1.4 (see Appendix B).

x

Exer ise 4.1.6 Compute the length of the spiral given in Exer ise 4.1.4 using (4.20) and a numeri al-integration routine. x

4.1.2 Ve tor Geometry of Surfa es At a point on a surfa e there are two normal ve tors and an in nity of tangent ve tors, i.e., all of the ve tors in the plane tangent to the surfa e. If the surfa e is des ribed parametri ally, then the parameterization de nes a unique normal ve tor and two spe ial tangent ve tors. These ve tors are de ned in this se tion and used to de ne the on ept of surfa e area. Two parameters are needed to parametri ally des ribe a surfa e; the ve tor form of the parametri equation of a surfa e is

x = x(; ) ; 0    1 ; 0    1 ;

(4.21)



63

1992 by P.M. Knupp, September 8, 2002

z

x( ξ+∆ξ,η ) x ∆ξ ξ

x( ξ+∆ξ,η+∆η )

θ

x( ξ,η )

x ∆η η

x( ξ,η+∆η ) y

x

Figure 4.2: Parametri surfa e while the s alar form of the ve tor equation is a set of three equations: x = x(; ) ; y = y(; ) ; z = z (; ) ; (4.22) where, as before, 0    1 and 0    1 (see Figure 4.2). Spheri al oordinates (see Equation (1.40)) an be used to des ribe the surfa e of a sphere of radius a: x = a os(2   ) sin( ) ; y = a sin(2   ) sin( ) ; z = a os( ) ; (4.23) or in ve tor form x = (a os(2   ) sin( ); a sin(2   ) sin( ); a os( )) : (4.24) Here  = 2   is the equatorial angle, while  =   is the polar angle. Exer ise 4.1.7 Obtain a

ess to graphi s software that an be used to plot surfa es. Write a driver routine to plot the sphere given in (4.24) for a = 1. Plot the full surfa e and then use a hidden surfa e algorithm to plot the surfa e. x Exer ise 4.1.8 Use a omputer ode to plot the six logi al-spa e oordinate planes (1) x = ; y = ; z = 0; (4.25) (2) x = ; y = ; z = 1; (4.26) (3) x = 0; y = ; z = ; (4.27) (4) x = 1; y = ; z = ; (4.28) (5) x = ; y = 0; z = ; (4.29) (6) x = ; y = 1; z = ; (4.30) (see Appendix B). As always, 0    1 and 0    1. Is there a preferred way of parameterizing these surfa es? For example, Surfa e (1) ould be parameterized by x = 1  , y = , z = 0, or x = , y =  , z = 0. x



64

1992 by P.M. Knupp, September 8, 2002

If the value of  is xed and  varies, then a urve on the surfa e is generated. The tangent T1 to this urve is given by

T1 = x =

x ; 

(4.31)

(see Figure 4.2). Similarly, if the value of  is xed and  varies then a se ond tangent T2 is given by x T2 = x  = : (4.32)  The urves given by  or  xed are alled oordinate urves. The points

x(; ) ; x( + ; ) ; x(;  + ) ; x( + ;  + ) ;

(4.33)

on the surfa e and the oordinate urves joining them de ne a small pat h on the surfa e (see Figure 4.2). When  and  are suÆ iently small, the parallelogram de ned by the se ant ve tors ,

x( + ; ) x(; ) ; x(;  + ) x(; ) ;

(4.34)

is approximated by the parallelogram de ned by the tangent ve tors T1  and T2 . The area A of the small pat h on the surfa es is approximately the area of the parallelogram determined by the tangent ve tors. This area is given by the length of the ve tor produ t of the two ve tors: A  jx  x j   :

(4.35)

Exer ise 4.1.9 Use a omputer ode (see Appendix B) to plot some oordinate

urves for the surfa e of the sphere given in Equation (4.24). Also plot a few pat hes, se ant, and tangent ve tors for this surfa e, that is, illustrate the dis ussion in the previous paragraph. x The ve tor x  x is perpendi ular to the two tangent ve tors x and x (as is obvious from (4.12) ) and is normal to the surfa e. The pat h on the surfa e that is de ned by the points in Equation (4.33) is the image of this re tangle in logi al spa e given by the points (; ) ; ( + ; ) ; (;  + ) ; ( + ;  + ) ;

(4.36)

the re tangle has area  . The limit of the ratio of the area of the pat h on the surfa e A (see Equation (4.35)) to the area in logi al spa e is A = jx  x j ; lim max( ;)!0  

(4.37)

i.e., the length of the ve tor x  x is the ratio of area on the surfa e to the area in logi al spa e. Consequently, the area A of the surfa e is given by

A=

Z

1Z 1

0 0

jx  x j d d :

(4.38)



65

1992 by P.M. Knupp, September 8, 2002

Exer ise 4.1.10 Show that Z 1Z 1q A= J12 + J22 + J32 d d ; 0 0 where

J1 = det



y y z z



; J2 = det



z z x x



; J3 = det

(4.39) 

x x y y



:

x (4.40)

Exer ise 4.1.11 For a planar urve, x = (x( ); y( ); 0), 0    1, show that a normal to the urve is given by N = (y ; x ; 0). Show that the normal ve tor to the surfa e x = x( ), y = y( ), z =  for 0    1 and 1 <  < 1 is the same as the normal to the urve. x

4.1.3 Normals and Gradients on Impli it Surfa es and Curves Consider a surfa e given impli itly by the equation f (x; y; z ) = C , where C is a

onstant. For example, x2 + y2 + z 2 = 1 des ribes the surfa e of the unit sphere. The gradient of f is de ned by rx f = (fx ; fy ; fz ) : (4.41) Assume that the urve x( ) lies on the surfa e, i.e., The hain rule gives

f (x( ); y( ); z ( )) = C :

(4.42)

fx x + fy y + fz z = 0 ;

(4.43)

i.e.,

rx f  x = 0 (4.44) for every urve on the surfa e. Consequently rx f must be normal to the surfa e and therefore be a s alar multiple of x  x . Curves an be given impli itly as the interse tion of two surfa es:

f (x; y; z ) = C1 ; g(x; y; z ) = C2 ;

(4.45)

where C1 and C2 are onstants. Be ause the urve is in ea h surfa e, rx f and rx g are perpendi ular to the urve, and onsequently, rx f  rx g is tangent to the urve (see Figure 4.3). If the urve is also given parametri ally by x( ), then rx f  rx g is a multiple of x .

4.2 General Coordinate Relationships General oordinate transformations used in grid generation are often spe i ed in terms of equations involving the inverse map. The relationship between the map and its inverse is expressed in terms of the tangents to the oordinate lines and the normals to the oordinate surfa es, showing that these ve tors form a bi-orthogonal set. Formulas for these relationships are derived for one, two, and three dimensions; the urve and surfa e ases are onsidered brie y.



66

1992 by P.M. Knupp, September 8, 2002

z



f



g

x

x

x ξ

y

x

Figure 4.3: Impli it urve

4.2.1 Coordinate Relationships In One Dimension This is a review of the line ase of the previous hapter. Let a one-to-one transformation and its inverse be given:

x = x( ) ;  =  (x) :

(4.46)

The fa t that these transformations are inverses of ea h other implies that

x = x( (x)) ;  =  (x( )) :

(4.47)

The Ja obian matrix J is the trivial one-by-one matrix,   = ( x ) ; J = x 

(4.48)

and the determinant of J is just the entry in the matrix:

J = J ( ) = x :

(4.49)

Although the Ja obian is trivial in this ase, J is retained in the formulas to follow, so that they an be ompared to the formulas for higher-dimensions. As noted in Chapter 1, Preliminaries, the assumption that the transformation is one-to-one implies that J 6= 0. If the Ja obian is negative on [0; 1℄, then the transformation an be repla ed by the new transformation x = x(1  ) and the Ja obian of this transformation will be positive. From now on, the Ja obian will be assumed positive.

x

Exer ise 4.2.1 Show that the Ja obians of x( ) and x(1  ) have opposite signs.



1992 by P.M. Knupp, September 8, 2002

67

variable onstant tangent  - urve   x - urve   x Table 4.1: Coordinate urves Di erentiating the rst equation in (4.47) with respe t to x, and applying the

hain rule gives x x = 1 ; (4.50) or 1 x = : (4.51) x Sin e J = x , (4.50) an be expressed as JJ 1 = 1. The analog of this formula in higher dimensions plays an important role in grid-generation theory. This is nothing but the standard rule for omputing the derivative of the inverse of a fun tion; it is usually written using di erentials: 1 d = : dx dx=d

(4.52)

Exer ise 4.2.2 Di erentiate the se ond equation in (4.47) with respe t to  to

re-derive (4.51).

x

4.2.2 Coordinate Relationships In Two Dimensions In Se tion 1.3 general oordinates for a region  R2 in physi al spa e are given

by a map x = x( ) from the unit square U = U2 to . The map an be written using

oordinates as x = x(; ) ; y = y(; ) ; (4.53) where 0    1 and 0    1. The map is assumed to be invertible; the inverse is written  =  (x), or in oordinates

 =  (x; y) ;  = (x; y) :

(4.54)

A oordinate urve is given when one of the logi al variables is held onstant and the other allowed to vary. A  - oordinate urve is given when  varies and  is onstant; a tangent ve tor to this urve is given by x . A similar result holds for  and  inter hanged (see Table 4.1 and Figure 4.4). Holding one of the logi al

oordinates onstant gives an impli it equation for a oordinate urve; for example,  =  (x; y) with  onstant is an impli it equation for an  oordinate urve. In three dimensions (see Se tion 4.2.3 below), holding  onstant gives a oordinate surfa e. The two-dimensional ase is a bit more onfusing than the three-dimensional ase, be ause, in two dimensions, the oordinate surfa es are the same as the oordinate

urves. To be onsistent with the three-dimensional ase, when the oordinate urves are given impli itly, they will be alled oordinate surfa es. Thus the  - oordinate

urve is the same as the - oordinate surfa e. A normal to the - oordinate surfa e is given by rx . A similar result holds for an  - oordinate surfa e (see Table 4.2).



68

1992 by P.M. Knupp, September 8, 2002

ξ line η surface

x ξ

y



∆ xξ

∆ x

η x η line ξ surface

Figure 4.4: Coordinate lines

variable onstant normal  -surfa e   rx  -surfa e   rx  Table 4.2: Coordinate surfa es



69

1992 by P.M. Knupp, September 8, 2002

The fa t that the maps (4.53) and (4.54) are inverses implies that x( (x)) = x and  (x( )) =  . The rst relationship, in oordinates, is

x( (x; y); (x; y)) = x ; y( (x; y); (x; y)) = y :

(4.55)

Using the hain rule to di erentiate ea h of these equations with respe t to x and y, produ es four equations:

x x + x x = 1 ; x y + x y = 0 ; y x + y x = 0 ; y y + y y = 1 : These equations an be written in matrix form: 

x x y y



x y x y





=

1 0 0 1



:

(4.56) (4.57)

(4.58)

Re all that the Ja obian matrix J for the present ase is de ned by 

J = xy xy



:

(4.59)

Equation (4.58) implies that J is invertible, and its inverse J 1 is given by 

J 1 = xx yy so that (4.58) be omes



:

(4.60)

J J 1 =I;

(4.61) where I is a 2  2 identity matrix. Be ause J is invertible, (4.61) implies that J 1 J = I . The next exer ise shows how to derive this last relationship from the

hain rule.

Exer ise 4.2.3 Di erentiate (4.54) with respe t to the logi al variables to show

that J 1 J = I .

x

The Ja obian J of the map is given by the determinant of the Ja obian matrix:

J = det(J ) = x y

x  y :

(4.62)

The fa t that the determinant of the inverse of a matrix is the inverse of the determinant is expressed by det(J 1 ) = 1=J . The inverse of the Ja obian matrix

an be omputed using ofa tors:

J 1 = J1



y y

x x



:

(4.63)

Exer ise 4.2.4 Che k Formula (4.63). x Comparing Equations (4.60) and (4.63) gives a set of four equations for transforming derivatives of the inverse transformation to derivatives of the transformation y x x =  ; y =  ; (4.64) J J y x x = ; y =  ; (4.65) J J



1992 by P.M. Knupp, September 8, 2002

70

variable onstant tangent  - urve  ,  x - urve  ,  x  - urve  ,  x Table 4.3: Coordinate urves these equations an be solved for the derivatives of the transformation, whi h gives the inverse relationship:

x = J  y ; x = J  y ; (4.66) y = J x ; y = J x : (4.67) Exer ise 4.2.5 Show that det(J 1 ) = x y y x = 1=J using Formulas (4.64)(4.65). x Exer ise 4.2.6 Verify that the results of Exer ise 4.2.3, that is, J 1 J = I , an be written in terms of ve tors as

x  rx  = 1 ; x  rx  = 0 ; x  rx  = 0 ; x  rx  = 1 :

(4.68) (4.69)

Sets of ve tors satisfying this type of relationship are alled biorthogonal (see Figure 4.4). x

4.2.3 Coordinate Relationships In Three Dimensions In Se tion 1.3 general oordinates for a region  R3 in physi al spa e are given

by a map x = x( ) from the unit ube U = U3 to . The map an be written using

oordinates as x = x(; ;  ) ; y = y(; ;  ) ; z = z (; ;  ) ; (4.70) where 0    1, 0    1, and 0    1. The map is assumed to be invertible; the inverse is written  =  (x), or in oordinates,

 =  (x; y; z ) ;  = (x; y; z ) ;  =  (x; y; z ) :

(4.71)

A oordinate urve is given when two of the logi al variables are held onstant and the third allowed to vary; this produ es three types of oordinate urves and their asso iated tangent ve tors (see Table 4.3 and Figure 4.5). A oordinate surfa e is given when one of the logi al variables is held onstant and the other two allowed to vary; i.e., the surfa e is given impli itly. There are three types of oordinate surfa es and their asso iated normal ve tors (see Table 4.4 and Figure 4.5). Be ause the  and  oordinate urves lie in the  oordinate surfa e (and so forth for all y li permutations of the logi al variables), the normal ve tor must be proportional to the ve tor produ t of the two tangents:

rx  / x  x ; rx  / x  x ; rx  / x  x :

(4.72)



71

1992 by P.M. Knupp, September 8, 2002

variable onstant normal  -surfa e ,   rx  -surfa e ,   rx   -surfa e ,   rx  Table 4.4: Coordinate surfa es

z



ζ line x ζ





x

η line

ξ ξ line

x

Figure 4.5: Coordinate urves and surfa e

y



72

1992 by P.M. Knupp, September 8, 2002

The fa t that the maps (4.70) and (4.71) are inverses implies that x( (x)) = x and  (x( )) =  or, in oordinates the rst relationship gives

x( (x; y; z ); (x; y; z );  (x; y; z )) = x ; y( (x; y; z ); (x; y; z );  (x; y; z )) = y ; z ( (x; y; z ); (x; y; z );  (x; y; z )) = z :

(4.73) (4.74) (4.75)

Di erentiating ea h of these equations with respe t to x, y, and z using the hain rule produ es nine equations. These equations an be ompa tly written using matri es: 0 

10

x x x y y y z z z

A

x y z x y z x y z

1

0

A

=

Re all that the Ja obian matrix J for this ase is 0

J =

x x x y y y z z z

1 0 0 0 1 0 0 0 1

1 A

:

(4.76)

1 A

:

(4.77)

Equation (4.76) says that J is invertible and its inverse J 1 is given by 0

J 1=

x y z x y z x y z

1 A

:

(4.78)

As before, (4.76) implies that J J 1 = I , and be ause J is square, that J 1 J = I . The next exer ise shows how to derive this last fa t from from the hain rule.

Exer ise 4.2.7 Di erentiate  (x( )) =  with respe t to the logi al variables to show that J 1 J = I is obtained. x The Ja obian J of the map is given by the determinant of the Ja obian matrix

J = det(J ) = +x y z + x y z + x y z x y z x y z x y z :

(4.79)

The fa t that the determinant of the inverse of a matrix is the inverse of the determinant gives det(J 1 ) = 1=J . The inverse of the Ja obian matrix an be

omputed using ofa tors:

J 1 = J1

0 

y z y z y z

y  z x  z y  z x  z y z x z

x z x y x z x y x z x y

x y x y x y

1 A

:

(4.80)

Comparing Equations (4.78) and (4.80) gives a set of nine equations for transforming derivatives of the inverse transformation to derivatives of the transformation; these equations an be solved for the derivatives of the transformation, whi h gives the inverse relationship.

Exer ise 4.2.8 The Ja obian matrix is given by a matrix of olumn ve tors,

J = (x ; x ; x ) ;

(4.81)



73

1992 by P.M. Knupp, September 8, 2002

and the inverse of the Ja obian matrix (Equation (4.78)) an be written as the transpose of a matrix of olumn ve tors:

J 1 = (rx ; rx ; rx  )T :

(4.82)

Show that

rx  = J1 x  x ; rx  = J1 x  x ; rx  = J1 x  x : x

(4.83)

Exer ise 4.2.9 Show that the Ja obian and its inverse are given by triple s alar J = [x ; x ; x ℄ ; J 1 = [rx ; rx ; rx  ℄ : x (4.84)

produ ts

Some of the quantities introdu ed in this hapter provide important measures of size, that is lengths, areas, and volumes. These measures are best expressed in terms of ratio of sizes in physi al spa e to sizes in logi al spa e. To summarize:

 jx j, jx j, and jx j give ratios of lengths;  jx  x j, jx  x j, and jx  x j give ratios of areas;  J gives a ratio of volumes.

Exer ise 4.2.10 Verify that the results of Exer ise 4.2.7, that is, J 1 J = I ,

an be written in terms of ve tors as

x  rx  = 1 ; x  rx  = 0 ; x  rx  = 0 ;

x   rx  = 0 ; x   rx  = 1 ; x   rx  = 0 ;

x   rx  = 0 ; (4.85) x   rx  = 0 ; (4.86) x   rx  = 1 : (4.87) Sets of ve tors satisfying this type of relationship are alled biorthogonal. x The ve tors introdu ed are so important that they have spe ial names:

 x , x , and x are ovariant tangent ve tors;  rx  , rx , and rx  are ontravariant normal ve tors.

The ovariant and ontravariant terminology refers to transformations of physi al spa e to itself; analyzing the situation using linear transformations is suÆ ient. Assume that a linear transformation

w = Ax; that is,

wi =

3 X j =1

Ai;j xj ;

(4.88) (4.89)

of physi al spa e to itself is given. Also, suppose that a transformation x = x( ) of logi al spa e to physi al spa e is given. We want to illustrate how quantities are

ovariant with respe t to the transformation generated by A (not the transformation x( )). Re all that xi is a tangent ve tor to oordinate urve. Di erentiating (4.88) with respe t to i gives (4.90) wi = A xi ;



74

1992 by P.M. Knupp, September 8, 2002

that is, the tangent ve tors transform in the same way as the oordinates of physi al spa e. This is what is meant by ovariant. The inverse of the transformation from logi al spa e to physi al spa e is given by  =  (x) and a oordinate surfa e given by i (x) = C where C is a onstant. A normal to this surfa e is given by rx i . Di erentiating i (x) = C with respe t to w and using the hain rule with (4.88) gives

rw i = (A 1 )T rx i ;

(4.91)

rx i = AT rw i :

(4.92)

that is,

This is what is meant by a ontravariant ve tor.

4.2.4 Coordinate Relationships On Curves and Surfa es The Ja obian matrix (1.9) for both urves and surfa es is not square and thus

annot have an proper inverse. Re all that a urve is de ned parametri ally by three fun tions of a single variable:

x = x( ) ; y = y( ) ; z = z ( ) : The Ja obian matrix for a urve is

0

J =

x y z

(4.93)

1 A

:

(4.94)

A surfa e is de ned parametri ally by three fun tions of two variables:

x = x(; ) ; y = y(; ) ; z = z (; ) : The Ja obian matrix for a surfa e is

0

J =

x x y y z z

(4.95)

1 A

:

(4.96)

The fa t that the urve and surfa e Ja obians are not square is a signi ant in onvenien e that an be over ome by introdu ing the metri matrix (or metri tensor), whi h is well known in di erential geometry. Further dis ussion of the issues raised in this se tion are reserved for Chapter 10, Variational Grid Generation on Curves and Surfa es.

4.3 Elementary Di erential Geometry The metri tensor and its appli ations to grid generation are des ribed in this se tion. Formulas for the Ja obian matrix an be summarized ni ely using index notation. Re all that x = (x1 ; x2 ;    ; xn ) and  = (1 ; 2 ;    ; k ) and that the Ja obian matrix J was de ned in Equation (1.9) as i Jij = x ; i = 1; : : : n ; j = 1; : : : k :  j

(4.97)



1992 by P.M. Knupp, September 8, 2002

75

The metri matrix or metri tensor G is one of the important obje ts introdu ed in elementary di erential geometry. This matrix is important in grid generation be ause its elements have a geometri interpretation; onsequently, many grid-generation algorithms are de ned in terms of elements of this matrix, its inverse, and its determinant. The matrix is de ned for urves, surfa es, and regions, i.e., all of the obje ts given in Table 1.2. For a k dimensional obje t, that is, when logi al spa e has dimension k, the metri matrix G is k by k and is de ned by G = JT J : (4.98) For example, the Ja obian matrix for a surfa e (see Equation (4.96)) is 1 0 x x (4.99) J =  y y A ; z z so for a surfa e, the metri matrix is 2  2 and is given by   2 2 2 (4.100) G = x xx ++yy y++zz z x xx 2++yy 2y++z 2z z :    In general, the metri g is de ned as g = det(G ) (4.101) and, onsequently, det(G 1 ) = 1=g. For square matri es, the determinant of a produ t of matri es is the produ t of their determinants and the determinant of a transpose is the same as the determinant. For the ase k = n, J is square; be ause Equation (4.98) de nes G by G = J T J , g is given by g = J 2 , where J = det(J ). Thus p (4.102) J = g: p Based on this identity, the notation J is repla ed byp g from here on. It is onvenient and often important to write formulas in terms of g instead of J . The formulas for the entries gi;j of G are easy to write using indexed variables:

gi;j = or in ve tor notation

n X

xl xl ; 1  i; j  k ; l=1 i j

(4.103)

(4.104) gi;j = xi  xj ; 1  i; j  k : Inter hanging i and j in this de nition does not hange the formula, so the metri matrix is symmetri (this is also seen from (4.98)). It is the ve tor de nitions that are the most useful for understanding the geometry of a transformation: gi;j is the dot produ t of the tangent ve tor to the i-th oordinate urves with the tangent ve tor to the j -th oordinate urve. In parti ular, a oordinate system is orthogonal if and only if the tangents to the oordinate urves are perpendi ular: (4.105) xi  xj = 0 ; i 6= j : Thus a oordinate system is orthogonal if and only if gi;j = 0 ; i 6= j ; (4.106) that is, G is diagonal. Another use of the metri matrix is illustrated in the following proposition (see Se tion 1.3 for the notation and de nitions).



76

1992 by P.M. Knupp, September 8, 2002

PROPOSITION 4.1 For k  n, a map from the logi al region Uk to a physi al region nk is nonsingular at  if and only if g 6= 0 at  . Proof. Re all that G = J T J (see 4.98). If k = n, then J is square and det(G ) = (det(J ))2 and the result follows by the orollary to the Inverse Mapping Theorem 1.1. For the general ase, rst assume that det(G ) = 0. Then there is a nonzero ve tor v su h that G v = 0. This implies that J T J v = 0 and then that v  J T J v = 0. However, v  J T J v = J v  J v = jJ vj2 , and onsequently jJ vj = 0, whi h implies that, J v = 0, or that the mapping is singular. On the other hand, if the mapping is singular, then there is a nonzero ve tor v su h that J v = 0 and thus that G v = J T J v = 0. This implies that det(G ) = 0. x When k = n, the entries of the inverse of the Ja obian matrix are given by [J 1 ℄i;j = (i =xj ) : Moreover,

G 1 = (J T J ) 1 = J 1 (J T ) 1 = J 1 (J 1 )T ; and onsequently the omponents gi;j of G 1 an be written gi;j =

n X

i j ; 1  i; j  n : x l=1 l xl

(4.107) (4.108) (4.109)

When k = n, the entries in the inverse of the Ja obian matrix an also be written as ve tor produ ts: gi;j = rx i  rx j : (4.110) Thus gi;j is the dot produ t of a normal to the i-th oordinate surfa e with a normal to the j -th oordinate surfa e.

Exer ise 4.3.1 In the ase k = n = 3, use (4.83) and the identity (4.10) to show

that

1 gi;l = [gj;m gk;n gj;n gk;m ℄ (4.111) g with y li permutations on (i; j; k) and (l; m; n) for i; l = 1; 2; 3. Show that this result

an also be obtained by dire tly inverting the metri matrix (i.e., expli itly ompute (4.108). x Additional relevan e of the metri matrix an be seen from the formula for

omputing the length of a urve on a surfa e. Assume that a urve parameterized by  , x = x( ), 0    1, is given in physi al spa e. Formula (4.20) gives the length of the urve as Z 1 dx L = j j d ; (4.112) 0 d where r dx j d j = ddx  ddx : (4.113) Be ause physi al spa e is mapped to logi al spa e by  =  (x), the urve in physi al spa e is mapped to a urve in logi al spa e given by  ( ) =  (x( )). Assume



1992 by P.M. Knupp, September 8, 2002

77

that logi al spa e has dimension k and is a subset of E n . Then the hain rule an be used to expand the derivatives: k dx X  x di = ; d i=1 i d

(4.114)

k k di dj dx dx X  x  x di dj X g   = = : d d i;j=1 i j d d i;j=1 i;j d d

(4.115)

and onsequently,

The last sum in the previous equation is alled the First Fundamental Form in di erential geometry texts. The derivative of the ve tor fun tion  with respe t to  , d=d , is a tangent ve tor to the logi al-spa e image of the physi al-spa e urve. The last part of Equation (4.115) should be thought of as a spe ial dot produ t, determined by gi;j , of the tangent ve tors to the urve in logi al spa e. Thus the metri matrix gives the relationship of the length of a urve in physi al spa e to the length of its image in logi al spa e.

4.4 Ve tor Cal ulus and Di erential Geometry in the Plane Previous results of this hapter are spe ialized to the planar ase in this se tion. This material is primarily used in Se tion 5.6 of the next hapter, Controlling the Grid Near the Boundary; it also serves to build geometri intuition involving relationships whi h hold in the plane. This intuition is useful, for example, in interpreting and suggesting variational grid generation prin iples. First-order relationships involving the tangent ve tors and their perpendi ulars are introdu ed. The perpendi ulars are related to the ontravariant normals. Se ond-order di erential relationships begin with the planar metri identity, whi h an be expressed in terms of the Beltrami operator. Rates-of- hange of the elements of the metri matrix are related to various inner produ ts of the tangent ve tors with the se ond-order ve tors and then onne ted to the Gauss Identities. The se tion ends with a de nition of oordinate-line urvature and a dis ussion of the parallel tangent ondition.

4.4.1 First-Order Relationships Let the point x = (x(; ); y(; ); 0) in the physi al plane be the image of the point (; ) in logi al spa e. The ovariant tangent ve tors of the mapping are x = (x ; y ; 0) and x = (x ; y ; 0); these learly lie in the plane and are tangents to the oordinate lines of the grid. The unit normal to the plane is k^ = (0; 0; 1). Re all that the rst-order planar metri s are de ned in terms of inner produ ts of the

ovariant tangent ve tors (4.116) gij = xi  xj : The ve tor ross produ t J = x  x is normal to both ovariant tangents. Sin e the tangents p lie in the plane, J is parallel to k^. The length of the normal is given by the quantity g, i.e., J = pg k^ where pg is de ned by

pg = x y x y :    

(4.117)



78

1992 by P.M. Knupp, September 8, 2002

The square of the length of J is

2 : g = g11 g22 g12 As noted previously, the quantity element bounded by the tangents.

pg

(4.118)

represents the lo al area of the di erential

Exer ise 4.4.1 Verify the identity g = (x2 + y2 ) (x2 + y2 ) (x x + y y )2 : using the de nition of J.

(4.119)

x

The planar ontravariant normals were de ned in Se tion (4.2.2), i.e., rx  = (x ; y ; 0) and rx  = (x ; y ; 0). These are the normals to the oordinate surfa es. Both the ovariant tangents and ontravariant normals play a key role in the theory of this hapter. However, it is sometimes more onvenient to work with the following tangent perpendi ulars to the ovariant tangents x? = ( y ; x ; 0) ; (4.120) ? x = ( y ; x ; 0) (4.121) 

instead of the ontravariant normals. From (4.64) and (4.65), it is lear that (4.122) x? = +pg rx  ; p ? g rx  ; (4.123) x = i.e., the perpendi ulars are merely are re-s alings of the lengths of the ontravariant normals.

Exer ise 4.4.2 Verify that x? = k^  x ; x? = k^  x : x

(4.124) (4.125)

Table 4.5 summarizes the inner produ ts of the ovariant and ontravariant ? normals. Note, in parti ular, that x  x?  = 0 and x  x = 0.



x x x? x?

x g11 g12 0

pg

x g12 g22

pg 0

x?

0 pg g11 g12

x?

pg

0 g12 g22

Table 4.5: Planar inner produ t relationships Sin e the tangent perpendi ulars lie in the plane, they may be resolved as a linear

ombination of the ovariant tangents (see the following exer ise).



79

1992 by P.M. Knupp, September 8, 2002

Exer ise 4.4.3 Use the inner produ t Table 4.5 to express the perpendi ulars x? and x? in terms of the ovariant tangents, obtaining the useful identities: g x g x x? = 11 p 12  ; (4.126) g x? = g22 x g12 x

pg



x

(4.127)

4.4.2 Se ond-Order Relationships Relations (4.126)-(4.127), may be ombined with the easily- he ked identity

 ?  ? x + x =0    

(4.128)

to obtain the planar metri identity

 g22 x g12 x  g x g x ( ) + ( 11 p 12  ) = 0: pg   g This identity holds for any oordinates in the plane. Let f (; ) Beltrami operator B is de ned (Struik, [199℄) by B f =

(4.129)

2 C2 on U2 .

 g11 f g12 f ( )℄: p1g [  ( g22 fpgg12 f ) +  pg

The

(4.130)

Note that the Beltrami operator is the Lapla ian if the metri matrix is trivial. The metri identity may thus be ompa tly written B x = 0. The metri identity is shown in Se tion 8.3.2 to be a onsequen e of a ertain variational prin iple.

Exer ise 4.4.4 Compute the Beltrami operator for polar oordinates. x The se ond-derivative ve tors x , x , and x lie in the plane. As a dire t

al ulation shows, the following inner produ t identities relate the se ond derivative ve tors to the rate-of- hange of the various rst-order metri s: x  x = 1 (g11 ) ; (4.131) 2 x  x = 1 (g11 ) ; (4.132) 2 1 (4.133) x  x = (g12 ) 2 (g22 ) ; 1 (g ) ; (4.134) x  x = (g12 ) 2 11  1 x  x = (g22 ) ; (4.135) 2 1 x  x = (g22 ) : (4.136) 2 Exer ise 4.4.5 Derive formula (4.133). x Be ause the ve tors xi j are in the plane and x and x are a basis, xi j an be written as a linear ombination of x and x . Formulas (4.131) through (4.136) an be used to nd the oeÆ ients of the linear ombination. This results in the well-known



1992 by P.M. Knupp, September 8, 2002

80

Gauss identities whi h resolve the se ond-order ve tors in terms of the ovariant tangents:

x = 111 x + 211 x ; x = 112 x + 212 x ; x = 122 x + 222 x ; where the S hwarz-Christo el symbols are given by 2 g 111 = g22 (g11 ) g12 [2 (g12 ) (g11 ) ℄ ; 2 g 211 = g12 (g11 ) + g11 [2 (g12 ) (g11 ) ℄ ; 2 g 112 = g22 (g11 ) g12 (g22 ) ; 2 g 212 = g11 (g22 ) g12 (g11 ) ; 2 g 122 = g12 (g22 ) + g22 [2 (g12 ) (g22 ) ℄ ; 2 g 222 = g11 (g22 ) g12 [2 (g12) (g22 ) ℄ : Exer ise 4.4.6 Derive one of the formulas (4.140)-(4.145). x

(4.137) (4.138) (4.139) (4.140) (4.141) (4.142) (4.143) (4.144) (4.145)

One usually sees these equations in onne tion with surfa es (planar regions being a spe ial ase). In the surfa e ase, terms proportional to the unit surfa e normal ve tor must be added to the expressions (4.137)-(4.139). Exer ise 4.4.7 Use the appropriate entries in Table 4.5 to show that p ? ( g) = x? (4.146)   x x  x ; p ? (4.147) ( g) = x?   x x  x : x Holding  xed at  = 0 de nes the urve x(0 ; ), whi h is referred to as a

onstant  - line; similarly, the urve x(; 0 ) is referred to as a onstant -line. The

urvature of these oordinate lines is de ned by x?  x 1 =  3=2 ; (4.148) g22 x?  x (4.149) 2 =  3=2 ; g11 with 1 being the urvature of the  -line and 2 being the urvature of the -line (further dis ussion of urvature an be found in Chapter 10). Exer ise 4.4.8 Use the Gauss Identities to express the two urvatures in terms of the rate-of- hange metri s. x As an example of the usefulness of the use of the various relations dis ussed in this se tion, the ondition for parallel tangents (see Figure 4.6) is derived. The ondition for x to be parallel to itself along onstant  lines is that x (; 1 ) / x (; 2 ) (4.150) for 1 andp 2 . If the ve tors in (4.150) are divided by their lengths, pg11any (; 1 ) p and g11 (; 2 ), the resulting unit ve tors have the same dire tion, that is, x (; )= g11 (; ) is independent of . Thus,  x = 0; (4.151)  pg11



81

1992 by P.M. Knupp, September 8, 2002

η

x (ξ,η ) 3 ξ

y

3

η

x (ξ,η ) 2 ξ

x (ξ,η ) 1 ξ

2

η

1

x

Figure 4.6: Parallel Tangents i.e., the rate of hange of the dire tion of the unit tangent along x is zero in the dire tion (note that the length of x an hange). This ondition an also be expressed as x = 1 (g11 ) x (4.152) 2 g11 i.e., x is parallel to x along the onstant  line.

Exer ise 4.4.9 Show that (4.138) and the onditions 212 = 0 ; 112 =  log pg11 : 

are suÆ ient to guarantee parallel tangents.

x

(4.153) (4.154)

Chapter 5

Classi al Planar Grid Generation 5.1 Introdu tion This hapter is devoted to des ribing some basi planar grid generation algorithms. The word lassi al in the title refers to grid generators originally derived from nonvariational methods; these generally appeared in the 1970's to mid-80's. The term should not be regarded as perjorative sin e these methods form the ba kbone of most grid generation software urrently in use. This hapter begins with a statement of the basi planar grid generation problem (Se tion 5.2). Although the trans nite interpolation method (previously dis ussed in Se tion 1.5) is a solution to the basi problem, it has signi ant limitations. Thus other approa hes to the basi problem are often preferred. The other approa hes in this hapter are divided between non-ellipti generators (Se tion 5.3) and ellipti generators (Se tion 5.4). This division re e ts the authors' bias towards ellipti generators; onsiderably more spa e is devoted to the dis ussion of ellipti grid generation in this book. The justi ation for this bias is that ellipti grid generators give smooth grids; further, they are quite exible about the hoi e of boundary parameterization. The major drawba k of the ellipti approa h is the relative slowness of the method, as onsiderably more omputational work is generally needed to solve ellipti equations than most of the non-ellipti methods (ex ept the biharmoni approa h). There are ertainly situations when a nonellipti generator is advantageous, so a brief survey of su h methods is also provided. Non-ellipti methods in lude algebrai grid generators (se tion 5.3.1), onformal and quasi- onformal mapping te hniques (Se tion 5.3.2), and orthogonal (Se tion 5.3.3), hyperboli (se tion 5.3.4), paraboli (Se tion 5.3.4), and biharmoni (Se tion 5.3.5) grid generators. Ellipti methods generate grids by solving boundary-value problems for ellipti partial di erential equations. For general ba kground information on ellipti partial di erential equations see Birkho and Lyn h, [19℄, for a dis ussion having a numeri al slant or see Epstein, [70℄, for a more mathemati al approa h. Two ellipti grid generators frequently appear in lassi al grid generation; these are often referred to as the \Length" (Se tion 5.4.1) and \Smoothness" (se tion 5.4.2) generators. The former is based on Amsden and Hirt, [3℄, and is dis ussed mainly be ause its 82



83

1992 by P.M. Knupp, September 8, 2002

simpli ity provides a useful introdu tion to the subje t of ellipti grid generation. The Smoothness generator is usually preferred due to it's onsiderable robustness against folding (but see Se tion 5.4.3 for an ex eption). This generator is based on Winslow, [231℄. It was extended and developed into a powerful tool by Thompson, Thames, and Mastin, [208℄, thus the method is also referred to as the homogeneous Thompson-Thames-Mastin or TTM generator. The homogeneous TTM generator an produ e reasonable grids on a wide variety of regions, but ontains no me hanism for ontrolling the interior grid other than through the boundary parameterizations. Thompson, Thames, and Mastin, [208℄, added for ing or inhomogeneous terms to the Winslow di erential equation to gain

ontrol over the interior. Unfortunately, the added terms introdu e a variety of arbitrary parameters that a user must spe ify and whose impa t on the grid is impre ise. The net result is that e e tive use of the inhomogeneous generator is an art instead of an automati pro ess. A dis ussion of the inhomogeneous TTM method is found in (Se tion 5.5). Often ontrol over the grid is desired near the boundary of the domain instead of the interior; the most su

essful method of addressing this need is the Steger-Sorenson method, des ribed in Se tion 5.6.2. Closely related to the subje t of inhomogeneous grid generation is that of solution-adaptive methods (Se tion 5.7); one lassi al approa h (Adaption with Inhomogeneous TTM, Se tion 5.7.1) and one non- lassi al approa h (the Deformation method, Se tion 5.7.2) are outlined at the end of this hapter.

5.2 The Planar Grid-Generation Problem The basi problem of planar grid generation is: given a simply- onne ted region

 R2 in physi al spa e, nd a mapping x = x(; ) from the unit square U2 in logi al spa e E 2 to the region . The physi al region is spe i ed by giving its boundary; this may be done by giving a set of four parametri maps

xb (s) ; xt (s) ; 0  s  1 ;

(5.1)

xl (s) ; xr (s) ; 0  s  1 : (5.2) (see Figure (1.12)). The subs ripts on x stand for bottom, top, left, and right boundaries of the logi al domain. In omponents, the required boundary maps are

xb (s) ; xt (s) ; xl (s) ; xr (s) ; yb (s) ; yt (s) ; yl (s) ; yr (s) ;

(5.3) (5.4)

while the desired map is written in omponents as

x = x(; ) ; y = y(; ) :

(5.5)

It is important that the four onsisten y he ks for the boundary maps given in Table 1.3 be satis ed. The basi problem has a number of important variations. For example, the given boundary of the region may be re-parameterized before extension to the interior is performed. Thus, if s = s(r) with 0  r  1, then the omposite fun tion xb = xb (s(r)) = x^ b (r) is a re-parameterization of the bottom boundary of . Re-parameterization is an important te hnique sin e the original boundary parameterization is frequently in onvenient.



1992 by P.M. Knupp, September 8, 2002

84

Exer ise 5.2.1 Give a re-parameterization of the left and right boundaries of the Modi ed Horseshoe domain (1.34) that on entrates grid lines towards the bottom boundary of the Horseshoe if trans nite interpolation is used to generate the grid. x Another modi ation of the basi planar grid generation problem is to redu e the number of boundaries that are to be t. For example, only three boundaries are needed in some approa hes to orthogonal grid generation Eiseman, [62℄, and only one boundary need be given in hyperboli grid generation. Of ourse, the other boundaries are then free and thus beyond user ontrol. The requirement that the region be simply onne ted may sometimes be relaxed by introdu ing uts into the physi al domain. For example, an annulus entered at the origin an be ut along the positive x-axis to redu e it to a simply onne ted domain. Regions having higher degrees of onne tivity an sometimes be treated by introdu ing multiple uts. Finally, regions not topologi ally equivalent to a square may require modi ation of the logi al domain. See the rst hapter of Thompson, Warsi, and Mastin, [215℄, for an extensive dis ussion of these latter points. The transformations are omputed using dis rete approximations. Grids in physi al and logi al spa e are set up as in Se tion 2.4, that is, let M and N be positive integers and de ne the logi al-grid points (i ; j ) by

j i ; 0  i  M ; j = ; 0  j  N : (5.6) M N Also, let  = 1=M and  = 1=N . The transformation x = x(; ), y = y(; ),

arries the logi al-spa e grid to a physi al-spa e grid xi;j = (xi;j ; yi;j ) where i =

xi;j = x(i ; j ) ; yi;j = y(i ; j ) ; 0  i  M ; 0  j  N :

(5.7)

The trans nite interpolation map dis ussed in Se tion 1.5 is an example of a map that solves the basi planar grid generation problem (the reader should review Se tion 1.5). Trans nite interpolation maps are useful in their own right and as initial guesses for maps that are omputed using iterative algorithms. As previously noted, su h maps are limited by their la k of smoothness and potential for folding. Many other approa hes to the planar grid generation problem have been proposed; a survey of some of these approa hes follows in the next se tion.

5.3 Non-Ellipti Grid Generators Useful non-ellipti grid generators are brie y des ribed in this se tion. The fa t that these appear in this hapter on planar grid generation is merely a matter of

onvenien e; most of the non-ellipti approa hes given here have extensions to three dimensions (orthogonal and onformal being the most diÆ ult to extend).

5.3.1 Algebrai Grid Generation Algebrai grid generation methods have been extensively developed to take advantage of their two main strengths: rapid omputation of the grids ompared to partial di erential equation methods and dire t ontrol over grid point lo ations. These advantages are somewhat o set by the fa t that algebrai methods la k any guarantee of grid smoothness; in parti ular, boundary slope dis ontinuities may propagate into the interior.



85

1992 by P.M. Knupp, September 8, 2002

y

v (ξ) 2 r (η) 2

v (ξ) 1 r (η) 1

v (ξ) 0 r (η) 0

x

Figure 5.1: Algebrai grid generation using multiple urves The basi method of algebrai grid generation is trans nite interpolation (Gordon and Hall, [85℄), a spe ial ase of whi h has been des ribed in Se tion 1.5. Surveys of trans nite interpolation are given in Thompson et al., [215℄ and Gordon and Thiel, [86℄. Algebrai methods begin with trans nite interpolation whi h has its origin in the methods of surfa e generation in omputer-aided design (CAD). The basi building blo k is uni-dire tional interpolation along a non-denumerable set of points (also referred to as a \shearing transformation"). Suppose K + 1 planar urves f vk ( ), k = 0; 1;    ; K g are given and the goal is to interpolate a grid between these urves (see Figure 5.1). This may be a

omplished using

x(; ) =

K X k=0

k () vk ( ) ;

(5.8)

where the k () are interpolating polynomials: k (j ) = Æjk . Note then that

x(; j ) = vj ( ) for 0  j  K , that is, the urves have been interpolated. The simplest hoi e for the fun tions k are the Lagrange Interpolating Polynomials of degree K : k () =

K Y

 j k j

(5.9) j=0 j 6= k with j = j=K . Re all that this is a K -th degree polynomial whi h is 1 at  = k and zero at  = j , j 6= k. The K + 1 urves an be used to ontrol the grid in the interior of the domain. Proje t 5.3.1 Write a ode (see Appendix B) to perform the uni-dire tional interpolation des ribed above. Use the set of paraboli urves uk ( ) = (1 + K k)  ; (5.10)



86

1992 by P.M. Knupp, September 8, 2002

vk ( ) = k (1 +  2 ) :

(5.11)

Prove analyti ally that for xed  = 0 , the oordinate urves are straight between any two onse utive urves vk and vk+1 ; also prove that, in general, the tangent x need not be ontinuous at the K + 1 urves. x Other interpolating fun tions are possible in luding splines, Hermite polynomials, and Bezier/Bernstein interpolating polynomials. These forms attempt to smooth the interpolating fun tion so that slopes of grid lines mat h, resulting in a smoother grid. Multi-dire tional interpolation is a

omplished by means of proje tion operators, so- alled be ause of their idempotent properties. The right-hand-side of (5.8) is an example of a proje tion operator. To properly interpolate a region, two families of

urves must be given (see Figure 5.1):

vk ( ) ; rl () ;

0k K; 0  l  L:

(5.12)

The urves must satisfy the onsisten y ondition

rl (k ) = vk (l ) ; 0  k  K ; 0  l  L :

(5.13)

The proje tion operators are de ned by

P = P (; ) = P = P (; ) =

K X k=0 L X l=0

k () vk ( ) ;

(5.14)

l ( ) rl ( ) ;

(5.15)

where k and l are interpolating fun tions. The proje tion P is the uni-dire tional interpolant in the -dire tion, while P is the uni-dire tional interpolant in the  dire tion. The simplest hoi e for the interpolating fun tions are again the Lagrange Interpolating Polynomials: the k are given in (5.9), while the l are given by l ( ) =

L Y

i=0 i 6= l

 i l  i

(5.16)

and i = Li . The unidire tional interpolators an be ombined to form the Tensor Produ t Proje tor:

P P = P P (; ) =

L X K X l=0 k=0

k () l ( ) rl (k ) =

L X K X l=0 k=0

k () l ( ) vk (l ) ; (5.17)

The de nition makes sense be ause of the onsisten y ondition (5.13).

Exer ise 5.3.2 Show that the Tensor Produ t Proje tor mat hes the given

urves at the points of their interse tion but, in general, nowhere else. This is done by setting x(; ) = P P (; ) and then omputing x(i ; j ). x



1992 by P.M. Knupp, September 8, 2002

87

To mat h the given region along all of the given urves, form the Boolean Sum proje tor P  P = P + P P P (5.18) and then set the transformation to

x(; ) = P  P (; ) :

(5.19)

Exer ise 5.3.3 Show that the Boolean Sum proje tor mat hes the the given

urves. Also show that if K = L = 1, then the Boolean Sum proje tor redu es to the trans nite interpolation formula given in Se tion (1.5). x In three-dimensions, there are 21 distin t proje tors using the Tensor produ t and the Boolean sum. Three of the most useful are:

P P P

(5.20)

P P  P P  P P

(5.21)

whi h mat hes the 8 verti es, whi h mat hes the 12 edges, and

P  P  P

(5.22)

whi h mat hes the 6 fa es of a ube-like region.

Other Algebrai Methods A generalized uni-dire tional interpolation method, alled \multi-surfa e," is due to Eiseman, [59℄. In this method, N \ ontrol surfa es" are spe i ed. The surfa es do not ne essarily orrespond to grid surfa es. One then reates a ve tor eld from the surfa es by means of the usual interpolating polynomials. Integrating the resulting expressions lead to the multisurfa e formulas. The resulting expressions an then be ombined as a proje tor using trans nite interpolation to obtain a grid. The multisurfa e method redu es to unidire tional interpolation in many ases; e.g., N = 2 redu es to the linear Lagrange method, N = 3 results in Bezier interpolation, and N = 4 be omes the ubi Hermite polynomial interpolation. Eiseman, [60, 61℄ improved the multisurfa e method by using lo al interpolant fun tions in pla e of the interpolating polynomials to a hieve \pre ise grid ontrol", i.e., grids whose properties

an be expli itly spe i ed within a lo al region independent of the grid elsewhere. This permits lo al embedding of one grid within another. A related method of algebrai interpolation is the two-boundary te hnique of Smith, [175℄. Smith, [176℄, used only boundary and derivative boundary information, with ubi or linear interpolating polynomials. The method ontains terms for ontrolling orthogonality. Spa ing an be ontrolled by a re-parameterization te hnique. This dis ussion is merely intended as a sket h; the full potential of algebrai grid generation is explored in Gordon, [85, 86℄, Eiseman, [58, 59, 60, 61, 68, 69℄ Shih, [169℄, and Smith, [175, 176℄. A trans nite interpolation formula for three dimensions is given in Se tion 9.2.2.



88

1992 by P.M. Knupp, September 8, 2002

5.3.2 Conformal and Quasi-Conformal Mapping Te hniques The term lassi al in the hapter title applies best to onformal mapping te hniques, whi h have long served as a means of onstru ting mappings between planar domains. The theory of onformal mappings is highly developed and the intention here is merely to outline some of the basi results most relevant to grid generation; for more details the reader is referred to Henri i, [95℄, for a dis ussion of

omplex variables and onformal mappings with a omputational slant and to Moretti, [139℄, for a survey of appli ations to grid generation. A onformal mapping in the omplex plane preserves angles between urves and the \sense" of the angle. Mappings w = f (z ) from the omplex plane to itself are

onformal if f is analyti , i.e., df=dz exists and is non-zero. To make the onne tion with previous notation, set

z =  +i; w = x +iy:

(5.23)

Exer ise 5.3.4 Let D be the square 1 < x < 2, 0 < y < 1 in the omplex plane and let w = exp(z ). Determine the image of D under this mapping, sket h some of the

oordinate lines, and show that angles are preserved, i.e., the mapping is onformal.

x

Mappings w = x(; ) + iy(; ) are onformal if x and y have ontinuous partial derivatives and satisfy the Cau hy-Riemann equations:

x = y  ; x = y  : An immediate onsequen e of the Cau hy-Riemann equations is that

(5.24)

x x + y y = 0 ; (5.25) x y x y = x2 + x2 ; (5.26) i.e., a onformal mapping is orthogonal and its Ja obian is stri tly positive (hen e, the mapping is lo ally one-to-one). An important fa t about onformal mappings is summarized in the Riemann Mapping Theorem:

THEOREM 5.1 Any simply onne ted domain D with at least two boundary points an be mapped onformally and one-to-one onto the disk jwj < 1. The mapping w = f (z ) is uniquely determined by setting f (z0 ) = w0 and arg(f 0 (z0 )) = 0 where w0 is an arbitrary point of the disk and z0 2 D. x A onsequen e of the Riemann Mapping Theorem is that it is not possible to map the re tangular domain D in Figure 5.2 to an arbitrary domain having four sides unless the ratio of the length-to-width of D is restri ted to a parti ular onstant M known as the onformal module. This map an be onstru ted by solving the pair of partial di erential equations

M 2 x + x = 0 :

(5.27)

The resulting map is then a quasi- onformal map (see Lehto and Virtaanen, [121℄, and Renelt, [153℄, for a general dis ussion of quasi- onformal maps). The diÆ ulty with this approa h is that M is not known a priori sin e it is domain-dependent; a method of omputing M is given in Seidl and Klose, [166℄. Other approa hes to

onstru ting onformal maps by solving partial di erential equations an be found in Chakravarthy and Anderson, [36℄, Challis and Burleya, [37℄, and Mastin, [129, 131℄.



89

1992 by P.M. Knupp, September 8, 2002

η

y w = f(z)

x x

11



01

D

x

b

10

M = a/b x 00

ξ

x

a logical space

physical space

Figure 5.2: Riemann Mapping Theorem Conformal mappings may also be onstru ted algebrai ally or by solving integral equations. A method using integral equations to obtain onformal maps in whi h the logi al spa e is the unit disk is summarized in Thompson et al., [215℄. Ives, [98℄, des ribes several analyti transformation methods in luding generalizations of the S hwarz-Christo el Map and the Near-Cir le-to-Cir le Map whi h uses the KarmanTre tz maps (a generalization of the Joukowski Airfoil map). Other referen es on

onformal and quasi- onformal mappings in lude Daripa, [45℄, Fornberg, [74℄, Hayes, Kahaner, and Kellner, [93℄, Meniko and Zema h, [136℄, and Symm, [200℄. Conformal mappings permit handling of multiply- onne ted regions with relative ease using multiple bran h uts. The properties of onformal mappings ited in this se tion are the reason for the ontinued use of onformal mapping te hniques as a means of grid generation even though there are important limitations. Among the limitations of onformal maps are (i) they are largely restri ted to two dimensions, (ii) they result in little ontrol over the interior grid, (iii) nding the map an be very diÆ ult, (iv) multiple-valuedness of the fun tions an lead to diÆ ulties in implementation, (v) arbitrary boundary point distributions are a hieved only at the sa ri e of the main advantage, orthogonality, and (vi) onformal mappings are ill onditioned in the sense that very small hanges in the shape of the domain an dramati ally alter the position of mapped boundary points.

5.3.3 Orthogonal Grid Generation Orthogonal p grids are de ned by having the property g12 = 0 (see Equation 4.105) with g 6= 0. Orthogonality is a desirable property of grids be ause, as previously mentioned, trun ation error is redu ed with su h grids (Mastin, [130℄). Additional advantages are that the transformed hosted equation has fewer terms than it would in a non-orthogonal frame and that physi al boundary onditions are more easily represented. A major disadvantage of orthogonal oordinate systems is that they only exist for planar domains (Eiseman, [62℄), and even then, they require a parti ular parameterization of the boundary. It is diÆ ult to ompute the orthogonal grid dire tly from the relation g12 = 0 sin e this is one rst-order equation in two unknowns. Haussling and Coleman, [90℄, di erentiated this rst-order equation with respe t to ea h of the  and  variables to obtain two se ond-order equations. The boundary onditions then uniquely spe ify the grid. However, for arbitrary boundary onditions, there is no guarantee that the resulting map is orthogonal (in fa t, the method an then generate folded grids).



90

1992 by P.M. Knupp, September 8, 2002

Eiseman, [62℄ proposed the method of orthogonal traje tories wherein one determines the onstant  -lines from a simple interpolation s heme and the onstant  lines are then determined by the requirement of orthogonality. Boundary points an be spe i ed on only three of the four boundaries of the region in this method. Orthogonal transformations in the plane an be viewed as a quasi- onformal map having a real dilation; in this ase they are de ned by the relation f x = x? (5.28) 

with \distortion fun tion" f = f (; ). This relation dire tly implies that g12 = 0 and that f is the ell-aspe t ratio r g f = 22 : (5.29) g11

Exer ise 5.3.5 Derive the relations g12 = 0 and (5.29) from (5.28). Show that a transformation satisfying (5.28) also satis es the se ond-order partial di erential equation  1  (f x ) + ( x ) = 0 ; (5.30)   f known as the S aled-Lapla ian. x The most widely studied s heme for generating orthogonal grids involves solving (5.30) (see, for example, Warsi and Thompson, [222℄, Ryskin and Leal, [157℄, Arina, [10℄, As oli, Dandy, and Leal, [14℄, and Duraiswami and Prosperetti, [53℄). In this approa h the user generally spe i es the ell-aspe t ratio f over the domain to ontrol the interior grid (if f is left unspe i ed, one has the so- alled weak onstraint method). However, solutions to (5.30) are not guaranteed for arbitrary f and, further, the grids may not be orthogonal (one must solve 5.28 dire tly to guarantee this). A method for

onstru ting f in su h a way as to ensure the existen e of an orthogonal solution to (5.30) is given in Duraiswami and Prosperetti, [53℄). The method requires omputation of a onformal module for the problem. The solution to (5.30) is, of ourse, sensitive to the imposed boundary onditions; g12 = 0 must hold on the boundary in the method of Duraiswami and Propseretti (hen e, arbitrary boundary-point distributions annot be spe i ed in advan e). With a given distortion fun tion f , (5.30) is a pair of linear equations, oupled through the boundary ondition. The equations are separable and

an be eÆ iently solved by dire t methods. Other work on the subje t of orthogonal grid generation may be found in Abrahamsson, [1℄, Tamamidis and Assanis, [201℄, Mori e, [140℄, Davies, [49℄, Mobley and Stewart, [138℄, and Potter and Tuttle, [149℄. Theodoropoulos and Bergeles, [202℄, have proposed an extension of orthogonal grid generation to three-dimensions. Allievi [2℄ solves the S aled-Lapla ian equation (5.30) using the nite element approa h.

5.3.4 Hyperboli and Paraboli Grid Generation This dis ussion of hyperboli grid generation follows the work of Steger and Chaussee, [188℄, who suggested the following non-linear, rst-order system be used in generating grids about 2D airfoil surfa es:

x x + y y = 0 ; x y or in ve tor notation

x  y = V ;

x  x = 0 ; J = V :

(5.31) (5.32)



91

1992 by P.M. Knupp, September 8, 2002

Here V = V (; ) is a user-spe i ed ontrol fun tion. The logi behind the system is

lear; the rst equation enfor es grid orthogonality and the se ond ontrols the lo al area of the transformation through fun tion V, i.e., the system is equivalent to the pgthe = V . If the transformation is non-singular, i.e., pair of statements g = 0 and 12 pg 6= 0, then this system may be expressed ve torially as

x = V x? : g11

(5.33)

Note the similarity between equations (5.33) and (5.28); both require the tangent

x to be proportional to the \perp" of the other tangent. However, if f = f (; ), then (5.28) is linear, while (5.33) is non-linear. More importantly, (5.28) is an ellipti system of equations (see Wendland, [229℄, for a de nition of type for systems of rstorder equations). On the other hand, (5.33) is not readily lassi ed due to the nonlinearity. However, as shown in referen e [188℄, if the latter equation is linearized, the resulting system of equations has the form

Ax + Bx = v

(5.34)

and is hyperboli .

Exer ise 5.3.6 Linearize equation (5.33) to nd the matri es A and B and the ve tor v in equation (5.34). Apply the lassi ation s heme in [229℄ (or some other referen e) to determine the type of the linearized system. x The systems (5.28) and (5.33), as well as the linearized system (5.34), an all be posed as initial-value problems and solved by mar hing s hemes (in whi h boundary data is given on the inner boundary of an unbounded domain; the grid solution is then obtained by mar hing the solution outward). However, it is well-known that mar hing s hemes for ellipti equations, su h as (5.28), are unstable unless ertain restri tions are pla ed upon the ell-aspe t ratios of the logi al spa e (see, for example, Roa he [154℄). On the other hand, there are stable mar hing s hemes for hyperboli systems (with no restri tion on the ell-aspe t ratio); thus, (5.33) or its linearized version (5.34) are preferred over (5.28) if a mar hing s heme is to be employed. In the following proje t, the reader is asked to devise a mar hing s heme for the non-linear equation (5.33); details of a mar hing s heme for the linearized system are given in referen e [188℄.

Proje t 5.3.7 Use the ode des ribed in the Appendix B.5 to solve the following nite di eren e approximation of Equation (5.33):  2   yi;j+1 = yi;j + 2 

xi;j+1 = xi;j





V (y g11 i;j i+1;j   V (x g11 i;j i+1;j

yi 1;j ) ;

(5.35)

xi 1;j ) :

(5.36)

Let 0    1, s =  (1 2 ), a > 0, b > 0, and V0 > 0 and de ne an ellipse (x; y) by the relations x = a os(s) ; y = b sin(s) : (5.37) Mar h the solution outwardpfrom the ellipse ( = 0) by applying (5.35)-(5.36). Use the ontrol fun tion V = V0 g11 expf (1 )g with V0 a s ale fa tor and  > 0 a



1992 by P.M. Knupp, September 8, 2002

92

Figure 5.3: Hyperboli grid stret hing parameter. Experiment with the parameters V0 , a, b, and  as well as the dis retization parameters M and N . Is the dis rete grid orthogonal? Compare the

ell areas to the ontrol fun tion V . Devise an impli it di eren ing s heme to solve (5.33) and modify the ode a

ordingly. An example of su h a grid is given in Figure 5.3 with a = 4, b = 1, V0 = 4, and  = 2. x Generation of grids by mar hing methods is very fast ompared to methods that require solving se ond-order ellipti systems. However, there are limitations inherent in hyperboli grid generation. The method applies only to unbounded domains, i.e., the outer boundary annot be spe i ed in advan e due to the hyperboli system of equations. Sho k-like behavior of the solution is possible, i.e., non-smooth grids an be produ ed. This is espe ially likely if the initial boundary urvature auses grid lines to propagate so that the grid lines interse t. A numeri al dissipation term is generally added to the equations to smooth the grid. The initial boundary urve should be di erentiable at all points to ensure the existen e of the tangent x . Sin e the fun tion V is user-de ned, the method is not automati ; experimentation is generally needed to nd an e e tive V for a given appli ation. The method, as di eren ed in (5.35)-(5.36), is rst-order a

urate in the mar hing dire tion, so large trun ation errors are possible, espe ially if oarse resolutions are used. The method has re ently been extended to surfa e and three-dimensional settings (Steger, [189℄). A somewhat di erent approa h to hyperboli grid generation is reported in Starius, [186℄. To over ome some of the limitations of hyperboli grid generation, Nakamura, [142℄, studied a paraboli grid generation s heme in whi h the speed of the hyperboli algorithm and the smoothness of ellipti algorithms is laimed. The proposed paraboli grid generation system is

x = A x + Sx ; y = A y + Sy ;

(5.38) (5.39)

with A a user-spe i ed onstant. The sour e terms Sx and Sy are used to ontrol spa ing and orthogonality of the interior mesh. As in hyperboli grid generation, boundary onditions are spe i ed on the inner boundary of a in nite domain. A mar hing algorithm progresses towards an outer boundary whose values also in uen e the sour e terms, via an interpolation algorithm. Control over orthogonality is



1992 by P.M. Knupp, September 8, 2002

93

indire tly a hieved through the sour e terms. The method is espe ially useful for O and H-type meshes around airfoils. The theory of the sour e terms does not appear to have been extensively developed nor has a three-dimensional extension been devised.

5.3.5 Biharmoni Grid Generation Grid generators based on fourth-order partial di erential equations permit additional boundary onditions to be imposed. In addition to the usual Diri hlet

onditions, for example, one may impose Neumann boundary onditions to ontrol boundary orthogonality and spa ing. This is espe ially useful in pat hing grids on multiple domains together. The biharmoni operator is the only fourth-order generator in use at present. Shubin et al., [171℄, and Bell et al., [17℄, propose

x + 2 x + x = 0 ; y + 2 y + y = 0 ;

(5.40) (5.41)

i.e., r4 x = 0. Signi ant penalties are in urred in the biharmoni approa h. First, the dis retized equations are mu h harder to solve due to an in rease in bandwidth of the matrix equation. Se ond, although the grids are smooth, there is no dire t ontrol over the interior mesh (as is also the ase for ellipti generators). Inhomogeneous forms of the biharmoni equations permit indire t ontrol over the interior grid. Third, there is no guarantee against grid folding (refer to the dis ussion in Se tion 3.7 for the one-dimensional form of the biharmoni generator). Sparis, [183℄, applied the biharmoni operator to mappings from physi al spa e to logi al spa e, i.e., r4x  = 0 and r4x  = 0 in hope of obtaining a guarantee against folding. Contrary to the laim, however, there is no maximum prin iple for the biharmoni operator. Therefore, there seems little advantage to applying the prin iple in the physi al rather than the logi al domain. Extension of the biharmoni grid generator to three dimensions is dis ussed in Shubin et al., [171℄.

5.4 Ellipti Grid Generation Ellipti grid generators are based on solving systems of ellipti partial di erential equations. A major advantage of this approa h is that the interior grid is very smooth, even for non-smooth boundary data. Grid smoothness is ne essary to a hieve low trun ation error in the solution of the hosted equation by nite di eren e methods. Another advantage of the ellipti approa h is that one may spe ify all four boundaries of the domain, thus satisfying the basi planar grid generation problem (Se tion 5.2). The interior grid is relatively insensitive to the boundary parameterization in the ellipti approa h (e.g., see Thomas and Middle o , [205℄; unlike most of the generators mentioned in the previous se tion, solutions exist for a wide variety of boundary parameterizations and hange only gradually as the boundary data is hanged. The major penalty in urred in the ellipti approa h is the loss of speed relative to the other methods mentioned; it takes onsiderably more work to solve an ellipti equation (there are large numbers of resear hers who sear h for fast ways to solve ellipti problems). Another signi ant problem is that it is mu h harder to ontrol the interior grid when it is generated by solving an ellipti system; this point is dis ussed in se tion (5.5).



94

1992 by P.M. Knupp, September 8, 2002

5.4.1 The Simplest Ellipti Generator (Length) The simplest ellipti generator, alled the AH (Amsden-Hirt) or Length generator, is a two-dimensional generalization of the AH generator (3.24) that was given in Se tion 3.3, with P = 0. This generator requires ea h omponent of the map to satisfy Lapla e's equation:

r2 x = r2 x = x + x = 0 ; r2 y = r2 y = y + y = 0 :

(5.42)

The four boundary maps given for x in (5.3) provide the boundary data

x(; 0) = xb ( ) ; x(0; ) = xl () ;

x(; 1) = xt ( ) ; x(1; ) = xr () ;

(5.43)

for the linear partial di erential for x in Equation (5.42), while the four boundary maps given for y in (5.4) provide similar boundary data for the linear partial di erential for y in Equation (5.42). The equations for determining x and y are un oupled, linear, and formulated on a square logi al domain. The partial di erential equations are Lapla e equations, the boundary onditions are alled Diri hlet onditions, and the boundary-value problem is alled the Diri hlet boundary-value problem for Lapla e's equation. It is well known (see for example, Birkho and Lyn h, [19℄, Forsythe and Wasow, [75℄, or Golub and Ortega, [84℄) that su h problems have a unique solution and that solution is in nitely di erentiable ( in C1 ) in the interior of U2 provided the boundary maps are ontinuous. This latter restri tion is not important for grid generation sin e if the boundary maps are not ontinuous the physi al region is not well de ned. The only theoreti al question left is: are su h maps one-to-one and onto, that is, is the Ja obian of the map nonzero? The answer is no; the maps typi ally fold for non- onvex regions. In the Rogue's gallery, Appendix C, there are many examples of folded grids generated by this method: they are labelled with \Length", see, for example, Figures C.3, C.4, C.5, C.6, C.7, C.9, C.10, C.11, and C.12. In spite of the la k of a folding guarantee, the AH generator is still attra tive in some ases. The most important ase is that of a onvex domain having one or more boundary points where the boundary has dis ontinuous slope. In that ase, algebrai generators fail to produ e a smooth grid, while the AH generator would produ e a smooth, unfolded grid. The omputation of the AH grid is relatively fast ompared to other non-linear ellipti generators be ause the generator equations are linear. The numeri al solution of the AH equations is a fundamental problem in numeri al partial di erential equations. The se ond derivatives in Lapla e's equation are dis retized using the standard entral di eren es: 1 1 (x 2 xi;j + xi+1;j ) + 2 (xi;j 1 2 xi;j + xi;j+1 ) = 0 ; (5.44)  2 i 1;j  for 1  i  M 1, 1  j  N 1. The numeri al boundary onditions orresponding to (5.43) are given by

xi;0 = xb (i ) ; xi;N = xt (i ) ; 0  i  M ; x0;j = xl (j ) ; xM;j = xr (j ) ; 0  j  N : (5.45) There are many omputer odes for rapidly omputing numeri al solutions to su h problems (see, for example, Birkho and Lyn h, [19℄). A program to solve su h problems may be found by sending a request by omputer mail to netlib.



95

1992 by P.M. Knupp, September 8, 2002

Exer ise 5.4.1 Compute the ve-point sten il for the AH generator. What is this sten il when  = ? x Exer ise 5.4.2 Obtain a omputer ode from a software library that solves Lapla e's equation for the Diri hlet problem. Use this software to generate grids for the Modi ed Horseshoe, Swan, and Chevron regions given in Se tion 1.5. x More sophisti ated ellipti grid generators are needed to handle the folding problem on non- onvex domains. One of the best is the Winslow generator, dis ussed in the next subse tion.

5.4.2 The Winslow or Smoothness Grid Generator The most widely used of all ellipti grid generators is the Winslow or homogeneous Thompson-Thames-Mastin (TTM) generator. The method is also sometimes referred to as the smoothness generator, espe ially within the ontext of variational grid generation (see Chapter 6). The generator is a two-dimensional generalization of the generator (3.28) that was dis ussed in Se tion 3.3, with P = 0. The method arose from the need for an ellipti generator that would produ e unfolded grids, i.e., a transformation with positive Ja obian. The method requires the

omponents of the inverse transformation,

 =  (x; y) ;  = (x; y) ;

(5.46)

r2  = r2x  = xx + yy = 0 ; r2  = r2x  = xx + yy = 0

(5.47)

to satisfy Lapla e's equation:

on a onvex logi al domain. Diri hlet boundary onditions are given by the inverses of the boundary maps. By requiring the inverse of the map to be harmoni (instead of the map itself, as in the previous se tion), it is possible to show that the mapping is oneto-one and onto. Rado's Theorem from the theory of Harmoni Mapping shows that the Winslow mapping is, in fa t, a di eomorphism provided the boundary map is a homeomorphism (Liao, [126℄). Thus, the ontinuum solution to the Winslow equations results in an unfolded transformation on the interior of the physi al domain. As with the previous AH ellipti grid generator, if the boundary of and the boundary maps are suÆ iently smooth then the Winslow problem possess a unique solution that is in nitely di erentiable in the interior of . It is diÆ ult to numeri ally solve the Winslow equations on an arbitrary domain dire tly. To develop a onvenient numeri al algorithm for omputing the Winslow map, Equations (5.47) are transformed to logi al spa e. It must be assumed that g 6= 0 so that the mapping is invertible. The result of inverting Equations (5.47) is

g22 x

2 g12 x + g11 x = 0 ; g22 y

where (see Equation (4.103))

2 g12 y + g11 y = 0 ;

(5.48)

g11 = x2 + y2 ; g12 = x x + y y ; g22 = x2 + y2 : (5.49) Re all that g11 is the length-squared of a tangent ve tor to a  - oordinate line, g22 is the length-squared of a tangent ve tor to a - oordinate line, and g12 is the inner



96

1992 by P.M. Knupp, September 8, 2002

produ t of the two tangent ve tors. This provides a useful geometri interpretation of the oeÆ ients in the transformed equations and a more ompa t form for writing the oeÆ ients: (5.50) gi;j = xi  xj : A sophisti ated derivation of the inverted Equations (5.48) is given in Se tion 7.3.5. The following exer ise uses the ideas in Chapter 2 to nd the transformed equations.

Exer ise 5.4.3 Use the formulas in Se tion 2.3 to nd the transformed Equations

(5.48).

x

In ontrast to (5.42), Equations (5.48) are neither linear nor un oupled; they are oupled through the metri -matrix oeÆ ients, whi h depend on both x and y. These oeÆ ients also make the equations quasi-linear instead of linear. It is useful to introdu e an operator notation for the TTM equations as this notation is more

ompa t. Thus, let

2

Qw = g22  2

2 g12

2 2 + g11 2 :  

(5.51)

Then the TTM Equations (5.48) an be written in ve tor form as

Qw x = 0

(5.52)

where Qw stands for Quasi-linear Winslow operator. The nite-di eren e form of the TTM equations follows dire tly from the formulas given in Se tion 2.4. Substantially more work is involved in numeri ally solving the Winslow system of equations than the AH system due to the oupling and nonlinearity. A ode des ribed in Appendix B.6 implements a Pi ard or su

essive-substitution iteration algorithm for omputing grids using the TTM generator. This type of algorithm is des ribed in Figure 3.2. Diri hlet boundary onditions for the system of nonlinear partial di erential Equations (5.48) are given by (5.43). old The algorithm pro eeds as follows. An initial grid, (xold i;j ; yi;j ) on the physi al region is generated, typi ally using trans nite interpolation. The rst step in the outer loop is to use the old values (xold ; yold ) to ompute the metri matrix entries g11 , g12 , and g22 , i.e., the metri matrix al ulations are lagged. The linearized nite-di eren e new equations are then solved using an SOR relaxation, giving new values (xnew i;j ; yi;j ). The outer loop is exited if the di eren e between the old and new values is less than a given toleran e. If the toleran e is not satis ed, the old values of (x; y) are set equal to the new values and the outer iteration is repeated. Note that the equations for both x and y are the same; this an be used to redu e storage and in rease eÆ ien y in numeri al algorithms for generating the grids. It is possible to repla e the Pi ard iteration with a Newton iteration; The Newton iteration typi ally onverges faster than the Pi ard iteration, but is more trouble to

ode than Pi ard iterations. Faster, but more omplex alternatives are o ered by multigrid methods (see Jain, [102, 103℄).

Exer ise 5.4.4 Look up the ode des ribed in Appendix B that solves the Winslow equations and verify that the formulas for one of the oeÆ ients is in agreement with the dis ussion in this se tion. Des ribe the numeri al algorithm by making a ow hart for the ode. Use the homogeneous TTM generator to produ e a grid on one of the non onvex region given in the Rogue's Gallery, Appendix C. x



97

1992 by P.M. Knupp, September 8, 2002

5.4.3 Trun ation Error in Grid Generation: A Case Study Grids generated as numeri al solutions to partial di erential equations are subje t to trun ation error e e ts. As a result, the dis rete grid that satis es the dis retized equations may not share the properties (su h as orthogonality, spe i ed area, et .) possessed by the ontinuum map, ex ept in the limit. A parti ularly striking example is en ountered in applying the TTM generator to the Modi ed Horseshoe domain des ribed in Chapter 1. The theorem stated in the previous se tion implies that for a wide lass of domains, folded maps are not solutions to the TTM equations. This is an asymptoti result and thus may not hold for any dis rete grid. As demonstrated in this se tion, trun ation error an play an important role in grid generation.

Proje t 5.4.5 Use the omputer ode des ribed in Se tion B.6 of Appendix B to solve the homogeneous TTM equations on the Modi ed Horseshoe domain, given by equations (1.34) in Chapter 1. Generate and plot n  n grids for the resolutions n = 4, 8, 16, 32, and the parameter values R = 2, R = 4, and R = 5. Are the grids folded? x The following theorem and proje t indi ate that the results of the previous proje t are due to trun ation error.

THEOREM 5.2 Let x = x(r(; ); s(; )) be the omposition of two maps, the rst from a unit logi al spa e to a domain in the (r; s) plane and the se ond from the (r; s) domain to a domain in physi al spa e. If (i) the primary map (r(; ); s(; )) satis es the TTM equations, and (ii) the se ondary map x(r; s) is a onformal map, then the omposite map satis es the TTM equations. Proof. De ne the metri s of the primary map as follows:

g^11 = xr  xr ; g^12 = xr  xs ; g^22 = xs  xs : Transform the TTM grid generator on the omposite map

Qw x = g22 x

2 g12 x + g11 x

(5.53) (5.54) (5.55) (5.56)

using the hain rule, beginning with

p

Let  = r s

g11 g12 g22 r  s .

= g^11 r2 + 2 g^12 r s + g^22 s2 ; = g^11 r r + g^12 (r s + r s ) + g^22 s s ; = g^11 r2 + 2 g^12 r s + g^22 s2 :

(5.57) (5.58) (5.59)

Then the hain rule applied to the TTM equations results in

Qw x

p

=  [^g22 xrr 2^g12 xrs + g^11 xss ℄ + [g22 r 2g12 r + g11 r ℄ xr + [g22 s 2g12 s + g11 s ℄xs : (5.60) Assume that the se ondary map is onformal, i.e., it satis es the Cau hy-Riemann

onditions

xr = ys ; xs = yr :

(5.61) (5.62)



1992 by P.M. Knupp, September 8, 2002

98

Immediate onsequen es are g^12 = 0, g^22 = g^11 , and xrr + xss = 0. As a result, the rst bra keted term in (5.60) is zero. Also, the omposite map metri s (5.57)-(5.59) redu e to  g11 = g^11 r2 + s2 ; g12 = g^11 (r r + s s ) ;  g22 = g^11 r2 + s2 ;

(5.63) (5.64) (5.65)

so that the se ond and third bra keted terms of (5.60) are also zero:   g^11 (r2 + s2 ) r 2 (r r + s s ) r + (r2 + s2 ) r xr = 0 ;   g^11 (r2 + s2 ) s 2 (r r + s s ) s + (r2 + s2 ) s xs = 0 ;

(5.66) (5.67)

sin e the primary mapping from logi al spa e to the (r; s) domain satis es the TTM equations. Thus, Qw x = 0 for the omposite map. x In general, the omposition of two maps ea h solving the TTM equations need not solve the omposite TTM equations.

Proje t 5.4.6 Map the horseshoe domain to the (r; s) domain in Figure 5.4 using

the map given by

r(; ) = rR (); s(; ) = sR () + (1  );

(5.68) (5.69)

 1 rR () = log(2) + log os2 () + R2 sin2 () ; 2 sR () = ar tan(R tan()) ;

(5.70) (5.71)

where

and R = exp( ). Find a parameterization of the bottom, top, and left boundaries so that the omposite map preserves the boundary parameterization of the Modi ed Horseshoe. Then solve the TTM equation on this new domain (with R = 4:0) and map the result onto the horseshoe domain via the onformal map

x(r; s) = exp(s) os(r) ; y(r; s) = exp(s) sin(r) ;

(5.72) (5.73)

to obtain an unfolded grid. Use this unfolded grid as the initial guess to start the iteration to solve the dis rete TTM Equations (5.56) to retrieve the folded grid in the previous proje t. This result strongly suggests that folding of the horseshoe grid is due to the e e ts of trun ation error. x

5.5 The Inhomogeneous TTM Grid Generator The purpose of this se tion is to present the planar version of the inhomogeneous Thompson-Thames-Mastin generator and show how it is used to ontrol the grid

on the interior of a domain. The generator an be used to attra t or repel grid nodes toward spe i ed points in the logi al domain and to move oordinate lines in a similar fashion. The original approa h is presented in Thompson, Thames, and Mastin, [208℄,



1992 by P.M. Knupp, September 8, 2002

99

Figure 5.4: Horseshoe region in whi h sour e terms are added to the homogeneous partial di erential equation (5.47). There are two basi forms of the inhomogeneous grid generator; both require the user to spe ify two weight fun tions to be used in the inhomogeneous terms. The original inhomogeneous approa h is

r2x  = P ; r2x  = Q ; while the re-formulated approa h (Warsi, [224℄) r2x  = gg22 P ; r2x  = gg11 Q ;

(5.74) (5.75)

is sometimes preferred be ause the ontrol fun tions P and Q for this latter form of the equations are orders of magnitude smaller than for the original form. The reader is

autioned that the weight fun tion Q should not be onfused with the grid generation operator Qw . Rado's Theorem (Liao, [126℄) provides a theoreti al basis for the homogeneous TTM or Winslow method be ause it implies that, in the ontinuum, the grid is not folded. As shown in the previous se tion, this doesn't imply that the dis rete grid is unfolded. When inhomogeneous terms are added to the equations, Rado's Theorem no longer applies, i.e., there is no guarantee against folding of the inhomogeneous

ontinuum grid. Moreover, the inhomogeneous ontinuum grid need not be smooth even though one is using an \ellipti " generator. For instan e, if a non-smooth grid is given (say, by an algebrai generator) then it is possible to ompute the grid metri s, tangents, et ., and therefore P and Q using the inhomogeneous equation. The omputed P and Q would then generate the non-smooth grid if used to solve the inhomogeneous grid equations. Restri tions on P and Q are learly needed if a smooth, unfolded grid is to be obtained. Inverting the original form (5.74) of the TTM equations gives

Qw x = g (P x + Q x )

(5.76)

while inverting the re-formulated Equations (5.75) gives

Qw x = g22 P x g11 Q x :

(5.77)



100

1992 by P.M. Knupp, September 8, 2002

The latter equations bear a lose resemblan e to the one-dimensional di erential equation obtained from the variational problem with a logi al-spa e weight; ompare Equation (3.66) of Se tion 3.5, Equation (3.33) of Se tion 3.3, and Equation (3.6) of Se tion 3.2. Steger and Sorenson, [187℄, uses the original TTM approa h (5.76) while Anderson, [6℄, and Thomas and Middle o , [205℄, follow the newer approa h (5.77). Lo al ontrol of the grid is obtained by hoosing P and Q to have the exponential forms (Thompson, Thames, and Mastin, [208℄):

P (; ) =

Q(; ) =

M X m=1 I X i=1 M X

bi

m=1

I X i=1

am

m j m j

2 21  i e di [( i ) +( i ) ℄ 2 ; j  i j

am

bi

 m

j  m j e

(5.78)

 m

m j m j j  m j e

2 21  i e di [( i ) +( i ) ℄ 2 ; j  i j

(5.79)

where M is the number of lines and I is the number of points the grid is to be attra ted to, and where am , bi , m , di , i and i are parameters. Noti e that P and Q are logi al-spa e weight fun tions. These sour e terms ontain arbitrary parameters that are varied to obtain a desired grid; there does not appear to be any parti ular methodology to guide the sele tion of parameter values. The P Q approa h to interior grid ontrol is reasonably e e tive but la ks automation, i.e. user intervention is required. Determination of the parameters in the sour e terms requires experien e and skill. Control of the grid is impre ise and non-automati . As dis ussed in Se tion 3.8, physi al spa e weighting is more useful than logi al spa e weighting; the former is not dire tly a hievable with this s heme. The EAGLE ode manual (Thompson et al., [217℄) provides further details on erning the use and apabilities of this algorithm. There are week-long short ourses available for those who would like to use the EAGLE ode. Numeri al implementation of the inhomogeneous generator requires only minor modi ation of the homogeneous generation ode. A ode partially implementing the P Q weights in the form (5.77) is des ribed in Appendix B Se tion B.6.

Proje t 5.5.1 Use the ode des ribed in Appendix B Se tion B.6 to attra t grid lines to the oordinate line  = s . The ode assumes P = 0; Q = Q0 sgn(r) e  jrj ;

(5.80) (5.81)

where r =  s , sgn(r) = r= j r j, and Q0 and  > 0 are user-supplied parameters. Set s = 1=2 and experiment with the parameters Q0 and  on the Trapezoid domain to determine reasonable values. Verify that if Q0 > 0, lines are attra ted to  = s , while if Q0 < 0, they are repelled. Can you predi t the lo ation and degree of attra tion in physi al spa e that is obtained by hanging Q0 and ? What happens to the grid as the parameters be ome large? Modify the ode to run the form (5.76) of the inhomogeneous equations. Whi h form do you prefer and why? Modify the ode to in lude the general weights P and Q given in (5.78)-(5.79). x



101

1992 by P.M. Knupp, September 8, 2002

Parallelogram

Swan

Trapazoid

Valley

Figure 5.5: Inhomogeneous-TTM grids The parti ular ase Q0 = 5,  = 1, s = 1=2 is shown in Figure 5.5 for the Parallelogram, Swan, Trapezoid, and Valley regions. Grid lines do appear attra ted to s = 1=2, but the lo ation in physi al spa e and the degree of attra tion are unpredi table. The solution iteration fails to onverge on the Annulus, Horseshoe, and several other domains. Better results might be obtained by further experimenting with the input parameters. Re-parameterization of the boundary would also improve the grids. The grids often fold badly for ertain seemingly reasonable hoi es of the parameter Q0 . In the ase s = 0 on the Airfoil, there is a strong sensitivity to Q0, with the grid folding for values Q0 greater than two. Even when unfolded grids are obtained, the grid lines are not parallel to the airfoil surfa e. This fails to meet an essential requirement of vis ous- ow al ulations. See Chapter 9 or Thompson, [210℄, for a dis ussion of the volume or threedimensional form of the inhomogeneous TTM method. Only limited ontrol over the interior grid generated by an ellipti equation an be a hieved by re-parameterization of the boundary. The experien e reported by Thomas and Middle o , [205℄, illustrates this and is onsistent with the theory on erning properties of solutions to ellipti equations. Inhomogeneous grid generators an also be used to alter the grid near the boundary as shown in the next se tion.



1992 by P.M. Knupp, September 8, 2002

102

5.6 Controlling the Grid Near the Boundary A parti ularly important requirement for a grid generator is to be able to ontrol the behavior of the transformation near the boundary sin e often this is where the behavior of the solution hanges most rapidly (e.g., boundary-layer phenomena in

uid dynami s). In su h an appli ation, ontrol over grid spa ing and orthogonality near the boundary is often required. The most e e tive means of a hieving this is to apply Neumann (gradient) boundary onditions to the ellipti partial di erential equations of the grid generator. However, most ellipti grid generators (su h as those dis ussed in this hapter) are se ond-order partial di erential equations, whi h an support only one set of boundary onditions. If Neumann onditions are applied at the boundary, then the Diri hlet boundary onditions must be dropped. The resulting mapping would then no longer be boundary- onforming. Both Diri hlet and Neumann boundary onditions an be enfor ed if the order of the equation is in reased. The fourth-order biharmoni grid generator (Se tion 5.3.5) is a likely andidate. However, although the biharmoni approa h would work in prin iple, it is relatively hard to implement and solve a fourth-order PDE ompared to a se ond-order PDE. Furthermore, ontrol over the interior grid is very indire t and there is a tenden y for grids generated by the biharmoni to fold. One alternate approa h is proposed in Thomas and Middle o , [205℄. While this method has enjoyed some su

ess, it's general use is not advo ated be ause the derivation of the method is not mathemati ally justi ed (i.e., the nal equations do not guarantee that the resulting transformation will possess the desired boundary properties). There are also pra ti al instan es in whi h the method has failed to perform e e tively (Salari, [160℄). Another approa h to the problem is des ribed in this se tion. The grid near the boundary is ontrolled using se ond-order inhomogeneous, ellipti equations with Diri hlet boundary onditions. Neumann onditions are simulated through the inhomogeneous sour e terms. Geometri onsequen es of spe ifying a Neumann boundary ondition along a boundary with known Diri hlet data are des ribed in the rst part of this se tion while the se ond part uses these results in a general exposition of the widely used Steger and Sorenson, [187℄, method of simulating Neumann boundary onditions. The generality of the dis ussion permits extension of the original Steger-Sorenson method to other ellipti grid generators beside the original TTM ontext in whi h it was proposed.

5.6.1 The Neumann Boundary Condition A surprising amount of information on the boundary tangents, metri s, and rateof- hange metri s of a transformation an be dedu ed if both Diri hlet and Neumann boundary onditions are simultaneously imposed on the boundary of a domain. The reader is referred to Se tion 4.4 for a review of the relevant planar di erential geometry needed for this se tion. In general, boundary onditions an be applied to any part or parts of the four boundaries of a planar region. To on retize this dis ussion, suppose the goal is to ontrol the grid along the entire  = 0 boundary (the dis ussion that follows is readily extended to other boundaries). Assume that Diri hlet data x( ) is given on this boundary and that the boundary has suÆ ient smoothness for the derivatives required in this dis ussion to exist. Then from the Diri hlet data, one may ompute the tangent x , it's perpendi ular x?  , the metri g11 , and the se ondderivative ve tor x all along the  = 0 boundary.



1992 by P.M. Knupp, September 8, 2002

103

Assume that the following general Neumann boundary ondition is also to be imposed on the grid at  = 0: x = p1 [1 ( ) x + 2 ( ) x? ℄ (5.82) g11 with 1 and 2 given di erentiable fun tions on 0 <  < 1. Sin e x is known at  = 0 and at  = 1 (from the Diri hlet data on the other boundaries), a pair of onsisten y

onditions on 1 and 2 are required, namely, that (5.83) p1g11 [1 (0) x + 2 (0) x? ℄ = x (0) ; (5.84) p1g11 [1 (1) x + 2 (1) x? ℄ = x (1) : Given onsistent 1 and 2 , the remaining metri terms are obtained from (5.82) by forming the relevant inner produ ts. On the  = 0 boundary: p (5.85) g12 = g11 1 ; 2 2 g =  + ; (5.86) p22g = 1 pg 2 : (5.87) 2 11 The expression (5.87) shows that the additional requirement 2 ( ) > 0 should be imposed to ensure a positive Ja obian on the boundary. Exer ise 5.6.1 Verify the relations (5.85)-(5.87). Also show that for arbitrary planar ve tors a? ? = a and (a + b)? = a? + b? . Apply these to (5.82) to show x?  on the boundary is (5.88) x? = p1 [1 ( ) x? 2 ( ) x ℄ : x g11 p ? So far, then, x , x?  , x , x , x , and the metri s g11 , g12 , g22 , and g are known or omputable from the given Diri hlet and Neumann data. To use the method of Steger-Sorenson, most of the rate-of- hange metri s on the boundary are also needed. To begin, the boundary ondition (5.82) an be di erentiated with respe t to  to obtain the rate-of- hange of x , i.e., the ross derivative x , in terms of known quantities: (g11 ) x g: (5.89) x = p1 f1 x + 2 x? + (1 ) x + (2 ) x? g11 2pg11  Exer ise 5.6.2 Use (4.131)-(4.136) and (5.85)-(5.87) to verify the following

omputable expressions for the rate-of- hange metri s: 1 (g ) = x  x ; (5.90) 2 11   (g ) p (g12 ) = g11 (1 ) + 1 p11  ; (5.91) 2 g11 1 (g ) = 1 (1 ) + 2 (2 ) ; (5.92) 2 22  p  (g ) p ( g) = 2 p11  + g11 (2 ) ; (5.93) 2 g11 1 (g ) = (g12 ) x  x : x (5.94) 2 11 



104

1992 by P.M. Knupp, September 8, 2002

The other rate-of- hange metri s involving derivatives with respe t to  are unknown sin e x annot be omputed from (5.82) as the latter holds only along the  = 0 boundary. In parti ular, (g12 ) and (g22 ) are unknown. The Christo el symbols 111 , 211 , 112 , and 212 an be omputed from the known rate-of- hange metri s using (4.140)-(4.143), but 122 and 222 annot. The spe ial ase 1 = 0, 2 = s > 0 is of parti ular importan e sin e it is the requirement that the grid be orthogonal on the boundary, with onstant spa ing s. In this ase, (5.82) redu es to: s x = p x? : (5.95) g11 This is a ompa t way of stating that orthogonality and a spe i ed spa ing s are required on the boundary. From the previous results,

g12 g p22g (g12 ) (g22 )

= = = = =

0; s2 ; p s g11 ; 0; 0;

(5.96) (5.97) (5.98) (5.99) (5.100)

on the boundary.

Exer ise 5.6.3 Find 111 , 211 , 112 , 212 for the spe ial ase des ribed above. x

5.6.2 The Steger-Sorenson Approa h The Neumann boundary onditions (5.82) an be simulated with an inhomogeneous grid generator using the Steger and Sorenson, [187℄. The method was originally proposed for the Winslow operator, but it is emphasized here that the basi approa h

an be applied to other se ond-order operators as well. Let Qx be any se ond-order quasilinear ellipti generator (e.g., Length, AO, or Winslow) and let the form of the inhomogeneous generator be

Qx = g f(; ) x + (; ) x g :

(5.101)

To simulate Neumann boundary onditions on the  = 0 boundary, the inhomogeneous weight fun tions are hosen to be

(; ) = 0 ( ) e   ; (; ) = 0 ( ) e   ;

(5.102) (5.103)

so that (5.101) be omes

Qx = g f0 ( ) x + 0 ( ) x g e



(5.104)

with  > 0 a user-supplied parameter whi h serves to blend the boundary ondition into the homogeneous ondition in the interior. Computational experien e shows that the grid is relatively insensitive to . To determine the weight fun tions, form the inner produ ts 3 x?  Qx = 0 g 2 e   ; (5.105) 3 x?  Qx = 0 g 2 e   : (5.106) 



105

1992 by P.M. Knupp, September 8, 2002

Generally, (5.104) does not hold on the boundary, but only on the interior. If one requires (5.104) to hold on the boundary as well as in the interior, 0 and 0 an be found by evaluating (5.105)-(5.106) at  = 0: 3 g 2 0 ( ) = (x?  Qx)0 ; (5.107) 32 (5.108) g 0 ( ) = (x?  Qx)0 : 

Formula (5.87) is used to evaluate g3=2 . Finding the inhomogeneous weights therefore requires evaluating Qx on the boundary. Unfortunately, the ellipti operators ontain the unknown ve tor x , so the evaluation annot be done a priori, but requires the use of an iterative solution pro edure. Before des ribing the iteration, expressions for the weights in (5.107)-(5.108) are derived. The various generators Qx are resolved into ombinations of the ovariant tangent ve tors using the Gauss Identities (4.137)-(4.139). For example, the Winslow operator an be expressed as

Qw x

= (g22 + (g22

111 2 g12 211 2 g12

112 + g11 212 + g11

Applying (5.107)-(5.108) to this gives the weights

g 0 = g22 g 0 = g22

111 2 g12 211 2 g12

112 + g11 212 + g11

122 )x 222 )x :

(5.109)

122 ; 222 :

(5.110) (5.111)

All the quantities on the right-hand-side of these equations, ex ept 122 and 222 , an be evaluated at  = 0 in the manner dis ussed in the previous se tion.

Exer ise 5.6.4 See Equation (6.73) of Se tion 6.3.5 for a des ription of the AO operator. Show that the weights for the AO operator are: g 0 = g22 g 0 = g22

111 + g11 211 + g11

122 + (g22 ) ; 222 + (g11 ) : x

(5.112) (5.113)

In the Steger-Sorenson approa h, the unknown quantities 122 and 222 ontained in 0 , 0 are lagged during the iterative solution. Strong under-relaxation is required to obtain onvergen e. The iteration is extremely slow as a result; intuitively, this is be ause one is lagging se ond-order quantities. The ve tor x is numeri ally evaluated on the boundary using the Pade approximation,

x j0 = 7 x1 + 8 x22 x3 2 

x j 3  0 

(5.114)

suggested by (Steger and Sorenson, [187℄). The rst author has had su

ess using the Steger-Sorenson approa h with the AO operator as well as with Winslow. It has not been found ne essary to use forward di eren e approximations for x in (5.104), as was reported in (Steger and Sorenson, [187℄). Small grid spa ing is needed to redu e the e e t of trun ation error. If oarse grids are used the desired ontinuum boundary

onditions (5.82) may not be losely mat hed. Others have su

essfully implemented the Steger-Sorenson method on more than one boundary simultaneously.

Proje t 5.6.5 Write a omputer ode to perform the Steger-Sorenson iteration for a general operator Qx. x



1992 by P.M. Knupp, September 8, 2002

106

5.7 Solution-Adaptive Algorithms This se tion extends the dis ussion initiated in Se tion 3.8 to two-dimensional solution-adaptive algorithms for moving grids. The goal is to redu e trun ation error in the numeri al solution of the hosted equations by moving grid nodes as the solution evolves. Weight fun tions are introdu ed into the inhomogeneous grid generator to

reate movement of grid nodes; the weights are based on physi al properties of the solution, su h as the gradient. The purpose of this se tion is merely to introdu e the reader to the subje t. For a more exhaustive treatment, see the review arti les on solution-adaptive grid generation by Thompson, [216℄, Eiseman, [67℄, and Hawken, [91℄.

5.7.1 Grid Adaption with Inhomogeneous TTM As noted in Se tion 5.5, the inhomogeneous TTM weights (5.78)-(5.79) are rather lumsy to work with. A more fundamental set of weights was derived in Thomas and Middle o , [205℄, by setting P = g11 (; ) and Q = g22 (; ). Inversion of Equations (5.74) with these new weights leads to an adaptive form of the inhomogeneous TTM equations

Qw x = g22  x g11 x :

(5.115)

To determine the weight fun tions  and , Anderson, [7℄, showed that the following equations are satis ed:

p

p

( g11 ) +  g11 = 0 ; pg = 0 ; p ( g22 ) + 22

(5.116) (5.117)

if it is assumed that the transformation satis es g12 = 0, 1 = 0, and 2 = 0, where the latter two parameters are the oordinate line urvatures de ned in (4.148)-(4.149). Exer ise 5.7.1 Derive (5.116) by forming the inner produ t of (5.115) with x? , p then setting g12 = 0, and 1 = 0. Show that g12 = 0 requires that x?  = g22 x = g and use this fa t to omplete the derivation. x If the weights  and relationships

are repla ed by new weights w1 and w2 through the (w1 ) ; w1 (w ) = 2; w2

=

(5.118) (5.119)

Anderson observes that the lo al ar p length in ea h p oordinate dire tion will be proportional to the new weights, i.e., g11 = 1 w1 and g22 = 2 w2 are solutions to (5.116)-(5.117) with 1 and 2 onstants. Anderson thus proposes to solve (5.115) with weights (5.118)-(5.119) determined from some adaptive weight fun tion (similar to (3.99)). Contrary to the assumptions in the derivation, the solution to these equations will not, in general, be orthogonal nor have zero urvature, so the weight fun tions do not ontrol the lo al ar -length in as dire t a fashion as suggested by (5.116)(5.117). Nevertheless, this approa h to adaptivity has been su

essful in appli ations. Extension of the approa h to three-dimensions is straightforward.



1992 by P.M. Knupp, September 8, 2002

107

In a variant of this approa h, Anderson, [8℄ has proposed to solve Qw x = (g22 x g12 x ) DD (g12 x g11 x ) DD (5.120) to ontrol lo al ell areas through the weight fun tion D. As is true in the ar -length approa h, the area ontrol is not exa t sin e ertain properties of the solution are assumed to hold in the derivation when, in fa t, they do not hold in general. Roa he, Salari, and Steinberg, [156℄, have suggested a modi ation of the Anderson approa h, alled the hybrid-adaptive method. The obje tion is made that when the weighting terms in (5.115) or (5.120) are small, the grid relaxes to the homogeneous Thompson-Thames-Mastin grid (Se tion 5.52), i.e., the Anderson approa h adapts grids away from the homogeneous TTM grid. In some appli ations the homogeneous TTM may not be the most desirable base grid (e.g., the StegerSorenson airfoil grids may be preferred). The purpose of the hybrid approa h is to permit adaptation away from an arbitrary base grid. This is a hieved by repla ing the weights in (5.115) by  = b + a and = b + a where the subs ript b denotes the base grid from whi h one wants to adapt away from and the subs ript a denotes the original adaptive weight terms in the Anderson method. If the Anderson weights are small, the grid will approa h the base grid. The base grid weights are determined by evaluating the left-hand-side of (5.115) with a onsistent dis rete approximation and using the base grid, solving for the weights b and b . The reader is referred to the paper for details of implementation and results.

5.7.2 The Deformation Method A novel approa h to solution-adaptivity, known as the deformation method, an be found in the re ent papers of Liao and Anderson, [125℄, and Liao and Su, [124, 122℄ whi h are based on the work of Moser and Da orogna. Although only the planar ase is spe i ally onsidered in this se tion, the method holds in arbitrary dimensions. The method ontrols the lo al area of the mapping through the use of a weight fun tion. This is a

omplished by introdu ing a ve tor eld whose divergen e is the spe i ed weight fun tion. The problem of omputing the mapping is redu ed to solving this divergen e relation and a system of ordinary di erential equations, one for ea h node of the grid. The method is based on the moving grid identity, whi h is now derived. Suppose the mapping fun tions are dependent on an additional parameter 0    1, so that x = x(; ;  ) (this parameter need not represent the time-variable). A dire t omputation using the hain rule on x shows that the relation p rx  x = ( pgg) (5.121) holds for arbitrary mappings. Using the fa t that (pg) = x  rx pg, (5.121) an be expressed as (5.122) rx  pxg = 0 : Either of these relations is referred to as the moving-grid identity. The goal in the deformation method is to produ e a C 1 mapping on a domain

whose Ja obian agrees with a spe i ed weight fun tion. Let f = f (x; y) be the weight fun tion; f must satisfy f 2 C 1 ( ), f > 0 in the domain, f = 1 on the boundary of the domain, and nally, Z Z f d = 1: (5.123)



108

1992 by P.M. Knupp, September 8, 2002

De ne

D(x; y;  ) =  + (1  ) f ;

(5.124)

h is onstant with h = pg D, and the ve tor eld v = D xp  . If dh=d = pg0,Dthen respe t to the parameter  . In thatp ase ( g D) =0 = ( ) ,  =1 but D =0 = f and D =1 = 1, so that if one assumes g = 1, then pg = f . The fun tion h an  =0

 =1

be made onstant with respe t to  , beginning with the moving-grid identity:

rx  DDpxg = 0 ;

rx  vh = 0 ; hr v v r h = 0; pg r x v x  rx h = 0 ; x  x h h p + g rx  v [ + x  rx h℄ = 0 ;   pg [(1 f ) + r  v℄ dh = 0 : x

Setting results in

rx  v = f

d

1

(5.125)

dh = 0: (5.126) d The deformation method thus entails solving the divergen e relationship (5.125) for the ve tor- eld v and then solving the ordinary di erential equations x = Dv . The divergen e relationship is solved with the boundary ondition v = 0 to ensure that points on the boundary do not move. The ve tor eld given by (5.125) is only unique up to the url of an arbitrary se ond ve tor eld, so it is possible to obtain many mappings whose Ja obians agree with the spe i ed weight fun tion. Expli it

onstru tions for the ve tor eld are given in Liao and Su, [124, 122℄, when the physi al domain is a square or the se tor of an annulus. Numeri al solution of the divergen e equation is greatly fa ilitated by the introdu tion of a s alar potential fun tion from whi h the ve tor eld an be derived by the relation v = r; the s alar potential is then found by solving a Poisson equation with appropriate boundary onditions.

Chapter 6

Variational Planar Grid Generation 6.1 Introdu tion One-dimensional variational grid generation has been dis ussed in Chapter 3, Se tions 3.5 and 3.6. The present hapter extends this to the two-dimensional planar

ase. Variational methods of grid generation have seen relatively little appli ation in industry, so another goal of this hapter is to onvin e the reader that variational methods are a worthwhile approa h to grid generation. An elementary presentation is made to rea h a wide audien e. A more advan ed treatment of this subje t is presented in Chapter 8. The original theory of variational grid generation is due to Bra kbill and Saltzman, [21℄, (see also Bra kbill, [20℄, Saltzman and Bra kbill, [161℄, and Saltzman, [162℄). This book favors the approa h of Steinberg and Roa he, [191℄, due to its more geometri (i.e, intuitive) avor. In Chapter 8, it is shown that the two theories are basi ally equivalent. Other referen es in lude Roa he and Steinberg, [155℄, Castillo, Steinberg, Roa he, [27℄, [29℄, [30℄, Ja quotte and Cabello, [99℄, and Ja quotte, [101℄. The hapter begins by reviewing basi ideas from the Cal ulus of Variations su h as the on ept of a fun tional, its rst and se ond variation, and the EulerLagrange equations (Se tion 6.2). The main se tion in this hapter (Se tion 6.3) des ribes the variational approa h to grid generation. Variational prin iples provide a lear and intuitive means of building grid-generation algorithms. Elementary variational prin iples provide ontrol of the length of segments in the grid, areas of

ells in the grid, and the orthogonality of the angles between grid lines. Subse tions des ribe three elementary fun tionals named Length, Area, and Orthogonality. Two of the fun tionals ontain weight fun tions for ontrolling the grids. Euler-Lagrange equations are derived for all the fun tionals. Minimization of any one of the elementary unweighted prin iples does not usually lead to useful grids. Weighted variational prin iples, leading to weighted grid generators, are often more useful. Combinations of the weighted variational prin iples have proven e e tive as well, but these have the defe t that the user must hoose weight parameters (Se tion 6.3.4). The AO algorithm (Se tion 6.3.5) is an e e tive automati algorithm that ontains no parameters. A numeri al algorithm for solving the non-linear Euler-Lagrange equations of variational grid generation is dis ussed in Se tion 6.4, while a dis rete approa h to variational grid 109



1992 by P.M. Knupp, September 8, 2002

110

generation, known as the Dire t Method (6.5), is brie y surveyed in the last se tion of this hapter.

6.2 The Cal ulus of Variations The material on the al ulus of variations from Chapter 3, Se tion 3.6 is reviewed and extended to two-dimensional transformations for planar grid generation. The on ept of a fun tional and its rst and se ond variation is introdu ed and ne essary onditions for a minimum are dis ussed. The Euler-Lagrange equations are derived and shown to be the transformations whi h minimize the fun tional. The Euler-Lagrange equations are of interest be ause they are the partial di erential equations that are solved to obtain the grid. Euler-Lagrange equations for onstrained, un onstrained, and high-order variational prin iples are given. Proofs and additional results from the al ulus of variations an be found in numerous texts, e.g., Gelfand and Fomin, [77℄.

DEFINITION 6.1 A fun tional is a rule I [x℄ that assigns a real number to ea h ve tor of fun tions x belonging to some spe i ed set of ve tors of fun tions. That is, a fun tional is a fun tion having a set of ve tors of fun tions for its domain and the real numbers for its range. A fun tional is often referred to as a variational prin iple and the set of ve tors of fun tions, the admissible set. The admissible set in the ase of grid generation is generally the set of twi e di erentiable transformations whi h satisfy the given Diri hlet boundary data. A major goal in the al ulus of variations is to minimize a given fun tional over an admissible set of ve tors of fun tions. An example of a grid generation fun tional has already been en ountered in Se tion 3.6. The example is repeated here and extended to the planar ase. Let G(r; s; t) be a smooth fun tion of three real variables and x( ) be a smooth fun tion de ned on [0; 1℄ satisfying the boundary onditions x(0) = a and x(1) = b, where a and b are some given numbers. Then I [x℄ de ned by Z

I [x℄ =

1

0

G(; x( ); x ( )) d

(6.1)

is a fun tional to be minimized over the admissible set satisfying the boundary

onditions. To extend this to planar problems, let G(r1 ; r2 ;    ; r8 ) be a given smooth fun tion of eight variables and x(; ) and y(; ) be smooth fun tions de ned on the unit square U2 and satisfying the given Diri hlet boundary onditions. If x = (x; y), then I [x℄ = I [x; y℄ de ned by

I [x℄ =

Z

1Z 1

0 0

G(; ; x; y; x ; x ; y ; y ) d d

(6.2)

is a fun tional. The goal is to minimize this fun tional subje t to the boundary data. The fun tional is frequently written in ve tor notation in the form

I [x℄ =

Z

U2

G(; x; x ; x ) d :

(6.3)

Transformations whi h minimize this fun tional are referred to as the optimal or minimizing grids for the problem. The goal in variational grid generation, then, is to nd grids whi h best t the desired grid properties spe i ed by the fun tional.



111

1992 by P.M. Knupp, September 8, 2002

To perform the minimization requires some results from the al ulus of variations. Re all that in al ulus, if a multi-variable fun tion has a minimum at a point, then all rst dire tional derivatives of the fun tion are zero at that point and all se ond dire tional derivatives of the fun tion are positive or zero at that point. The onverse of this result is not true; for the onverse to hold it must be assumed that the se ond derivatives are stri tly positive. The analog of these results are fundamental in the

al ulus of variations. First, the analog of dire tional derivative must be de ned.

DEFINITION 6.2 If I [x℄ is a fun tional de ned on a spa e of ve tors of fun tions and is a ve tor of fun tions su h that x+ is in the given spa e of ve tors of fun tions for all , then the rst variation of the fun tional I in the dire tion of at the point x is de ned by d D I [x℄ = I [x +  ℄ : (6.4) d =0

THEOREM 6.3 A ne essary ondition for I [x℄ to have an extremum at x^ is that D I [^x℄ = 0 for all admissible .

Exer ise 6.2.1 Consult a book on ve tor al ulus that reviews the on ept of dire tional derivative. Verify that if x and are taken to be ve tors from a nite dimensional spa e, then D I [x℄ is the dire tional derivative. x DEFINITION 6.4 With I , x and as in Theorem 6.3, the se ond variation of a fun tional I is de ned as d D 2 I [x℄ = D I [x +  ℄ : (6.5) d =0

THEOREM 6.5 A ne essary ondition for I [x℄ to have a minimum at x^ is that D 2 I [^x℄  0 for all (for a maximum, D 2 I [^x℄  0).

There are also theorems for suÆ ient onditions (see Gelfand and Fomin, [77℄). When the fun tional I is given in terms of an integral of a fun tion G applied to a ve tor of fun tions x, the ne essary ondition that the rst variation is zero at some point x results in a boundary value-problem problem for x (the hat on x has been dropped). The partial di erential equations in the boundary-value problem are alled the Euler-Lagrange equations. The boundary onditions are typi ally enfor ed by requiring that is zero on the boundary of the underlying region on whi h the fun tions x are de ned. The Euler-Lagrange equations are derived by applying (6.4). As an example, the Euler-Lagrange equation for the fun tional de ned in Equation (6.1) is now derived. Suppose x is a smooth fun tion of  and a minimum of I . Let = ( ) be a smooth fun tion su h that (0) = (1) = 0. These homogeneous boundary onditions guarantee that if x = x( ) satis es the Diri hlet boundary onditions x(0) = a and x(1) = b then so does x( ) +  ( ). The rst variation of I is given by

D I [x℄ =

Z

1



Gx (; x; x ) + Gx (; x; x )  d ;

(6.6)

0 where Gx = Gr and Gx = Gt when G = G(r; s; t). Integration by parts (using the boundary onditions on ) gives Z 1n  o (6.7) Gx (; x; x ) Gx (; x; x )  d : D I [x℄ = 0



112

1992 by P.M. Knupp, September 8, 2002

For a minimum to o

ur, D I [x℄ = 0 for all . This an only be true if

Gx (; x; x )



Gx (; x; x )  = 0 :

(6.8)

This is the Euler-Lagrange equation, whi h is onveniently written in the form

 G(; x; x ) x

d  G(; x; x ) = 0 ; d x

(6.9)

where the derivative d=d is alled a total derivative. If Gx x 6= 0, then this is a se ond-order di erential equation for x. To see this, apply the hain rule to the total derivative to get Gx G x Gx x x Gx x x = 0 : (6.10) The set of admissible x provides two boundary onditions for this di erential equation. For the planar fun tional (6.2) or (6.3), the Euler-Lagrange Equations are

G x

d G d x

d G = 0; d x

(6.11)

G d G d G = 0; (6.12) y d y d y where, again, d=d and d=d are total derivatives. If the total derivatives are omputed using the hain rule then a system of partial di erential equations of the form

T11 x + T12 x + T22 x + S = 0 results where T11 , T12 , T22 are 2  2 matri es and S is a 2  1 ve tor.

(6.13)

Exer ise 6.2.2 Cal ulate the rst variation of (6.2) and verify that the EulerLagrange Equations (6.11) and (6.12) are orre t. Note the role played by the Diri hlet boundary onditions on x and y. Compute the 2  2 matri es in (6.13). x THEOREM 6.6 If I [x℄ is given by a smooth multivariate fun tion G applied to x and x is a smooth fun tion and satis es a Diri hlet boundary ondition, then a ne essary ondition for I [x℄ to have an extremum at x is that x satisfy the Euler-

Lagrange equations asso iated with I .

Constrained minimizations are also possible. To minimize the fun tional I [x℄ in (6.2) subje t to the onstraint u(x) = 0, the Euler-Lagrange equations (6.11)-(6.12) must be modi ed to read: u G d G d G  = 0; (6.14) x d x d x x u G d G d G  = 0; (6.15) y d y d y y where  is known as the Lagrange Multiplier (see Gelfand and Fomin, [77℄). Fun tionals having higher order derivatives may also be onsidered in variational grid generation. For the ase involving se ond-order derivatives,

G = G(; x; x ; x ; x ; x ; x ) ;

(6.16)



113

1992 by P.M. Knupp, September 8, 2002

the Euler-Lagrange equations for x and y read: G d G d G 0 = + x d x d x d2 G d2 G d2 G + + ; d 2 x dd x d2 x G d G d G 0 = + y d y d y d2 G d2 G d2 G + + : d 2 y dd y d2 y A variational prin iple for the inverse map  =  (x; y) reads

I [ ℄ =

Z



G~ (x; ; rx ; rx ) dx dy;

for whi h the Euler-Lagrange equations are  G~ d  G~ d  G~ = 0;  dx x dy y  G~ d  G~ d  G~ = 0:  dx x dy y

(6.17)

(6.18)

(6.19)

(6.20) (6.21)

6.2.1 Minimization Theory For the more mathemati ally in lined, a short introdu tion to the theory of minimizing fun tionals is given. To keep this material simple, the variational problem for the hosted equation (2.45),

I [f ℄ =

Z



f(rf )  (T rf ) + 2 g f g dx dy ;

(6.22)

is used as an example. Re all that f = f (x; y) and g = g(x; y) are smooth real-valued fun tions, with f zero on the boundary of , T = T (x; y) a 2  2 real symmetri positive matrix, and r = rx = (=x; =y). Exer ise 6.2.3 For the fun tional (6.22), verify that the rst variation is given by Z D I [f ℄ = f(r )  (T rf ) + (rf )  (T r ) + 2 g g dx dy ; (6.23)



and than that the se ond variation is given by

D 2 I [f ℄ = 2

Z



r  T r dx dy : x

(6.24)

An integration by parts and the use of symmetry gives

D I [f ℄ = 2

Z



(r  T rf

g) dx dy :

(6.25)

and onsequently, the Euler-Lagrange equation for the fun tional (6.22) is r  T rf g = 0 : (6.26) Note that the se ond variation does not depend on f ; this orresponds to a fun tion having a onstant se ond derivative.



114

1992 by P.M. Knupp, September 8, 2002

f

f(v) (f(u)+f(v))/2

f(u)

m = (u+v)/2

f(m)

x m

u

v

Figure 6.1: Convex fun tion The properties of the fun tional I depend riti ally on the properties of the matrix For the moment, assume that T is a onstant matrix. Next, let u and v be two ve tors and then de ne the bilinear form B by

T.

B (u; v) = uT T v

(6.27)

and then de ne the quadrati form Q by

Q(u) = B (u; u) = uT T u :

(6.28)

Typi ally, T is de ned to be positive de nite by requiring that

Q(u) > 0 when u 6= 0 :

(6.29)

Be ause T is symmetri , it an be diagonalized and from this and the positivity of T it an be seen that

juj2  Q(u)  C juj2 (6.30) for two positive onstants and C . In addition, the positivity of T implies that Q is a onvex fun tion. Re all that when f = f (u) is a positive real-valued fun tion, then f is (stri tly) onvex if

f





u + v < f (u) + f (v) for u 6= v : 2

2

(6.31)

(see Figure 6.1). To see that Q is stri tly onvex note that for u 6= v, 0 < Q(u v) = B (u v; u v) = Q(u) 2 B (u; v) + Q(v) and onsequently

2 B (u; v) < Q(u) + Q(v) :

(6.32) (6.33)



115

1992 by P.M. Knupp, September 8, 2002

Exer ise 6.2.4 Use the previous inequality (6.33) to show that Q is onvex. Show that F (u) = Q(u) + L(u) + C where L(u) is linear and C is a onstant is also

onvex if Q is onvex. Also show that both Q(u) and F (u) be ome in nite as juj be omes in nite. Finally, note that F(u) is bounded below. x The results of the previous exer ise make it lear that F has at least one minimum. A proof goes as follows: let m = inf u F (u). Then there must exist uk su h that F (uk )  m + 1=k, k > 1. Be ause F is large for u large, the uk must be in some bounded set, bounded sets in nite-dimensional spa es are ompa t, so there is a subsequen e of uk that onverges to a point u that is a minimum of F .

Exer ise 6.2.5 Use the onvexity of F to show that its minimum is unique. x Most of the previous results an be extended to the fun tional I . First, if f = f (x; y) and g = g(x; y) are smooth real-valued fun tions, then let

< f; g >= be the L2 inner produ t and

Z



f g dx dy

kf k2 =< f; f >

(6.34) (6.35)

be the L2 norm. Dis ussions of inner produ ts and norms an be found in most fun tional analysis texts and some PDE texts, e.g. Showalter, [170℄. To study I

introdu e the bilinear fun tional

B[f; g℄ =

Z



B (rf; rg) dx dy

and the quadrati form

Q[f ℄ = B[f; f ℄ and then note that the fun tional I given in (6.22) an be written as I [f ℄ = Q[f ℄ + L[f ℄

(6.36) (6.37) (6.38)

where L is a linear fun tional. Now, be ause T depends on x, it must be assumed that the eigenvalues of T are bounded below by some positive onstant. Next note that if rf = 0 then f is onstant. However, only f that are zero on the boundary of are onsidered here so, in fa t, rf = 0 implies f = 0.

Exer ise 6.2.6 Use the previous results to show that I is onvex, that I [f ℄ goes to in nity as kf k goes to in nity, and that I is bounded below. x Unfortunately, the previous argument about the existen e of a onvergent subsequen e is not so elementary in this in nite dimensional setting. There are two fundamental problems: First, the fun tional I is not de ned for all fun tions f with nite L2 norm; and se ondly, bounded sets in in nite dimensional spa es are not

ompa t in any obvious way.

Exer ise 6.2.7 Look up a result (say in Showalter, [170℄) that implies that I has a minimum and then use the onvexity of I to show that the minimum is unique. x



1992 by P.M. Knupp, September 8, 2002

116

More an be said about I ; if = (x) is a smooth fun tion that is zero on the boundary of the region , then the Poin are inequality says that there exists a positive

onstant k su h that kk k2  Q[ ℄ (6.39) (this requires the boundary onditions on ). Use the Poin are inequality to show that

D 2 I [f ℄  K k k2

(6.40)

for some positive onstant K . As D is a dire tional derivative, it is reasonable to only use of length one, k k = 1. Now it is lear that D 2 I is uniformly bounded below, whi h is just another way of stating that I is stri tly onvex. The observation about the se ond derivative provides another method for showing that a minimum of I is unique.

Exer ise 6.2.8 Assume that f are g are minima of I . Let h( ) = I [f + (g f )℄ :

(6.41)

Show that:

h0 ( ) = Dg h00 ( ) = Dg2

f I [f

+ (g f )℄ ; f I [f + (g f )℄ ;

(6.42) (6.43) (6.44)

Then use the fa ts that h(0) = h(1) and h00 ( ) > 0 and the mean value theorem to show that f = g. x It is important to understand that almost none of the grid-generation fun tionals are onvex, so su h an elementary theory as des ribed above is of no help. Liao, [124℄, has studied generalized onvexity properties of several fun tionals. The Liao fun tional des ribed in Subse tion 8.2.1 is onvex but produ es poor grids.

6.2.2 Ellipti ity A topi that is losely related to the onvexity dis ussion in the previous se tion is the notion of ellipti ity of the Euler-Lagrange equation (6.26). This operator is ellipti provided that !T T !  j!j2 (6.45) for all ve tors ! and some onstant . This is nothing but the lower half of inequality (6.30). If a partial di erential operator P is ellipti then solutions f of P f = g possess more derivatives than does g (see, for example, Bers, John and S he ter, page 135, [18℄.) In variational grid generation, it is important to know if the systems of di erential equations omprising the Euler-Lagrange equations are ellipti or not. A dis ussion of the theory of ellipti systems is well beyond the s ope of this book. Thus, only a method for he king the ellipti ity of a system of grid-generation equations (de ned on a logi al spa e of dimension k) is given. Thus the system of partial di erential equations k X

i;j =1

Ti;j xi j = F

(6.46)



117

1992 by P.M. Knupp, September 8, 2002

(see Equation 6.13 for an example) where Ti;j and F depend on  , x, and x is ellipti provided that 1 0 det 

k X

i;j =1

Ti;j !i !j A  j!j2 k

(6.47)

for all ! = (!1 ;    !k ) and all  and all suÆ iently smooth x. Later, this de nition will be used to he k the ellipti ity of the Euler-Lagrange equations for several fun tionals.

Exer ise 6.2.9 Apply the ellipti ity test to the Winslow equations (5.48). x

6.3 Variational Grid Generation in the Plane Both the Length and Smoothness grid generators of Chapter 5 are based on Lapla e's equation, whi h has a well-known variational prin iple. The variational prin iple for Length is easily seen to be 1 1 1 2 2 2 2 (x + y + x + y ) d d ; (6.48) 2 0 0   this fun tional has Euler-Lagrange equations in agreement with (5.42). The Smoothness (Winslow or homogeneous TTM) grid generator an be derived from a variational prin iple in a similar fashion, following the approa h of Bra kbill and Saltzman. These observations undoubtedly sparked the rst thoughts on variational grid generation. The variational approa h is appealing be ause powerful mathemati al results have long been available for variational problems in lassi al me hani s and more re ently for problems in non-linear elasti ity. The hope is that by taking the variational approa h, that grid generation an be given a solid footing and made more powerful;

ertainly it already has been made more intuitive. The immediate goal in variational grid generation is not to nd the grid, but to nd the best grid generation equation for the stated appli ation. This is parti ularly important in two and three-dimensions, sin e the question as to what is the best grid generator is not as readily settled as it was for the one-dimensional ase dis ussed in Chapter 3. The variational approa h permits the use of one's intuition in sele ting meaningful and appropriate variational prin iples to be minimized. This is done by employing the geometri interpretation of the tangents and metri quantities des ribed in the previous hapters. Re all that (see Table 4.1) x is a tangent ve tor to an  oordinate line, x is a tangent ve tor to an  oordinate line; and that the elements of the metri matrix (see Se tion 4.3) an be de ned and interpreted as follows: g11 = x  x as the length-squared of a tangent ve tor to a  - oordinate line, g22 = x  x as the length-squared of a tangent ve tor to a - oordinate line, and g12 = x  x as the inner produ t of the two tangent ve tors. The determinant of the Ja obian matrix, pg, gives the area of the parallelogram whose sides are given by the tangent ve tors x and x (see Exer ise 4.1.1). Grid spa ing, area, and orthogonality

an be ontrolled by using these metri s in a variational prin iple. Examples are given in the subse tions 6.3.1, 6.3.2, and 6.3.3 that follow. Taken individually, none of the Length, Area, or Orthogonality fun tionals produ e quality grids on a wide variety of regions. To over ome this, a fun tional that is a weighted ombination of the individual fun tionals is introdu ed in Se tion 6.3.4. For appropriate hoi es of the weight parameters, the fun tional given by the weighted

ombination produ es quality grids on a wider range of regions. Unfortunately,

I [x℄ =

Z

Z



1992 by P.M. Knupp, September 8, 2002

118

this approa h introdu es a new problem, namely, that of hoosing the parameters automati ally. This problem is over ome with the AO fun tional (see Se tion 6.3.5) whi h ontains no parameters and thus is automati . To highlight the strengths and weaknesses of ea h method, it is useful to ompare the various unweighted methods des ribed in this se tion on the domains of the Rogue's Gallery. Sin e almost any method will work well on a onvex domain, most of the test domains are non- onvex. The boundary onditions applied to the variational grid generation equations are riti al. They must be ompatible with the fun tional or the resulting grid should not be expe ted to perform as designed. Spa ing of the grid points on the boundary

an be modi ed by hanging the boundary parameterization, but, at this stage, it is not at all lear a priori what boundary onditions are appropriate. For the examples in the Rogue's gallery, no attempt was made to hoose a good (or optimal) boundary grid. The variational pro edure produ es a solution that is \best" in a least squares sense. A good example is that of the Length generator, whi h an be derived not only from the prin iple (6.48), but by attempting to satisfy the Cau hy-Riemann equations (5.24) in a least squares sense by minimizing 1 1 1 (x y )2 + (x + y )2 d d : (6.49) 2 0 0   It is easy to show that the minimizing transformation again satis es (5.42); thus, solutions to Lapla e's equation an be viewed as satisfying the Cau hy-Riemann equations in a least-squares sense. The advantage of the variational approa h is that, with arbitrary boundary onditions, existen e of solutions to Lapla e's equation are guaranteed, whereas solutions to the Cau hy-Riemann equations (5.24) are not. The question of spe ifying appropriate boundary onditions to permit existen e of a solution to (5.24) is also avoided. On the other hand, solutions to (5.24) are obtained from (6.49) only if the proper boundary onditions are applied. If the solution to Lapla es' equations (5.42) are onformal, then the value of the fun tional is zero. In general, the fun tional will be positive at the minimum. In identally this example also shows that the same transformation an minimize more than one fun tional. Given a variational prin iple, the grid is determined by omputing the rst variation of the fun tional, using the formulas in Se tion 6.2, The Cal ulus of Variations. The resulting Euler-Lagrange equations are the partial di erential equations that are solved to determine the grids. In all but one ase, the partial di erential equations form a oupled system of nonlinear equations (they are, in fa t, quasi-linear). The boundary onditions for these partial di erential equations are the Diri hlet onditions given by requiring that the boundary of the logi al region map to the boundary of the physi al region. The nonlinearity of the partial di erential equations produ es many pra ti al and theoreti al problems. For arbitrary variational prin iples, the Euler-Lagrange equations are probably not ellipti , so smoothness of the grids annot be assumed to be an automati by-produ t of this approa h. The results in Chapter 3, Se tion 3.5 suggest that if one minimizes a fun tional that is the ratio of the square of a quantity divided by some weight then the solution of the minimization problem will for e the quantity to be proportional to the weight. Unfortunately, this useful property generally breaks down in planar grid generation be ause the desired grid does not exist. Never-the-less, weighted variational prin iples are useful sin e they result in weighted grid generators that permit interior ontrol of the grid. To keep the Euler-Lagrange equations simple, this hapter onsiders only logi al-spa e weight fun tions. In this ase, the fun tional has no dire t dependen e on

I [x℄ =

Z

Z



119

1992 by P.M. Knupp, September 8, 2002

x, so the rst terms drop out of the Euler-Lagrange equations (6.11)-(6.12). Dis ussion

of physi al-spa e weight fun tions is deferred to Chapter 8. The weight fun tions in this hapter are taken to be  = (; ) or, in the ase of the Length fun tional, the two weights (; ) and (; ). Generally, these weights must be positive in order for a minimum of the fun tional to exist. Se tion 6.3.6 omments further on the weights.

6.3.1 The Length Fun tional The unweighted Length fun tional has already been stated in (6.48). A weighted version of the Length fun tional is presented in this subse tion, whi h generalizes the approa h in Chapter 3, Se tion 3.2. The goal is to nd a grid su h that the lengths p g11 and pg22 of the  and  oordinate lines be proportional to two given positive logi al weight fun tions  = (; ) and = (; ). Based on the analogy with the one-dimensional ase, it is reasonable to minimize the fun tional

1 1 1 g11 g22 d d : (6.50) + 2 0 0  To derive the Euler-Lagrange equations, assume that is a smooth ve tor fun tion that is zero on the boundary of U2 . The rst variation of the Length fun tional (6.50) is:  Z 1Z 1 x   x   D IL [x℄ = d d: (6.51) +  0 0 Integration by parts leads to Z

IL [x℄ =

D IL [x℄ =

Z

1Z 1

Z







(

x





x

 )

d d: (6.52) +    The rst variation must be zero for all if the fun tional is to be minimized. Consequently     x + x = 0 : (6.53)    This is the Euler-Lagrange equation for the weighted Length fun tional. The quotient rule for derivatives an be used to put the Euler-Lagrange equations in the form (6.13) T11 x + T12 x + T22 x + S = 0 ; (6.54) where T11 = 1 I ; T12 = 0 I ; T22 = 1 I ;

0 0

where I is the identity matrix and

"

S=

(6.55)  2 x  2 y

2 x  2 y 

#

:

(6.56)

Note that for  and being the same onstant, this Euler-Lagrange equation redu es to the unweighted Length generator given by Lapla e's equations.



1992 by P.M. Knupp, September 8, 2002

120

Exer ise 6.3.1 Verify Equations (6.51), (6.52), and (6.54). x Exer ise 6.3.2 Show that for the Length Fun tional Equation (6.54) is ellipti ,   (6.57) det T11 !12 + T22 !22  !12 + !22 2

that is,

for some positive onstant .

x

Observe that the Euler-Lagrange equations for the weighted Length fun tional are linear and un oupled, therefore, the solution grid is unique and exists for arbitrary smooth weights and ontinuous boundary data. Both linearity and the fa t that the two equations are un oupled onspire to make these grid generation equations parti ularly easy to solve. Curiously, the se ond-order part of the di erential operator is not the simple Lapla ian; the two weight fun tions have split the operator. Given the assumption of stri tly positive weight fun tions, the weights do not prevent the operator from remaining ellipti ; smooth grids an be expe ted. One must be areful not to laim too mu h for this fun tional. Contrary to expe tations, the solution does not ne essarily have the property that the grid lengths are proportional to the given weights. For example, if the physi al domain and its boundary oin ide with the logi al domain, then the solution to (6.53) or the system (6.54) is just x =  , y =  for any hoi e of onstant weight fun tions! The ni e property that held in the one-dimensional ase simply does not arry over to the planar problem, a fa t that poses a signi ant obsta le for grid generation in two and three dimensions. Of ourse, the diÆ ulty here is really with the hoi e of weights as mu h as with the grid generator. For example, it is fairly lear that the grid implied by the weights  = 2, = 1 does not exist on the unit square. The uniform grid is the least-squares solution to the problem. Noti e that if the solution x has the properties x = 1  and x = 2 where

1 and 2 are onstant ve tors, then x is a solution of the Euler-Lagrange equation. To have the lengths of the grid segments spe i ed by the weights it is only ne essary to have jx j = C1  and jx j = C2 for some onstants C1 and C2 . However, the

ondition on the lengths of the tangent ve tors is not suÆ ient to guarantee that the mapping is a solution of the Euler-Lagrange equations. In general, then, it is not expe ted that solutions of the Euler-Lagrange equations will have the spe i ed lengths. The performan e of the unweighted Length fun tional is shown in the Rogue's Gallery. Grids produ ed by minimizing the Length fun tional are quite satisfa tory on onvex domains su h as the Square, Trapezoid, and Dome. The solution on the Trapezoid is the same as that obtained by applying the isoparametri map (1.14). Without ex eption, the unweighted Length fun tional produ es folded grids on the non- onvex domains. Folding on non onvex domains is the prin iple drawba k of the unweighted Length equations and the main reason Length is not often onsidered as a stand-alone grid generator despite its simpli ity.

Proje t 6.3.3 The purpose of this exer ise is to show that the weight fun tions  and an be hosen so that the weighted Length equations an be used to generate an unfolded grid on a non onvex domain. For example, the unweighted Length fun tional produ es a folded grid on the Annulus region of the Rogue's Gallery. Modify the

omputer ode des ribed in Appendix B that solves the unweighted Length equations so that it solves the weighted system (6.54). Generate grids on the Annulus by hoosing the ratio of  and to be approximately equal to the ratio of the \length" of the



121

1992 by P.M. Knupp, September 8, 2002

physi al region to the \width" of the physi al region. See Castillo, Steinberg, and Roa he, [30℄, for more information. x

6.3.2 The Area Fun tional A more satisfa tory generalization of the one-dimensional ase is the Area fun tional. The goal here is to nd a grid su h that the area of the ells in the

grid are proportional to some given weight fun tion  = (; ) > 0. Re all that g = J 2 and that J is proportional the area of a ell. Based on analogy with the one-dimensional ase, it is reasonable to minimize 1 1 1g 1 1 1 J2 d d = d d : (6.58) 2 0 0  2 0 0  The Euler-Lagrange equation for the Area fun tional IA has many forms; one of the more onvenient is     J x J x = 0: (6.59)     Using the produ t rule, this equation an be rewritten as Z

IA [x℄ =

Z

Z

 

J x   

Z

 

J x = 0;   

(6.60)

  J  x + J  x = 0 :  

(6.61)

and expanded to obtain

J x

J x

Carrying out the derivatives, rearranging terms, and inter hanging the equations puts the Euler-Lagrange equations in the expand form (6.13):

T11 x + T12 x + T22 x + S = 0 ; where





y2 x  y ; x y  x2  T12 = +(x y2y+ yx y ) +(x y2x+ xx y )   +y2 x y ; T22 = x y +x2     : S = J yx xy    

T11

=

(6.62)



;

(6.63)

Noti e that, in ontrast to the Length fun tional, the matri es Tij for the area fun tional are independent of the weight fun tions.

Exer ise 6.3.4 Che k Equations (6.62). x



122

1992 by P.M. Knupp, September 8, 2002

Exer ise 6.3.5 Show that the Area-Fun tional Euler-Lagrange Equations (6.62) are not ellipti . To do this hoose x(; ) =  and y(; ) =  and then evaluate T11 , T12 , and T22 . For these spe ial values of these matri es, show that 

det T11 !12 + T12 !1 !2 + T22 !22 = 0

and thus that the Euler-Lagrange equations annot be ellipti .

(6.64)

x

In ontrast to the Length equations, the Area equations are quasi-linear, oupled, and non-ellipti . Solutions to the equations may not exist for arbitrary weight fun tions or arbitrary boundary data. There are, at present, no theorems to tell us if solutions exist or if they are unique. Computational experien e with the unweighted Area fun tional suggests that indeed it is possible to en ounter problems having no solution, but that if there is a solution, it appears to be unique. The fa t that the equations are oupled merely makes the numeri al solution algorithm more diÆ ult to implement (see Se tion 6.4). La k of ellipti ity results in the strong possibility that the Area grids are not smooth. If the grid satisfying the original goal that area is proportional to the given weight fun tion (i.e., J = , with a onstant) exists, it is a solution to the Area equations, boundary onditions permitting. This is most obvious from (6.60). If the weight  is

onstant, then the areas of the grid ells should be equidistributed. The grids in the Rogue's Gallery provide insight into the performan e of the unweighted Area fun tional. This generator performs reasonably well on the Trapezoid, Annulus, Horseshoe, Chevron, Dome, and Valley, however, the grids on some of these domains are not smooth. Solution grids were not obtained on almost half of the test domains, in luding the Swan, Airfoil, Ba kstep, Plow, and \C." In these ases, the iteration pro edure did not onverge, presumably be ause the equalarea solution does not exist on these domains, at least not for the given boundary data.

6.3.3 The Orthogonality Fun tional The Orthogonality fun tional is based on a di erent on ept than the Length and Area fun tionals. The latter fun tionals were derived by trying to make two quantities proportional. The Orthogonality fun tional is based on trying to make a quantity zero. Re all that g12 = jx j jx j os() (6.65) where  is the angle between the two tangent ve tors to the grid lines. If the grid lines are orthogonal, then g12 = 0. On the other hand, if g12 = 0 then either the grid lines are orthogonal or the length of at least one of the tangent ve tors is zero. If one of the tangent ve tors is zero, then the Ja obian is zero, so the assumption that the transformation is a di eomorphism implies that the transformation is orthogonal if and only if g12 = 0. To satisfy the orthogonality ondition in a least-squares sense, the Orthogonality fun tional 1 1 1 2 g d d (6.66) 2 0 0 12 is minimized. If the minimum is zero, then the transformation is orthogonal, otherwise it is the transformation losest to orthogonal in the least-squares sense. No weight fun tion is needed in the Orthogonality prin iple.

IO [x℄ =

Z

Z



123

1992 by P.M. Knupp, September 8, 2002

The Euler-Lagrange Equation for this fun tional is (g12 x ) + (g12 x ) = 0 :

(6.67)

Full di erentiation of this expression gives the Euler-Lagrange equations in the form (6.13): T11 x + T12 x + T22 x + S = 0 ; (6.68) where

T11

=

T12

=

T22

=



 



x2 +x y ; x y y2 (4 x x + 2 y y ) (x y + x y ) (x y + x y ) (4 y y + 2 x x )  x2 x y ; x y y2



;

(6.69)

and S = 0. The Orthogonality equations are quasi-linear, oupled, and non-ellipti . Orthogonal grids derived as solutions to (6.68) are not given for most of the domains in the Rogue's Gallery. The iterative pro edure often failed to onverge, presumably be ause orthogonal solutions do not exist, at least for the given boundary data. In general, orthogonal transformations mat hing the boundary onditions seldom exist on severely distorted domains su h as the ones in the Rogue's Gallery. Grids were obtained only for the Square, the Parallelogram, the Annulus (whi h gives polar oordinates) and the Valley. In view of these results, the use of Orthogonality as a stand-alone method for automati ally generating grids is not re ommended. The grid generated on the parallelogram is another example of the least-squares nature of the solutions in variational grid generation. The grid generated by the Orthogonality equations in this example is learly not orthogonal, yet it minimizes the Orthogonality fun tional by equidistributing the metri g12 .

6.3.4 Combinations of Fun tionals To over ome the limitations of the individual fun tionals, it is natural to

onsider minimizing ombinations of the Length, Area and Orthogonality fun tionals to a hieve a ompromise between the properties ontrolled by these fun tionals. Steinberg and Roa he, [191℄, introdu ed the fun tional

IW [x℄ = wS IS + wA IA + wO IO :

(6.70)

The weight parameters wS , wA , and wO are assumed to be non-negative onstants whose sum is unity. They are used to experimentally adjust the grid by sele ting the right ompromise between the individual fun tionals. These weighting parameters should not be onfused with the weight fun tions  and within the individual weighted fun tionals. The weighted ombination of Length and Area, ILA , given by wO = 0 is studied in Castillo et al., [29℄, with wS = 0:1 and wA = 0:9 re ommended as the best values for the weights. This ombination often produ es smooth, unfolded grids, as demonstrated for the Unit Square, Trapezoid, Annulus, Modi ed Horseshoe, Chevron, and Dome domains of the Rogue's Gallery given in Appendix C. The Area-Smoothness ombination over omes two important limitations of the individual



124

1992 by P.M. Knupp, September 8, 2002

fun tionals, namely, la k of smoothness for Area, and hroni folding for the Length fun tional. However, the solution to the Area-Smoothness equations fails to exist on the Airfoil, Ba kstep, Plow, and \C" domains; the grids on the Swan and Valley domains have highly skewed ells. Further experiments with the values of the weight parameters would undoubtedly improve the grids on some of these domains, but it is just su h trial and error pro edures that prevent robust automati grid generation.

Exer ise 6.3.6 Derive the Euler-Lagrange equations for the weighted ombination and show that in general they are quasi-linear, oupled, and non-ellipti . x

6.3.5 The AO Fun tional A robust automati generator is obtained by hoosing the weight parameters in Equation (6.70) to be wS = 0, wA = 21 , and wO = 12 . This ombination yields the Area-Orthogonality or AO fun tional (Knupp, [112℄). The name AO derives from the fa t that the fun tional is \halfway" between the equal Area and Orthogonality fun tionals. The weighted variational prin iple to be minimized is:

2 1 1 1 g + g12 1 1 1 g11 g22 IAO [x℄ = d d = d d : 2 0 0  2 0 0  The Euler-Lagrange equations take the parti ularly simple form:     g x g22 x + 11  = 0 ;     Z

Z

Z

Z

(6.71)

(6.72)

where g11 and g22 are de ned in (5.49) The expanded equations are as in (6.13):

T11 x + T12 x + T22 x + S = 0 ;

where

T11

=

T12

=

T22

=

S =

(6.73)



 x2 + y2 0 0 x2 + y2 ;  4 x x 2 (x y + x y ) +2 (x y + x y ) +4 y y  2  2 x + y  0 2 0 x + y2 ;    1 x x g22  : g11   y y



;

(6.74)

The AO equations are quasi-linear and oupled.

Exer ise 6.3.7 Use the transformation x =  + , y =  ( ) for suÆ iently small  to show that the Euler-Lagrange Equations (6.73) are not ellipti . Exer ise 6.3.8 Show that the sum of the Euler-Lagrange equations for the equalArea fun tional (6.62 with  = 1) and the Orthogonality fun tional (6.68) give the unweighted AO Euler-Lagrange equations (6.73). x Exer ise 6.3.9 Show that the weighted AO equations an be written in the

operator form

QAO x =  g22 x +  g11 x

(6.75)



1992 by P.M. Knupp, September 8, 2002

125

where the operator is de ned by

QAO x = g22 x + 2(x  x )x + 2(x  x )x + g11 x : x

(6.76)

As seen in the Rogue's Gallery, unweighted AO grids are smooth, generally nonfolded, have near-uniform areas, and are nearly orthogonal. The latter two properties are not surprising sin e the fun tional averages the equal-Area and and Orthogonality fun tionals. More surprising is the smoothness of the grids sin e the Length fun tional is not involved. This is explained from the fa t that the AO equations (6.72) are formally ellipti (and rigorously ellipti on many domains of interest). Unweighted AO grids are not always ompletely satisfa tory; the tenden y toward area-uniformity auses ells near the leading edge of the airfoil domain to be nearly the same size as elsewhere in the grid. This is not a useful property of the grid in boundary layer al ulations. In prin iple, this an be repaired using the weighted form of the AO grid generator. Alternatively, the generalized version of the Steger-Sorenson algorithm (Se tion 5.6.2) an be used with the AO generator. AO grids an be sensitive to the boundary parameterization (Knupp, [112℄). This is not too surprising given the lose relationship of the AO fun tional to the Orthogonality prin iple and orresponding la k of ellipti ity on some domains. Grids on the Modi ed Horseshoe domain (with the same aspe t ratios that aused the severe trun ation error e e ts reported in Se tion 5.4.3) are not folded if generated with AO.

6.3.6 The Referen e Grid and the Repli ation Idea An e e tive means of onstru ting the weight fun tions  and in the previous variational prin iples is through the on ept of the referen e grid (Steinberg and Roa he, [191℄). Suppose it is desired to onstru t a grid on a physi al domain

su h as the one shown in Figure 6.2 and that none of the unweighted grid generators produ es the desired grid. A weighted form is needed. In the referen e grid approa h (see Figure 6.2), weight fun tions are onstru ted by rst hoosing a referen e domain (in referen e spa e) whi h losely resembles the physi al domain, but on whi h it is relatively easy to onstru t a grid having the desired properties. The referen e grid is given by a transformation u = (u(; ); v(; )) from logi al spa e to referen e spa e. The metri s p of the referen e grid an be omputed from the oordinates: ij = ui  uj and  = u v u v . If, for example, the Area fun tional is used, the weight  is onstru ted from the referen e grid (following the one-dimensional idea of proportionality) by omputing the lo al areas on the referen e i.e., sets p p domain, pone fun tional is used, one uses  = . For  =  . If the Length and = 22 11 p weighted AO,  = 11 22 .

Proje t 6.3.10 Modify the ode referred to in Appendix B that solves the weighted Length equations (6.54) to obtain a ode that reates weights based on a user-spe i ed referen e domain. x The referen e grid approa h is explored in Castillo, Steinberg, and Roa he, [27℄, [30℄, and applied by Yeung and Vaidhyanathan, [233℄. Although quite powerful, attainment of satisfa tory grids by the referen e grid approa h often requires onsiderable experimentation on the part of the user. One problem is that of determining a satisfa tory parameterization of the boundary of the referen e domain. Another is nding referen e domains that are lose to the physi al domain, but for whi h the desired referen e grid an be easily omputed.



126

1992 by P.M. Knupp, September 8, 2002

y

v

u

x

Reference Space

Physical Space η

ξ Logical Space

Figure 6.2: Referen e spa e Closely related to the referen e grid on ept is the idea of grid repli ation. If the boundary parameterizations of the referen e domain and the physi al domain

oin ide, one might reasonably expe t that the interior grid on the physi al domain to be the same as the interior grid p on the referen e domain. In fa t, this is true only for the Area fun tional. If  =  in the Area fun tional, and the referen e and the physi al domains oin ide, then the Area equations are satis ed by both the physi al and referen e grids. The physi al grid satis es 

pJ





x



pJ





x = 0:

(6.77)

p

No matter how the referen e p grid is onstru ted, it has J =  , so that the Area equations (with weight  ) are automati ally satis ed by the referen e grid. In general, however, repli ation of the referen e grid by the physi al grid requires not only o-in iden e of the domains, but also o-in iden e of the grid generation equations, in luding the weight fun tions. For example, onsider the weighted Length fun tional, with weights generated using the referen e grid approa h. The grid on the physi al domain satis es

x

p

p



x  +  = 2 x + 2 x 

(6.78)

with  = 11 and = 22 . In general, the referen e grid need not be generated using the Length equations and thus will not satisfy equation (6.78) with x repla ed with u. The repli ation idea is only valid for the Area fun tional. Thus, even when the referen e domain is \ lose" to the physi al domain, the physi al grid may not be

lose to the referen e grid unless both grids were generated by similar means.



127

1992 by P.M. Knupp, September 8, 2002

6.4 Numeri al Algorithms for Variational Generators To dis retize the Euler-Lagrange equations for any of the variational generators in the previous se tion, observe that the expanded forms of the weighted EulerLagrange equations (6.54) (6.62), (6.68), and (6.73) an all be written in matrix-ve tor form as    x + A11 B11 y B11 C11    x + A12 B12 y B12 C12    x = A22 B22 y B22 C22   S1 : (6.79) S2 where the three oeÆ ient matri es are symmetri and the oeÆ ients Ar;s , Br;s , Cr;s , and Sr , 1  r; s  2, generally depend on the rst derivatives of the transformation and on the weight fun tion(s) and their derivatives. The equations are nonlinear and

oupled, so reasonable hoi es for a solution algorithm are Pi ard or Newton iteration. Both methods depend on a starting point for the iteration, that is, it is ne essary to already have an initial grid on the region before the iterative algorithm an be applied. Initial grids an be generated using trans nite interpolation or other simple generators. The initial grid need not be of good quality; hopefully, the more sophisti ated grid generation will improve the grid quality. The dis retization of the se ond derivatives is exa tly the same as in Se tion 2.4: x 2 xi;j + xi+1;j x  i 1;j ;  2 x 2 xi;j + xi;j+1 x  i;j 1 ;  2 x x x +x x  i+1;j+1 i 1;j+1 i+1;j 1 i 1;j 1 ; (6.80) 4   with similar formulas for the y-derivatives. These are the onstant oeÆ ient ases of Formulas (2.69), (2.73), and (2.79). The se ond-derivative dis retizations are used to approximate the partial di erential equation by a blo k system of di eren e equations of the form X

j j;j j1 X

j j;j j1

Tij xi+ ;j+ + Uij xi+ ;j+

+

X

j j;j j1 X

j j;j j1

Formulas for the T sten il are

A11 (i; j ) ;  2 A (i; j ) Tij 1;0 = 11 2 ;  Tij1;0 =

Uij yi+ ;j+ = Fij ; Vij yi+ ;j+ = Gij :

(6.81)



1992 by P.M. Knupp, September 8, 2002

128

A22 (i; j ) ; 2 A (i; j ) Tij0; 1 = 22 2 ;  A (i; j ) Tij1;1 = 12 ; 4   A12 (i; j ) Tij1; 1 = ; 4   A12 (i; j ) ; Tij 1;1 = 4   A (i; j ) Tij 1; 1 = 12 ; 4   A (i; j ) A (i; j ) (6.82) Tij0;0 = 2( 11 2 + 22 2 ) :   Similar formulas hold for the U and V sten ils, with the U sten ils depending on the Br;s 's and the V sten ils depending on the Cr;s oeÆ ients. Also, Fij = S1 (i; j ) and Gij = S2 (i; j ). Formulas (6.81) and (6.82) hold for all interior points, 1  i  N 1, 1  j  M 1; they omprise 2 (N 1) (M 1) equations for determining xi;j and yi;j . The boundary onditions spe ify the values of xi;j and yi;j at the boundary points. Consequently, there are 2 (N 1) (M 1) unknowns in this problem. This formulation does not need derivatives of the grid oordinates at boundary points of the region. Codes implementing a general algorithm for solving equations of the form 6.79 are des ribed in Se tion B.7 of Appendix B. Variational methods are frequently riti ized for their relatively large storage requirements. For the most general planar fun tionals, there an be as many as twenty-seven sten il arrays and two right-hand-side arrays, whi h must be stored or

omputed during the iteration. For omparison, the inhomogeneous TTM equation requires eighteen arrays plus the two right-hand-side arrays. The situation is mu h simpler for the Length fun tional; only two sten il arrays are needed and the equations are un oupled. For the AO equations, C11 = A11 , C22 = A22 , and B11 = B22 = 0, so only seventeen sten ils need be stored. The Area and Orthogonality fun tionals require the full twenty-seven sten ils, but the righthand-side arrays are zero for orthogonality. It is more eÆ ient, however, to store the oeÆ ients Ar;s , Br;s , and Cr;s instead of the sten il arrays. Then, at most nine arrays need be kept, as opposed to twenty-seven. With this approa h, Length again requires two arrays, AO just ve, while Area and Orthogonality require nine. The sten ils an then be omputed from the oeÆ ient arrays as needed, using (6.82). If the ross-derivative terms in the variational equations are lagged (i.e., in luded in the right-hand-side arrays), additional savings in storage an be obtained. By this means, AO requirements an be redu ed to just two oeÆ ient arrays plus the right-hand-sides. This is the same storage requirement as in a lagged TTM s heme. Tij0;1 =

6.5 The Dire t Optimization Method The Dire t Optimization method was brie y introdu ed in se tion 3.5. For

ompleteness, a brief overview of the method is made in this hapter on variational methods. The primary authorities on this subje t are Castillo, [26℄, [28℄, [31℄, [34℄,



129

1992 by P.M. Knupp, September 8, 2002

Kennon and Dulikravi h, [107℄, Pardhanani and Carey, [147℄, Kumar and Kumar, [118℄, Knupp, [108℄, [111℄, and Barrera et.al., [16℄. In the ontinuum variational approa h des ribed in the rst part of this hapter, a fun tional is minimized to determine a transformation that is spe i ed by a partial di erential equation. It is also possible to minimize fun tionals by dire t methods, i.e, by working with the variation prin iple itself rather than with the Euler-Lagrange equations (see Da orogna, [42℄). The dire t approa h has not been su

essfully applied to the ontinuum variational grid generation problem as yet, but it has been applied to ases in whi h grid generation is treated as a dis rete optimization problem. In the dis rete optimization approa h, one minimizes a multi-variable fun tion instead of a fun tional. This results in a dis rete optimization problem, as opposed to a problem in the al ulus of variations. The Dire t Optimization method is sometimes ina

urately referred to as the Dire t Variational method. For an M by N grid, there are (M 1)(N 1) nodes and 2(M 1)(N 1) unknowns to be found. Suppose

S (x) = S (: : : ; xi;j ; yi;j ; : : :) ; 1  i  M 1 ; 1  j  N 1 ; (6.83) is a positive fun tion from R2(M 1)(N 1) to R. The grid-generation problem is stated as a non-linear optimization problem (e.g., Flet her, [73℄, Minoux, [137℄): let (xi;j ; yi;j ) be arbitrary points in the plane. Minimize S subje t to the onstraint that the boundary data is satis ed. The solution grid x^ must satisfy S (x^)  S (x) for all other grids x. There are three dis rete quantities that are used to make up the grid fun tion S : node-to-node lengths, ell areas or half-areas, and ell angles. Castillo, [34℄, has devised fun tions named Length, Area, and Orthogonality in analogy to the

ontinuum fun tionals presented earlier in this hapter. Kennon and Dulikravit h, [107℄, presented an unusual but e e tive area-like fun tion that appears to have no

ontinuum analog, while Pardhanani and Carey, [147℄, propose alternate Length and Area fun tions. An arbitrary dis rete fun tional may not always have a ontinuum limit. Dis rete fun tions that have a ontinuum limit are generally preferred, i.e., as the number of nodes is in reased, the grid will approa h some ontinuum transformation. Be ause

ontinuum variational prin iples may be dis retized in di erent ways, there an be di erent dis rete fun tions that have the same ontinuum limit. In the Dire t Method the solution grid satis es the dis rete gradient equations to within a spe i ed toleran e, that is, the solution is essentially exa t. However, the resulting dis rete grid still only approximates the limiting ontinuum transformation (assuming there is one) to within some dis retization, or trun ation error. As in the ontinuum variational approa h the grids generally satisfy the the underlying geometri onditions in a least-squares, not exa t, sense. Widely studied optimization te hniques su h as onjugate gradient (Shanno, [168℄) or the trun ated Newton method (Dembo and Steihaug, [50℄) an be applied to rapidly

ompute the minimum of S . Su h methods require omputation of the gradient (6.84) rS = (: : : ; xS ; yS ; : : :) i;j i;j and often the Hessian matrix

H=

2S xm2xn  S ym xn

2S xm2yn  S ym yn

!

:

(6.85)



1992 by P.M. Knupp, September 8, 2002

130

For the grid generation fun tions, the Hessian is a sparse matrix, so storage requirements are not that severe. Of ourse, one an also set the gradient of S to zero (to satisfy the ne essary

ondition for a minimum) and solve the resulting equations by some iterative te hnique, if the equations are non-linear, or dire tly if they are linear. There is little dire t eviden e of whi h approa h, optimization or solving the linear equations, is best. We suspe t that, if the fastest optimization te hniques are ompared to the fastest linear-equation solvers, then the ontest would be a draw. For those used to numeri ally solving partial di erential equations, the dire t method may seem diÆ ult to implement as it makes use of unfamiliar optimization te hniques, while those used to solving optimization problems will likely favor the dire t approa h over the ontinuum variational method. The best method for a parti ular user is probably the one they are most familiar with. A present advantage of the dire t method over the ontinuum variational formulation is the relative ease with whi h the properties of the grid on the boundary

an be in orporated into the optimization prin iple (see, for example, the paper on orthogonality by Castillo, [28℄). DiÆ ulties an o

ur if the fun tion is not stri tly

onvex, i.e., has lo al minimae in addition to a global minimum. This a tually o

urs in the dire t method of grid generation when applied to the urve and surfa e ase; in su h instan es, the problem be omes far more deli ate than the planar ase (Knupp, [111℄). The dire t method has been extended to weighted and adaptive planar grid generation (Castillo, [31℄). There are obvious extensions of the method to threedimensions, but no serious work in this dire tion has yet been performed.

Chapter 7

Tensor Analysis and Transformation Relationships 7.1 Introdu tion Con epts from tensor analysis are introdu ed in this hapter to assist in transforming hosted equations and to set the stage for the advan ed treatment of variational grid generation presented in the next three hapters. The reader is assumed to be familiar with lassi al on epts su h as the gradient of a s alar fun tion, the divergen e and url of a ve tor, and the Lapla e operator. These are extended in the Se tion 7.2 to the gradient of a ve tor, the divergen e and tra e of a tensor, the gradient of a tensor, and the tensor produ t of ve tors. These extensions prove quite useful in expressing the transformed operators of hosted equations in ompa t form. The gradient, divergen e, url, and Lapla ian operators are given in general oordinates in terms of transformation matri es su h as the Ja obian and its inverse (Se tion 7.3). As an additional bene t, the transformation relations help tie up a few loose-ends left in the previous hapters. Se tion 7.3.5 derives the Winslow grid generation equations by inverting the map from physi al to logi al spa e, thus ompleting the dis ussion in Se tion 5.4.2, Chapter 5. Se tion 7.3.6 returns to the topi of type invarian e of the hosted equation to show that the type of the equation is invariant to a hange of oordinates. Se tion 7.3.7 derives the moving-grid identity mentioned in Se tion 5.7.2 on the Deformation method and uses it to obtain onservative formulations of time-dependent hosted equations in general oordinates.

7.2 Tensor Analysis The basi obje ts in a grid generator su h as s alar, ve tor, and tensor fun tions are related through the familiar gradient, divergen e, and url operators and through some non- lassi al extensions thereof. Both lassi al and non- lassi al operators are de ned in this se tion; the non- lassi al de nitions are based on Gurtin, [87℄. Although this se tion is basi ally a atalog of de nitions and relationships, some motivation is provided in examples and exer ises to relate this se tion to grid generation. The de nitions are also relevant to the transformation of the hosted equations. A large number of relationships an be derived from the basi de nitions; an attempt has been made to give only the most useful. 131



132

1992 by P.M. Knupp, September 8, 2002

Operator Domain Range Tra e Tensor S alar Gradient S alar Ve tor Gradient Ve tor Se ond-Order Tensor Gradient Se ond-Order Tensor Third-Order Tensor Divergen e Ve tor S alar Divergen e Se ond-Order Tensor Ve tor Curl Ve tor Ve tor Lapla ian S alar S alar Lapla ian Ve tor Ve tor Tensor Produ t Ve tors Tensor Table 7.1: Summary of an operator's domain and range Although the de nitions and relationships of this hapter hold in quite general settings, only the planar and volume ases are spe i ally onsidered sin e these are relevant to grid generation. The tangent and other ve tors reside in an asso iated ve tor spa e V . The term se ond-order tensor is used inter hangeably with the term matrix to mean any linear transformation T : V ! V . Only se ond and third order tensors are needed in this book. For lari ation, Table 7.1 summarizes the range and domain of the operators de ned in this se tion.

7.2.1 The Tra e of a Tensor

The tra e of a se ond-order tensor S is the s alar tr(S ) =

X

j

Sjj :

(7.1)

Exer ise 7.2.1 Find tr(J ), tr(J T ), tr(J 1 ), tr(G ), tr(G 1 ). x

7.2.2 The Gradient of a Ve tor Re all that the gradient rf of a s alar f

= f (; ) is r f = (f ; f ). If f = f (x(; ); y(; )), then f and f are the ovariant omponents of the gradient ve tor. The ontravariant omponents are rx f = (fx ; fy ); the transformation rule between the two sets of omponents is derived in Se tion 7.3.1. The gradient an be generalized to operate on ve tors. Let v 2 R2 or R3 be a ve tor fun tion, then the gradient of this ve tor is the se ond-order tensor: v [r v℄ij = i : (7.2) j

One of the important appli ations of this on ept in grid generation is r x, whi h is readily shown from de nition (7.2) to be the Ja obian matrix, i.e., J = r x. Only operators with logi al-spa e derivatives will be de ned in the rest of this se tion; be ause ve tors and tensors are independent of the oordinate system, all of the de nitions in this se tion apply with physi al-spa e derivatives as well.

Exer ise 7.2.2 Compute r x and r x . Show J 1 = rx  . x



133

1992 by P.M. Knupp, September 8, 2002

7.2.3 The Divergen e of a Tensor The divergen e of a ve tor v 2 R2 or R3 is vi : i i Exer ise 7.2.3 Show that for a ve tor v, div  v =

X

div  v = tr(r v) :x

(7.3)

(7.4)

Exer ise 7.2.4 Let f (; ) be a s alar fun tion and v(; ) a ve tor fun tion.

Verify the identity

x

div  f v = f div  v + v  r f :

(7.5)

The divergen e an be generalized to operate on tensors. Let S = [S ℄ij be a se ond-order tensor with ` rows and m olumns (m = 1; 2, or, 3), then divergen e of this tensor is the ve tor whose i-th omponent (i = 1; : : : ; `) is: (div S )i =

m X

 Sij : j =1 j

(7.6)

Exer ise 7.2.5 Let f (; ) be a s alar fun tion. Verify the produ t rule div (f S ) = f div S + Sr f : x

(7.7)

The following divergen e identity is used in the next hapter to derive ovariant proje tions of the Euler-Lagrange equations. For any tensor S and any ve tor v, (div S )  v = div  (S T v) tr(S T r v):

(7.8)

Exer ise 7.2.6 Prove this identity. x Two auxiliary matri es, T C = pg (J 1 )T ; C 1 = Jpg ;

(7.9)

are introdu ed to give an example of the use of the divergen e of a tensor. In the planar ase, these matri es are

C= and



y x

y x





(7.10)



y x (7.11) y x : In the surfa e and volume ases, the auxiliary matri es are more ompli ated. To show that these auxiliary matri es have some importan e of their own, observe that one has dire tly from (7.10) and (7.11)

C 1=

div C = 0 ; divx C 1 = 0 :

(7.12) (7.13)



134

1992 by P.M. Knupp, September 8, 2002

C = pgJ G 1 , (7.12) is seen to be a re-statement of the metri

By observing that identity (4.129):

p div ( g J G 1 ) = 0 :

Exer ise 7.2.7 Verify also that divx (

(7.14)

G pJ 1 ) = 0 :

(7.15)

g

Write this equation expli itly in terms of the physi al-spa e derivatives of the fun tions  (x; y) and (x; y). x

Exer ise 7.2.8 Use (7.8), (7.12)-(7.13) to derive the identities

pg

1 div  C T x ; 2  p1g = 12 divx  (C 1 )T  ; =

(7.16) (7.17)

i.e., the area metri s an be expressed as divergen es of ertain ve tors.

7.2.4 The Gradient of a Tensor Let S be a se ond order ` by m tensor. third-order tensor

x

Then de ne its gradient to be the

Sij (7.18) k with k = 1; : : : ; m. For example, [r J ℄21;2 = x . Let T be an m by m se ond-order tensor. Then the ontra tion of the gradient of S with T is the ve tor whose i-th

omponent (i = 1; 2; : : : ; `) is: [r S ℄kij =

([r S ℄T )i =

m X m X

Sij Tjk : j =1 k=1 k

(7.19)

Exer ise 7.2.9 Show that the Winslow grid operator (5.48) may be expressed as Qw x = g [r J ℄ G 1 : x (7.20)

the ontra tion

Exer ise 7.2.10 Let T = [T ℄ij be a 2  2 matrix and J the planar Ja obian

matrix. Show that

[r J ℄T = T11 x + (T12 + T21 ) x + T22 x : x

(7.21)

Exer ise 7.2.11 Verify the produ t rule div (S T ) = S div T + [r S ℄ T : x

(7.22)

Exer ise 7.2.12 Let R be an n by ` tensor. Verify the ve tor identity: [r (R S )℄ T = R ([r S ℄ T ) + [r R℄(S T ): How many omponents do the ve tors in this identity have?

x

(7.23)



135

1992 by P.M. Knupp, September 8, 2002

Exer ise 7.2.13 Re all that in the planar ase,

p1g = x y y x :

(7.24)

Use (7.22) to verify the ontra tions

r pg rx p1g

= [r J T ℄C ;

= [rx (J 1 )T ℄C 1 : x

Exer ise 7.2.14 Use (7.22), (7.12), and (7.13) to show [r C 1 ℄C = 0 ; [rx C ℄C 1 = 0 : x

(7.25) (7.26)

(7.27) (7.28)

7.2.5 Curl and Lapla ian The lassi al de nitions of url and Lapla ian are all that are needed in this book. The url of a two- omponent ve tor v = (u; v) is the ve tor url v = (v u ) k^, while the url of a three- omponent ve tor v = (u; v; w) is the ve tor

url v = (w

v ; u 

w ; v

u ) :

(7.29)

These omponents are obtained from the de nition url v = r  v, provided that in two-dimensions v = (u; v; 0) and

 ; 0) : r = (  ; 

(7.30)

Exer ise 7.2.15 Show that for a three- omponent ve tor, div  ( url v) = 0. Show that url (r f ) = 0 holds in both planar and three-dimensional ases. x The familiar s alar Lapla ian or Lapla e operator is:

r2 f = div  r f = f + f :

(7.31)

This is most easily generalized to the ve tor Lapla ian using the de nition of the divergen e of a tensor:

r2 v = div (r v) = v + v : (7.32) Exer ise 7.2.16 Show that the divergen e of the 2  2 Ja obian matrix is the Lapla ian of x. x 7.2.6 The Tensor Produ t Given two ve tors a 2 RM and b 2 RN , the tensor produ t (a b) is the tensor [a b℄ij = ai bj : (7.33) It is lear from this de nition that (b a) = (a b)T . Some important examples of the tensor produ t that o

ur in planar variational grid generation (see Chapter 8) are given in the next exer ise.



136

1992 by P.M. Knupp, September 8, 2002

Tensor

Det. Tr. x x 0 g11 x x 0 g12 x x 0 g12 x x 0 g22 (x x )+ -g 2g12 (x x )

Eigenve tor

Eigenvalue Null Ve tor g11 x? g12 x? g12 x? g22 x? 0 pgg1211g22

x x x pg22xx  pg11 x

Table 7.2: Covariant tangent tensor produ t properties

Exer ise 7.2.17 Verify the following tensor produ ts:   x2 x y x x = x y y2 ;    (x x ) + (x x ) =

x x =





2x x x y + x y x y + x y 2y y  2 x x y :x x y y2

(7.34) 

;

(7.35) (7.36)

Exer ise 7.2.18 Show that the rank of a b is one. Show that for any ve tor v 2 RN , (a b) v = (b  v) a : (7.37) Use this property to verify that x is an eigenve tor of x x . Verify some of the

eigenve tors and other entries given in Table 7.2.

x

Exer ise 7.2.19 Use (4.126), (4.127), (4.146), and (7.37) to prove the following

identity:

p

( g) x =

p1g [g11 (x x ) g12 (x x )℄ x + p1g [g22 (x x ) g12 (x x )℄ x :

(7.38)

Note how the tensor produ t property (7.37) an be used to ferret out the se ond derivatives hidden in the rate-of- hange metri s. This identity and ones involving (pg) x , (pg) x , (pg) x are used in the derivation in Se tion 8.3.5. x

Exer ise 7.2.20 Let f be a s alar fun tion and v a ve tor fun tion. Verify the

produ t identity:

r (f v) = f r v + v r f : x

(7.39)

Exer ise 7.2.21 Use (7.37) to show that for any four ve tors a, b, p, q 2 RN , a  f(p q) bg = (a  p) (q  b) ; (7.40) (a + b) (p + q) = (a p) + (a q) + (b p) + (b q) ; (7.41) [(a p) q℄ b = (a p) (q b) :x (7.42)



137

1992 by P.M. Knupp, September 8, 2002

Exer ise 7.2.22 Re all that G = J T J and G 1 = J 1 (J 1 )T . Verify that the

produ t of the Ja obian matri es in opposite order an be expressed in terms of the following tensor produ ts: g (J 1 )T J 1 = (x? x? ) + (x? x? ) ; (7.43) 

J JT







= (x x ) + (x x ) :

These equations also show that f(x f(x? x? ) + (x? x? )g=pg. x

x ) + (x x )g=pg

(7.44)

is the inverse of

Exer ise 7.2.23 Prove the rst of the following identities: 2 (x? x? ) + g2 (x? x? ) g (x x ) = g11   12  

g12 g11 [(x? x? ) + (x? x? )℄ ;

g [(x x ) + (x x )℄ = 2 g11 g12 (x? x? ) ? + 2 g22 g12 (x?  x ) 2) (g11 g22 + g12 ? ? ? [(x x?  ) + (x x )℄ ;

(7.45)

(7.46) (7.47)

2 (x? x? ) 2 (x? x? ) + g12 g (x x ) = g22 g12 g22 [(x? x? ) + (x? x? )℄ ;

(7.48)

g I = g11 (x? x? ) + g22 (x? x? ) g12 [(x? x? ) + (x? x? )℄ ;

(7.49)

by applying the relation

pg x

? = g12 x? (7.50)  g11 x together with (7.41). The symbol I is used in this book to denote the identity matrix. These identities onvert tensor produ ts of ovariant ve tors to tensor produ ts of

ontravariant ve tors. Identities between mixed ovariant and ontravariant forms also exist. x 

7.3 Transformation Relations Tensor analysis is the natural language for stating the gradient, divergen e, url, and Lapla ian operators that o

ur in the hosted equations in general oordinates. Detailed derivations of these relationships are too lengthy to in lude here, but readers should verify a few of them on their own. Conservative and non- onservative forms are given for ea h of the transformed operators. Relationships an be given either in terms of J or the auxiliary matrix C ; the latter is generally preferred due to the identity (7.12), but both forms are useful.



138

1992 by P.M. Knupp, September 8, 2002

7.3.1 Gradient Gradient of a S alar Fun tion Expressions for the gradient in general oordinates were given in Chapter 2, Equations (2.50); these were derived using the hain rule. The relations an be

ompa tly expressed in terms of the auxiliary matri es de ned in the previous se tion: rx f = p1g C r f (7.51) or, inverting,

r f = pg C 1 rx f :

(7.52)

These are the non- onservative forms of the gradient transformation. To obtain the onservative forms (2.51), apply the identities (7.12) and (7.13), along with the produ t rule (7.7) to nd div C f = divx C 1 f =

Cr f ; C 1rx f :

(7.53) (7.54)

Thus, the gradient of f (x; y) in onservative form is the divergen e of a tensor: rx f = p1g div (C f ) : (7.55) Inverting:

r f = pg divx (C 1 f ) :

(7.56)

The Normal Derivative Hosted equations, su h as (2.45), are often solved with Neumann boundary

onditions, stated in terms of the normal derivative. By de nition, the normal derivative of f (x) is f = n  rx f ; (7.57) n where n is a unit normal to a given surfa e in physi al spa e. In general oordinates, this is n f = p  C r f : (7.58) n g If the surfa e forms a boundary of the domain, then one of the logi al spa e oordinates is onstant on the surfa e. In two dimensions, for example, 8
0, then both dis riminant have the same sign, i.e., the type of the transformed

equation is the same as the type of the original equation, provided the transformation is non-singular. The matri es T and T 0 are ongruent sin e they are related by an expression of the form T 0 = ST S T (Horn and Johnson, [96℄). In general, ongruent matri es have exa tly the same number of positive eigenvalues, negative eigenvalues, and zero eigenvalues, on e again explaining the invarian e of type in the hosted equation.

7.3.7 Transformation of the Time Derivative The goal here is to des ribe how time-dependent hosted P.D.E.'s su h as the paraboli equation ft = r2x f are transformed. For two-dimensional physi al-spa e, the logi al spa e now onsists of the triple (; ;  ), 0    1, the oordinate mapping is (x(; ;  ); y(; ;  )) and the dependent variable is f = f (x(; ;  ); y(; ;  ); t( )). Note that the original physi al time-variable depends only on the transformed time variable  and not on the other logi al oordinates. Appli ation of the hain rule shows

f = fx x + fy y + ft t ; = x  rx f + ft t :

(7.101)

The ve tor x is known as the grid-speed, as it measures the rate-of- hange of position of the grid with respe t to the logi al time variable. The time-dependent quantity that appears in the hosted equation is ft , whi h is

ft =

1 ff t 

x   rx f g :

(7.102)



1992 by P.M. Knupp, September 8, 2002

143

This form is not parti ularly useful sin e it ontains derivatives with respe t to both the logi al and physi al variables. The fully transformed expression, in non- onservative form is easily obtained from (7.51): x 1 (7.103) ft = ff p  Cr f g : g t To obtain the onservative form, the moving-grid identity (5.122) must be proved. The proof uses (7.5), (7.72), and the hain rule: x 1 1 divx  p = p divx  x + x  rx p ; (7.104) g g g x  r pg ; 1 (7.105) = p divx  x x g g 1 p = (7.106) [trf(r x ) C T g ( g) ℄ g = 0: (7.107) Combining the produ t rule (7.5) for the divergen e of a s alar times a ve tor with the time-dependent metri identity gives f x  rx f = pg divx  ( p x ): (7.108) g The divergen e in the metri identity may be transformed to the logi al domain using the relationship (7.70) to obtain the following onservative transformation rule for the time-derivative: f 1 ft = ff div  ( p C T x )g: (7.109) t g Exer ise 7.3.7 Show that the paraboli equation

ft = divx  (T rx f )

(7.110)

transforms to

CT T C f t f = p div  ( p r f ) + div  ( p C T x ) : x g g g If one has a ve tor of dependent variables f = (f1 ; f2 ; f3 ), CT x f 1 f = f div [f ( p  )℄g : t t  g

(7.111)

(7.112)

Exer ise 7.3.8 Use (7.112) to ompute the quantity tx . x

The material (or substantial) derivative, Df = ft + v  r x f ; (7.113) Dt is often en ountered in uid me hani s. Here, v is not an arbitrary ve tor, but rather the uid velo ity. In parti ular, note that v 6= x . Assuming a moving grid, the material derivative an be transformed to the non- onservative form: Df 1 1 = ff p (x v t )  C r f g : (7.114) Dt t g



144

1992 by P.M. Knupp, September 8, 2002

Note that the se ond term drops out if x = v t . There is no fully onservative form of the material derivative be ause the moving-grid identity annot be applied to v. The substantial derivative of a ve tor quantity f is de ned as

Df = ft + (v  rx ) f ; Dt = ft + (rx f ) v :

(7.115) (7.116)

Applying the transformation rules (7.112) and (7.62) gives the non- onservative form Df 1  f CT x 1 = f div [f ( p  )℄g + p (r f )C T v : (7.117) Dt t  g g All the results of this se tion readily generalize to the ase R3 . As a tting on lusion to this hapter, the three-dimensional Navier-Stokes equation

Dv = rx  rx p + divx [(rx v) + (rx v)T + (divx  v)I ℄ (7.118) Dt is transformed. The symbol  is used for the gravity term to avoid onfusion with the metri symbol g ( is the uid density, p the uid pressure, and  the dynami vis osity). Applying (7.117), the left-hand-side of the Navier-Stokes equation transforms to 



Dv   v = f Dt t 

div [v (

CpT x )℄g + p (r v)C T v g g 

(7.119)

while the right-hand-side is transformed to

p1g fdiv (C )

 div p [(r v)C T + g using (7.55), (7.74), (7.62), and (7.70).

div (C p) +

C (r v)T + (div  C T v)I ℄Cg

(7.120)

Chapter 8

Advan ed Planar Variational Grid Generation 8.1 Introdu tion The tensor and transformation relationships developed in the previous hapter have many appli ations to variational grid generation. In light of these te hniques, the planar variational ase, presented in Chapter 6, is re-examined in this hapter, beginning with a review of several variational prin iples. General planar variational prin iples for both physi al and logi al weight fun tions are given in 8.2. All the fun tionals of grid generation an be expressed in terms of the elements of the metri tensor and its determinant, so parti ular attention is paid to this ase in subse tion 8.2.1 and several new variational prin iples are introdu ed. The on ept of a homogeneous fun tion is introdu ed to show that fun tionals based on su h fun tions are invariant to rigid body transformations see Se tion 8.2.2. The Euler-Lagrange equations of grid generation are the main fo us of this hapter; they are expressed in divergen e form in Se tion (8.3). Several forms are given before the dis ussion is restri ted to fun tionals whi h depend on the elements of the metri tensor. A

ompa t, (near- onservative) divergen e form of the Euler-Lagrange is found and related to a generalization of the 2D hosted equation. Se tion 8.3.3 dis usses the numeri al solution of this equation; the approa h enables one to write a omputer

ode that will automati ally generate a grid based on a wide lass of fun tionals of the metri tensor. Another form of the Euler-Lagrange equations, alled the Covariant Proje tion, is derived in Se tion (8.3.4); the proje ted form gives a relationship between the rates-of- hange of the grid metri s and is fully onservative. Ex essive labor is required to expli itly al ulate the Euler-Lagrange equations for arbitrary fun tionals, so a non- onservative expression, known as tensor form, is derived. The

oeÆ ients in the tensor form are expressed in terms of tensor produ ts of the tangent ve tors and rst and se ond partial derivatives of the variational prin iple with respe t to the elements of the metri tensor. The form is easy to apply and fa ilitates writing a

omputer ode to solve the tensor form of the Euler-Lagrange equations for arbitrary fun tionals. Both physi al and logi al weighted ases are onsidered. In Se tion 8.4, some results are given for the se ond variation of the grid generation fun tional. Finally, the variational grid generation approa h due to Bra kbill and Saltzman is given and related to the Steinberg-Roa he method favored in this book. 145



1992 by P.M. Knupp, September 8, 2002

146

8.2 Variational Prin iples The most general planar variational problem that is onsidered in this book was given in Equation (6.3); it is restated here for onvenien e. Minimize

I1 [x℄ =

Z

1Z 1

G(; x; x ; x ) d d (8.1) 0 0 subje t to the given boundary data. If logi al weight fun tions are used, it is assumed that the fun tional takes the form

I2 [x℄ =

1 Z 1 G^ (x ; x ) d d ; 0 0 ( )

Z

(8.2)

where  is a positive fun tion of the logi al variables. If physi al weight fun tions are used, the fun tional takes the form

I3 [x℄ =

1 Z 1 G^ (x ; x ) d d ; 0 0 w2 (x)

Z

(8.3)

where w is a positive fun tion of the physi al variables. Most grid generation fun tionals have a yet more spe i form, dis ussed in the next se tion.

8.2.1 Fun tionals of the Metri Tensor Of parti ular interest to grid generation are variational prin iples that an be expressed dire tly in terms of the elements of the metri tensor, its determinant, and a positive physi al-spa e weight fun tion . In this ase, the prin iple takes the form

1 Z 1 H (g11 ; g12 ; g22 ; pg) d d (8.4) w2 (x) 0 0 where H is some smooth positive fun tion from R4 to R. Table 8.1 lists ten I4 [x℄ =

Z

proposed grid generation fun tionals having this form and also a weighted ombination fun tional. Some of the prin iples have already been presented in Chapter 6; others lead to seldom-used generators that are mainly of theoreti al interest. The performan e of all ten is ompared on a standard set of domains in the Rogue's Gallery in Appendix C. Prin iples in Table 8.1 that were not dis ussed in Chapter 6 are now brie y onsidered.

Orthogonality-II The se ond orthogonality fun tional was also proposed in Steinberg and Roa he, [191℄ Z 1Z 1 2 g12 IO;II [x℄ = d d : (8.5) 0 0 g11 g22 This variational prin iple makes geometri sense be ause p is the square of p the integrand the inner produ t of the two unit tangent ve tors x = g11 and x = g22 ; the fun tional

ontrols only the relative dire tion of the two tangents and not their lengths.



147

1992 by P.M. Knupp, September 8, 2002

Prin iple

Symbol

Form of H

Length

IL

Area

IA

g11 + g22 (pg)2

Orthogonality-I

IO;I

2 g12

Orthogonality-II

IO;II

Orthogonality-III

IO;III

pg11 g22

AO

IAO

g11 g22

AO-Squared

IAO2

Winslow

IW i

Liao

ILi

Modi ed Liao

IML IC

Combined

2 g12 g11 g22

(g11 g22 )2 g11p+g22 g

2 + g22 2 + 2g12 2 g11 ( g11p+g22 )2 P

g

Hk k k wk2

Table 8.1: Unweighted Variational Prin iples

Orthogonality-III Table 8.1 illustrates that di erent fun tionals an all result in orthogonal grids. The third orthogonality fun tional is related to the \S aled-Lapla ian" (5.30), Chapter 5, whi h an be obtained from the variational prin iple 1 1 1 g (8.6) (f g11 + 22 ) d d : 2 0 0 f with the logi al-spa e weight f = f (; ) > 0. The S aled-Lapla ian is a spe ial

ase of the weighted Length fun tional (6.50), with  = f1 and = f . Physi al spa e weighting, f = f (x), would seem to be more useful (this would not lead to the S aled-Lapla ian equation, however). Another interesting fun tional (related to the q into the variational weak onstraint approa h) an be derived by inserting f = gg22 11 prin iple (8.6); this leads to

ISL [x℄ =

Z

IO;III [x℄ =

Z

Z

1Z 1p g11 g22 d d : 0 0

(8.7)

The performan e of this latter fun tional is displayed in the Rogue's Gallery in Appendix C.



148

1992 by P.M. Knupp, September 8, 2002

AO-Squared As the name suggests,

IAO2 [x℄ =

Z

1Z 1 0 0

[g11 g22 ℄2 d d ;

(8.8)

minimized subje t to the given boundary onditions. This fun tional is in luded be ause the orresponding grids shown in the Rogue's Gallery in Appendix C are generally very good.

The Winslow Fun tional The Length fun tional IL leads to smooth, but possibly folded grids. A \penalty"

an be introdu ed to move the minimum away frompregions of zero Ja obian. This is a

omplished by dividing the Length integrand by g, leading to the fun tional:

1 Z 1 g11 + g22 IW i [x℄ = pg d d : 0 0 Z

(8.9)

Sin e d d = dx dy=pg, this integral over the logi al domain transforms to an integral over the physi al domain having the form Z

Z

g11 + g22 dx dy = g11 + g22 dx dy : (8.10) g



The latter fun tional is the well-known variational prin iple for the Winslow or homogeneous TTM generator. IW i [ ℄ =

The Liao Fun tional Liao, [124℄, proposed the following grid generation fun tional based on a proof of

onvexity in Da orogna, [42℄. The fun tional has the form H =j J j4 2(det J )2 , so one minimizes Z 1Z 1 ILi [x℄ = [(g11 + g22)2 2g℄ d d : (8.11)

0 0

2 + g22 2 + 2g12 2 =j G j2 . Although the The integrand is also equivalent to H = g11 fun tional is positive and onvex (and therefore has unique minimum), the resulting grids are often folded, as is seen in the Rogue's Gallery in Appendix C.

Modi ed Liao The Liao fun tional an be improved by introdu ing a penalty fun tion to mitigate the tenden y to fold. Dividing the Liao integrand by g, the resulting \Modi ed Liao" fun tional is Z 1Z 1 g +g IML [x℄ = ( 11p 22 )2 d d : (8.12) g 0 0 The IML integrand is just the square of the Winslow integrand. As the Rogue's Gallery shows, the penalty approa h helps keep the \Modi ed Liao" grids from folding.



1992 by P.M. Knupp, September 8, 2002

149

Weighted Combination

Let f k g, k = 1; : : : ; K be a set of onstants whose sum is unity. Let Hk = Hk (g11 ; g12 ; g22; pg) be K fun tions of the elements of the metri tensor and wk = wk (x) a orresponding set of weight fun tions. Then the weighted ombination to be minimized is Z 1Z 1X K H IC [x℄ = k 2k d d : (8.13) 0 0 k=1 wk This general fun tional form an provide suÆ ient exibility to generate useful grids on ompli ated regions.

8.2.2 Rigid Body Transformations of the Domain Rigid body transformations in the plane onsist of translations, rotations and stret hes of s ale of physi al spa e. Similar transformations on logi al spa e will also be onsidered. Any useful grid generator will have the property that the grid generated after a rigid body transformation of the boundary of the physi al domain is the same grid that would be obtained if the grid were generated using the original boundary, then the rigid body transformation applied. Criteria to guarantee su h behavior are dis ussed in this se tion. First note that physi al-spa e weights are typi ally omputed from the solution of a hosted PDE; be ause the solutions of su h PDEs are typi ally invariant to rigidbody transformations, then the weight an be invariantly de ned. Thus, if w^ is the transformed weight, it will be the ase that

w^(^x) = w(x) :

(8.14)

If one performs a translation x^ = x + x0 of the physi al boundary data, then the tangents x and x are independent of su h a shift. Sin e the variational prin iple I2 only depends on the tangents, the resulting grids will be invariant to translation. Variational prin iples su h as I3 or I4 must have physi al-spa e weights with the property w(x^) = w(x) to be invariant under translation. Similarly, rigid body rotations an be represented by an orthogonal transformation S T = S 1 , so that x^ = S T x. Rotations preserve the lengths of the tangents, so the variational prin iples are una e ted by rotation, provided w(x^) = w(x).

Exer ise 8.2.1 Show that the Length generator (5.42) is invariant to translations and rotations of the physi al domain. x Most grid generators are not invariant to nonuniform stret hes of the physi al

oordinate axes. Suppose  and  are positive real onstants with x^ =  x and y^ =  y. Then, for example, the metri g^11 be omes g^11 = x^2 + y^2 = 2 x2 +  2 y2 6= g11 . Sin e the metri s are not invariant, most grid generators are not invariant to su h stret hes. However, if the stret h is uniform, that is, if  =  , then the metri s s ale with the stret h. For example g^11 = x^2 + y^2 = 2 x2 + 2 y2 = 2 g11 .

Exer ise 8.2.2 Show that the area metri pg s ales with respe t to a non-

uniform stret h and, onsequently, that grids generated by the Area fun tional are invariant with respe t to nonuniform stret hes. x In fa t, most generators will be invariant to a uniform stret h  =  of the physi al domain be ause then the tangents and metri s s ale with the stret h.



150

1992 by P.M. Knupp, September 8, 2002

Exer ise 8.2.3 Show that grids generated by the Length fun tional are invariant with respe t to uniform stret hes. x Consider the e e t of a non-uniform stret h of the logi al domain upon the grid generator. Let ^ =   and ^ =  . Then x =  x^, x =  x^. Let g^ij = x^i  x^j be the transformed metri s. Then g11 = 2 g^11 , g12 =   g^12 , g22 =  2 g^22 , and p p g =   g^. Exer ise 8.2.4 Show that the Winslow grid generator (5.48) is invariant to a nonuniform stret h of the logi al domain, whereas the Length generator (5.42) is not.

x

Sin e the logi al domain is generally xed, invarian e of a grid generator to nonuniform stret hes of the logi al domain is not often required. It is useful to be aware of the property, however, sin e some grid generation systems may be based on nonsquare logi al domains while others are based on square logi al domains.

n if

DEFINITION 8.1 Let  > 0. A fun tion F : Rk ! R is homogeneous of degree F ( x1 ;  x2 ; :::;  xk ) = n F (x1 ; x2 ; :::; xk ) :

(8.15)

Exer ise 8.2.5 Verify that the fun tionals in Table 8.1 are homogeneous and nd the degree n for ea h. What an be said about the weighted ombination fun tional, IC ? Is the Area-Length ombination IW (6.70) homogeneous? x THEOREM 8.2 If the integrand H in (8.4) is homogeneous of degree n, then the resulting unweighted grid generator is invariant to uniform stret hes of both the physi al and logi al spa es.

Proof. The elements of the metri tensor s ale as g^ij = 2 gij under a uniform stret h of either the physi al or logi al domain. Therefore,

p

p

H (^g11 ; g^12 ; g^22 ; g^) = H (2 g11 ; 2 g12 ; 2 g22 ; 2 g) = 2n H;

so the new fun tional is merely a onstant times the original fun tional.

(8.16)

x

8.3 The Euler-Lagrange Equations The Euler-Lagrange equations are the fo us of most of this hapter sin e they are, in fa t, the grid generation equations. Euler-Lagrange equations for planar fun tionals were derived in se tion 6.2, Chapter 6. Using the tools of tensor analysis introdu ed in the previous Chapter, the Euler-Lagrange equations are re- ast in terms of the divergen e operator. Several forms are onsidered to over both physi al and logi alspa e weight fun tions.

8.3.1 The General Planar Euler-Lagrange Equations The most general form of the planar variational prin iple was given in 8.1, for whi h the Euler-Lagrange equations (6.11)-(6.12) apply. To write the Euler-Lagrange equations in a more ompa t form, de ne the matrix 0

T

G x  = G y

1

G x A G y

:

(8.17)



151

1992 by P.M. Knupp, September 8, 2002

The tools developed in Chapter 7 an then be applied to write the Euler-Lagrange equations in the ompa t form rx G div T = 0 : (8.18) Note the mixture of partial derivatives with respe t to both physi al and logi al

oordinates. The transformation rule (7.55) annot be dire tly applied to the gradient operator be ause G is not stri tly a fun tion of just the physi al variables, but also of the logi al variables and the tangent ve tors. If the logi ally-weighted variational prin iple I2 in (8.2) is assumed, then the Euler-Lagrange equation (8.18) redu es to the onservative form T^ div = 0 (8.19)  with T^ de ned by repla ing G in (8.17) by G^ . Applying the produ t rule (7.7), the non- onservative form of the Euler-Lagrange equations for logi al weighting is just r (8.20) div T^ = T^  :  If the physi ally-weighted variational prin iple I3 in (8.3) is assumed, then the EulerLagrange equation (8.18) be omes 1 T^ (8.21) div 2 = G^ rx 2 : w w Sin e the weight in the inhomogeneous term is just a fun tion of x, the gradient an now be inverted using (7.55) to get 1 G^ T^ div 2 = p C r 2 ; (8.22) g w w G^ C = p div 2 : (8.23) g w Fully expanded, the non- onservative form of the physi al-spa e weighted EulerLagrange equations is ( ) G^ r w : ^ ^ div T = 2 T p C (8.24) g w Noti e that a fully onservative form is not obtained if physi al-spa e weights are used. However, a fully onservative form of the Euler-Lagrange equations for physi al spa e weights is derived in Se tion 8.3.4. The hain rule an be applied to the left-hand-side of either (8.20) or (8.24) to obtain Euler-Lagrange equations in the tensor form of Se tion 6.4: S11 x + ((S12 + S12T ) x + S22 x = T^ r  ; if Logi al Weight, (8.25) 2fT^ pG^g Cg rw w ; if Physi al Weight, where the matri es S are de ned by

 2 G^ x x S =   2 G^ y x 0

1  2 G^ x y A:  2 G^ y y

(8.26)



152

1992 by P.M. Knupp, September 8, 2002

Although this last is a powerful result, still more an be said for the fun tional I4 , as demonstrated in the next se tion.

8.3.2 The Euler-Lagrange Equations for the Prin iple I4 The Euler-Lagrange equation (8.23) holds for a general variational prin iple with physi al-spa e weights. If, in addition, the form in (8.4) is assumed, the equations be ome (8.27) pHg div wC2 div wT2 = 0 : with 1 0

T

=



H x H y

H x A H y

:

(8.28)

Equation (8.27) is not signi antly di erent from that obtained from the fun tional I3 , but sin e H has the spe ial form in (8.4), the Euler-Lagrange equation an be developed further using the hain rule. If A = A(x ; x ) is a s alar fun tion of the tangent ve tors, de ne the ve tors 0

A

A  x = A  x y 

0

1 A

;

A

A  x = A  x y

1 A

:

(8.29)



Then, for example, (8.28) be omes T = [H= x ; H= x ℄. Exer ise 8.3.1 Show that  pg g12 g22 g11 = 2x ; = x ; = 0; = x? ;  x  x  x  x  pg g11 g12 g22 = 0; = x ; = 2x ; = x?  :x  x  x  x  x The results of the previous exer ise are ombined with the hain rule to show H H H = 2x + x x? H ;  x g11 g12  pg H H H H = 2x + x + x?   pg :  x g22 g12

(8.30) (8.31)

(8.32) (8.33)

It is now easy to observe that the matrix T has the fa torization T = J B where the tensor B is de ned by B = M + pg H (8.34) pg G 1 and [M℄ij = (1 + Æij ) H=gij with Æij the Krone ker Delta. The tensor B thus p

ontains partial derivatives of H with respe t to g and to the elements of the metri tensor; B is symmetri . Sin e the Ja obian matrix is the gradient of the position ve tor, one has the resulting non-linear Euler-Lagrange equation C (r x)B H (8.35) div  2 = p div 2 : w g w A table of partial derivatives for the various variational prin iples in Table 8.1 is provided in Table 8.2.



153

1992 by P.M. Knupp, September 8, 2002

Prin iple

H g11

H g12

H g22

H  pg

Length

1

0

1

0

Area

0

0

0

2 pg

Orthogonality-I

0

2 g12

0

0

2 g12 g11 g22

Orthogonality-III

g2 2 12g22 g11 1 q g22 2 g11

0

g2 2 12g11 g22 1 q g11 2 g22

AO

g22

0

g11

Orthogonality-II

AO-Squared

2 2 g11 g22

0

2 2 g22 g11

Winslow

p1g

0

p1g

Liao

2 g11

4g12

2 g22

Modi ed Liao

2 g11 +g g22

0

2 g11 +g g22

0 0 0 0

g11 +g22 g

0

2 (g11 +23g22 )

2

g

Table 8.2: First partial derivatives of the variational prin iples

Exer ise 8.3.2 Consider the variational prin iple H = pg with w = 1. Compute

the matrix B and evaluate (8.35); show that the metri identity (7.14) results. Find a geometri interpretation of this result and show that for any prin ipal H and any

onstant s alar, , the prin ipal H~ = H + pg has the same minimizing transformation as H . x

Exer ise 8.3.3 Compute B for the two forms of the Area fun tional: p H = ( g )2 ; 2 ; H = g11 g22 g12

and ompare the results. Show that, for this B, generi property of solutions to (8.35). x

pg

(8.36) (8.37)

= w with a onstant is a

The fa t that the homogeneous Euler-Lagrange equations resulting from the variational prin iple (8.4), with w = 1, an be expressed as the divergen e of J B does not need explaining, for, in general, the Euler-Lagrange equations always have the form div T = 0 for some tensor T . This an always be written as div J B~ = 0 with B~ = J 1 T . However, if one expresses this same Euler-Lagrange equation as div (r x)B = 0, the analogy with the hosted equation (Se tion 7.3.6) is ompelling. The question arises, is there a generalization of the hosted variational prin iple (6.22) that an be onne ted to the prin iple I4 ? The following theorem and orollary delineates su h a onne tion.

THEOREM 8.3 If H is homogeneous of degree n, then 2 n H = trfJ B J T g = trfG Bg :

(8.38)



154

1992 by P.M. Knupp, September 8, 2002

(i−1, j+1)

B 12 (i−1/2,j+1/2)

B 22 (i,j+1/2)

(i−1/2,j)

B 12 (i−1/2,j−1/2)

(i−1,j−1)

B 12 (i+1/2,j+1/2)

B 11

B11 (i−1, j)

(i+1, j+1)

(i, j+1)

(i, j)

B 22 (i,j−1/2)

(i+1, j)

(i+1/2,j)

B 12 (i+1/2,j−1/2)

(i, j−1)

(i+1, j−1)

Figure 8.1: Lo ation of the entries of B Proof. The proof is a dire t omputation, based on the well-known Euler formula for homogeneous fun tions: H H H p H nH = g11 +g +g + g p : (8.39) g11 12 g12 22 g22  g

x

COROLLARY 8.4 The variational prin iple (8.4) may be re-written Z Z 1 1 1 trf(r x) B (r x)T g d d ; I4 [x℄ = 2n 0 0

(8.40)

provided H is homogeneous of degree n, n 6= 0.

To make a onne tion between the variational prin iple for the hosted equation and the variational prin iple I4 thus requires the additional assumption of homogeneity of the fun tion H ( (8.35) is derived without this assumption). The extra assumption is not a burden sin e homogeneity is needed anyway to a hieve invarian e of the grid generator under rigid body motions, as dis ussed in Se tion 8.2.2. In general, ~ is minimized, where B~ = B~(x ; x ) is an arbitrary symmetri if the prin iple trfG Bg matrix, the resulting Euler-Lagrange equation has the form div J B^ = 0 where the two matri es B~ and B^ are not the same.

8.3.3 Numeri al Implementation This se tion shows how to write a omputer ode to numeri ally solve the nonlinear Euler-Lagrange equation (8.35), maintaining onservative form. The equation



1992 by P.M. Knupp, September 8, 2002

an be written expli itly as the pair B x +B x B x +B x ( 11  2 12  ) + ( 12  2 22  ) w w y H y = p f( 2 ) ( 2 ) g ; g w w B11 y + B12 y B12 y + B22 y ( ) + ( ) w2 w2 x x H = p f( 2 ) + ( 2 ) g : g w w

155

(8.41)

(8.42)

The left-hand-sides of both the rst and se ond equations are of the same form as the 2D hosted equation, so the dis retization applied in Se tion 2.4 will result in symmetri sten ils: 1 B22 Ni;j = (8.43) ( ) 1; 2 w2 i;j+ 2 1 B22 (8.44) ( ) 1; Si;j = 2 w2 i;j 2 1 B11 (8.45) Wi;j = ( ) 1 ;  2 w2 i 2 ;j 1 B11 Ei;j = ( ) 1 ; (8.46)  2 w2 i+ 2 ;j B 1 ( 12 ) 1 1 ; (8.47) NE i;j = 4   w2 i+ 2 ;j+ 2 B 1 (8.48) ( 122 )i 21 ;j+ 21 ; NW i;j = 4   w B 1 (8.49) ( 12 ) 1 1 ; SE i;j = 4   w2 i+ 2 ;j 2 1 B (8.50) SW i;j = ( 122 )i 21 ;j 21 ; 4   w Ci;j = (Ei;j + Wi;j + Ni;j + Si;j + NE i;j + NW i;j + SE i;j + SW i;j ): (8.51) The entries of the matrix B are lo ated at eight positions (see Figure 8.1): (B11 )i 12 ;j , (B22 )i;j 21 and (B12 )i 12 ;j 21 , so the tangents and metri s must be omputed at these eight lo ations. For example, 1 fx x +x xi;j g : (8.52) (x )i+ 21 ;j+ 21  2  i+1;j+1 i;j+1 i+1;j The nine-point sten il equation applies to ea h of equations (8.41)-(8.42), but with di ering right-hand-sides; the right-hand-sides are: 1 H RXi;j = ( ) 4   pg i;j f yi+1;j+1w2 yi+1;j 1 yi 1;j+1w2 yi 1;j 1 i+1;j i 1;j yi+1;j+1 yi 1;j+1 yi+1;j 1 yi 1;j 1 + g; (8.53) 2 +1 2 1 wi;j wi;j



1992 by P.M. Knupp, September 8, 2002

RYi;j =

1 H ( ) 4   pg i;j f xi+1;j+1w2 xi+1;j 1 xi 1;j+1w2 xi 1;j 1 i+1;j i 1;j xi+1;j+1 xi 1;j+1 xi+1;j 1 xi 1;j 1 + g; 2 +1 2 1 wi;j wi;j

156

(8.54)

Be ause the entral di eren ing used in this se tion follows the approa h in Chapter 2, it is expe ted that this algorithm is a se ond order a

urate approximation of (8.41)-(8.42). Sin e it an be shown that (8.41) is not ellipti in many ases, it is an important open problem to develop an existen e and smoothness theory for the equations (8.41)-(8.42). Curiously, solution methods that apply to ellipti problems work well in some of the nonellipti ases. In the numeri al odes des ribed in Se tion B.7 of Appendix B, the oeÆ ients generated by the tensor B are lagged in a Pi ard iteration like the one des ribed in Se tion 5.4.2. A swit h is built into the ode to ompute the entries of the matrix B, depending on whi h variational prin iple has been hosen. The iterative approa h outlined in this se tion is e e tive for the Length, Area, AO, and S aled Lapla e fun tionals, but it fails to onverge on the Winslow, Orthogonality-I, Liao, Modi ed Liao, and AO-Squared fun tionals. Sin e several of the latter are known to be onvex fun tionals, the la k of onvergen e is due to the numeri al s heme and not la k of existen e of a solution. If the sten il matrix is not diagonally dominant, or if the tensor B is not positive de nite, the approa h may break down. For example, if H = g122 , then B11 = B22 = 0 and the ross derivatives in the equations dominate. Another important open problem is to develop numeri al algorithms that will solve a wider

lass of these equations.

8.3.4 The Covariant Proje tions The Euler-Lagrange equation (8.35) is a ve tor relationship, therefore it may be proje ted onto other ve tors in the plane. If the proje tion with the ovariant tangents is formed, the resulting equations an be integrated to obtain a onservative form that gives relationships between the rates-of- hange of the elements of the metri tensor. In ontrast, the ontravariant proje tions are not integrable. De ne the

ovariant proje tions to be the expressions one obtains by forming the s alar produ t of the ve tor Euler-Lagrange equation with the two tangent ve tors x and x . This pro edure is equivalent to pre-multiplying (8.35) by J T . The following identity is left as an exer ise to the reader, [r J T ℄ J B = r H :

(8.55)

THEOREM 8.5 The ovariant proje tions of the Euler-Lagrange equations (8.35) may be integrated to obtain the divergen e form H I GB g = 0: w2 Proof. Begin by writing the Euler-Lagrange equation (8.35) as div f

JB 1 div 2 = H (J 1 )T r 2 : w w

(8.56)

(8.57)



157

1992 by P.M. Knupp, September 8, 2002

(divJ B)  x

Fun tional (g11

Length

g22 ) + 2 (g12)

(divJ B)  x (g22

g11 ) + 2 (g12)

Area

g

g

Orthogonality-I

2 ) + 2 (g11 g12 ) (g12

2 ) + 2 (g22 g12 ) (g12

AO

(g11 g22 ) + 2 (g11 g12 )

(g11 g22 ) + 2 (g22 g12 )

( gp22g )

Winslow

( gp12g )

( gp11g )

( gp12g )

Table 8.3: Covariant proje tions of the planar Euler-Lagrange equations Pre-multiply this by J T and perform the following sequen e of steps:

J T div Jw2B J T J B [r J T ℄ J B

1 = H r 2 ; (8.58) w 1 div = H r 2 ; (8.59)  w2 w2 w GB 1 r H = Hr 1 ; (8.60) div 2  2 w w2  w GB H div 2 r 2 = 0 : x (8.61) w w Table 8.3 gives ovariant proje tions for some of the fun tionals onsidered in this

hapter (with w = 1). No simple relationship emerges between the various metri s, with the ex eption of the area fun tional. This demonstrates that, ex ept for area, the minimizing grid does not equidistribute any property of p the grid dire tly related to H . In parti ular, the weighted fun tional does not make H proportional to the weight w.

Exer ise 8.3.4 Verify the result in Table 8.3 for the area fun tional using both 2.x H = (pg)2 and H = g11 g22 g12 Exer ise 8.3.5 Show that for the Winslow fun tional in Table 8.1,

and therefore, in agreement with (7.91).

x

HI =

pGg + pg G 1 ;

(8.62)

HI

T GB = 2 CpgC ;

(8.63)

8.3.5 Tensor Form of the Euler-Lagrange Equations The Euler-Lagrange equations of grid generation are usually presented and solved in the non- onservative form (6.79). Sin e the fully onservative approa h outlined in Se tion 8.3.3 does not onverge for some important variational prin iples (e.g.,



1992 by P.M. Knupp, September 8, 2002

158

Winslow), the non- onservative approa h remains viable. The non- onservative form

an be obtained by expanding (8.35) via the produ t rule (7.22) in Chapter 7: J div B + [r J ℄B + w2 fH (J 1 )T J Bg r w = 0 : (8.64) Exer ise 8.3.6 Show that the last term above an be expressed as J b = b1 x + b2 x where 2 (8.65) b = fH G 1 Bg r w : x w Using the exer ise and also (7.21), equation (8.64) an be expressed as

J div B + B11 x + 2 B12 x + B22 x + b1 x + b2 x = 0 :

(8.66)

The rst term in this expression is

J div B = f(B11 ) + (B12 ) g x + f(B12 ) + (B22 ) g x :

(8.67)

The terms on the right-hand-side are expanded using the hain rule. Sin e B11 = 2 H=g11, the rst term be omes

2H  2H + (g12 ) + 2 g11 g11g12  2H 2H p + ( g ) (g22 ) x : (8.68) g11 g22 g11  pg  Using (4.131)-(4.136), (4.146)-(4.147), and the tensor produ t property (7.37), ea h term of the previous expression an be treated in a manner similar to the following example: 2H 2H (8.69) (g11 ) 2 x = 2 2 (x  x ) x ; g11 g11 2H = 2 2 (x x ) x : (8.70) g11 Grouping all the terms, the nal result an be put into non- onservative (or tensor) form QH x = 0, where H ( ) x = g11  



(g11 )

QH x = T11 x + (T12 + T12T ) x + T22 x + b1 x + b2 x : (8.71) The bi are s alars de ned in the previous exer ise and the Tij are se ond-order tensors whi h are omposed of the three symmetri tensor produ t matri es x x , [(x x )+(x x )℄, x x , and the 2  2 identity I . Abbreviated formulas for the

ase in whi h H does not depend on pg are given here; omplete formulas are given in Appendix A.

T11

=

H I g11 2H +2 2 (x x ) g11 2H [(x x ) + (x x )℄ + g11g12   1 2H + 2 (x x ) ; 2 g12

(8.72)



159

1992 by P.M. Knupp, September 8, 2002

T12 + T12T

=

and

H I g12 2H +2 (x x ) g11 g12   2H +2 [(x x ) + (x x )℄ g11 g22  2H (x x ) ; +2 g12 g22 

(8.73)

H I g22 1 2H + 2 (x x ) 2 g12 2H + [(x x ) + (x x )℄ g22g12   2H (8.74) +2 2 (x x ) : g22 2 , H = g11 g22 , and ompare Exer ise 8.3.7 Compute the tensors Tij for H = g12 the results to (6.68) and (6.73). x Tensor form is lengthy, but quite useful for omputing the Euler-Lagrange equation of a ompli ated fun tional. For example, try omputing the non- onservative form of H = pg11 g22 dire tly, without using (8.72)-(8.74). In addition, the formulas for Tij

an be used in a planar variational grid generation ode to numeri ally solve (8.71) using the formulas developed in Se tion 6.4. For some fun tionals (su h as Area and Winslow), it is onvenient to use an alternate form of the expressions (8.72)-(8.74), namely, that obtained by expressing the tensor-produ ts in terms of ontravariant tangent ve tors. This is a

omplished using the identities (7.45)-(7.49) in Chapter 7. The result is given in Appendix A. Exer ise 8.3.8 Use the ontravariant form of the tensor Euler-Lagrange equations in Appendix A to show that the Tij for H = (pg)2 are T11 = (x? x? ) ; (8.75) T ? ? ? ? T12 + T12 = [(x x ) + (x x )℄ ; (8.76) ? ? T22 = (x x ) : (8.77)

T22

=





Compare these to what is obtained for the area fun tional using (8.72)-(8.74) and to 6.62 in Chapter 6. x Another reason for introdu ing the ontravariant tensor form is to show that the Winslow grid generator is indeed obtained from the fun tional H = (g11 + g22 )=pg. This is readily done using (A.4)-(A.6) in onjun tion with (7.49). Exer ise 8.3.9 Show that the tensors for the Winslow fun tional are: 3 (8.78) g 2 T11 = g22 [(x? x? ) + (x? x? )℄ ; 32 T ? ? ? ? g (T12 + T12 ) = 2 g12 [(x x ) + (x x )℄ ; (8.79) 32 (8.80) g T22 = g11 [(x? x? ) + (x? x? )℄ : x



160

1992 by P.M. Knupp, September 8, 2002

Allpthree tensors in the previous exer ise are proportional to the tensor g (J 1 )T J 1 . If g 6= 0, g (J 1 )T J 1 is invertible (see (7.43)-(7.44)), so pre-multiplying the tensor T form by J Jg results in the Winslow operator Qw x:

g22 x

2 g12 x + g11 x = 0 :

Exer ise 8.3.10 Form the proje tions x operator and show (using 4.131-4.136) that

 Qw x

g 1 g22 ( ) = ( 12 ) ; 2 g11 g11 1 g11 g12 ( ) = ( ) :x 2 g22  g22

and x

(8.81)

 Qw x

for the TTM (8.82) (8.83)

8.3.6 Logi al Spa e Weighting If a logi al-spa e weight fun tion (; ) is used in the variational prin iple

I5 [x℄ =

1Z 1 H d d ; 0 0 

Z

(8.84)

then the rst term in the Euler-Lagrange equation (gradient with respe t to the physi al variables) drops out, leaving just div

J B = 0: 

(8.85)

The inhomogeneous form is

r div J B = J B  : 

(8.86)

In ontrast to the physi al-weight ase, the ovariant proje tion of the logi al-spa e equation is not fully integrable: div

GB = 1 r H:  



(8.87)

The tensor form (8.71) still holds, but the ve tor for the rst-order derivatives is

b=B

r  : 

(8.88)

As dis ussed in Chapter 3, logi al-spa e weighting is not re ommended sin e the e e t of the weight o

urs at an unpredi table lo ation in physi al spa e.

8.4 The Se ond Variation As noted in Se tion 6.2, if it is possible to prove that the se ond variation of a fun tional is positive de nite then is possible to prove that a unique minimum exists. It was shown that for the 2D hosted equation that the se ond variation was positive if the matrix T had positive eigenvalues; the analogous situation for the variational prin iple involving H would be for B to have positive eigenvalues. However, sin e B in



161

1992 by P.M. Knupp, September 8, 2002

general is a fun tion of the elements of the metri tensor, the problem is non-linear and the riterion that applies to the hosted equation is insuÆ ient for the grid generation equations (but is a good start). The se ond variation of the homogeneous grid generation fun tional (8.4) may be

omputed using (6.5). Terms of the following type o

ur in the integrand:

2H : g11 g22 The result (7.40) an be applied to obtain the tensor produ t form 2

  [(x x )  ℄  H ; g11g22 whi h motivates the following result (   x ) (x   )

(8.89)

(8.90)

THEOREM 8.6 The se ond variation of the fun tional involving H has the form    Z 1Z 1 1 2

T T  11 12 T (8.91) DI = [  ;  ℄

 d d : T12T T22 2 4 0 0 The proof is a lengthy and tedious ve tor and tensor analysis al ulation. Let the 4  4 blo k matrix H be denoted by 

x



: (8.92) H = TT11T TT12 12 22 The 2  2 blo ks are just the matri es Tij that appear in the tensor form (8.71) of the Euler-Lagrange equations; T12 is obtained from the formula (8.73) for T12 + T12T by dividing the tensor by two and eliminating terms involving x x . Theorem

(8.91) gives a ne essary ondition for the existen e of a minimum of I4 , namely that the se ond variation be positive. A suÆ ient ondition for the se ond variation to be positive is that the blo k matrix above have positive eigenvalues. For example, if H = g11 + g22 , then H is just the identity matrix. Therefore, the se ond variation of the Length fun tional is positive. Unfortunately, this approa h is not helpful in analyzing any of the other fun tionals in Table 8.1. For example, the eigenvalues of the matrix H an be

omputed for the AO fun tional: 2 1 2 2 3 4

= = = =

(g11 + g22 ) + [(g11 + g22 )2 + 12 g11 g22 ℄ 2 ; 1 (g11 + g22 ) [(g11 + g22 )2 + 12 g11 g22 ℄ 2 ; g22 ; g11 : 1

(8.93) (8.94) (8.95) (8.96)

The se ond eigenvalue is seen to be negative, while the others are positive. Therefore, one annot on lude anything ertain about the positivity of the se ond variation of the AO fun tional from this approa h. More sophisti ated approa hes to onvexity an be found in (Da orogna, [42℄). Many fun tionals are not onvex in the lassi alp sense, but have the property of \poly onvexity." A fun tion G = G(x ; y ; x ; y ; g) is poly onvex if it is formally

onvex in ea h of its arguments. Poly onvexity, in turn, an be linked to notions of ellipti ity. Liao, [124℄, has studied the poly- onvexity of the weighted fun tionals



162

1992 by P.M. Knupp, September 8, 2002

(6.70) and (8.11). Generalizations of the Winslow fun tional are treated in Da orogna, p134, [42℄. A onne tion between onvexity and ellipti ity is made in referen e [42℄, namely, that under the proper assumptions, onvexity is equivalent to the Legendre-Hadamard ellipti ity ondition. The theory given there is not dire tly appli able to the grid generation fun tionals; it is an open question as to whether it an be shown that the ellipti ity test in hapter (6) is a onsequen e of the onvexity ondition given in the present se tion.

8.5 Inverse Mapping Approa h Variational grid generation may also be formulated in terms of fun tionals whose domain is the set of inverse mappings ( (x; y); (x; y)); this is the approa h taken in the well-known variational method of Bra kbill and Saltzman, [21℄. The Bra kbillSaltzman variational prin iples have the general form (6.19), for whi h the EulerLagrange equations are (6.20)-(6.21). To ompare the Bra kbill-Saltzman method to the variational method des ribed in this hapter, assume the spe i fun tional form

IBS [ (x; y); (x; y)℄ =

Z

1 ^ 11 12 22 1 H (g ; g ; g ; p ) dx dy ; g

w2

(8.97)

whi h is to be minimized to nd the fun tions  (x; y) and (x; y). The integrand H^ is a fun tion of the elements of the inverse metri tensor; a physi al-spa e weight fun tion w = w(x; y) is assumed. The goal is to derive the Euler-Lagrange equations in the manner used in this hapter and to invert them using the transformation rules given in the previous hapter. The Euler-Lagrange equation for (8.97) is

S^ divx 2 = 0 ; w where

 H^  ^ S =   H^x x 0

(8.98)

 H^ y A  H^ y 1

:

(8.99)

The right-hand side of the Euler-Lagrange equation is zero due to the use of a physi alspa e weight; if a logi al-spa e weight had been used, a non-zero right-hand side would appear. This is just the opposite of the situation that o

urred in the dire t mapping approa h, see Equations (8.19) and (8.22). Following the approa h used in Se tion 8.3.2, the tensor S^ may be fa tored to obtain S^ = B^(rx  ) where 0

B^ = 

^ 2 g H11  H^

g12

1

 H^ g12 A +  H^ 2 g 22

^

p1g  (pH1 ) G : g

B^ is symmetri . The Bra kbill-Saltzman Euler-Lagrange equation is then B^ (rx  ) = 0 : div x w2

(8.100)

(8.101)



1992 by P.M. Knupp, September 8, 2002

163

Compared to the dire t mapping Euler-Lagrange equation (8.35), the order of the matri es has been reversed, B ! B^, and the Ja obian has be ome its inverse. The Euler-Lagrange equations resulting from su h a minimization must be inverted to obtain a omputationally useful s heme. The transformation relationship (7.74) derived in the previous hapter is applied to (8.101) to yield pg B^ G 1 ! 1 = 0: (8.102) pg div w2 Example. 8.7 Let H^ = g11 + g22 be the homogeneous TTM fun tional. The EulerLagrange equation is divx J 1 = 0, i.e., the ve tor Lapla ian of  . Transformed, this p 1 reads div ( g G ) = 0. x p Example. 8.8 Let H^ = (1= g) 1 be the area fun tional. The Euler-Lagrange p equation is divx gJ T = 0 whi h, when transformed, reads div g I = 0. x The ontravariant proje tion of the Bra kbill-Saltzman equation (8.101) is derived next. Exer ise 8.5.1 Verify that (8.103) [rx (J 1 )T ℄ (B^ J 1 ) = rx H^ : x The ontravariant proje tion of (8.101) is found by pre-multiplying (8.101) by (J 1 )T . Using (8.103), the following proje tion is obtained (J 1 )T B^ J 1 (8.104) g = w12 rx H^ : divx f w2 The ontravariant proje tion is non-integrable due to the use of a physi al-spa e weighting fun tion; if a logi al-spa e weighting is used, the ontravariant proje tion

an be shown to be integrable. This situation is just the opposite as in the dire t mapping approa h, for whi h the ovariant proje tion is integrable if a physi al-spa e weighting is used, but not if a logi al spa e weighting is used. The ontravariant proje tion may be re-written to obtain an expression similar in form to (8.56), 1 H^ I (J 1 )T B^ J 1 g = H^ rx 2 : (8.105) divxf 2 w w The Bra kbill-Saltzman approa h an be related to the Steinberg-Roa he approa h. If the variational prin iple (8.97) is transformed to the logi al domain, one obtains a variational prin iple involving H , with H = pg H^ . The hain rule an be applied to show that p H ;  H^ = g (8.106) g11 g22  H^ pg H ; = (8.107) 12 g g12  H^ p H ; = g (8.108) 22 g g11 H  H^ H = H 2 (g11 +g + g11 12 g12  ( p1g ) pg H H g22 + ): (8.109) g22 2  pg



1992 by P.M. Knupp, September 8, 2002

164

This result an be used to obtain the following relationship between the matri es B^ and B: B^ = H G pgG B G : (8.110)

THEOREM 8.9 The ovariant proje tion (8.56) of the Steinberg-Roa he EulerLagrange equations, transformed to physi al spa e, equals pg times the Bra kbillSaltzman Euler-Lagrange equation (8.101). Conversely, the ontravariant proje tion (8.105) of the Bra kbill-Saltzman Euler-Lagrange equations, transformed to logi al spa e, equals 1=pg times the Steinberg-Roa he Euler-Lagrange equation (8.35). Proof. The rst statement is evident from the following sequen e, based on (8.110) and the transformation rules for the divergen e of a tensor:

pg B^ G 1 HI GB g = div f g;  w2 w2 B^ J 1 p = g divx f 2 g : w The se ond statement is based on ( ) ^ I (J 1 )T BJ ^ 1 H I ^ x divx Hdiv w2 w2 H I J BJ T = p divx 2 divx f p 2 g; g w gw 1 H JB C = p f p div 2 div 2 g : x g g w w div f

(8.111) (8.112)

(8.113) (8.114)

Another way to view the rst statement of the Theorem is to say that one an obtain the Bra kbill-Saltzman Euler-Lagrange equation by pre-multiplying the SteinbergRoa he Euler-Lagrange equation by J T and then \post-multiplying" the result, again by J T . From (7.75) in Chapter 7, post-multipli ation is a

omplished by transforming from logi al to physi al oordinates. It is lear from this Theorem that the two approa hes to variational grid generation lead to basi ally the same grid generation equations, so the two methods are essentially equivalent. Although the ovariant approa h has a natural geometri interpretation, the ontra-variant method (to be des ribed in Chapter 11 is preferred be ause of the utility of physi al-spa e weight fun tions. Su h weights dire tly give a symmetri form for the Euler-Lagrange equations in the ontra-variant ase, whereas in the o-variant

ase, one must rst form the proje tion of the Euler-Lagrange equations to obtain the symmetri form.

Chapter 9

Grid Generation in Three Dimensions Considerably less is known about robust methods of grid generation in three dimensions than in the plane. A large part of the reason for this is that the topology of three-dimensional (3D) obje ts is signi antly more omplex than in two dimensions, and also the omputing ost of generating a grid in 3D is mu h greater than in 2D. While many obje ts in the plane an be viewed as moderate distortions of the unit square, few obje ts in three dimensional spa e are readily envisioned as moderate distortions of a ube. Most three-dimensional obje ts are better thought of as the union of a number of separate ube-like parts. If a set of maps, X`;3 3 : U3 ! 3`;3 from the unit ube to ` = 1; 2; : : : ; L three-dimensional volumes in E 3 is onstru ted, there remains the diÆ ulty of putting the separate maps together in su h a way as to ensure ontinuity of slopes a ross the interfa es between the blo ks. This pat hing problem is urrently most e e tively addressed by the ubi spline approa h (see Shih, [169℄) of algebrai grid generation, or by the use of Neumann boundary onditions in an ellipti method, or by hanging the shape of the logi al domain to avoid pat hing of multiple maps. The intention in this hapter is to provide a brief overview of the basi problem of three-dimensional grid generation, namely, nding a single map X33 from the unit

ube to a blo k-like domain 33 . Relevant relationships from Chapter 4 are thus reviewed and extended in Se tion 9.1. To solve the basi problem, an initial boundary map X33 must be given; generally the boundary is de ned in terms of six surfa e parameterizations des ribed in Subse tion 9.2.1. Frequently, the boundary of the obje t is given as a set of data points from whi h a surfa e parameterization must be

onstru ted. Often the given parameterization of the boundary results in poor grids when the former is extended into the interior. If the given boundary parameterization is inadequate, the urve and surfa e algorithms des ribed in the next hapter may be applied to perform a re-parameterization. On e the not-in onsequential task of determining the boundary parameterization is ompleted, the three dimensional trans nite interpolation formula given in Subse tion 9.2.2 an be used to extend the grid into the interior. If the trans nite interpolation grid is not adequate, then inhomogeneous grid generators based on partial di erential equations may be used to improve the grid; this approa h is quite ostly and is urrently taken only as a last resort. Although many of the methods dis ussed in the planar hapter extend to three165



166

1992 by P.M. Knupp, September 8, 2002

dimensions, most are not widely used in pra ti e. Noti eably absent from the list of widely used three-dimensional methods are onformal maps, hyperboli grid generators, the biharmoni approa h, and variational methods (in luding the dire t optimization method). Algebrai methods urrently reign as the most su

essful approa h to three-dimensional stru tured grid generation due to the speed with whi h they may be omputed. Only when algebrai methods fail does one onsider di erential equation-based grid generators, due to the relative slowness at whi h the latter are omputed. The most widely used of the ellipti generators is the 3D inhomogeneous Thompson-Thames-Mastin generator, as modi ed in the ThomasMiddle o or Steger-Sorenson approa h (see Subse tion 9.2.3). Some su

ess has also been had with 3D orthogonal grid generators. Papers that ontain dis ussions of 3D grid generation in lude Arina and Casella, [12℄, Eiseman, [63℄, Mastin and Thompson, [127℄, Shubin, Stephens, and Bell, [171℄, Sorenson and Steger, [182℄, Steger, [189℄, Theodoropoulos and Bergeles, [202℄, Warsi and Ziebarth, [225℄, and Warsi, [224℄. Numerous appli ations of three dimensional grid generation may be found in the

onferen e pro eedings edited by Ar illa, Hauser, Eiseman, Thompson, [9℄, Hauser and Taylor, [89℄, Sengupta, Hauser, Eiseman, and Thompson, [167℄, and Thompson, [210℄. The development in Chapter 8 is followed to extend variational methods to three-dimensional volumes in Se tion 9.3. Variational methods have s ar ely been used in three-dimensional grid generation, primarily due to ex essive storage and

omputational requirements, but the eÆ ient variational algorithms presented in this

hapter may over ome some of the limitations.

9.1 Volume Di erential Geometry Relationships from Chapter 4 are reviewed and extended in this se tion. The reader may wish to review Subse tion 4.2.3 and Se tion 4.3 for related material. Let

x = (x(; ;  ); y(; ;  ); z (; ;  )) 2 33 ; where the oordinates are smooth fun tions of (; ;  ) tangents are:

2 U3 .

(9.1) The three ovariant

x = (x ; y ; z ); x = (x ; y ; z ); x = (x ; y ; z ) :

(9.2) (9.3) (9.4)

The Ja obian matrix is J = r x, i.e., 0

J =

x x x y y y z z z

1 A:

(9.5)

The determinant is the root of the metri pg = det(J ) = x  (x  x ).

Exer ise 9.1.1 Following the notation introdu ed in (8.29), show that  pg = x  x ;  x

 pg = x  x ;  x

 pg = x  x : x  x

(9.6)



167

1992 by P.M. Knupp, September 8, 2002

The inverse Ja obian matrix is J 1 = rx  , i.e., 0 x y J 1 =  x y x y

z z z

1 A:

(9.7)

For referen e, re all the relations (4.83)

rx  = xpgx ; rx  = xpgx ; rx  = xpgx :

(9.8)

These relations are same as Equations (4.83) and analogous to Equations (4.122); the

ross produ ts of the ovariant tangents play the role of the \perp" ve tors in that se tion. Exer ise 9.1.2 Apply the identity (4.11) in Chapter 4 to (9.8) to obtain (9.9) x = pg (rx   rx  ); p (9.10) x = g (rx   rx  ); (9.11) x = pg (rx   rx ) : x The ovariant metri tensor is de ned by G = J T J , i.e., 0 1 g11 g12 g13 G =  g12 g22 g23 A : (9.12) g13 g23 g33 The entries of G onsist of s alar produ ts of the form (9.13) gij = xi  xj ; with i; j = 1; 2; 3, and 1 =  , 2 = , and 3 =  (e.g., g13 = x  x ). The determinant of G is denoted by g. Exer ise 9.1.3 Compute g = detG from (9.12). x The inverse metri tensor has the form 0 11 1 g g12 g13 G 1 =  g12 g22 g23 A : (9.14) g13 g23 g33 The relationship between the elements of the inverse metri tensor and the metri tensor were given in (4.110) and in Exer ise 4.3.1 that follows. The metri identities (7.12) and (7.13) hold for the 3  3 auxiliary matri es C = pg (J 1 )T and C 1 = J T =pg. Exer ise 9.1.4 Show that in three-dimensions, div C = 0 is equivalent to the identity    (x  x ) + (x  x ) + (x  x ) = 0 : x (9.15)    Exer ise 9.1.5 Show that x  x = pg fg11 x + g12 x + g13 x g; (9.16) x  x = pg fg12 x + g22 x + g23 x g; (9.17) p 13 23 33 (9.18) x  x = g fg x + g x + g x g : These relationships are analogous to (4.126)-(4.127). x



168

1992 by P.M. Knupp, September 8, 2002

Exer ise 9.1.6 Expli itly write out the three-dimensional metri identity

div (pg J G 1 ) = 0.

x

The three-dimensional version of the planar Gauss relations (4.137)-(4.139) is

xi j =

3 X `=1

` x ij `

(9.19)

where `ij is the spa e Christo el symbol of the se ond kind. The latter is de ned in terms of the spa e Christo el symbol of the rst kind, [ij; k℄, through the relation ` ij

with the de nition

=

3 X k=1

g`k [ij; k℄ ;

(9.20)

1 gik gjk gij (9.21) f +   g : 2 j i k Exer ise 9.1.7 Show that the spa e Christo el symbol of the rst kind is merely the following inner produ t (9.22) [ij; k℄ = xk  xi j : Thus, relation (9.21) is analogous to the planar relations (4.131)-(4.136). x [ij; k℄ =

Exer ise 9.1.8 Verify that the gradient in 3D transforms as in (7.51). The other transformation relations in Se tion 7.3 also generalize dire tly to 3D volumes. x

9.2 Approa hes to Three-dimensional Grid Generation 9.2.1 The Volume Grid-Generation Problem

The basi problem an be stated: given a simply- onne ted region  R3 in physi al spa e, nd a mapping x = x(; ;  ) from the unit ube U3 in logi al spa e E 3 to the region . The physi al region is spe i ed by giving its boundary; this task is

onsiderably more ompli ated in three dimensions than in two. Six bounding surfa es

xW (s; t) ; xE (s; t) ; 0  s; t  1 ;

(9.23)

xN (r; t) ; xS (r; t) ; 0  r; t  1 ; (9.24) xT (r; s) ; xB (r; s) ; 0  r; s  1 ; (9.25) are required (see Figure 9.1). The subs ripts on x stand for the west, east, north, south, top, and bottom surfa es of the logi al domain. There are twelve edges

xSW (t) ; xSE (t) ; xNW (t) ; xNE (t) ;

(9.26)

xBW (s) ; xT W (s) ; xBE (s) ; xT E (s) ; xBS (r) ; xT S (r) ; xBN (r) ; xT N (r) ;

(9.27) (9.28)

and eight orner points:

xW SB ; xW ST ; xW NB ; xW NT ;

(9.29)



169

1992 by P.M. Knupp, September 8, 2002

WNT TW

TE

T

NE

NW

ST WST

TS

EST

N

E

W S

SW

η

WSB

SE WNB

ζ

ξ

ENT

TN

BW

BE

B

BS

ENB

BN

ESB

Figure 9.1: The volume grid-generation problem

xESB ; xEST ; xENB ; xENT :

(9.30)

The surfa e boundary onditions are then:

x(0; s; t) x(1; s; t) x(r; 0; t) x(r; 1; t) x(r; s; 0) x(r; s; 1)

= = = = = =

xW (s; t) ; xE (s; t) ; xS (r; t) ; xN (r; t) ; xB (r; s) ; xT (r; s) :

The edges also need boundary onditions:

x(0; 0; t) x(0; 1; t) x(1; 0; t) x(1; 1; t) x(0; s; 0) x(0; s; 1) x(1; s; 0) x(1; s; 1) x(r; 0; 0) x(r; 0; 1) x(r; 1; 0)

= = = = = = = = = = =

xSW (t) ; xNW (t) ; xSE (t) ; xNE (t) ; xBW (s) ; xT W (s) ; xBE (s) ; xT E (s) ; xBS (r) ; xT S (r) ; xBN (r) ;

(9.31)



170

1992 by P.M. Knupp, September 8, 2002

x(r; 1; 1) = xT N (r) ;

(9.32)

as do the orners:

x(0; 0; 0) x(1; 0; 0) x(0; 1; 0) x(0; 0; 1) x(1; 1; 1) x(0; 1; 1) x(1; 0; 1) x(1; 1; 0)

= = = = = = = =

xW SB ; xESB ; xW NB ; xW ST ; xENT ; xW NT ; xEST ; xENB :

(9.33)

Exer ise 9.2.1 Work out a few of the onsisten y onditions for the edges and

orners of the physi al domain similar to the planar onditions given in Table 1.3. x Before the grid an be extended into the interior, adequate grids must be generated on the twelve bounding edges, and subsequently, the six bounding surfa es. This may involve re-parameterizing the original data (9.23)-(9.28); this is the subje t of the Chapter 10. The te hnique of introdu ing uts to redu e the onne tivity of the physi al domain is useful, as is modifying the topology of the logi al domain (see Thompson, Warsi, and Mastin, [215℄).

Exer ise 9.2.2 Work out the 3D extension of the dis retization (5.6) at the end

of Se tion 5.2.

x

9.2.2 3D Trans nite Interpolation Algebrai grid generation is perhaps the most su

essful approa h to threedimensional grid generation due to the relative speed with whi h su h grids may be

al ulated. The methods des ribed in Se tion 5.3.1 have natural extensions to threedimensions; the referen es ited in that se tion an be onsulted for details. Only the simplest of the trans nite interpolation formulas is given in this brief survey. The trans nite interpolation formula (1.45) in Se tion 1.5 has the following extension to three-dimensions: where

x(; ;  ) = x1 + x2 + x3 x12 x13 x23 + x123 ;

(9.34)

x1 = (1  ) xW (;  ) +  xE (;  ) ; x2 = (1 ) xS (;  ) +  xN (;  ) ; x3 = (1  ) xB (; ) +  xT (; ) ;

(9.35) (9.36) (9.37)

x12 = (1  ) (1 ) xSW ( ) + (1  )  xNW ( ) +  (1 ) xSE ( ) +   xNE ( ) ;

(9.38)



1992 by P.M. Knupp, September 8, 2002

171

x13 = (1  ) (1  ) xBW () + (1  )  xT W () +  (1  ) xBE () +   xT E () ;

(9.39)

x23 = (1 ) (1  ) xBS ( ) + (1 )  xT S ( ) +  (1  ) xBN ( ) +   xT N ( ) ;

(9.40)

x123 = (1  ) (1 ) (1  ) xW SB + (1  ) (1 )  xW ST + (1  )  (1  ) xW NB + (1  )   xW NT +  (1 ) (1  ) xESB +  (1 )  xEST +   (1  ) xENB +    xENT :

(9.41)

The trans nite formula is often adequate if the physi al domain has been divided into several ube-like subdomains. If not, this approa h may serve to generate the initial guess in iterative solution pro edures for solving the partial di erential equations of 3D grid generation des ribed in the following se tions.

9.2.3 3D Thompson-Thames-Mastin The 3D inhomogeneous Thompson-Thames-Mastin equation is based on the map

 = ( (x; y; z ); (x; y; z );  (x; y; z )) from physi al to logi al spa e. The planar relationship (5.75) generalizes to: r2x  = f ;

(9.42) (9.43)

where the omponents of f are fi = gii Pi (no sum on the index i). The Pi are logi alspa e ontrol fun tions. The system (9.43) is easily inverted using the approa h in Se tion 7.3.5: [r J ℄ G 1 = J f ; (9.44) or, expli itly,

g11 x + g22 x + g33 x + 2 g12 x + 2 g13 x + 2 g23 x + g11 P1 x + g22 P2 x + g33 P3 x = 0: The operator notation for the 3D TTM method is QT T M x = 0 where QT T M x = g11 x + g22 x + g33 x + 2 g12 x + 2 g13 x + 2 g23 x + g11 P1 x + g22 P2 x + g33 P3 x :

(9.45)

(9.46)



1992 by P.M. Knupp, September 8, 2002

172

It is not appropriate to refer to the three-dimensional TTM generator as the Winslow generator sin e the generalization originated later (see, for example, Warsi, [224℄). As noted in previous hapters, there is no guarantee against folding with the three-dimensional homogeneous TTM generator sin e the maximum prin iple does not hold in this setting. The sour e term f is generally modi ed in appli ations to a hieve ontrol over the grid at the boundary following Thomas, [206℄ or Sorenson and Steger, [182℄. The latter essentially enfor es Neumann boundary onditions to permit grid lines to interse t bounding surfa es at right angles so that oordinate lines will be smooth a ross blo ks. Se tion 5.6.2 gives the planar version of the latter algorithm.

9.3 The Variational Method 9.3.1 3D Variational Prin iples Variational methods have seen little appli ation to three-dimensional grid generation, primarily due to the omplexity of the equations that arise and the resulting demand on storage and omputational e ort. In spite of these diÆ ulties, variational methods may prove useful given the relatively large amount of ontrol over the grid that is attained. The theory developed in Chapter 8 arries over readily to the threedimensional ase. Based on the results of the previous variational hapters, it is proposed to minimize the fun tional Z 1Z 1Z 1 H I [x℄ = d d d (9.47) 2 w 0 0 0 (x) with H = H (g11 ; g12 ; g13 ; g22 ; g23 ; g33 ; pg) being a smooth positive fun tion from R7 to R and w a weight fun tion of the physi al variables. The fun tion H is assumed to be homogeneous of some degree to a hieve invarian e of the generator to rigid body motions. Considerable un ertainty exists at present on erning the hoi e of variational prin iple. Some of the planar grid generators in Table 8.1 have natural extensions to 3D, while generalizations of others are more diÆ ult to onstru t (there being numerous possibilities). Note that any diÆ ulties with planar generators will extend to 3D be ause any planar region an be naturally extended to a 3D volume. Table 9.1 lists some proposed 3D variational prin iples. Length is easily generalized; its tenden y to generate folded grids on non- onvex planar domains will arry over to threedimensions. The planar equal-area fun tional extends readily to the three-dimensional equal-volume fun tional; as was true in the plane, p the equal-volume fun tional (or powers thereof) is the only generator for whi h H is dire tly proportional to the weight fun tion when H is evaluated at a solution grid. The volume fun tional will generate non-smooth grids. Orthogonality has several generalizations to 3D; stri tly orthogonal grids exist on only a limited set of box-like domains having \triply-orthogonal" oordinate systems (Struik, [199℄) so the variational approa h, with its least-squares solutions, makes

onsiderable sense. Three orthogonality fun tionals are proposed in Table 9.1. The 2 in two dimensions may be written g12 2 = g g12 g12 , orthogonality fun tional g12 suggesting the generalization 2 + g11 g23 2 + g22 g13 2 H = g (g12 g12 + g23 g23 + g13 g13 ) = g33 g12 (9.48) for Orthogonality-I in the table (this one is proposed primarily for its use in the extension of AO to three-dimensions). Orthogonality II is a straightforward



1992 by P.M. Knupp, September 8, 2002

173

generalization of the planar fun tional. The Orthogonality III fun tional results in an Euler-Lagrange equation similar to several non-variational 3D orthogonal grid generation systems that have been proposed (see Warsi, [224℄, Arina and Casselas, [12℄, and Theodoropoulos and Bergeles, [202℄). Multiple generalizations of the planar AO fun tional are possible due to its dependen e on the orthogonality on ept. The most obvious generalization would be g11 g22 g33 , but numeri al experiments suggest that this fun tional la ks suÆ ient

onvexity. If AO is viewed as the sum of the area and Orthogonality-I fun tionals, one obtains H = g11 g22 g33 g12 g23 g13 , whi h appears to perform better in numeri al tests. A variational prin iple for the three-dimensional homogeneous Thompson-Thames-Mastin generator is readily onstru ted, as is a 3D Liao fun tional. Undoubtedly, there are many other 3D fun tionals that might be onstru ted; there is little experien e with any of the fun tionals in this hapter to suggest whi h are best. Preliminary numeri al results suggest that more uniform volumes and angles an be obtained using the AO fun tional as opposed to trans nite interpolation or Length. Exer ise 9.3.1 Show that the fun tions H in Table (9.1) are homogeneous and determine the degree homogeneity. Compare the degree of homogeneity of ea h fun tional to their planar ounterparts. x Prin iple Symbol Form of H \Length" IL trG p Area IA ( g )2 2 + g11 g23 2 + g22 g13 2 Orthogonality-I IO;I g33 g12 212 223 213 g g g Orthogonality-II IO;II g11 g22 + g22 g33 + g11 g33 pg11 g22 g33 Orthogonality-III IO;III AO IAO g11 g22 g33 g12 g23 g13 pg tr(G 1 ) Smoothness IW i Liao ILi j G j2 Table 9.1: 3D Variational Prin iples

9.3.2 The 3D Euler-Lagrange Equations With the de nitions in Chapter 7, the approa h of Chapter 8 arries over dire tly to three dimensions. Assuming a fun tional of the form (9.47), the three-dimensional Euler-Lagrange equation has exa tly the same form as it does in the plane: (9.49) pHg div wC2 div Jw2B = 0 ; where   H H ; ; (9.50) J B = H x  x  x ; and B = M + pg H (9.51) pg G 1 ;



174

1992 by P.M. Knupp, September 8, 2002

and

[M℄ij = (1 + Æij )

H : gij

(9.52)

Exer ise 9.3.2 Show that H H H = 2 x + x + x  x g11 g12 H H H = x + 2 x + x  x g12 g22 H H H = x + x + 2 x  x g13 g23

H H + (x  x ) p ; g13  g H H + (x  x ) p ; g23  g H H + (x  x ) p x g33  g

(9.53) (9.54) (9.55)

The ovariant proje tion of (9.49) is again,

HI GB g = 0: w2 Exer ise 9.3.3 Show that for the 3D TTM fun tional, div f

H=

(9.56)

p1g [g11 g22 + g22 g33 + g33 g11 g122 g132 g232 ℄ :

(9.57)

Show that the fun tional p (9.57) redu es to the H in the two dimensional Winslow fun tional, plus the term g in the limiting ase g13 ! 0, g23 ! 0, and g33 ! 1. Show that for H as in (9.57), B = M H G 1 where

M = p2g

0 

g22 + g33 g12 g13 g12 g11 + g33 g23 g13 g23 g11 + g22

1 A

:x

(9.58)

The non- onservative, tensor form, QH x = 0 is

T11 x + T22 x + T33 x (T12 + T12T ) x (T23 + T23T ) x (T13 + T13T ) x

+ + + + b1 x + b2 x + b3 x = 0 :

(9.59)

The following expressions give T11 and (T12 + T12T ) for the ase in whi h H does not p depend on g. Expressions for the other tensors in (9.59) an be obtained from the following, by y li permutation of the indi es:

T11

H )I g11 2H + 2 2 (x x ) g11 1 2H + 2 (x x ) 2 g12 2H + [(x x ) + (x x )℄ g11 g12   = (



1992 by P.M. Knupp, September 8, 2002

2H [(x x ) + (x x )℄ g11 g13   1 2H + 2 (x x ) 2 g13 1 2H + [(x x ) + (x x )℄ ; 2 g12g13 

175

+

(9.60)

H I g12 2H + [(x x ) + (x x )℄ g11g23  2H + 2 (x x ) g11g12   2H [(x x ) + (x x )℄ + 2 g11g22   1 2H + 2 [(x x ) + (x x )℄ 2 g12 1 2H + [(x x ) + (x x )℄ 2 g12 g13  2H + 2 (x x ) g12g22   1 2H [(x x ) + (x x )℄ + 2 g12 g23  2H + [(x x ) + (x x )℄ g13g22  2H + (x x ) : (9.61) g13g23  If the tensor form of the TTM equations is al ulated using the ontravariant form, results similar to (8.78)-(8.80) apply. The se ond variation in three dimensions is the obvious generalization of the result (8.91) with 0 1 T11 T12 T13 H =  T12T T22 T23 A : (9.62) T13T T23T T33 The numeri al algorithms presented in Se tions 6.4 and 8.3.3 extend dire tly to three-dimensions. If the former approa h is used, there are a prohibitive 162 threedimensional sten il arrays to be stored for the most general fun tionals. This an be made more manageable by storing instead the elements of the tensors Tij , whi h redu es the number of three-dimensional arrays to thirty-six (plus three right-handside arrays). The sten ils must then be omputed from the thirty-six arrays as needed. Considerably fewer arrays may be needed for spe i variational prin iples, as many of the o -diagonal terms may then be zero. The onservative s heme outlined in 8.3.3 fares onsiderably better; only fourteen three-dimensional arrays (plus three more for the right-hand-sides) need be stored for the most general fun tionals. Thus,

onservative forms of the three-dimensional Euler-Lagrange equations appear to o er the best hope of performing 3D variational grid generation in pra ti al appli ations.

T12 + T12T

=



1992 by P.M. Knupp, September 8, 2002

176

9.3.3 A Variational Approa h to the Steger-Sorenson Algorithm A planar version of the Steger-Sorenson algorithm for the non- onservative operator Qx was des ribed in Se tion 5.6.2. In this se tion, it is shown that the algorithm may be ombined with the variational approa h des ribed in the present 3D Chapter (it an also be ombined with the planar variational algorithm). Assume the following boundary ondition on the  = 0 boundary:

x = 1 (; ) px + 2 (; ) px + 3 (; ) (xp  x33 ) ; g11 g22 gg

(9.63)

where the i are user-spe i ed fun tions, with 3 > 0. For example, the hoi e p 1 = 2 = 0 and 3 = g33 s2 gives g23 = g13 = 0 and pg33 = s on the  = 0 boundary. Equation (9.49) an be written div J B = J b

(9.64)

with b = 2=w fH G 1 Bg r w. Rather than use this form, repla e b with b = exp(  ) b0 (; ), so that div J B = e   J b0 :

(9.65)

If the last equation is evaluated at  = 0, and proje ted onto J0T , one nds b0 in terms of the boundary metri s and their rates-of- hange. The grid generation equation in

onservative form is div J B = e   J fG 1 div (G B H I )g0 :

(9.66)

The subs ript \0" denotes that the portion within bra kets must be evaluated at  = 0, with the boundary ondition (9.63) imposed (formulas for the 3D boundary metri s and their rates-of- hange may be derived in the manner of Se tion 5.6.1). The 3D extension of the numeri al algorithm des ribed in Se tion 8.3.3 is used to solve (9.66); the steps in the algorithm may be summarized as: 1. Compute an initial guess for the grid, 2. Use the initial guess and the boundary ondition (9.63) to ompute the righthand-side of (9.66), 3. Solve (9.66) for the updated grid, 4. Apply a onvergen e test; return to se ond step if not satis ed.

Chapter 10

Variational Grid Generation on Curves and Surfa es The goal of the present hapter is to present a variational approa h to urve and surfa e grid generation. A signi ant di eren e between urve and line, or, surfa e and planar, grid generation is that the Ja obian matrix is not square. As a result,

onstraints must be imposed on the minimization to ensure that the resulting grid points lie upon the given physi al obje t. One way to impose these onstraints is to onvert the minimization to the form of the previous hapters by the use of a parameter spa e. The parameter spa e has no urvature and thus the te hniques of the previous hapters apply. Although the parametri approa h is su

essful when a onservative form of the equations is used, an unexpe ted diÆ ulty arises with the non- onservative form of the parametri Euler-Lagrange equations, namely, solutions to the dis rete equations may bifur ate on obje ts having large urvature. The other approa h to imposing the onstraint is through the use of Lagrange Multipliers. The Lagrange Multiplier approa h is also not without diÆ ulty as it is subje t to O -Obje t trun ation error and to diÆ ulties in handling the multiplier. Other approa hes to

urve and surfa e grid generation in lude those studied by Eyler and White, [71℄, Garon and Camarero, [76℄, Saltzman, [162℄, Warsi, [226℄, and Whitney and Thomas, [230℄.

10.1 Curves The study of urves provides an ex ellent pla e to begin this hapter as the problem possesses most of the diÆ ult features en ountered in the problem of surfa e grid generation. Curves are of interest to surfa e and volume grid generation be ause the boundaries of these more ompli ated obje ts must be parameterized by a urve grid generation algorithm before the surfa e or volume algorithm an be applied. There is little to be found in the literature on the subje t of urve grid generation; stret hing and other re-parameterizations of urves are widely used.

10.1.1 Di erential Geometry of Curves A review and extension of the relevant relations from Chapter 4 pertaining to the di erential geometry of urves is useful in the development of variational urve 177



178

1992 by P.M. Knupp, September 8, 2002

grid generation. Key on epts are introdu ed in this se tion, in luding ar -length,

urvature, and the Frenet formulas. Let x( ) = (x( ); y( ); z ( )) be a parameterization of a C 2 [0p ; 1℄ urve in R3 . The tangent ve tor is x = (x ; y ; z ). De ne g11 = x  x so that g11 is the length of the tangent. Let s be the ar -length parameter, de ned by

s( ) =

Z 

0

pg d : 11

(10.1)

Applying the hain rule to the tangent gives, x = s xs , so x = pg11 xs . This shows that xs must be a unit tangent ve tor. Following Struik, [199℄, let ^t = xs be the unit tangent. Sin e ^t  ^t = 1, di erentiation of this relationship with respe t to s shows ts is normal to ^t. Let n^ be a unit ve tor in the dire tion of ts . Then there exists a s alar, denoted by , su h that d^t =  n^ : (10.2) ds The s alar  is known as the urvature and (10.2) is the rst Frenet formula. It follows that the magnitude of the urvature is: 1 (10.3) (s) = (xss  xss ) 2 : The sign of  is a matter of onvention sin e it is not uniquely de ned by this relationship. One an also de ne the torsion unit ve tor b^ = ^t  n^ to form a lo al orthogonal referen e frame (^t; n^ ; b^ ) known as the moving trihedron. Three Frenet formulas relating these quantities are well-known: d^t =  n^ ; (10.4) ds dn^ =  ^t +  b^ ; (10.5) ds db^ =  n^ ; (10.6) ds where  is the torsion. If one di erentiates the relation x = s^t with respe t to  , the urve identity is obtained: (10.7) x = s ^t + s2  n^ ; whi h may also be written in the more useful form x = 1 (g11 ) x + g11  n^ : (10.8) 2 g11 The urve identity bears the same relationship to urves as the Gauss equations do to surfa es, with the oeÆ ient of the rst term in (10.8) playing the role of the surfa e Christo el symbol. While (10.4) shows that for the equal ar -length parameterization, xss lies in the dire tion of n^, (10.8) shows that for arbitrary parameterizations, x lies in the n^-^t plane. Note that x is independent of b^. It is emphasized that this relationship holds for any parameterization of the urve and therefore does not imply any parti ular grid (i.e., it is not a grid generation equation). Note that (10.8) shows n^  x = g11 ; this fa t is useful later. The ovariant proje tion of (10.8) is the identity 1 x  x = (g11 ) : (10.9) 2



1992 by P.M. Knupp, September 8, 2002

179

Exer ise 10.1.1 Use (10.8) to obtain the following expression for the urvature: 2 =

(x  x )  (x  x ) : (x  x )3

(10.10)

Apply the hain rule (i.e., x = r xr , et .) to show that the urvature (10.10) is an invariant of the parameterization, i.e., the urvature at a xed point x on the urve in physi al spa e is independent of the parameterization. x An expression similar to (10.10) holds for the torsion. The torsion is also an invariant of the parameterization, but it does not play a signi ant role in se ond-order grid generation methods sin e it depends on third-derivatives of the parameterization. In the spe ial ase of planar urves the urvature and torsion relations simplify to: x y y x ; (10.11)  =   2 (x + y2) 32  = 0: (10.12)

Exer ise 10.1.2 Use (10.5)-(10.6) to show n^ = b^ =

 x +  (x  n^) ; pg  n^ : x 11

(10.13) (10.14)

Proje t 10.1.3 Given a parameterization x( ) of a urve, (10.1) an be used to ompute the equal ar -length grid. First, obtain or write your own numeri al integration subroutine. Let Z 1 pg d L= (10.15) 11 0

be the total length of the urve. Write a omputer ode to ompute L and then the set of points fri g, i = 1; : : : M , su h that Z ri

ri

pg d = L : 11 M 1

(10.16)

Compute xi = x(ri ). Use the paraboli urve x =  , y =  (1  ), with a positive parameter to test the ode. x

10.1.2 Transformation Relations on a Curve The transformation relationships from Chapter 7 on erning gradient, divergen e, and Lapla ian are extended to urves. A diÆ ulty arises from the fa t that the Ja obian matrix 0 1 x J =  y A (10.17) z is not square and therefore its inverse does not exist. Matri es are denoted by bra kets, for example, J = [x ℄, while x is reserved for the olumn ve tor. The metri tensor is G = J T J , whi h has just the single element g11 = x2 +y2 +z2. Also, if g = det G , then g = g11 in this highly degenerate ase. The inverse metri tensor is G 1 , whi h has the single element 1=g11. Re all that the null spa e of a matrix is the set of all elements of the ve tor spa e whi h map to the zero element



180

1992 by P.M. Knupp, September 8, 2002

under the linear transformation given by the matrix. The null spa e of J T is the set of all linear ombinations of the ve tors n^ and b^. The tangent spa e, T, is de ned to be the omplement of the null spa e, i.e., the set of all ve tors that lie in the dire tion of x . Sin e G is invertible, a generalized inverse an be de ned by (J 1 )T =

J G 1;

[x ℄ = : g11

(10.18) (10.19)

If the de nitions C = pg (J 1 )T and C 1 = J T =pg from the previous hapters are applied to urves, C = p[xg ℄ ; (10.20) 11 = [xs ℄ ; (10.21) i.e., C has the same entries as does the unit tangent ve tor. On the other hand,

C 1

[x ℄T pg11 ; = [xs ℄T ; =

(10.22) (10.23)

has the same entries as does the unit tangent (row) ve tor. The divergen e of a 3  1 matrix S is the olumn ve tor (div S )i = Si =, i = 1; 2; 3. For example, the divergen e of C yields the urve metri identity:

p

(10.24) div C = g11  n^ : This is the onservative form of the urve identity (10.8). Note the appearan e of an additional term proportional to the urvature ompared to the planar formula (7.12). The next goal is to obtain transformation relationships for the gradient. Suppose one has the s alar fun tion f = f (x( ); y( ); z ( )) de ned on the urve. Then the logi al spa e gradient (or ovariant derivative) of f is just r f = f . The physi alspa e gradient is not well-de ned be ause the fun tion f is not smoothly de ned in a neighborhood of the urve. Using (7.51) for an analog, de ne the physi al-spa e gradient in terms of the generalized inverse to be the olumn ve tor = (J 1 )T f ; (10.25) x  f : (10.26) = g11  The transformed physi al-spa e gradient belongs to the tangent spa e T. Both the

hain rule f = fx x + fy y + fz z , and the transformation rule

rx f

f = J T rx f

(10.27)

formally hold when this de nition is adopted. Observe that the generalized inverse permits onstru tion of relations that formally agree with the relations given in Chapter 7. The additional term proportional to urvature in the metri identity (10.24) gives rise to an additional term in the \ onservative" form of the gradient: rx f = p1g div (C f )  f n^ : (10.28) 11



181

1992 by P.M. Knupp, September 8, 2002

Let vT 2 R3 . To a hieve onsisten y with the de nition of the gradient, the divergen e of v must transform as 1 divx  v = p div  C T vT ; (10.29) g 1 x v (10.30) = p ( p ) : g11 g11 This an be proved using the de nition (10.26) of the gradient and the fa t that the divergen e of v is the tra e of the physi al-spa e gradient of v. If one lets vT = x =pg11 , then (10.30) gives divx  xTs = 0 ;

(10.31)

whi h is the analog of (7.13). Using (10.26) and (10.29), the transformed Lapla ian in onservative form is

f ( p  ) : 11 g11

r2x f = pg1

(10.32)

Exer ise 10.1.4 Let f =  in (10.32) and set r2x  = 0. Perform the analog to

the sequen e of steps in Se tion 7.3.5 to obtain \Winslow" equations for a urve.

x

10.1.3 Parametri Approa h to Variational Curve Grid Generation Assume that an initial parameterization x(r), 0  r  1, of a C 2 urve is given

and the urve is to be re-parameterized using a variational grid generator. The line grid fun tional (3.67) in Chapter 3 has a natural generalization to a urve fun tional and preserves the property that the lo al tangent is proportional to the physi al weight fun tion. To be onsistent with the variational theory outlined in Chapter 8, minimize the urve fun tional Z 1 H (g11 ) d ; (10.33) I [x℄ = 0 w2 (x) where H : R ! R is a arbitrary positive real homogeneous fun tion, g11 = x  x is the length metri , and w is a physi al-spa e weight fun tion. The set of admissible fun tions must satisfy the end-point onstraints x(0) = a 2 R3 and x(1) = b 2 R3 . This fun tional is more general than ne essary sin e the obvious hoi e is H = g11 . As will be demonstrated, if H = g11 , the unit weight w = 1 produ es the equal ar length parameterization. The di eren e between the line fun tional and (10.33) is that here x = (x; y; z ), i.e., there are three fun tions x( ), y( ), and z ( ) to be found. As a result, a onstraint must be imposed on the minimization to ensure that the new parameterization x( ) is a re-parameterization of the original urve x(r); i.e., the new points must lie upon the urve implied by the old parameterization. There are two approa hes to implementing the onstraint; one is referred to as the Lagrange Multiplier approa h (treated in Subse tion 10.1.4) and the other is the Parametri approa h (treated in this se tion). The on ept of parameter spa e is introdu ed in the parametri approa h to ensure that grid points lie upon the given

urve. Parameter spa e onsists of an intermediate domain 0  r  1 su h that r = r( ) is a mapping from logi al spa e to parameter spa e and x = x(r) is the user-spe i ed mapping from parameter spa e to physi al spa e (see Figure 10.1). The



182

1992 by P.M. Knupp, September 8, 2002

z

b 0

r Parameter Space

0 Logical Space

1

1

ξ

y a

Physical Space x

Figure 10.1: Curve parameterization following transformation rules apply to the omposite map from logi al to physi al spa e: x = xr r ; (10.34) J = J^ r ; (10.35) and g11 = g^11 r2 ; (10.36) with J^T = (xr ; yr ; zr ) and g^11 = xr  xr . One may also de ne G^ = J^T J^ = [^g11 ℄; then G = r2 G^. The minimization (10.33) over the set of admissible fun tions x be omes a minimization over the set of admissible fun tions r( ):

1 H d (10.37) 0 w^2 (r) with r(0) = 0, r(1) = 1, and the weight fun tion w^(r) = w(x(r)) de ned in terms of the parameter r. The onstraint is automati ally satis ed in the parametri approa h be ause the given parameterization x(r) ensures that grids points will lie upon the given urve for any r( ) that minimizes (10.37). I [r℄ =

Z

The Euler-Lagrange equation gives the grid generation equation for the urve; it has the form d T  H (10.38) ( ) ( ) = 0; r w^2 d w^2 where T = [H=r ℄. Exer ise 10.1.5 De ne B = 2 [H=g11℄. Apply the hain rule to T to show that (10.39) T = r G^ B : x

Exer ise 10.1.6 To obtain an eÆ ient omputational s heme, the rst term in (10.38) must be expressed in terms of the logi al spa e derivative. This is somewhat deli ate sin e H is not dire tly a fun tion of r. Apply the hain rule to show that H 1 H G^ r B : x ( 2 )r = ( 2 ) (10.40) w^ r w^ w^2



1992 by P.M. Knupp, September 8, 2002

183

From the results of the previous exer ises, the Euler-Lagrange equation now reads

H G^ r r B r ( G^ r B ) = 0 : ( 2 )  w^ w^2 w^2  This equation may be expressed in onservative form: (

r2 G^ B ) = 0 : w^2

H

(10.41)

(10.42)

Exer ise 10.1.7 Let H = g11 and show that the onservative form (10.42) of the Euler-Lagrange equation be omes g^11 r2 ) =0 (10.43) w^2  and that therefore pg11 = w^(r) is a generi property of the solution with a

onstant. Note that the equal ar -length solution is obtained when w^ = 1. x (

Numeri al Implementation The non-linear equation (10.43) is solved in the same manner as the line equation (3.16) using 3.45 of se tion 3.4. De ne = g^11 r =w^2 to obtain the sten il equation

C R Li r + i r + i r = 0; ( )2 i 1 ( )2 i ( )2 i+1

(10.44)

where

Li = Ri = Ci =

; ; (Li + Ri ) :

i 21 i+ 21

(10.45) (10.46) (10.47)

The lagged oeÆ ients are evaluated as follows

g^ = ( 112 )i+ 12 (ri+1 ri ) : (10.48) w^ The rst fa tor on the right is merely a fun tion of the parameter r, so it may be evaluated at the half-point by ri+ 21 = (ri+1 + ri )=2. As usual, i = 1; : : : ; M 1 are the interior points and r0 = 0, rM = 1 are the boundary onditions. The sten ils are symmetri sin e Li+1 = Ri . The approximation is se ond-order a

urate. i+ 12

Proje t 10.1.8 Convert the ode written for Proje t 3.4.6 from Chapter 3 to a

urve grid generator that solves (10.43). Use the parabola x(r) = (r; r (1 r); 0), 0  r  1, with  0 for a model problem. x Non-Conservative Form and Bifur ation A non- onservative form of the urve grid generator is obtained by expanding (10.43): w^r 2 x x gr = 0: (10.49) r + f r rr xr  xr w^ 



1992 by P.M. Knupp, September 8, 2002

184

This equation an be dis retized and solved in a manner analogous to (3.18) in Chapter 3, however, the approa h leads to a serious diÆ ulty, as des ribed in Steinberg and Roa he, [193℄. Brie y summarized, in the ontinuum the equal ar -length problem has a unique solution and so the Euler-Lagrange equation (10.49) with w^ = 1 is expe ted to have a unique solution. But when entered di eren es are used to dis retize this equation the solution bifur ates and uniqueness is lost. The planar paraboli urve in Proje t (10.1.8) is used as a model problem. If there are just M = 2 segments, there is one unknown parameter value r = r( 12 ) to be al ulated. Central di eren es at this lo ation gives the derivatives r = 1 and r = 4 (1 2 r). The dis retized equal ar -length equation (10.49 with w^ = 1) be omes 2 2 (1 2 r) = 0: (10.50) 4 (1 2 r) 1 + 2 (1 2 r)2 p p For < 2, there is the unique solution r = 12 , while for > 2, there are three real solutions, namely, r 1 1 1 1 1 r = ; and r =  : (10.51) 2 2 2 2 2 Only the rst solution a tually divides the urve into equal ar -length. Unfortunately, it is an unstable xed point in the iteration used to solve the nonlinear nite di eren e equation. Thus, for essentially all initial guesses, the iteration does not onverge to the desired root but rather to one of the two spurious, unequal ar -length, roots. The problem persists even if M is large. Alternate di eren ing s hemes applied to (10.49) do not alleviate the bifur ation problem. Numeri al experiments show that one annot get past the bifur ation point using ontinuation pro edures. Similar behavior was reported for parametri formulations of surfa e variational prin iples. If the parametri approa h to urve and surfa e grid generation is taken, the non onservative form (10.49) should be avoided; the onservative equation (10.43) is strongly preferred sin e it does not exhibit bifur ation behavior when dis retized. Proje t 10.1.9 Dis retize (10.49) using entered di eren es and write a numeri al ode to solve the resulting equations. Repli ate the bifur ation behavior des ribed above (see Steinberg and Roa he, [193℄). x

10.1.4 Lagrange Multiplier Approa h to Variational Curve Grid Generation The se ond way to impose the onstraint on the minimization (10.33) is to use Lagrange Multipliers. Again, the problem is to minimize

I [x℄ =

1

Z

0

G(; x; x ) d;

(10.52)

where G : R7 ! R is a smooth fun tion, over all parameterizations of the urve x = x( ), 0    1. The following derivation of the Euler-Lagrange equation follows the de nition (6.4) of the rst variation of a fun tional. Now, be ause most urves are not linear, x +  will not lie on the urve for nonzero . So a generalization is needed. Let x(; ) be a family of parameterizations of the given urve su h that x(; 0) = x( ), x(0; ) = x(0) and x(1; ) = x(1). Thus x(; ) x(; 0) (10.53) 



185

1992 by P.M. Knupp, September 8, 2002

is a a se ant ve tor, and thus its limit as  goes to zero is a tangent ve tor, that is, a multiple of the unit tangent:  x(; )j=0 = C ^t : (10.54)  Note that C = C ( ). Now de ne

F () =

Z

0

1

G(; x(; ); x (; )) d :

(10.55)

For the urve x( ) to minimize I ,  = 0 must be a minimum of of F (). This derivative de nes the rst variation of I : F (10.56) D^tI = (0) :  The hain rule then gives

1 G ( 0 x

Z

d G ^ )  t C d : (10.57) d  x In order for the rst variation to be zero, the rst part of the integrand must be normal to the tangent spa e, i.e., there exist fun tions 1 ( ), 2 ( ) su h that G d G (10.58) = 1 n^ + 2 b^ :  x d  x D^tI =

This is the Lagrange Multiplier form of the Euler-Lagrange equations for a urve. Applying (10.58) to the urve fun tional (10.33) , the onstrained Euler-Lagrange equation is  H d T (10.59) = 1 n^ + 2 b^ ( )  x w2 d w2 where the Lagrange Multipliers are, as yet, unknown and T = H= x = J B. The

omponents of x are not independent of one another sin e x lies upon the urve; thus, the rst term of (10.59) must be inverted using the generalized inverse relationship (10.28). Equation (10.59) then be omes (10.60) pHg11 ( pgx11w2 ) ( xw 2B ) = (1 +  wH2 ) n^ + 2 b^ :

Exer ise 10.1.10 Form the inner produ ts of equation (10.60) with n^ and b^.

Use the identities (10.13)-(10.14) to show

B

1 = g ; w2 11 2 = 0 : x

(10.61) (10.62)

Pulling these results together, the Euler-Lagrange equation in multiplier form is (10.63) pHg11 ( pgx11 w2 ) ( xw 2B ) = w2 (H g11 B) n^ : If H = g11, the previous result be omes x  w ( 2 ) = x + g11 2 n^ ; 3 w w w

(10.64)



1992 by P.M. Knupp, September 8, 2002

186

whi h further simpli es to the onservative form x g (  ) = 11  n^ : (10.65) w w The non- onservative form is (10.66) x w x = g11  n^ : w Exer ise 10.1.11 Usep (10.63) to derive the Euler-Lagrange equations for the variational prin iple H = g11 with w = 1. Compare the Euler-Lagrange equation to the urve metri identity and interpret the results. x Exer ise 10.1.12 Proje t (10.66) onto x and use the parametri relation x = xr r to derive (10.49). Show pg11 = w is a solution for this H . x The ovariant proje tion is obtained by forming the inner produ t of (10.63) with x , H GB ( ) = 0: (10.67) w2  Sin e G = r2 G^, the ovariant proje tion an be immediately onverted into the parametri formulation (10.42). For H = g11 , the ovariant proje tion of the weighted

urve grid generation equation is g ( 112 ) = 0 : (10.68) w

Numeri al Algorithms for the Lagrange Multiplier Form In planar numeri al grid generation it was noted that trun ation error shifts points from their ontinuum lo ation in the plane to the lo ation of the dis rete node. As a result, the dis rete planar grid will not exa tly have the properties of the ontinuum grid; for example, the ontinuum solution may be orthogonal while the numeri al solution is not exa tly so, espe ially if oarse resolutions are used. As shown in Se tion 5.4.3, another e e t of trun ation error is that the dis rete grid an be folded when the ontinuum grid is not. An additional trun ation error e e t an o

ur in the ase of numeri al urve and surfa e grid generation. Suppose one numeri ally solves the urve grid generation equation (10.65) or (10.66) using some nite di eren e approximation. Let the exa t solution to the urve grid equation at  = i be x(i ) and the dis rete solution at that point be xi (see Figure 10.2). The ontinuum solution point x(i ) lies exa tly upon the given urve, while the dis rete point xi may not. As the dis retization be omes ner, it is expe ted that the dis rete point approa hes the point x(i ) on the urve. Let vi = x(i ) xi and de ne the lo al trun ation error to be p (10.69) T Ei = vi  vi : Lo al In-Curve Trun ation Error, ICTE, is de ned by ICT Ei = vi  ^t : (10.70) To measure the normal displa ement of the dis rete grid node from the given urve, one may de ne the lo al O -Curve Trun ation Error, OCTE, by

OCT Ei = =

q

T Ei2 ICT Ei2 ; j vi  ^t j :

(10.71) (10.72)



187

1992 by P.M. Knupp, September 8, 2002

x (ξ ) i

ICTE i ^t OCTE i

TE

i x

i

Figure 10.2: Geometry of urve-grid trun ation errors Note that both T Ei and OCT Ei are non-negative.

Exer ise 10.1.13 Show that if vi 2 T, then OCT Ei = 0 and ICT Ei = T Ei . Show that if vi is in the null spa e of J T , then OCT Ei = T Ei and ICT Ei = 0. x The parametri formulation of the urve grid generator (se tion 10.1.3) guarantees that OCT Ei = 0, however, ICTE may prevent the dis rete urve grid from being exa tly equal-ar . The Lagrange Multiplier formulation does not guarantee zero OCTE. In this ase, prohibitively large resolutions may be needed for the grid points to onverge towards the given urve, espe ially if the urvature is large (Knupp, [113℄). In planar grid generation, O -Planar Trun ation Error (OPTE) is zero by de nition, so T Ei = IP T Ei, i.e., all the observed trun ation error lies in the plane. In general, In-Obje t Trun ation Error may result in inexa t metri relationships and sometimes in grid folding, while O -Obje t Trun ation Error results in dis rete grids whi h do not lie upon the target obje t. Numeri al algorithms for solving the systems of three non-linear equations (10.65) or (10.66) are now onsidered. Both have ve tor nite di eren e sten ils of the form

x x x Li i 12 + Ci i 2 + Ri i+12 = Gi ( ) ( ) ( )

(10.73)

with Ci = (Li + Ri ). The systems are solved by su

essively applying a tridiagonal solver to ea h of the three equations and iterating on the non-linearity. For equation (10.65), the sten il oeÆ ients are 1 ; wi 21 1 Ri = ; wi+ 21

Li =

(10.74) (10.75)



1992 by P.M. Knupp, September 8, 2002

188

while for equation (10.66), the oeÆ ients are  w ( ); (10.76) 2 w i  w Ri = 1 ( ): (10.77) 2 w i To obtain se ond-order a

ura y, the weights should be averaged to the half-points as, for example, wi+ 12 = (wi + wi+1 )=2. The right-hand-side Gi of these equations are the deli ate part of the algorithm, as is demonstrated in the following proje t.

Li = 1 +

Proje t 10.1.14 Write a omputer ode (see Appendix B) to solve (10.65) using the algorithm des ribed above for the model parabola in Proje t (10.1.8). The righthand-side is g (10.78) Gi = ( 11  n^)i : w Use the analyti expression for planar urves x y y x (10.79) n^ = r rr2 2r 2 rr x?r (xr + yr ) derived from (10.11). The right-hand-side Gi must be evaluated at xi ; in general this requires inverting the original analyti parameterization of the urve, i.e., given xi , nd ri to evaluate (10.79). For the paraboli urve this is easy sin e r = x. In the general ase, the given original parameterization most likely must be inverted numeri ally. Evaluate g11 on the right hand side using the entered nite di eren e expression for x . Set = 1, w = 1 and ompute the solution grid, the hord lengths between adja ent nodes, and the maximum O -Curve Trun ation Error. Perform a grid onvergen e study and verify that OST E ! 0 in se ond-order fashion. Try larger values of . It is tempting to eliminate OSTE by setting yi = y(xi ), but then (10.65) is not satis ed (i.e., the grid is not equal ar -length) and, in any ase, the approa h only works for urves of the form y = y(x) and not more general ases. x The numeri al results for the non- onservative parametri equation (10.49) suggest that (10.66) would exhibit bifur ation behavior, but it does not (Knupp, [113℄). Evidently, there is enough information in the Lagrange Multiplier form to avoid the ambiguities inherent in the proje ted form (10.49) that lead to bifur ations. The proje ted equation (10.67) may be solved via a Newton iterative te hnique des ribed in Knupp, [113℄. The approa h is e e tive in that it avoids bifur ation and \o - urve" trun ation error. The main limitation of the Newton approa h is in the

omplexity of its implementation. If one re-introdu es the parameter-spa e variable so that the tangent transforms as in (10.34), (10.67) redu es to (10.42) and the solution methods employed in Proje t 10.1.8 an be used. The best variational approa h to generating grids on urves appears to be to solve the onservative form (10.43) of the parametri equations. The parametri approa h is a natural way to impose the onstraint that the grid points lie upon the given urve. The approa h simultaneously avoids o - urve trun ation error and bifur ation. Use of the non- onservative parametri equation should be avoided sin e this leads to bifur ations. Bifur ations for the onservative form were reported in Steinberg and Roa he, [195℄ but a di erent form, not fully onservative, was used in that study. Numeri al experiments using the model problem on the fully onservative form (10.43) indi ate that bifur ations do not o

ur. Bifur ations also do not o

ur if



189

1992 by P.M. Knupp, September 8, 2002

the proje ted equation (10.67) is solved, using the Newton iteration te hnique. The Lagrange multiplier forms are unsatisfa tory be ause they permit non-zero O -Curve Trun ation Error, espe ially if the resolution is oarse or the urve has regions of high

urvature. In addition, they require inversion of the original parameterization in order to determine the urvature at the required lo ation.

10.2 Surfa es The following dis ussion of variational surfa e grid generation is modeled after the results obtained for urves. The surfa e di erential relations from Chapter 4 are reviewed and extended. Transformations for hosted equations on a surfa e are des ribed. Parametri and Lagrange Multiplier approa hes to variational surfa e grid generation are presented. Euler-Lagrange equations for a general fun tional with physi al-spa e weighting are developed.

10.2.1 Di erential Geometry of Surfa es First-Order Relationships Let S  R3 be a smooth, simply- onne ted, orientable surfa e. A point on S is spe i ed by a mapping from logi al spa e U2 to physi al spa e X23 via three oordinate

fun tions

x(; ) = (x(; ); y(; ); z (; ) ) : (10.80) The two surfa e tangent ve tors, x = (x ; y ; z ) and x = (x ; y ; z ), serve as

ovariant basis ve tors for the tangent plane. The tangent plane is the subspa e T spanned by these tangent ve tors. Let J = r x be the 3  2 Ja obian transformation matrix,

0

1

x x J =  y y A : (10.81) z z Assume the surfa e is non-degenerate, i.e., J has rank 2, or, j x  x j6= 0. The metri tensor as de ned in Chapter 4 is G = J T J . The elements of G are g11 = x  x ; g12 = x  x ; g22 = x  x : (10.82) 2 . The assumption on the rank The determinant of the metri tensor is g = g11 g22 g12 of the Ja obian matrix ensures that g 6= 0 so G is invertible. Exer ise 10.2.1 Show that g =j x  x j2 : x

A surfa e normal ve tor is J = x  x and a unit normal ve tor is n^ = J=pg :

Exer ise 10.2.2 Verify the following relationship, whi h an be derived from the

ve tor identity (4.11):

x  n^ = g22 x p g12 x ; g g12 x + g11 x n^  x = :x p g

(10.83) (10.84)

The s alar produ t identities in Table 4.5 hold, if the proper analogies are made.



190

1992 by P.M. Knupp, September 8, 2002

Se ond Order Relationships Se ond-order quantities are introdu ed to develop the Gauss and metri identities. Following Stoker, [197℄, de ne the elements of the Curvature Tensor W as 

L M W= M N



(10.85)

where

L = n^  x ; M = n^  x ; N = n^  x : (10.86) The well known Gauss identities for a surfa e an be derived by resolving the se ond-order ve tors into ombinations of the tangent plane and surfa e normal ve tors: x = 111 x + 211 x + L n^ ; (10.87) 1 2 x = 12 x + 12 x + M n^ ; (10.88) 2 1 x = 22 x + 22 x + N n^ ; (10.89) with surfa e S hwarz-Christo el symbols as de ned in (4.140)-(4.145). Terms proportional to the unit surfa e normal are added to the planar relations. The Gauss Identities are satis ed by every parameterization of a surfa e. Various ross-produ t relationships an be derived from (10.87)-(10.89) whi h are useful in obtaining the Weingarten equations:

n^ = ( g12 M g22 L ) x + ( g12 L g11 M ) x ;

(10.90)

g M g11 N ) x : n^ = ( g12 N g22 M ) x + ( 12

(10.91)

g

g

g

g

These show that n^ and n^ lie in the tangent plane.

Exer ise 10.2.3 Show that one an rewrite the elements of the urvature tensor as L = n  x , M = n  x = n  x , and N = n  x . x The Mean Surfa e Curvature,

g N  = 11

2 g12 M + g22 L ; 2g

(10.92)

plays an important role in surfa e grid generation sin e it is an invariant of the surfa e parameterization.

Exer ise 10.2.4 Show that  is invariant to the hoi e of surfa e parameteriza-

tion.

x

Exer ise 10.2.5 Verify that trfG 1 Wg = 2  : x

THEOREM 10.1 The surfa e Metri Identity  g22 x g12 x  g x g x p ( ) + ( 11  12  ) = 2  g n^ 

pg



pg

(10.93)

(10.94)



1992 by P.M. Knupp, September 8, 2002

191

holds for any parameterization of the surfa e. Proof:

 g22 x g12 x  g x +g x ( ) + ( 12 p 11  ) = pg   g   (x  n^) + (n^  x ) =    x  n^ + n^  x = 2  pg n^

(10.95) (10.96) (10.97)

where the last step is obtained by forming the appropriate ross produ ts with the Weingarten equations (10.90)-(10.91) and the de nition (10.92). x Higher-order relationships of di erential geometry su h as the Codazzi equations, the Theorema Egregium, and the theory of geodesi s ould be presented, but these have seen little appli ation in grid generation to date.

Exer ise 10.2.6 A simple derivation of a widely used non-variational surfa e grid generator ( Warsi, [226℄ ) an be obtained from the surfa e Gauss relations. Expand the surfa e ve tor g22 x 2 g12 x +g11 x in the linear ombination P x +Q x + n^ and show  = 2 g . To onvert this identity into a grid generation equation, the

oeÆ ients P and Q are repla ed by weight fun tions, while the oeÆ ient  ensures that points lie upon the given surfa e (to within trun ation error). x

10.2.2 Transformation Relations on a Surfa e Sin e the surfa e Ja obian matrix is not square, it's determinant is unde ned and has no inverse. Furthermore, the matrix J T takes ve tors in R3 to R2 so that if v 2 T, then J T v 2 R2, i.e., the image of a ve tor in the tangent plane is a ve tor in R2 . Observe that the null spa e of J T onsists of s alar multiples of the unit surfa e normal ve tor. In parti ular, J T n^ = 0 : (10.98) This is made lear by observing that the omponents of this matrix-ve tor produ t is the ve tor having omponents x  n^ and x  n^. Although the inverse of the Ja obian matrix does not exist, a generalizedinverse an be onstru ted using the de nition

J

(J 1 )T = J G 1 :

(10.99)

This is well-de ned sin e the surfa e metri tensor is square and is assumed to have non-zero determinant. Expli it forms of the inverse are 1 (J 1 )T = [g22 x g12 x ; g12 x + g11 x ℄; g 1 = p [x  n^; n^  x ℄ : g

(10.100) (10.101)

The generalized-inverse takes ve tors in R2 to ve tors in T.

Exer ise 10.2.7 Let v 2 T. Show that (J 1 )T (J T v) = v and verify the entries in Table 10.1.

x

(10.102)



192

1992 by P.M. Knupp, September 8, 2002

Matrix

J JT J 1 (J 1 )T

Dimensions Domain Range Null Spa e 32 23 23 32

R2 R3

T R2

n^

R3 R2

R2

n^

T

0

0

Table 10.1: Properties of the Ja obian matrix and its generalized inverse It an be shown from the de nitions that J J 1 = I33 and J 1 J = I22 . The null spa e of J 1 is the same as the null spa e of J T , i.e.,

J 1 n^ = 0 :

(10.103)

Transformation relationships for hosted equations on surfa es an be developed in terms of pthe generalized-inverse. The auxiliary matri es, C = pg (J 1 )T and C 1 = J T = g are de ned as in previous hapters. The metri identity (10.94) is simply stated p (10.104) div C = 2  gn^ : Assume for the moment that divx C 1 = 0 : (10.105) This will be proven later in this se tion to be a onsequen e of de nitions to be adopted. No urvature term appears in (10.105) due to the fa t that logi al spa e has zero urvature. Let f = f (x(; )) be a s alar fun tion de ned on S . The logi al spa e gradient is well-de ned   f  (10.106) r f = f ; 

with r f 2 R2 . The physi al spa e derivatives of f are not well de ned sin e f is de ned only upon the surfa e. Therefore, the following de nition of the physi alspa e gradient of f is adopted: rx f = (J 1 )T r f ; (10.107) =

p1g C r f :

(10.108)

The de nition is based on analogy with the planar transformation relationship and employs the generalized-inverse of the Ja obian matrix. The gradient rx f = (fx ; fy ; fz )T lies in the tangent plane, i.e., rx f 2 T. This de nition an be inverted using the result (10.102) to obtain non- onservative forms

r f

= =

J T rx f ; pg C 1 r f : x

whi h formally agree with the planar relation.

(10.109) (10.110)



193

1992 by P.M. Knupp, September 8, 2002

The \ onservative" form of the surfa e-gradient ontains extra terms div (C f ) = =

C r f + f div C ; C r f + 2 f pg  n^ :

A

epting (10.105),

(10.111) (10.112)

divx(C 1 f ) = C 1 rx f : These give the onservative forms of the gradient:

(10.113)

r f rx f

(10.114)

= =

pg div (C 1 f ); x 1 pg div (C f ) 2 f  n^ :

(10.115)

As  ! 0, the surfa e formula approa hes the planar result. The transformation relations involving the gradient of a ve tor are again based on analogy with the planar relations. Let v 2 R3 and v^ 2 R2 . Then r v is a 3  2 matrix, rx v is 3  3, r v^ is 2  2, and rx v^ is a 2  3 matrix. Their transformation rules read (10.116) rx v^ = p1g (r v^) C T ; r v = pg (rx v) (C 1 )T : (10.117)

Exer ise 10.2.8 Show that rx  = J 1 . x Let v 2 R3 . The onservative form of the physi al-spa e divergen e an be

onstru ted from the de nition (10.108) of the gradient: 1 divx  v = p div  (C T v) : g

(10.118)

This de nition makes sense be ause C T v 2 R2 ; it is onsistent with the planar ase. Exer ise 10.2.9 Expand the right-hand-side of (10.118) and show that this relationship for the divergen e is onsistent with (10.108). x The result an be inverted by de ning v^ = C T v 2 R2 :

p div  v^ = g divx  (C 1 )T v^ :

(10.119)

The divergen e relation (10.118) an be used to obtain the transformation relationships for the divergen e of a tensor. Let T^23 take ve tors in R3 to ve tors in R2 . Then (T^ C )22 and 1 divx T^ = p div (T^ C ) (10.120) g is a ve tor in R2 . If T32 takes ve tors in R2 to ve tors in R3 , then (T C 1)33 and

p

div T = g divx (T

C 1)

(10.121)

is a ve tor in R3 . The inverse metri identity (10.105) an now be proved as a onsequen e of the formal de nition (10.120): 1 divx C 1 = p div (C 1 C ) : (10.122) g



1992 by P.M. Knupp, September 8, 2002

194

The term on the right-hand-side is the zero ve tor in R2 . The Lapla ian an be de ned using the gradient and divergen e results and noting that the physi al-spa e gradient of f lies in the tangent plane, T r2x f = p1g div  ( CpgC r f ) :

(10.123)

The ve tor Lapla ian transforms as

with v^ 2 R2 .

v^) C T C r2x v^ = p1g div f (r p g; g

(10.124)

Exer ise 10.2.10 Invert the relation r2x  = P to obtain the Warsi surfa e grid

generator given in Exer ise (10.2.6). x If T takes ve tors in R3 to ve tors in R3, the ellipti form is divx  T rx f =

T p1g div  ( C pTg C r f ) :

(10.125)

To summarize, on e the generalized-inverse has been de ned the physi al operators gradient, divergen e, and Lapla ian an be de ned by analogy to the planar relationships. The results are onsistent with one another and with the planar operations.

10.2.3 Parametri Approa h to Variational Surfa e Grid Generation Based on the analogy to urve grid generation (se tion 10.1.3), the ma hinery just developed is used to derive the Euler-Lagrange equations for a surfa e variational prin iple. Two approa hes are des ribed, the rst employs the parameter spa e

on ept while the se ond is based on Lagrange Multipliers. The general surfa e fun tional is of the form

I [x℄ =

Z

1Z 1

0 0

G(; x; x ; x ) d d

(10.126)

with G : R11 ! R1 being a positive, real, smooth, homogeneous fun tion and x 2 S . The minimization is, of ourse, onstrained so that the mapping takes points to the given surfa e. The parametri form of the surfa e Euler-Lagrange equations is derived in this se tion. Introdu e the parameter spa e r = (r; s) so that x = x(r; s) (see Figure 10.3). The transformed tangents are

x = xr r + xs s ; x = xr r + xs s :

(10.127) (10.128)

The surfa e Ja obian transforms as

J = J^(r r) :

(10.129)

with J^ = (rr x) being a 3  2 matrix. De ne the transformed metri tensor G^ to be (10.130) G^ = J^T J^



195

1992 by P.M. Knupp, September 8, 2002

z

y

x Physical Space η

s

ξ Logical Space

r Parameter Space

Figure 10.3: Surfa e parameter spa e



196

1992 by P.M. Knupp, September 8, 2002

p and de ne g^ = det G^ so that g^ =j xr  xs j. The original metri tensor G = J T J transforms as G = (r r)T G^ (r r) : (10.131) De ne the parameter-spa e Ja obian determinant p

= det(r r) ; = r  s r  s :

(10.132) (10.133)

Using the fa t that the determinant of the produ t of two matri es is the produ t of their determinants, relation (10.131) shows

pg = ppg^ :

(10.134)

The surfa e fun tional (10.126) is onverted to

1 Z 1 H (g11 ; g12 ; g22 ; pg) d d I [r℄ = w^2 (r) 0 0 Z

(10.135)

in the parametri formulation. The onstraint that the mapping lie upon the given surfa e is automati ally satis ed.

Exer ise 10.2.11 Use (10.131) to verify that g11 = 2 G^ r ;  r

g12 ^ = G r ;  r

g12 ^ = G r ;  r

g11 = 0;  r and use (10.134) to show that  pg =  r

p

g^ r? ; 

g22 = 0;  r

(10.136)

g22 = 2 G^ r ;  r

(10.137)

 pg p ? = g^ r : x  r

(10.138)

The Euler-Lagrange equation for the prin iple (10.126) is

 H T (10.139) ( ) div 2 = 0  r w^2 w^ where T22 = [H= r ; H= r ℄ and w^ = w^(r). Using (10.136), (10.137), and (10.138), the hain rule an be applied in the manner of Chapter 8 to nd

T where

p

= G^ (r r) M + g^ [M℄ij = (1 + Æij )

and

Cr

= =

H C:  pg r

(10.140)

H gij

(10.141)

p [(r r) 1 ℄T ;    s r

s r

(10.142)

:

(10.143)



197

1992 by P.M. Knupp, September 8, 2002

Exer ise 10.2.12 Begin with (10.140) and show that T = [H= r ; H= r ℄. x Exer ise 10.2.13 Let

B = M + pg H pg G 1

as in Chapter 8. Show that

T

= G^ (r r) B : x

(10.144) (10.145)

As was true in the ase of urves, the rst term in the Euler-Lagrange equation

annot be dire tly onverted to a onservative, logi al-spa e form. The following relationship applies

 H 1  H ( ) = (r r)T ( 2 ) + 2 [r (r r)T ℄ G^ (r r) B :  w^2  r w^ w^ The Euler-Lagrange equation in parametri form is then 1 G^ (r r) B ) = 0 :  H [r (r r)T ℄ G^ (r r) Bg div ( ( 2) pCr f  2 w^ w^ w^2

(10.146)

(10.147)

Covariant Proje tion

If one multiplies the previous Euler-Lagrange equation by (r r)T = p Cr 1 , it is easy to show that a fully onservative form is obtained: (r r)T G^ (r r) B g = 0: (10.148) w^2 Numeri al solutions to this equation may be developed in a manner similar to Se tion 8.3.3, linearizing (10.148) by fa toring out the leading matrix: div f

div

HI

(r r)T fH [(r r) 1 ℄T w^2

G^ (r r) Bg = 0 :

(10.149)

10.2.4 Lagrange Multiplier Approa h to Variational Surfa e Grid Generation The Lagrange Multiplier form of the surfa e Euler-Lagrange equations for an arbitrary fun tional of the following form is now derived.

1 Z 1 H (g11 ; g12 ; g22 ; pg) d d I [x℄ = w2 (x) 0 0 Z

(10.150)

with the onstraints that the boundary data is satis ed and the minimizing transformation lies upon the given surfa e. The Lagrange Multiplier  is introdu ed to ensure the onstraint is met. The Euler-Lagrange equations are proportional to a ve tor in the null spa e of J T ; this an be demonstrated in a manner similar to the derivation supplied in se tion (10.1.4) for urves, or, one an refer to equations (6.14)-(6.15) from Chapter 6. Let T = [H= x ; H= x ℄ so that the Euler-Lagrange equation has the form

T  H ( 2 ) div 2 =  n^ x w w

(10.151)



198

1992 by P.M. Knupp, September 8, 2002

with  to be determined. The rst term an be onverted to a logi al-spa e gradient using the gradient relation (10.115) to get

 1  H ( ) = H ( 2);  x w2 x w 1 C = H f p div 2 g w

(10.152) 2  n^g : w2

(10.153)

The se ond term in (10.151) is T = J B with the matrix B de ned as in Chapter 8. The Euler-Lagrange equation (10.151) now reads

pHg div ( wC2 )

JB 2 H  div f 2 g = ( + 2 ) n^ : w w

(10.154)

The multiplier  is determined by proje ting this equation onto the unit surfa e normal ve tor. To do so requires a few lemmas.

LEMMA 10.2 The gradient of the unit surfa e normal ve tor is

r n^ = pCg W : Proof.

pg C 1 r n^ 

= = =

J T [n^ ; n^ ℄ ; n^  x n^  x n^  x n^  x W:x

(10.155)



(10.156)

;

(10.157) (10.158)

LEMMA 10.3 The proje tion of the rst term in (10.154) onto the unit surfa e

normal is

C

n^  div ( 2 ) = 2 pg  : w w 2

(10.159)

Proof. Observe that C T n ^ = 0 due to the result (10.103). Using (7.8) from Chapter 7,

C C T n^ CT n^  div ( 2 ) = div  ( 2 ) trf 2 r n^g ; w w w T C = trf 2 r n^g ; w

1 CT C trf( p ) Wg ; 2 w g pg trfG 1 Wg ; = w2 and the relation (10.93) nishes the proof. x =

(10.160) (10.161) (10.162) (10.163)

LEMMA 10.4 The proje tion of the se ond term in (10.154) onto the unit surfa e

normal is

n^  div ( J B2 ) = 12 trfB Wg : x w w

(10.164)



199

1992 by P.M. Knupp, September 8, 2002

Proof.

JB

JB

JB

n^  div ( 2 ) = div  ( 2 )T n^ trf( 2 )T r n^g ; w w w Tn B J ^ 1 = div  ( 2 ) trfB J T r n^g ; w w2

1 trfB Wg : x w2 Pulling these lemma's together, one has =

(10.165) (10.166) (10.167)

THEOREM 10.5 The Lagrange Multiplier in (10.154) is 1 trfBWg : x (10.168) w2 Note that  depends on the urvature tensor, the partial derivatives of H , and upon the weight fun tion. If the surfa e has zero urvature, the multiplier is zero. Finally, the Euler-Lagrange equation (10.154) in onservative form is

=

pHg div ( wC2 )

JB 1 div f 2 g = 2 [trfG 1 (H I w w

G B) Wg℄ n^ :

(10.169)

Exer ise 10.2.14 Evaluate the surfa e Euler-Lagrange equations (10.169) for H = pg with w = 1. Relate the results to the surfa e metri identity. x Exer ise 10.2.15 Find the surfa e Euler-Lagrange equations for the area fun tional and show pg = w is a generi property of the solution. x Numeri al approa hes to (10.169) are not re ommended sin e the Lagrange Multiplier is diÆ ult to evaluate for arbitrary fun tionals H , is not an invariant of the parameterization, and it would be diÆ ult to invert the parameterization to evaluate the right-hand-side at the orre t lo ation. Ex essive O -Surfa e Trun ation Error also is a possibility.

10.2.5 The Surfa e Covariant Proje tions The Euler-Lagrange equation (10.169) is proje ted onto the tangent plane. As shown previously, this is equivalent to multiplying the Euler-Lagrange equation by the matrix J T . Thus, the proje ted form of (10.169) is

H C ( p ) J T div ( 2 ) g w

J T div ( Jw2B ) = 0 :

(10.170)

Using (10.115), the rst term is

H C 1 H ( p ) J T div ( 2 ) = ( p ) J T fC r ( 2 ) g w g w 2 p + 2 g  n^g ; w 1 H = ( p ) J T fC r ( 2 )g ; g w 1 = H r ( 2 ) : w

(10.171) (10.172) (10.173) (10.174)



200

1992 by P.M. Knupp, September 8, 2002

To treat the se ond term, one needs the planar result (8.55), [r J T ℄(J B) = r H

(10.175)

generalized to surfa es.

Exer ise 10.2.16 Verify (10.175). x The se ond term is

J T div ( JwB2 )

JTJ B

JB

= div ( 2 ) [r J T ℄( 2 ) ; w w 1 G B r H: = div ( 2 ) w w2  Observing that r H = div (H I ), one has

(10.176) (10.177)

THEOREM 10.6 The ovariant proje tion of the Lagrange Multiplier form of the surfa e Euler-Lagrange equations is HI GB g = 0: (10.178) w2 Proof: The proof readily follows from the lemmas established in this se tion. x div f

One an solve (10.178) in a Newton iteration (Knupp, [113℄) but sin e this form reverts to (10.148) when the parameter spa e is introdu ed, the numeri al approa h suggested in subse tion (10.2.3) may be more onvenient.

Chapter 11

Contravariant Fun tionals: Alignment, Diagonalization, and Rotation A weakness of the variational methods des ribed in previous hapters is that there is no

lear interpretation of the weight fun tions (ex ept in the ase of the area fun tional); the weights are merely hooks that permit one to tinker with the grid to a hieve a desired result. The variational method of Steinberg and Roa he (see Chapter 6) uses a referen e grid to onstru t the weight fun tion in an intuitive manner. However, a

lear geometri meaning to the weight an only be found for the area fun tional (and this results in a non-ellipti generator). The variational method presented in Chapter 8 does not remedy this problem of the weights. The non-variational, weighted ellipti grid generator (se tion 5.5) may also be riti ized, again be ause there is no dire t geometri onne tion between the weight fun tions and the interior tangents (this partly a

ounts for the rise of intera tive grid generation as a workable substitute for automati grid generation). Ideally, one would like to spe ify an arbitrary lo al ondition that gives the lo al relationship between the two ovariant tangent ve tors; for example, relation (5.28) for orthogonality and ell-aspe t ratio ontrol. This is done in this hapter using fun tionals that depend on a quadrati integrand (expressed in terms of the ellipti norm). Matrix fun tions of position serve as physi al-spa e weights that des ribe the lo al ondition. Physi al-spa e weights are handled more onveniently using the Bra kbill-Saltzman (or ontravariant) variational approa h. The main advantage of the variational approa h of this hapter, then, is that the resulting Euler-Lagrange equations provide a least-squares t to a given lo al ondition. Another advantage is that the se ond variation of the fun tional depends only upon the physi al-spa e weight fun tions (i.e., the matrix fun tions). It is thus straightforward to show that the se ond variation is non-negative. The approa h has strong onne tions to the theory of harmoni grid generation (see Dvinsky, [54℄, [55℄, Liao, [126℄, and Sritharan, [185℄, for a omplete dis ussion of harmoni grid generation) and, in parti ular, to Winslow's Variable Di usion generator. The remaining diÆ ulty is, of ourse, that the desired lo al ondition does not ne essarily result from solving the proposed Euler-Lagrange equations. This is due to the fa t that the equations give a least-squares t to the ondition; the resulting 201



1992 by P.M. Knupp, September 8, 2002

202

grid is riti ally dependent upon the imposed boundary onditions. Furthermore, a grid having the desired lo al onditions everywhere may simply not exist (this is the beauty of the least-squares approa h: if the grid exists, the method will produ e it if the proper boundary onditions are given; if the grid does not exist, a least-squares approximation will be produ ed). For simpli ity, the present dis ussion is on ned to the planar problem (des ribed in Chapter 5); generalizations to the surfa e and volume ases require additional work. In se tion 11.1 two basi lasses of fun tionals are introdu ed, based on the ellipti norm and the rank of two matri es, whi h lead to alignment and diagonalization grid generators. A nonsymmetri form of the diagonalization equations is derived in se tion 11.2 for numeri al purposes, while se tion 11.3 shows how to onstru t weight fun tions for the diagonalization equations to attain least-square solutions to a given lo al ondition on the tangent ve tors. Se tion 11.4 gives a weighted grid generator whose lo al ondition is stated in terms of rotation matri es. The hapter loses with se tion 11.5, in whi h it is shown how to ombine ellipti ity and alignment into a single fun tional.

11.1 Fun tionals Based on the Ellipti Norm Let A~ and B~ be 2  2 real, positive semi-de nite matri es. De ne the non-negative fun tion G j R2  R2 ! R by

G(x1 ; x2 ) = xT1  A~ x1 + xT2  B~ x2 :

(11.1)

It is easy to show that the fun tion G is onvex when the two matri es are positivede nite, so it is believed that grid generation fun tionals based on G (su h as the ones to follow) will turn out to be onvex (or perhaps poly onvex). The proof of this is left as a future resear h topi . The matri es A~ and B~ are to serve as physi al-spa e weighting fun tions so assume further that the two matri es are fun tions of x, the position in the plane. For physi alspa e weighting, ontravariant fun tionals result in simpler Euler-Lagrange equations than do ovariant fun tionals. Therefore, onsider the ontravariant fun tional form Z

1 G ( rx ; rx  ) dx dy; (11.2) 2

to be minimized subje t to the onstraint of the boundary data (the fun tional is

learly non-negative). The se ond variation an be shown to also be non-negative due to the assumption that the matri es are positive semi-de nite. The Euler-Lagrange equations for this fun tional are examined to see what kinds of solution properties are possible for various assumptions on the matri es A~ and B~. The Euler-Lagrange equations read:

I [  (x); (x) ℄ =

divx [ A rx ; B rx  ℄T = 0

(11.3)

with

A B

1 ~ ~T (A + A ); 2 1 = (B~ + B~T ); 2 =

(11.4) (11.5)



1992 by P.M. Knupp, September 8, 2002

203

i.e., the matri es that appear in the Euler-Lagrange equations are the symmetri part of the matri es A~ and B~ that appear in the fun tional. This means that the skewsymmetri part of the matri es appearing in the fun tional have no e e t on the grid, nor on the se ond variation of the fun tional, i.e., one may as well assume that A~ and B~ are symmetri to begin with. Observe that the matrix A in the Euler-Lagrange equations is real, symmetri (and thus has real eigenvalues), and positive semi-de nite; the same statement holds for B. There are two ases to be onsidered that have a major impa t on the type of grids that an be generated. These ases lead to alignment and diagonalization fun tionals; they are based on the ranks of the matri es.

11.1.1 The Alignment Fun tional Suppose both A and B have rank 1. Then the matri es are singular and have

only one non-zero eigenvalue ea h. The null-spa e of ea h matrix has dimension one. Fun tionals based on matri es with rank 1 are referred to as alignment fun tionals be ause they an be used to align the oordinate system tangents with pres ibed ve tor elds. The following lemma is used to nd the geometri ondition that leads to potential solutions to the Euler-Lagrange equation (11.3); many other solutions are, of ourse, possible.

LEMMA 11.1 Let M be any real, symmetri matrix of rank 1. Then M obeys

the proportionality

M/v v

(11.6) with v an arbitrary non-zero ve tor. The null-spa e of M is the span of the ve tor v? , while the eigenspa e is the span of v, with eigenvalue  / v  v. The proof depends on the fa t that the olums of a rank 1 matrix are linearly dependent. x

Now that the form of the two matri es has been established, it is easy to onstu t fun tionals whi h align the tangents with two given (possibly non-orthogonal) ve tor elds v1 and v2 . Take

A B

= v2 v2 ; (11.7) = v 1 v1 : (11.8) Then the null-spa e of A is the span of v2? and the null-spa e of B is the span of v1? , so the ontravariant pair rx  / v2? and rx  / v1? is a potential solution of the Euler-Lagrange equation; this is equivalent to the ovariant pair x / v1 and x / v2 . If only one ve tor- eld, v, is given, one may strive for alignment and orthogonality by setting A = v? v? ; (11.9)

B

= v v;

(11.10)

G = rx   (v2 v2 ) rx  + rx   (v1 v1 ) rx ; = (v2  rx  )2 + (v1  rx )2 ;

(11.11) (11.12)

to align x with v and x with v? . The matri es (11.7)-(11.8) give



1992 by P.M. Knupp, September 8, 2002

204

whi h shows G = 0 (and thus the fun tional is minimized) if the alignment solution holds. It is possible to show that the Euler-Lagrange equations for the alignment fun tional based on (11.12) are non-ellipti (aligment being an inherently non-ellipti task). It is readily shown that the alignment fun tional proposed here is essentially equivalent to the dire tional ontrol fun tionals of Giannakopoulos and Engel, [81℄. Applying various ve tor and matrix identities:

G = = = =

rx   (v2 v2 ) rx  + rx   (v1 v1 ) rx ; rx   f(v2?  v2? )I (v2? v2? )g rx  + rx   f(v1?  v1? )I (v1? v1? )g rx ; (v2?  v2? ) (rx   rx  ) (v2?  rx  )2 + (v1?  v1? ) (rx   rx ) (v1?  rx )2 ; k v2?  rx  k2 + k v1?  rx  k2 ;

(11.13) (11.14) (11.15) (11.16)

whi h is re ognized to be of the form of Giannakopoulos and Engel. The main drawba k to the alignment approa h given in this se tion is the la k of ellipti ity of the governing equations; this problem is addressed in se tion 11.5.

11.1.2 The Diagonalization Fun tionals Suppose both A and B in (11.3) have rank 2. Then their inverses exist, their null-

spa es are just the zero ve tor, and both matri es are symmetri , positive de nite, so G > 0. The Euler-Langrange equation now annot possess the previously- onstru ted alignment solution be ause this would for e both tangent ve tors to be zero sin e the null spa es have dimension zero. Another possible solution is based on the metri identity divx C 1 = 0. Sin e C T = [ (rx)? ; (rx  )? ℄, one has the pair of lo al

onditions: A rx  = (rx)? ; (11.17) ? B rx  = +(rx ) : (11.18) Ea h relation in (11.17)-(11.18) makes a lo al statement relating the ontravariant tangents. For arbitrary matri es A and B, there is no reason to expe t the two relationships to be onsistent with (i.e. derivable from) one another. In the most general ase, in whi h the two rank 2 matri es are unrelated, two lo al onditions on the tangents are implied - not a very useful situation. To obtain onsisten y between the two lo al onditions, the two matri es must be related.

LEMMA 11.2 The two lo al onditions (11.17)-(11.18) are onsistent with one

another if

(where = det A).

x

B = 1 A

(11.19)

Equation (11.19) will be referred to as the onsisten y ondition. The proof of the lemma uses the fa t that A and B are invertible and symmetri ; also useful is the matrix   P = 01 01 : (11.20)



205

1992 by P.M. Knupp, September 8, 2002

P has many interesting properties. It is orthogonal, skew-symmetri , and detP = 1 ; P T = P 1 ; P 1 = P ; P 2 = I ; (11.21) P v = v? ; P T v = v? ; (11.22) T T T T PA P = ofa torA ; P A P = ofa torA (11.23) 2 with arbitrary v 2 R and A an arbitrary 2  2 matrix. The lemma is now easily proved. Proof. Re-write onditions (11.17)-(11.18) as

A rx  B rx 

If (11.24) holds, then

= =

PA rx  BPA rx

P T rx ; P rx :

(11.24) (11.25)

rx ; (11.26) B rx ; (11.27) thus, (11.25) is derivable from (11.24) provided P T BPA = I . In the same manner, one an show that (11.24) is derivable from (11.25) provided PAP T B = I . These two

onditions turn out to be the same sin e A and B are invertible. Applying (11.23) gives ( ofa torA)B = I , from whi h (11.19) follows. x = =

If the onsisten y ondition on the matri es holds, then the fun tion G be omes 1 G = rx   A rx  + rx   A rx ; (11.28) and the Euler-Lagrange equation redu es to divx D 1 J 1 A = 0

(11.29)

with D = diag(1; ). A potential solution is D 1 J 1 A = C 1 , from whi h one obtains the following equivalent ontravariant and ovariant lo al onditions:

J 1 J

= =

D C 1A 1; A C D 1:

(11.30) (11.31)

Expli itly, (11.31) an be stated as the onsistent pair of lo al onditions x = A x? ; (11.32) 1 ? x = A x : (11.33) The lo al relation (11.33) an be shown to omprise a rst-order ellipti system (e.g., using the lassi ation in [229℄); the se ond-order system (11.29) an also be shown to be ellipti using an ellipti ity test similar to the one in Chapter 6. Re-arranging the lo al ondition (11.30) or (11.31) yet again, one obtains the diagonalization ondition C TpA C = D: (11.34) g This relation is interpreted to mean that the oordinate system is a least-squares t to the problem of diagonalizing the matrix A. One satis es the onsisten y ondition (11.19) if and only if the diagonalization ondition (11.34) holds. Some spe ial ases of interest:



206

1992 by P.M. Knupp, September 8, 2002

 D 1 = I . Then = 1 so A has the form A = T =p with T symmetri , positive de nite and  = det T . This results in the Winslow Variable Di usion generator (see se tion 11.3 for further dis ussion of this generator).

= I (then D 1 = I ). The Winslow (homogeneous Thompson-ThamesMastin) grid generator results.

A 

If A has the form A = f1 I , then = 1=f 2 and D = diag(1; 1=f 2), from whi h one obtains the lo al ondition J = C F with F = diag( f1 ; f ). This is re ognized as the ovariant statement for an orthogonal grid, with ell-aspe t ratio proportional to f (see equation 5.28). The orresponding Euler-Lagrange equation, divx FJ 1 = 0, is not the same as the s aled-Lapla ian (equation 5.30), but is a ontravariant analog. Solutions to the s aled-Lapla ian potentially satisfy the same lo al ondition as given here, but annot be said to be a leastsquares t sin e the s aled-Lapla ian is not derivable from a variational prin iple when f depends on x. Note this ell apse t ase is not a spe ial ase of the Winslow Variable Di usion generator.

11.2 Non-Symmetri Form of the Diagonalization Equations Numeri al solutions to (11.29) are most easily obtained by inverting and omputing a non-symmetri form in a manner analogous to the pro edure given in subse tion 7.3.5. Inversion is readily a hieved using the relationship (7.74): div D 1 J 1 A C = 0:

(11.35)

To obtain a non-symmetri form similar to the Winslow equations, proje t the transformed equation using the matrix produ t J D, giving

J D div D 1 J 1 A C = 0

(11.36)

and expand to obtain

p [r J D℄D 1 C T A C = g[r A℄C : Putting this equation into the form

(11.37)

Qdiag x = R;

(11.38)

the left-hand-side expli itly reads

Qdiag x = 22 x

2 12 x + 11 x +

where Aij are the elements of A and

1 ( 11 

12  ) x

22 = y2 A11 2 x y A12 + x2 A22 ; 12 = y y A11 (x y + x y ) A12 + x x A22 ; 11 = y2 A11 2 x y A12 + x2 A22 ; while the right-hand-side reads: R1 = R2 =

pg f(A ) y pg f(A11 ) y 12

 

(A12 ) x (A22 ) x

(A11 ) y + (A12 ) x g ; (A12 )  y + (A22 ) x g :

(11.39) (11.40) (11.41) (11.42) (11.43) (11.44)



207

1992 by P.M. Knupp, September 8, 2002

As an example, the ell-aspe t ratio equations, with A = I = f , are

Qw x = f1 f (g22 f g12 f ) x + (g11 f g12 f ) x g

(11.45)

with Qw x de ned as in (5.52).

11.3 Winslow's Variable Di usion Generator p

The ase A = T =  , leading to Winslow's variable di usion grid generator, is reviewed. The fun tional to be minimized is

I [ (x; y); (x; y)℄ =

Z

frx  pT rx  + rx   pT rx g dx dy ;

where it is required that T (x) be a symmetri , positive-de nite matrix.

(11.46)

The Euler-Lagrange equation is readily al ulated from (11.29) to be

T divx J 1 p = 0 ; 

(11.47)

or, more expli itly,

rx  pT rx  r  pT r  x

 x

= 0;

(11.48)

= 0:

(11.49)

Equations (11.48)-(11.49) are re ognized as similar to Winslow's variable di usion model (Winslow, [232℄); the only di eren e is that Winslow's tensor was a fun tion of  and , i.e., it was a logi al-spa e weight. Various forms of the generator have also been onsidered by Anderson, [8℄ (who attempted to relate it to area grid generation within a solution-adaptive ontext), and by Bra kbill, [22℄. The original part of this dis ussion is the interpretation of the weight tensor using the theory developed in this book. As demonstrated, a potential solution to equation (11.47) is J 1 pT = C 1 ; (11.50) i.e., the Ja obian matrix at ea h point of the grid satis es

J = pT C :

(11.51)

Expli itly, equation (11.51) reads

pT x? pT x?  

= x ;

(11.52)

= x :

(11.53)

These equations show that the potential solution is a quasi- onformal mapping (see, for example, Thompson, [212℄).



1992 by P.M. Knupp, September 8, 2002

208

The weight fun tion derived from (11.51) is related to the Ja obian matrix by

pT

=

p1g J J T :

(11.54)

In prin iple, then, if the Ja obian Matrix of the desired transformation is spe i ed over the domain , (11.54) an be used to onstru t the weight-tensor, and (11.47) solved to obtain a least-squares solution potentially having the desired Ja obian p matrix (numeri ally, one would solve the inverted equation 11.38 with A = T =  ). The matrix on the right-hand-side of (11.54) is sometimes referred to as the left-Cau hyGreen-Tensor (see Ja quotte, [101℄). One may onstru t the weight fun tion T from (11.54) by spe ifying a desired lo al ondition. Suppose, for example, one desires both oordinate alignment with a given ve tor- eld and to ontrol the aspe t-ratio through the fun tion f . The most su

in t statement of this is

x = a v; x = f x?

(11.55) (11.56)

with a an unspe i ed non-zero onstant. The rst relation, of ourse, gives the dire tion of the tangent x , while one an dedu e from both relations that r

g12 = 0; g22 = f; g11

(11.57) (11.58)

i.e., the grid is orthogonal and the aspe t-ratio is ontrolled by the fun tion f . One also nds pg = a2 j v j2 f and that so that

J = a [ v; v? ℄ diag(1; f );

(11.59)

p1g J J T = M F MT

(11.60)

with M = [v; vp? ℄ = j v j and F = diag(1=f; f ). It is believed that solving (11.47) with the weight T =  = M F MT will generate a grid that is a least-squares t to the requirement (11.60).

11.4

Lo al Condition with Non-Symmetri Matri es

Equations (11.32) and (11.33) spe ify a lo al ondition between the ovariant tangents via a symmetri , positive de nite matrix. Alternatively, it would seem natural to give the lo al ondition using a rotation matrix. Su h matri es are generally non-symmetri , so the variational approa h given in the rst part of this hapter is pre luded. In this se tion, it is shown that it is none-the-less possible to devise a variational prin iple leading to this alternate lo al ondition. Although the resulting grid generation equations are quite similar to those in the pre eding se tions of this

hapter, two di eren es stand out; rst, the new weight fun tion is proportional to the metri tensor G (instead of the left-Cau hy-Green-Tensor), se ond, the weights appear



209

1992 by P.M. Knupp, September 8, 2002

on the right-hand-side of the generator instead of being mixed in with the operator. The grid generation equations are thus similar in form to the standard inhomogeneous Thompson-Thames-Mastin equations (but better motivated than the latter). De ne the two ve tors 

x =



y =

x x y y





;

(11.61)

;

(11.62)

and let A and B again be 2  2 symmetri , positive de nite real matri es. Let G be as in (11.1) and onsider the fun tional Z

1 I [  (x); (x) ℄ = G ( x ; y ) dx dy; 2

to be minimized with the boundary data as onstraint ( ompare to 11.2). Pro eeding as usual, the Euler-Lagrange equation is divx [A x ; B y ℄ = 0:

(11.63)

(11.64)

A potential solution to (11.64) is

A x B y

= y? ; = +x? :

(11.65) (11.66)

The requirement of onsisten y between these two point onditions again results in

ondition (11.19) on the matri es, so onsider the spe ial ase 1 A : (11.67) y When (11.19) holds, the integrand G an also be expressed in terms of the ontravariant ve tors as

G =  x  A x + y 

G = A11 rx   D 1 rx  + 2A12 rx   D 1 rx  + A22 rx   D 1 rx 

(11.68)

with D = diag(1; ), as before. The Euler-Lagrange equation for this ase reads divx A J 1 D 1 = 0:

(11.69)

Compare the Euler-Lagrange equations (11.69) and (11.29); the reversal of order in (11.69) is a onsequen e of using the ve tors (11.61)-(11.62) instead of the usual

ontravariant tangents in the fun tional. This reversal of order arries through in the analogues to (11.30), (11.31), and (11.34):

J 1 J CApC T g

= = =

A 1 C 1 D; D 1 CA; D:

(11.70) (11.71) (11.72)



210

1992 by P.M. Knupp, September 8, 2002

A signi ant di eren e in the expli it lo al ondition arises from the reversal of order; writing these in terms of the ovariant tangents: x = A^ x? ; (11.73) 1 ^T ? x = A x ; (11.74) ^ where A^ is the non-symmetri , positive de nite matrix   (11.75) A^ = A1 A 12 A1 12 : 22 and ^ = det(A^) = A11 =A22 . Comparing (11.73)-(11.74) to (11.32)-(11.33), one sees that the form is the same, but the matrix is now non-symmetri , whereas before it was symmetri . In both ases they are positive de nite (whi h guarantees pg > 0, lo ally). The rst-order equations (11.73)-(11.74) are ellipti , as is (11.69). The polar de omposition theorem ([87℄) may be applied to express A^ as the produ t of a symmetri , positive de nite matrix V and a rotation matrix R, i.e., A^ = VR, where  212 ( 1)A12   (1 + ) + 2 A (11.76) V=A ( 1)A12 1 + + 2A212 ; 22

R= and



1+ 2A12

2A12 1+



;

(11.77)

1 : (11.78) (1 + )2 + 4A212 Sin e the matrix in the present lo al ondition is non-symmetri , it is possible p to obtain an orthogonal matrix from (11.75); this requires = 1, so let A = T =  with T symmetri positive de nite. Then, from (11.68), the integrand in the variational prin iple is 1 G = p f T11 (rx   rx  ) + 2 T12 (rx   rx ) + T22 (rx   rx ) g (11.79)  and the Euler-Lagrange equation redu es to

=

p

T

divx p J 1 = 0  ( ompare to 11.47). The potential solution has the properties

J 1 J CTpC T g

(11.80)

T = ( p ) 1C 1; 

(11.81)

=

(11.82)

=

C pT ; p I :

(11.83)

By re-arranging (11.82), one observes that the weight fun tion in the lo al solution is

pT

=

pGg ;

(11.84)



211

1992 by P.M. Knupp, September 8, 2002

i.e., the weight is proportional to the metri tensor ( ompare to 11.54). p When = 1, V = T11 =T22 I ; the expli it lo al ondition is thus given in terms of a rotation and a stret h: r

T11 ? R x ; T 22 r x = + T22 RT x? T11 where R is the orthogonal matrix

x =

1



(11.85) (11.86)

p



pT12 : R = pT T T 12 11 22

(11.87)

One an obtain the usual stret h by the fa tor r > 0 and rotation through an angle  by hoosing   1 =r sin  T = sin  r ; (11.88) whi h gives

R=



os  sin 

sin 

os 



;

(11.89)

and

x = 1 R x? ; r x = +rRT x? :

(11.90) (11.91)

The non-symmetri (inverted) form of equation (11.80) is readily shown (by the usual te hnique) to be

Qw x = J [r ( pT ) 1 ℄ pT gG 1 ;

(11.92)

where the left-hand-side is just the Winslow operator de ned in (5.52). Observe that the weights in (11.92) lie entirely upon the right-hand-side, whereas in (11.38) they are mixed into the se ond-order part of the operator. Equation (11.92) is thus loser in form to the standard inhomogenous grid generation equations of Se tion 5.5 than is (11.38). The generator (11.92) may be more useful than (11.38) in some instan es; for example, it is diÆ ult to devise a Steger-Sorenson-like algorithm with (11.38) while (11.92) preserves the approa h given in Se tion 5.6.2. Finally, it ispobserved that the

ell-aspe t-ratio generator (11.45) is obtained from (11.92) when T =  = diag(1=f; f ). The inhomogeneous equations in se tion 5.5 an be put into the form 1 divxJ 1 = S P g

(11.93)

with P = (P; Q) and S = gI in the original weighted formulation and S = diag(g22 ; g11) in Warsi's modi ation. Comparing (11.93) to (11.80), there appears to be no dire t onne tion between the standard inhomogeneous generators and the rotation/stret h approa h given here. Although the pra ti al value of the present approa h remains to be established, the generator (11.92) gives the rst geometri allymotivated version of the inhomogenous grid generators.



1992 by P.M. Knupp, September 8, 2002

11.5

212

Alignment with an Ellipti Generator

This se tion onsiders the question: is it possible to onstru t a smooth oordinate system that is aligned with a given a pair of ve tor- elds fv1 j x 2 ! E 2 g and fv2 j x 2 ! E 2 g? To ensure that the ve tor- eld is properly oriented, assume that  = k^  (v1  v2 ) > 0. A non-ellipti alignment s heme based on rank 1 matri es was des ribed in subse tion 11.1.1. In this se tion, it is shown that it is possible to a hieve both alignment and ellipti ity within a single generator. As usual, the solution to the Euler-Lagrange equations is not guaranteed to be the desired lo al ondition, but merely a least-squares t to the ondition. Let A and B be 2  2 symmetri positive-de nite matri es with determinants > 0 and > 0, respe tively. Solutions to the Euler-Lagrange equation (11.3) are sought, based on the metri identity. Therefore, onsider solutions of the form [ A rx ; B rpx  ℄T = C 1 , where  is a positive onstant independent of x and C 1 = J T = g with J the Ja obian matrix. This ondition is the same as the following pair of lo al onditions on the ve tors rx  and rx : A rx  =  (rx)? ; (11.94) ? B rx  = + (rx ) : (11.95) In Lemma 11.2, a relationship alled the onsisten y ondition was derived; this relationship gave the ondition between the two weight matri es if one of the lo al

onditions was to be derive-able from the other. With the onstant  introdu ed, 2 the onsisten y ondition generalizes to B =  A; the onsisten y ondition implies = 4 . The onsisten y ondition leads to the diagonalization generator des ribed in subse tion 11.1.2. Assumption of the onsisten y ondition is not ne essary to obtain useful grid generators, however. The following lemma gives the general form of the weight matri es in the lo al

ondition if onsisten y is not required.

LEMMA 11.3 The lo al ondition (11.94)-(11.95) holds for arbitrary ontravariant tangent ve tors rx  and rx  if and only if the matri es A and B have the form

A B

=

J DpA J T ;

g J DpB J T ; = g

(11.96) (11.97)

where DA = diag(; =) and DB = diag( =; ). An algebrai proof of this is readily

onstru ted. x From (11.96)-(11.97), the weight matri es are symmetri , positive de nite provided , , and pg are postive. Observe that the lo al ondition is insuÆ ient to onstrain the determinants and of the two matri es, so these remain aribitrary. The expressions (11.96)-(11.97) are equivalent to the following useful outerprodu t forms: (11.98) A = pg f  (rx )? (rx )? +  (rx  )? (rx  )? g ; B = pg f  (rx )? (rx )? +  (rx  )? (rx  )? g : (11.99)



1992 by P.M. Knupp, September 8, 2002

213

where 1 = pg = (rx  )?  (rx ). To generate a grid whose ovariant tangents are aligned with the given ve tor- eld (i.e., x / v1 and x / v2 ) and having ell-aspe t ratio r

g22 = g11

s

rx   rx  = f; rx   r x 

(11.100)

the ontravariant tangents must satisfy

= a v2? = j v2 j ; (11.101) a ? (11.102) = + v1 = j v1 j ; f with \a" an arbitrary s ale fa tor. Subsititution of (11.101)-(11.102) into (11.98)(11.99) gives the ne essary form of the weight matri es: f A = 1 f r (v v ) + (v2 v2 ) g ; (11.103) f 1 1 r B = 1 f fr (v1 v1 ) + fr (v2 v2 ) g : (11.104) where r =j v2 j = j v1 j. It may be shown that the weight matri es A and B remain well-de ned in the limit that the length of either velo ity-ve tor goes to zero. The weight matri es in (11.103)-(11.104) may also be expressed as ^ T (11.105) A = V DA V ; ^ T B = V DB V ; (11.106) where V = [v1 ; v2 ℄, D^A = diag(r=f ; f=r) ; and D^B = diag( r=f ; f=r). Assuming weight matri es as onstru ted in (11.103)-(11.104), it is natural to

onsider whether or not the solution (11.101)-(11.102) to the lo al ondition (11.94)(11.95) is unique. Using the matrix P de ned in (11.20), the lo al ondition implies that the ontravariant tangents must satisfy the auxilliary system:

rx  rx 

= 2 rx ; (11.107) (11.108) = 2 rx   with Z = B 1A. Z is easily al ulated from (11.105)-(11.106): Z = V T DZ V T where DZ = diag(2 ; =2 ). The eigenpairs of Z are (2 ; v2? ) and ( =2 ; v1? ); thus, the ontravariant tangents are aligned with the eigenve tors of Z . In parti ular, if 6= 4 , rx  must align with v2? and not with v1? . Similarly, rx  must align with v1? and not v2? . Using this result, it may be shown that the solution (11.101)-(11.102) is unique up-to the s alar multiplier \a", provided the onsisten y ondition is not enfor ed. The ase v1 = v, v2 = v? is of parti ular interest sin e it orresponds to alignment with a single ve tor- eld. In this ase, the weight matri es redu e to A = j v1 j2 f f (v v) + f (v? v? ) g ; (11.109) B = j v1 j2 f f (v v) + f (v? v? ) g : (11.110)

Z rx  Z rx 



214

1992 by P.M. Knupp, September 8, 2002

These an also be expressed as

A B

 f  I + (1 ) (vj v jv2 ) g ; f (v? v? ) =  f f I + (1 ) j v j2 g ;

(11.111)

=

(11.112)

where  = f 2 =2 and = =f 2 2 , showing that the determinants of the matri es

an be interpreted as smoothing parameters. A derivation of the omputationally- onvenient inverted, non-symmetri form of the Euler-Lagrange equations for the ellipti -alignment ase is now given. When B 6= A, the inversion te hniques derived in earlier hapters fail on (11.3) if the usual approa h is taken. The following identity is useful in giving the inverted, nonsymmetri form of the Euler-Lagrange equations 



rx   ( divx A QA x ) ; (11.113) rx   ( divx B QB x ) with the generalized Winslow operator QA x de ned in terms of the matrix A by QA x = (rx   A rx  ) x + 2 (rx  A rx ) x + (rx   A rx ) x : (11.114) divx [ A rx ; B rx  ℄T =

The derivation of (11.113) goes as follows:

QA x

= [ r J ℄(J 1 A J T ) ; 1 = p [ r J ℄(J 1 A C ) ; g 1 = p f div A C J div J 1 A C g ; g = divx A J divx J 1 A:

(11.115) (11.116) (11.117) (11.118)

The result (11.118) readily leads to the identity divx  A rx  = rx   (divx A

QA x ) ;

(11.119)

from whi h (11.113) follows. Note that (11.113) is stated in terms of proje tions onto the ontravariant tangents ( the Euler-Lagrange equation an only be stated as a ve tor relationship when the onsisten y ondition is satis ed). The equation is

onveniently solved omputationally in the proje ted form:

rx   Q A x

=

rx   Q B x

=

p1g rx   ( [ r A ℄ C ) ; p1g rx   ( [ r B ℄ C ) ;

whi h puts all se ond-derivatives on the left-hand-side.

(11.120) (11.121)

Bibliography [1℄ Abrahamsson, L. [1991℄. Orthogonal grid generation for two- dimensional du ts, J.Comp. and Appl. Math., 34, 305-314. [2℄ Allievi, A., and Calisal, S.M. [1992℄. Appli ation of Bubnov-Galerkin Formulation to Orthogonal Grid Generation, J.Comp.Physi s, 98, 163-173. [3℄ Amsden, A.A., and Hirt, C.W. [1973℄. A Simple S heme for Generating General Curvilinear Grids, J.Comp.Physi s, 11, 348-359. [4℄ Anderson, D.A., and Rai, M.M. [1982℄. The use of Solution- Adaptive Grids in Solving Partial Di erential Equations, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 317-338. [5℄ Anderson, D.A. [1983℄. Adaptive grid Methods for Partial Di erential Equations, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 1-15. [6℄ Anderson, D.A. [1986℄. Constru ting Adaptive Grids with Poisson Grid Generators, in Numeri al Grid Generation in Computational Fluid Dynami s, J. Hauser and C. Taylor, eds., Pineridge Press, Swansea UK, 125-136. [7℄ Anderson, D.A. [1987℄. Equidistribution S hemes, Poisson Generators, and Adaptive Grids, Appl. Math. and Comp., 24, 211-227. [8℄ Anderson, D.A. [1990℄. Grid Cell Volume Control with an Adaptive Grid Generator, Appl. Math. and Comp., 35, 209-217. [9℄ Ar illa, A.S., Hauser, J., Eiseman, P.R., Thompson, J.F. [1991℄. Numeri al Grid Generation in Computational Fluid Dynami s, Pro eedings of the Third International Conferen e on Numeri al Grid Generation in Computational Fluid Dynami s and Related Fields, Bar elona, Spain, North-Holland, Amsterdam, 1991. [10℄ Arina, R. [1986℄. Orthogonal Grids with Adaptive Control, in Numeri al Grid Generation in Computational Fluid Dynami s, J. Hauser and C. Taylor, eds., Pineridge Press, Swansea UK, 113-124. [11℄ Arina, R. [1988℄. Adaptive Orthogonal Surfa e Coordinates, in Numeri al Grid Generation in Computational Fluid Me hani s '88, S. Sengupta, J. Hauser, P.R. Eisemen, and J.F. Thompson, eds., Pineridge Press, Swansea UK, 351-359. [12℄ Arina, R., and Casella, M. [1991℄. A harmoni grid generation te hnique for surfa es and three-dimensional regions, in Numeri al Grid Generation in 215



1992 by P.M. Knupp, September 8, 2002

216

Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 935-945. [13℄ Armstrong, M.A., [1987℄. Basi Topology, Springer-Verlag, New York. [14℄ As oli, E.P., Dandy, D.S., and Leal, L.G. [1987℄. On Distortion Fun tions for the Strong Constraint Method of Numeri ally Generating Orthogonal Coordinate Grids, J. Comp. Physi s, 72, 513-519. [15℄ Bar eld, W.D. [1970℄. An Optimal Mesh Generator for Lagrangian Hydrodynami s Cal ulations in Two Spa e Dimensions, J. Comp. Physi s, 6, 417-429. [16℄ Barrera, P., Perez, A., and Castellanos, L. [1992℄. Curvilinear Coordinate System Generation over Plane Irregular Regions, Fa ultad de Cien ias, U.N.A.M., Mexi o. [17℄ Bell, J.B., Shubin, G.R., and Stephens, A.B. [1982℄. A Segmentation Approa h to Grid Generation Using Biharmoni s, J. Comp. Physi s, 47, 463-472. [18℄ Bers, L., John, F., and S he ter, M. [1964℄. Partial Di erential Equations Inters ien e, New York. [19℄ Birkho , G., and Lyn h, R.E. [1984℄. Numeri al Solution of Ellipti Problems, SIAM, Philadelphia. [20℄ Bra kbill, J.U. [1982a℄. Coordinate System Control: Adaptive Meshes, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 277-294. [21℄ Bra kbill, J.U., and Saltzman, J.S. [1982b℄. Adaptive Zoning for Singular Problems in Two Dimensions, J. Comp. Physi s, 46, 342-368. [22℄ Bra kbill, J.U., An Adaptive Grid with Dire tional Control, to appear. [23℄ Camarero, R. and Younis, M., [1980℄. EÆ ient Generation of Boundary-Fitted Coordinates for Cas ades using Multigrid, AIAA J., 18, 487-488. [24℄ Carey, G.F. [1993℄. Grid Generation, Re nement, and Redistribution, Wiley, New York. [25℄ Castillo, J.E. [1986℄. Mathemati al Aspe ts of Grid Generation - I, in Numeri al Grid Generation in Computational Fluid Dynami s, J. Hauser and C. Taylor, eds., Pineridge Press, Swansea UK, 35-43. [26℄ Castillo, J.E. [1987a℄. On Variational Grid Generation, Ph.D. thesis, University of New Mexi o. [27℄ Castillo, J.E., Steinberg, S., and Roa he, P.J. [1987b℄. Mathemati al Aspe ts of Variational Grid Generation II, J. Comp. and Appl. Math., 20, 127-135. [28℄ Castillo, J.E. [1988a℄. A Dire t Variational Grid Generation Method: Orthogonality Control, in Numeri al Grid Generation in Computational Fluid Me hani s '88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, pp. 247-256. [29℄ Castillo, J.E., Steinberg, S., and Roa he, P.J. [1988b℄. Parameter Estimation in Variational Grid Generation, Appl. Math. and Comp., 28, No.2, 1-23.



1992 by P.M. Knupp, September 8, 2002

217

[30℄ Castillo, J.E., Steinberg, S., and Roa he, P.J. [1988 ℄. On the Folding of Numeri ally Generated Grids: Use of a Referen e Grid, Comm. Applied Num. Methods, Vol. 4, 471-481. [31℄ Castillo, J.E. [1990℄. An Adaptive Dire t Variational Grid Generation Method, Computers Math. Appli ., Vol. 4, No. 1, 1-9. [32℄ Castillo, J.E., ed. [1991a℄. Mathemati al Aspe ts of Numeri al Grid Generation, SIAM, Philidelphia. [33℄ Castillo, J.E. [1991b℄. The Dis rete Grid Generation Method on Curves and Surfa es, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 915-924. [34℄ Castillo, J.E. [1991a℄. A Dis rete Variational Grid Generation Method, SIAM J. S i. Stat. Comp., Vol. 12, No. 2, 454-468. [35℄ Celia, M.A., and Gray, W.G. [1992℄. Numeri al Methods for Di erential Equations, Prenti e Hall, Engelwood Cli s, NJ. [36℄ Chakravarthy, S. and Anderson, D. [1979℄. Numeri al onformal mapping, Math. Comp., 33, 953-969. [37℄ Challis, N.V. and Burley, D.M., [1982℄. Numeri al method for onformal mapping, IMA J. Numer. Anal., 2, 169-181. [38℄ Chawner, J.R., and Anderson, D.A. [1991℄. Development of an Algebrai Grid Generation Method with Orthogonality and Clustering Control, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 107-117. [39℄ Chikhliwala, E.D. and Yortsos, Y.C. [1985℄. Appli ation of Orthogonal Mapping to Some Two-Dimensional Domains, J.Comp.Physi s, 57, 391-402. [40℄ Chu, W.H. [1971℄. Development of a General Finite Di eren e Approximation for a General Domain. Part 1: Ma hine Transformation, J. Comp. Physi s, 8, 392-408. [41℄ Corwin, L.J., and Sz zarba, R.H. [1982℄. Multivariable Cal ulus, Dekker, New York. [42℄ Da orogna, B. [1989℄. Dire t Methods in the Cal ulus of Variations, Springer Verlag, Berlin. [43℄ Dannenho er, J.F. [1988℄. A Comparison of Two Adaptive Grid Te hniques, in Numeri al Grid Generation in Computational Fluid Me hani s `88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, 319-328. [44℄ Daripa, P. [1991a℄. A New Theory for One-Dimensinal Adaptive Grid Generation and its Appli ations, SIAM J. Numer. Anal., 28, 1635-1660. [45℄ Daripa, P. [1991b℄. On a Numeri al method for Quasi onformal Grid Generation, J. Comp. Phys., 96, pp. 229-236.



1992 by P.M. Knupp, September 8, 2002

218

[46℄ Daripa, P. [1992a℄. Iterative S hemes and Algorithms for Adaptive Grid Generation in One Dimension, J. Comp. Phys., 100, 284-293. [47℄ Daripa, P. [1992b℄. A Fast Algorithm to Solve Non-Homogeneous Cau hy Riemann Equations in the Complex Plane, SIAM. J. S i. Stat. Comput. (to appear). [48℄ Daripa, P. [1992 ℄. A Fast Algorithm to Solve Beltrami Equation with Appli ations to Quasi onformal Mappings, Preprint. [49℄ Davies, C.W. [1981℄. An Initial Value Approa h to the Produ tion of Dis rete Orthogonal Coordinates, J. Comp. Physi s, 39, 164-178. [50℄ Dembo, R.S., and Steihaug, T. [1983℄. Trun ated Newton Algorithms for LargeS ale Un ontrained Optimization, Math. Prog., 26, 190-212. [51℄ Desbois, F., and Ja quotte O-P. [1991℄. Surfa e Mesh Generation and Optimization, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 131-141. [52℄ Dougherty, R.L. and Hyman, J.M. [1990℄. A divide and Conquer Algorithm for Grid Generation, LA-UR-90-2128, Los Alamos National Lab., Los Alamos NM, 1-10. [53℄ Duraiswami, R. and Prosperetti, A. [1992℄. Orthogonal Mapping in Two Dimensions, J. Comp. Phys., 98, 254-268. [54℄ Dvinsky, A.S. [1988℄. Adaptive Grid Generation from Harmoni Maps, in Numeri al Grid Generation in Computational Fluid Me hani s `88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, 299-308. [55℄ Dvinsky, A.S. [1991℄. Adaptive Grid Generation from Harmoni Maps on Riemannian Manifolds, J.Comp.Phys., 95, 450-476. [56℄ Dwyer, H.A., Kee, R., and Sanders, B. [1980℄. Adaptive Grid Method for Problems in Fluid Me hani s and Heat Transfer, AIAA Journal, 18, 1205-1212. [57℄ Dwyer, H.A., Smooke, M.D., and Kee, R.J. [1982℄. Adaptive gridding for nite di eren e solutions to heat and mass transfer problems, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 339-356. [58℄ Eiseman, P.R. [1978℄. A Coordinate System for a Vis ous Transoni Cas ade Analysis, J. Comp. Physi s, 26, 307-338. [59℄ Eiseman, P.R. [1979℄. A Multi-surfa e Method of Coordinate Generation, J. Comp. Physi s, 33, 118-150. [60℄ Eiseman, P.R. [1982a℄. Coordinate Generation with Pre ise Controls over Mesh Properties, J. Comp. Physi s, 47, 331-351. [61℄ Eiseman, P.R. [1982b℄. High Level Continuity for Coordinate Generation with Pre ise Controls, J. Comp. Physi s, 47, 352-374. [62℄ Eiseman, P.R. [1982 ℄. Orthogonal Grid Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 193-226.



1992 by P.M. Knupp, September 8, 2002

219

[63℄ Eiseman, P.R. [1980℄. Alternating Dire tion Adaptive Grid Generation for ThreeDimensional Regions, Preprint. [64℄ Eiseman, P.R. [1985a℄. Alternating Dire tion Adaptive Grid Generation, AIAA Journal, Vol. 23, No. 4, 551-560. [65℄ Eiseman, P.R. [1985b℄. Adaptive Grid Generation by Mean Value Relaxation, Journal of Fluids Engineering, Vol. 107, 477-483. [66℄ Eiseman, P.R. [1985 ℄. Grid Generation for Fluid Me hani s Computations, Ann. Rev. Fluid Me h., 17, 487-522. [67℄ Eiseman, P.R. [1987℄. Adaptive Grid Generation, Comp. Meth. in Appl. Me h. and Engr., 64, No. 1-3, 321-376. [68℄ Eiseman, P.R. [1988℄. A Control Point Form of Algebrai Grid Generation, Int. J. for Num. Methods in Fluids, Vol. 8, 1165-1181. [69℄ Eiseman, P.R. [1992℄. Control Point Grid Generation, Computers Math. Appli ., Vol. 24, No. 5-6, 57-67. [70℄ Epstein, B. [1962℄. Partial Di erential Equations, An Introdu tion, Robert E. Krieger Pub. Co., Malarbar Florida. [71℄ Eyler, L.L., and White, M.D. [1988℄. Surfa e Constrained Grid Generation with Lagrange Multipliers, in Numeri al Grid Generation in Computational Fluid Me hani s `88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, pp 125-136. [72℄ Flet her, C.A.J. [1988℄. Computational Te hniques for Fluid Dynami s, Springer-Verlag, Berlin. [73℄ Flet her, R. [1980℄. Pra ti al Methods of Optimization, Vol. 1, Un onstrained Optimization, John Wiley, New York. [74℄ Fornberg, B. [1980℄. A Numeri al Method for Conformal Mapping, SIAM J. S i. Stat. Comput., 1, 386-400. [75℄ Forsythe, G.E., and Wasow, W.R. [1960℄. Finite Di eren e Methods for Partial Di erential Equations, Wiley, New York. [76℄ Garon, A., and Camarero, R. [1983℄. Generation of Surfa e-Fitted Coordinate Grids, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 117-122. [77℄ Gelfand, I.M., and Fomin, S.V. [1963℄. Cal ulus of Variations, Prenti e-Hall, Englewood Cli s NJ. [78℄ George, P.L. [1991℄. Automati Mesh Generation: Appli atons to Fnite Element Methods, Wiley, New York. [79℄ Ghia, K.N., and Ghia, U., eds. [1983a℄. Advan es in Grid Generation, FEDVol. 5, ASME Applied Me hani s, Bioengineering, and Fluids Engineering Conferen e, Houston.



1992 by P.M. Knupp, September 8, 2002

220

[80℄ Ghia, K.N., Ghia, U., and Shin, C.T. [1983b℄. Adaptive Grid Generation for Flows with Lo al High Gradient Regions, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 35-47. [81℄ Giannakopoulos, A.E., and Engel, A.J. [1988℄. Dire tional Control in Grid Generation, J. Comp. Physi s, 74, 422-439. [82℄ Gilding, B.H. [1988℄. A Numeri al Grid Generation Te hnique, Computers and Fluids, Vol. 16, No. 1, 47-58. [83℄ Godunov, S.K., and Prokopov, G.P. [1972℄. The Use of Moving Meshes in GasDynami al Computations, USSR Comp. Math. Math. Phys., 12, 182. [84℄ Golub, G.H., and Ortega, J.M. [1991℄. S ienti Computing and Di erential Equations, A ademi Press, Boston. [85℄ Gordon, W.J., and Hall, C.A. [1973℄. Constru tion of Curvilinear Coordinate Systems and Appli ations to Mesh Generation, Inst. J. Num. Meth. Engr., 7, 461-477. [86℄ Gordon, W.J., and Thiel, L.C. [1982℄. Trans nite Mappings and their Appli ations to Grid Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 171-192. [87℄ Gurtin, M.E. [1981℄. An Introdu tion to Continuum Me hani s, A ademi Press, New York. [88℄ Hall, C.A., and Pors hing, T.A. [1990℄. Numeri al Analysis of Partial Di erential Equations, Prenti e Hall, Englewood Cli s, NJ. [89℄ Hauser, J., and Taylor, C., eds. [1986℄. Numeri al Grid Generation in Computational Fluid Dynami s, Pineridge Press, Swansea UK. [90℄ Haussling, H.J., and Coleman, R.M. [1981℄. A Method for Generation of Orthogonal and Nearly Orthogonal Boundary-Fitted Coordinate Systems, J. Comp. Physi s, 43, 373-381. [91℄ Hawken, D.F. [1987℄. Review of Adaptive-Grid Te hniques for Solution of Partial Di erential Equations, Prog. Aerospa e S i., Vol. 24, 29-49. [92℄ Hawken, D.F., Gottlieb, J.J., and Hansen, J.S., [1991℄. Review of Some Adaptive Node-Movement Te hniques in Finite-Element and Finite-Di eren e Solutions of Partial Di erential Equations, J. Comp. Phys., 95, p254-302. [93℄ Hayes, J.K., Kahaner, D.K., and Kellner, R. [1972℄. An improved method for numeri al onformal mapping, Math. Comp., 26, 327-334. [94℄ Heinri h, B. [1987℄. Finite Di eren e Methods on Irregular Networks, A Generalized Approa h to Se ond Order Ellipti Problems Birkauser, Basel. [95℄ Henri i, P. [1974℄. Applied and Computational Complex Analysis, 2 Vols., John Wiley and Sons, New York. [96℄ Horn, R.A., and Johnson, C.R. [1985℄. Matrix Analysis, Cambridge Univ. Press, Cambridge.



1992 by P.M. Knupp, September 8, 2002

221

[97℄ Hsu, K.I. and Lee, S.L. [1991℄. A numeri al Te hnique for Two-Dimensional Grid Generation with Grid Control at All of the Boundaries, J. Comp. Phys., 96, 451-469. [98℄ Ives, D.C. [1982℄. Conformal Grid Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 107-137. [99℄ Ja quotte, O.P., and Cabello, J. [1988a℄. A Variataional Method for the Optimization and Adaption of Grids in Computational Fluid Dynami s, in Numeri al Grid Generation in Computational Fluid Me hani s `88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, 405-413. [100℄ Ja quotte, O.-P. [1988b℄. A Me hani al Model for a New Grid Generation Method in Computational Fluid Dynami s, Comp. Meth. Appl. Me h. and Engr., 66, 323-338. [101℄ Ja quotte, O-P. [1991℄. Re ent Progress on Mesh Optimization, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 581-596. [102℄ Jain, R.K. [1986℄. GMD Arbeitspapiere No. 208. [103℄ Jain, R.K. [1987℄. GMD Arbeitspapiere No. 246. [104℄ Jeng, Y.N. and Liou, Y.C. [1992℄. Two Modi ed Versions of Hsu-Lee's Ellipti Solver of Grid Generation, Num. Heat Trans., Part B, Vol. 22, 125-140. [105℄ Jeng, Y.N., and Liou, Y.C., [1993℄. Adaptive Grid Generation by Ellipti Equations with Grid Control at all of the Boundaries, Num. Heat Trans., Part B, vol. 23, p135-151. [106℄ Kang, I.S. and Leal, L.G. [1992℄. Orthogonal Grid Generation in a 2D Domain via the Boundary Integral Te hnique, J. Comp. Phys., 102, 78-87. [107℄ Kennon, S.R., and Dulikravi h, G.S. [1986℄. Generation of Computational Grids Using Optimization, AIAA Journal, Vol. 24, No. 7, 1069-1073. [108℄ Knupp, P.M. [1989℄. Robust Grid Generation on Curves and Surfa es, Ph.D. thesis, U. New Mexi o. [109℄ Knupp, P.M. [1990℄. On the Invertibility of the Isoparametri Map, Comp. Meth. Appl. Me h. Engr., 78, 313-329. [110℄ Knupp, P.M. [1991a℄. Intrinsi Algebrai Grid Generation, in Mathemati al Aspe ts of Numeri al Grid Generation, J.E. Castillo, ed., SIAM, Philadelphia. [111℄ Knupp, P.M. [1991b℄. The Dire t Variational Grid Generation Method Extended to Curves, Appl. Math. Comp., 43, 65-78. [112℄ Knupp, P.M. [1992a℄. A Robust Ellipti Grid Generator, J. Comp. Phys., 100, 409-418. [113℄ Knupp, P.M. [1992b℄. Surfa e Grid Generation and the Tangent Plane Methodology, to appear.



1992 by P.M. Knupp, September 8, 2002

222

[114℄ Knupp, P.M., Trun ation Error in Grid Generation: A Case Study, to appear. [115℄ Knupp, P.M., Alignment of Boundary-Fitted Coorinates with a Ve tor-Field Pair: A new Variational/Ellipti Generator, preprint. [116℄ Kreis, B. [1983℄. Constru tion of a Curvilinear Grid, SIAM J. S i. Stat. Comput., Vol. 4, No. 2. [117℄ Kreis, R.I., Thames, F.C., and Hassan, H.A. [1986℄. Appli ation of a Variational Method for Generating Adaptive Grids, AIAA Journal, Vol 24, No. 3, 404-410. [118℄ Kumar, A., and Kumar, N.S. [1988℄. A New Approa h to Grid Generation Based on Lo al Optimisation, in Numeri al Grid Generation in Computational Fluid Me hani s `88, S. Sengupta, J. Hauser, P.R. Eiseman, and J.F. Thompson, eds., Pineridge Press, Swansea UK, 177-184. [119℄ Lan aster, P. and Salkauskas, K. [1990℄. Curve and Surfa e Fitting, A ademi Press, San Diego, CA. [120℄ Lee, D., and Tsuei, Y.M. [1992℄. A Modi ed Adaptive Grid Method for Re ir ulating Flows, Intl. J. Num. Meth. Fluids, Vol. 14, 775-791. [121℄ Lehto, O. and Virtaanen, K.I. [1973℄. Quasi onformal Mappings in the Plane, Springer-Verlag, Berlin. [122℄ Liao, G. and Su, J. [1993℄. A dire t method in Da orogna-Moser's approa h of grid generation problems, to appear in Appli able Analysis. [123℄ Liao, G. and Su, J. [1992℄. Grid Generation via Deformation, Applied Math. Letters, Vol. 5, No. 3, 27-29. [124℄ Liao, G. [1992℄. Variational Approa h to Grid Generation, Num. P.D.E.'s, 8, 143-147. [125℄ Liao, G., and Anderson, D.A. [1993℄. A New Approa h to Grid Generation, to appear in Appli able Analysis. [126℄ Liao, G. [1991℄. On Harmoni Maps, in Mathemati al Aspe ts of Numeri al Grid Generation, J.E. Castillo, ed., SIAM, Philadelphia. [127℄ Mastin, C.W., and Thompsom, J.F. [1978a℄. Transformation of ThreeDimensional Regions onto Re tangular Regions by Ellipti Systems, Numer. Math., 29, 397-407. [128℄ Mastin, C.W., and Thompson, J.F. [1978b℄. Ellipti Systems and Numeri al Transformations, J. Math. Anal. and Appl., 62, 52-62. [129℄ Mastin, C.W. [1981℄. Coordinate Generation by Conformal and Quasi- onformal mappings, Ellipti Problem Solvers, M. Shultz, ed., A ademi Press. [130℄ Mastin, C.W. [1982℄. Error Indu ed by Coordinate Systems, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 31-40. [131℄ Mastin, C.W., and Thompson, J.F. [1984℄. Quasi onformal Mappings and Grid Generation, SIAM J. S i. Stat. Comput., Vol. 5, No.2, 305-310.



1992 by P.M. Knupp, September 8, 2002

223

[132℄ Mastin, C.W. [1992℄. Linear Variational Methods and Adaptive Grids, Computers Math. Appli ., Vol. 24, No. 5-6, 51-56. [133℄ Matsuno, K., and Dwyer, H.A. [1988℄. Adaptive Methods for Ellipti Grid Generation, J. Comp. Physi s, 77, 40-52. [134℄ Mavriplis, D.J. [1992℄. Unstru tured Mesh Algorithms for Aerodynami Cal ulations, ICASE Report No. 92-35, NASA-Langley Resear h Center, Hampton VA. [135℄ Melas, A.D. [1991℄. An Example of a Harmoni Map between Eu lidean Balls, preprint, University of California at Los Angeles. [136℄ Meniko , R. and Zema h, C. [1980℄. Methods for numeri al onformal mapping, J. Comp. Phys., 36, 366-410. [137℄ Minoux, M. [1986℄. Mathemati al Programming, John Wiley and Sons, New York. [138℄ Mobley, C.D., and Stewart, R.J. [1980℄. On the Numeri al Generation of Boundary-Fitted Orthogonal Curvilinear Coordinate Systems, J. Comp. Physi s, 34, 124-135. [139℄ Moretti, G. [1980℄. Grid Generation Using Classi al Te hniques, in Numeri al Grid Generation Te hniques, R.E. Smith, ed., NASA CP 2166, NASA Langley Resear h Center, Hampton VA, 1-35. [140℄ Mori e, P. [1983℄. Numeri al Generation of Boundary-Fitted Coordinate Systems with Optimal Control of Orthogonality, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 71-78. [141℄ Nakahashi, K., and Deiwert, G.S. [1986℄. Three-Dimensional Adaptive Grid Method, AIAA Journal, Vol. 24, No.6, 948-954. [142℄ Nakamura, S. [1982℄. Mar hing Grid Generation Using Paraboli Partial Differential Equations, in Numeri al Grid Generation, J.F. Thompson, ed., NorthHolland, New York, 775- 786. [143℄ Nakamura, S. [1983℄. Adaptive Grid Relo ation Algorithm for Transoni Full Potential Cal ulation Using One-Dimensional and Two-Dimensional Di usion Equations, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 49-58. [144℄ Niederdrenk, P. [1991℄. Solution-Adaptive Grid Generation by Hyperboli /Parabolized Hyperboli P.D.E.s, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 173-181. [145℄ Noak, R.W., and Anderson, D.A. [1990℄. Solution-Adaptive Grid Generation Using Paraboli Partial Di erential Equations, AIAA Journal, Vol. 28., No. 6, 1016-1023. [146℄ Oh, H.J., and Kang, I.S., [1993℄. Orthogonal Grid Generation in a 2D Domain with Spe i ed Boundary Corresponden e at Three Sides, Pohang Institute of S ien e and Te h., Korea.



1992 by P.M. Knupp, September 8, 2002

224

[147℄ Pardhanani, A., and Carey, G.F. [1988℄. Optimization of Computational Grids, Num. Meth. for P.D.E.'s, Vol 4, No. 2, 95-117. [148℄ Peyret, R., and Taylor, T.D. [1983℄. Computational Methods for Fluid Flow, Springer-Verlag, New York. [149℄ Potter, D.E., and Tuttle, G.H. [1973℄. Constru tion of Dis rete Orthogonal Coordinates, J. Comp. Physi s, 13, 483-501. [150℄ Pulliam, T.H., and Steger, J.L. [1980℄. Impli it nite-di eren e simulations of three-dimensional ompressible ow, AIAA J., 18, 159-167. [151℄ Quirk, J.J. [1992℄. An Alternative to Unstru tured Grids for Computing Gas Dynami Flows Around Arbitrary Complex Two-Dimensional Bodies, ICASE Report No. 92-7, NASA Langley, Hampton VA. [152℄ Rai, M.M., and Anderson, D.A. [1981℄. Grid Evolution in Time Assymptoti Problems, J. Comp. Physi s, 43, 327-344. [153℄ Renelt, H., [1988℄. Ellipti Systems and Quasi onformal Mappings, Wiley, New York. [154℄ Roa he, P.J. [1978℄. Mar hing Methods for Ellipti Problems, Part 1, Num. Heat Transfer, vol. 1, 1-25. [155℄ Roa he, P.J., and Steinberg, S. [1985℄. A New Approa h to Grid Generation Using a Variational Formulation, AIAA 7th C.F.D. Conferen e, paper no. 851527, 360-370. [156℄ Roa he, P.J., Salari, K., and Steinberg, S. [1991℄. Hybrid Adaptive Poisson Grid Generation and Grid Smoothness, Commun. in Applied Num. Meth., Vol. 7, 345-354. [157℄ Ryskin, G., and Leal, L.G. [1983℄. Orthogonal Mapping, J. Comp. Physi s, 50, 71-100. [158℄ Saha, S. and Basu, B.C. [1991℄. Simple Algebrai Te hnique for Nearly Orthogonal Grid Generation, AIAA Journal, 29, 1340-1341. [159℄ Saitou, M. and Hirata, A., [1992℄. Two-Dimensional Unsteady Solidi ation Problem Cal ulated by Using the Boundary-Fitted Coordinate System, J. Comp. Phys., 100, 188-196. [160℄ Salari, K. [1989℄. personal ommuni ation. [161℄ Saltzman, J.S., and Bra kbill, J.U. [1982℄. Appli ations and Generalizations of Variational Methods for Generating Adaptive Meshes, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 865-884. [162℄ Saltzman, J.S. [1986℄. Variational Methods for Generating Meshes on Surfa es in Three Dimensions, J. Comp. Physi s, 63, 1-19. [163℄ Samarskii, A.A., Tishkin, V.F., Favorskii, A.P., and Shashkov, M.Yu. [1981℄. Operational nite-di eren e s hemes, Di . Eqns., 17, 863-885.



1992 by P.M. Knupp, September 8, 2002

225

[164℄ Samarskii, A.A., Tishkin, V.F., Favorskii, A.P., and Shashkov, M.Yu. [1982℄. Employment of the referen e-operator method in the onstru tion of nite di eren e analogs of tensor operations, Di . Eqns., 18, 881-885. [165℄ S hwartz, A.L., and Connett, W.E. [1986℄. Evaluating Algebrai Adaptive Grid Strategies, in Numeri al Grid Generation in Computational Fluid Dynami s, J. Hauser and C. Taylor, eds., Pineridge Press, Swansea UK, 63-174. [166℄ Seidl, A., and Klose, H., [1985℄. Numeri al Conformal Mapping of a TowelShaped Region onto a Re tangle, SIAM J. S i. Stat. Comput., Vol. 6, No. 4, 833-842. [167℄ Sengupta, S., Hauser, J., Eiseman, P.R., and Thompson, J.F., eds. [1988℄. Numeri al Grid Generation in Computational Fluid Me hani s '88, Pineridge Press, Swansea UK. [168℄ Shanno, D.F. [1978℄. Conjugate gradient methods with inexa t sear hes, Math. Oper. Res., 3, 244-256. [169℄ Shih, T. I-P., Bailey, R.T., Nguyen, H.L., and Roelke, R.J. [1991℄. Algebrai Grid Generation for Complex Geometries, Intl. J. for Num. Meth. in Fluids, Vol.13, No.1, 1-31. [170℄ Showalter, R.E., [1977℄. Hilbert Spa e Methods for Partial Di erential Equations, Pitman, London. [171℄ Shubin, G.R., Stephens, A.B., and Bell, J.B. [1982℄ Three Dimensional Grid Generation Using Biharmoni s, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 761-774. [172℄ Smar h-Abolhassani, J., and Smith, R.E., [1992℄. A Pra ti al pproa h to Algebrai Grid Generation, Computers Math. Appli ., Vol. 24, No. 5-6, 69-81. [173℄ Smith, P.W., and Sritharan, S.S. [1988℄. Theory of Harmoni Grid Generation, Complex Variables, Vol. 10, 359-369. [174℄ Smith, R.E., ed. [1980℄. Numeri al Grid Generation Te hniques, NASA Conferen e Publi ation 2166, NASA Langley Resear h Center, Hampton VA. [175℄ Smith, R.E. [1981℄. Two-Boundary Grid Generation for the Solution of the Three Dimensional Navier-Stokes Equations, NASA TM-83123, Langley Resear h Center, Hampton VA. [176℄ Smith, R.E. [1982℄. Algebrai Grid Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 137-170. [177℄ Sod, G.A. [1985℄. Numeri al Methods in Fluid Dynami s, Cambridge University Press, Cambridge. [178℄ Soni, B.K., and Wang, T.-S. Goodness of Grid: Quantitative Measures, to appear. [179℄ Soni, B.K., and Mastin, C.W. [1990℄ Variational Methods for Grid Optimization, to appear.



1992 by P.M. Knupp, September 8, 2002

226

[180℄ Soni, B.K., [1992℄. Grid Generation for Internal Flow Con guration, Computers Math. Appli ., Vol. 24, No. 5-6, 191-201. [181℄ Sorenson, R.L., and Steger, J.L. [1980℄. Numeri al Generation of Two Dimensional Grids by the Use of Poisson Equations with Grid Control, in Numeri al Grid Generation Te hniques, R.E. Smith, ed., NASA CP 2166, NASA Langley Resear h Center, Hampton VA, 449-461. [182℄ Sorenson, R.L. and Steger, J.L. [1981℄. Grid Generation in Three Dimensions by Poisson Equations with Control of Cell Size and Skewness at Boundary Surfa es, Preprint. [183℄ Sparis, P.D. [1985℄. A Method for Generating Boundary-Orthogonal Curvilinear Coordinate Systems Using the Biharmoni Equation, J. Comp. Physi s, 61, 445462. [184℄ Sparis, P.D., Karkanis, A., and Pergantis, S. [1992℄. Conjugate method of solutions of the biharmoni equation for the generation of boundary orthogonal grids, Cmptr. Meth. Appl. Me h. and Engr., 98, 273-290. [185℄ Sritharan, S.S. [1991℄. Mathemati al Aspe ts of Harmoni Grid Generation, in Mathemati al Aspe ts of Numeri al Grid Generation, J. Castillo, ed., 131-145. [186℄ Starius, G. [1977℄. Constru ting Orthogonal Curvilinear Meshes by Solving Initial Value Problems, Numer. Math., 28, 25-48. [187℄ Steger, J.L., and Sorenson, R.L. [1979℄. Automati Mesh-Point Clustering Near a Boundary in Grid Generation with Ellipti Partial Di erential Equations, J. Comp. Physi s, 33, 405-410. [188℄ Steger, J.L., and Chausee, D.S. [1980℄. Generation of Body-Fitted Coordinates Using Hyperboli Partial Di erential Equations, SIAM J. S i. Stat. Comput., Vol. 1, No. 4, 431-437. [189℄ Steger, J.L. [1991℄. Grid Generation with Hyperboli Partial Di erential Equations for Appli ation to Complex Con gurations, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 871-886. [190℄ Steinberg, S., and Roa he, P.J. [1985℄. Symboli Manipulation and Computational Fluid Dynami s, J. Comp. Physi s, 57, 251-284. [191℄ Steinberg, S., and Roa he, P.J. [1986℄. Variational Grid Generation, Num. Meth. for P.D.E.s, 2, 71-96. [192℄ Steinberg, S. [1988℄. Overview of symbol manipulation, CWI Quarterly, 1, 65-72. [193℄ Steinberg, S., and Roa he, P.J. [1990℄. Anomalies in Grid Generation on Curves, J. Comp. Physi s, 91, 255- 277. [194℄ Steinberg, S., and Roa he, P.J. [1991℄. Dis retizing Symmetri Operators in General Coordinates, to appear. [195℄ Steinberg, S., and Roa he, P.J. [1992℄. Variational Curve and Surfa e Grid Generation, J. Comp. Phys., 100, 163-178.



1992 by P.M. Knupp, September 8, 2002

227

[196℄ Steinthorsson, E., Shih, T.I-P., and Roelke, R.J. [1992℄. Enhan ing Control of Grid Distribution in Algebrai Grid Generation, Intl. J. Num. Meth. Fluids, Vol. 15, 297-311. [197℄ Stoker, J.J. [1969℄. Di erential Geometry, Wiley, New York. [198℄ Strikwerda, J.C. [1989℄. Finite Di eren e S hemes and Partial Di erential Equations, Wadsworth & Brooks Cole, Pa i Grove. [199℄ Struik, D.J. [1988℄. Le tures on Classi al Di erential Geometry, Dover, New York. [200℄ Symm, G.T. [1966℄. An integral equation method in onformal mapping, Numer. Math., 9, 250-258. [201℄ Tamamidis, P., and Assanis, D.N. [1991℄. Generation of Orthogonal Grids with Control of Spa ing, J.C.P., 94, 437-453. [202℄ Theodoropoulos, T., and Bergeles, G.C. [1989℄. A Lapla ian Equation Method for Numeri al Generation of Boundary-Fitted 3D Orthogonal Grids, J. Comp. Physi s, 82, 269-288. [203℄ Thinking [1992℄. Getting Started in CM Fortran Thinking Ma hines Corporation, 245 First Street, Cambridge MA 02142-1214, USA. [204℄ Thomas, P.D., and Lombard, C.K. [1979℄. Geometri onservation law and its appli ation to ow omputations on movings grids, AIAA Journal, 17, 10301037. [205℄ Thomas, P., and Middle o , J. [1980℄. Dire t Control of the Grid Point Distribution in Meshes Generated by Ellipti Equations, AIAA Journal, vol. 18, no. 6, 652-656. [206℄ Thomas, P.D. [1982℄. Numeri al Generation of Composite Three Dimensional Grids by Quasilinear Ellipti Systems, in Numeri al Grid Generation, J.F. Thompson, ed., 667-686. [207℄ Thomas, P.D. [1984℄. Stationary Interior Grids and Computation of Moving Interfa es, in Advan es in Computational Methods for Boundary and Interior Layers, Boole Press. [208℄ Thompson, J.F., Thames, F.C., and Mastin, C.W. [1974℄. Automati Numeri al Generation of Body-Fitted Curvilinear Coordinate System for Field Containing Any Number of Arbitrary Two-Dimensional Bodies, J. Comp. Physi s, 15, 299319. [209℄ Thompson, J.F., Thames, F.C., and Mastin, C.W. [1977℄. TOMCAT - A Code for Numeri al Generation of Boundary-Fitted Curvilinear Cordinate Systems on Fields Containing Any Number of Arbitrary Two-Dimensional Bodies, J. Comp. Physi s, 24, 274-302. [210℄ Thompson, J.F., ed. [1982a℄. Numeri al Grid Generation, North-Holland, New York. (Also published as Vol. 10 and 11 of Applied Mathemati s and Computation, 1982).



1992 by P.M. Knupp, September 8, 2002

228

[211℄ Thompson, J.F. [1982b℄. Ellipti Grid Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 79-105. [212℄ Thompson, J.F., Warsi, Z.U.A., and Mastin, C.W. [1982 ℄ Boundary-Fitted Coordinate Systems for Numeri al Solution of Partial Di erential Equations A Review, J. Comp. Physi s, 47, 1-108. [213℄ Thompson, J.F. and Mastin, C.W. [1983℄. Order of Di eren e Expressions in Curvilinear Coordinate Systems, in Advan es in Grid Generation, Ghia and Ghia, eds., ASME, 17-28. [214℄ Thompson, J.F. [1984℄. Grid Generation Te hniques in Computational Fluid Dynami s, AIAA Journal, Vol. 22, No. 11, 1505-1523. [215℄ Thompson, J.F., Warsi, Z.U.A., and Mastin, C.W. [1985a℄. Numeri al Grid Generation: Foundations and Appli ations, North-Holland, Elsevier, New York. [216℄ Thompson, J.F. [1985b℄. A Survey of Dynami ally-Adaptive Grids in the Numeri al Solution of Partial Di erential Equations, Applied Numeri al Mathemati s, 1, 3-27. [217℄ Thompson, J.F., Martinez, A., and Mounts, J.S. [1987℄. Program EAGLE Numeri al Grid Generation System Users Manual, Vols I-III, AFATL-TR-8715, Eglin AFB. [218℄ Vinokur, M. [1983℄. On One-Dimensional Stret hing Fun tions for Finite Di eren e Cal ulations, J. Comp. Phys., 50, 215-234. [219℄ Vinokur, M. [1989℄. An analysis of nite-di eren e and nite-volume formulations of onservation laws, J. Comp. Phys., 81, 1-52. [220℄ Vreugdenhil, C.B. [1991℄. Grid Control for Non-orthogonal Ellipti Grids, Comm. Appl. Num. Meth., 7, 633-637. [221℄ Warsi, Z.U.A., and Thompson, J.F. [1980a℄. Appli ation of Variational Methods in the Fixed and Adaptive Grid Generation, Computers Math. Appli ., Vol. 19, No. 8/9, 31-41. [222℄ Warsi, Z.U.A., and Thompson, J.F. [1980b℄. A Non-iterative Method for the Generation of Two-Dimensional Orthogonal Curvilinear Coordinates in an Eu lidean Spa e, in Numeri al Grid Generation Te hniques, R.E. Smith, ed., NASA CP 2166, NASA Langley Resear h Center, Hampton VA, 516. [223℄ Warsi, Z.U.A., and Thompson, J.F. [1982a℄. A Noniterative Method for the Generation of Orthogonal Coordinates in Doubly-Conne ted Regions, Math. of Comp., Vol. 38, No. 158, 501-516. [224℄ Warsi, Z.U.A. [1982b℄. Basi Di erential Models for Coordinate Generation, in Numeri al Grid Generation, J.F. Thompson, ed., North-Holland, New York, 41-78. [225℄ Warsi, Z.U.A., and Ziebarth, J.P., [1982 ℄. Numeri al Generation of ThreeDimensional Coordinates between Bodies of Arbitrary Shapes, in Numeri al Grid Generation, J.F. Thompson, ed., 717-728.



1992 by P.M. Knupp, September 8, 2002

229

[226℄ Warsi, Z.U.A. [1986℄. Numeri al Grid Generation in Arbitrary Surfa es through a Se ond-Order Di erential Model, J. Comp. Physi s, 64, 82-96. [227℄ Warsi, Z.U.A., [1990℄. Theoreti al Foundation of the Equations for the Generation of Surfa e Coordinates, AIAA J., Vol. 28, No. 6, 1140-1142. [228℄ Warsi, Z.U.A., and Koomullil, G.P. [1991℄. Appli ation of Spe tral Te hniques in Surfa e Grid Generation, in Numeri al Grid Generation in Computational Fluid Dynami s, A.S.-Ar illa, J. Hauser, P.R. Eiseman, J.F. Thompson, eds., 955-963. [229℄ Wendland, W.L. [1979℄. Ellipti Systems in the Plane, Pitman, London. [230℄ Whitney, A.K., and Thomas, P.D. [1983℄. Constru tion of Grids on Curved Surfa es Des ribed by Generalized Coordinates Through the Use of an Ellipti System, in Advan es in Grid Generation, K.N. Ghia and U. Ghia, eds., ASME, Houston, 173-179. [231℄ Winslow, A. [1967℄. Numeri al Solution of the Quasilinear Poisson Equations in a Nonuniform Triangle Mesh, J. Comp. Physi s, 2, 149-172. [232℄ Winslow, A. [1981℄. Adaptive Mesh Zoning by the Equipotential Method, UCID19062. [233℄ Yeung, R.W., and Vaidhyanathan, M. [1992℄. Non-Linear Intera tion of Water Waves with Submerged Obsta les, Intl. J. Num. Meth. Fluids, Vol. 14, 1111-1130. [234℄ Zegeling, P.A., Verwer, J.G., and Van Eijkeren, J.C.H. [1992℄ Appli ation of a Moving-Grid Method to a Class of 1D Brine Transport Problems in Porous Media, Intl. J. Num. Meth. Fluids, Vol. 15, 175-191.

Appendix A

Tensor CoeÆ ients This appendix gives expressions for the tensor oeÆ ients in the planar (8.71) and volume (9.59) non- onservative forms p of the Euler-Lagrange equations arising from fun tionals of the form H = H (gij ; g).

A.1 Planar Tensor CoeÆ ients A.1.1 Covariant Form T11

H I g11 2H  2H g g2  2 H + f2 2 + 2 p22 + 22 p 2 g(x x ) p g11 g g11  g 2g  g g12  2 H 2H 2H g g12 g22  2 H + f g + p22 p p p g11g12 g g11 g 2 g g12  g 2g  pg2 [(x x ) + (x x )℄ g2  2 H 1  2 H g12  2 H + 12 p 2 g(x x ) + f (A.1) p p 2 g g12 g 2g  g 2 g12 =

and

T12 + T12T

= + + + +

2H gI g12 pg 12 2H 2H g12 g22  2 H g g(x x ) 2 p12 f2 g g p g g11  g g  pg2   11 12 2H  2H g 1  2 H g22  2 H f2 g g + p11 + p 2 + pg g22  pg g g11 g 2 g12 11 22 2 2H g11 g22 + g12 g[(x x ) + (x x )℄ 2g  pg2 2H g 2H 2 p12 f2 g g g g22  pg 12 22 H f g

p

+ g

230



1992 by P.M. Knupp, September 8, 2002

g11 g12  2 H g(x x ) g  pg2  

231 (A.2)

and

T22

H I g22 1  2 H g12  2 H g2  2 H + f + 12 p 2 g(x x ) p p 2 2 g12 g g12 g 2g  g 2 H 2H g12  2 H g g12 g11  2 H + f g + p11 p p p g22g12 g g22 g 2 g g12  g 2g  pg2 [(x x ) + (x x )℄  2H 2H g g2  2 H + f2 2 + 2 p11 (A.3) + 11 p 2 g(x x ) p g22 g g22  g 2g  g =

A.1.2 Contravariant Form gT11 = + +

+ +

H 2  2 H + 2g11g12  2 H gI + f2g11 2 g11 g11 g11 g12 2 2 2 g12  H pg  Hp + g pg  2 Hp + 2 g 11 2 2 g12 g11  g 12 g12  g g 2H ? ? g(x x ) 2  pg2  2H 2 g g 2H + 12 22 2 f2g11g12 gH2 + (g11 g22 + g122 ) g g 2 g12 11 12 11 p 2 2 p  Hp + g22 g  Hp g[(x? x? ) + (x? x? )℄ g12 g     g11  g 2 g12 g 2 2H g2  2 H f2g122 gH2 + 2g12g22 g g + 22 2 g(x?

x? ) (A.4) 11 12 2 g12  11

and

g(T12 + T12T ) = + +

+ +

H f g

p

+ g

2H ggI g12 pg

12 2H 2H 2H f2g112 g g + 4g11g12 + g11 g12 2 g11 g22 g12 11 12 2 2 2  H + 2pgg12  Hp g(x? x? ) 2g12  g12g22 g22 g  2H 2 ) 2H + 2(g11 g22 + g12 f2g11g12 g g g11 g22 11 12 2 2 p  Hp + 1 (g g + g2 )  H g11 g 2 g11  g 2 11 22 12 g12  2H p  2 Hp 2g12 g22 + g22 g g12g22 g22  g



1992 by P.M. Knupp, September 8, 2002

g 2H g[(x? x? ) + (x? x? )℄ 2  pg2 2  2 H + 4g12g22  2 H + f2g12 g12 g11 g11 g22 2 p  Hp + g g  2 H + 2g12 g 2 g11 g 12 22 g12 2  2 H g(x? x? ) + 2g22  g12g22 

232

+

gT22 =

+ + + +

(A.5)

2  2H ? ? H 2  2H + 2g12g11  2 H + g11 gI + f2g12 2 2 g(x x ) g22 g22 g22 g12 2 g12 2H 2 g g 2H + 12 11 2 f2g22g12 gH2 + (g11 g22 + g122 ) g g 2 g12 22 12 22 p 2 2 p  Hp + g11 g  Hp g[(x? x? ) + (x? x? )℄ g12 g     g22  g 2 g12  g 2 2H f2g222 gH2 + 2g22g12 g g 22 12 22 2 2H 2H g12 p pg  2 Hp g + 2 g + g p 22 12 2 2 g12 g22 g g12  g g 2H g(x? x? ) (A.6) 2  pg2 

A.2 Volume Tensor CoeÆ ients A.2.1 Mixed Covariant and Contravariant Form T11

 2H H )I + 2 2 (x x ) g11 g11 2 H 2H [(x x ) + (x x )℄ + [(x x ) + (x x )℄ g11 g12 g11 g13   1 2H 2 (x x ) 2 g12 1 2H 1 2H ( x

x ) + [(x x ) + (x x )℄   2 2 g13 2 g12 g13  pg  2 Hp [(x r ) + (r x )℄  g11 g  pg  2 H [(x r ) + (r x )℄ 2 g12 pg  pg  2 H g 2H (A.7) [(x r ) + (r x )℄ + p 2 (r r ) p 2 g13 g 2 g

= ( + + + + + +

T12 + T12T

=

H I g12



1992 by P.M. Knupp, September 8, 2002

2H  2H (x x ) + 2 [(x x ) + (x x )℄ g11g12 g11g22   2H [(x x ) + (x x )℄ g11 g23  pg  2 Hp [(x r) + (r x )℄  g11  g  1 2H 1 2H [( x

x ) + ( x

x )℄ + [(x x ) + (x x )℄     2 2 g12 2 g12 g13   2H 1 2H 2 (x x ) + [(x x ) + (x x )℄ g12g22 2 g12g23  2H (x x ) g13 g23  pg  2 H [(x r ) + (r x ) + (x r) + (r x )℄ 2 g12  pg  2H [(x x ) + (x x )℄ g13 g22  pg  2 H p [(x r) + (r x )℄ 2 g13  g  pg  2 Hp [(x r ) + (r x )℄  g  g  pg 22 2 H [(x r ) + (r x )℄ 2 g23  pg  g 2H [(r r) + (r r )℄ (A.8) 2  pg2

+ 2 + + + + + + + + + + +

233

The other four matri es an be obtained from these two by y li permutations.

Appendix B

Fortran Code Dire tory This appendix provides a des ription of the odes that are on the disk that ome with this book. The rst se tion in this appendix provides programs for generating grids from analyti formulas in one and two dimensions. Note that these odes were written by di erent people at di erent times, so their programming styles are not onsistent. Make les are provided for ompiling the odes under UNIX. On other systems, the Make les exhibit expli itly all the sour e ode needed to ompile any given program. Both \.f" and \.for" endings are used on the sour e les to help make distinguish di erent programming styles.

B.1 Analyti Grid Generators B.1.1 Program linear Program linear uses Formula (1.13)

x = (1  ) x0 +  x1 ; 0    1

(B.1)

to produ e a linear grid on the interval [x0 ; x1 ℄. The program is in:



fortran/analyti /linear.f

B.1.2 Program oned For one dimensional grids, it is assumed that a formula x = x( ) is given and that the grid is given by i xi = x( ) ; 0  i  M ; (B.2) M where M is a given positive integer. There are subroutines for reating a general grid, the identity grid, an exponentially ompressed grid, a tangent grid:

   

fortran/analyti /oned.f fortran/analyti /identity1.f fortran/analyti / ompress.f fortran/analyti /tangent.f 234



1992 by P.M. Knupp, September 8, 2002

235

B.1.3 Program bilinear To generate a bilinear map in two dimensions, the physi al region must be a quadrilateral de ned by four points: x0;0 , x1;0 , x0;1 , x1;1 . The bilinear map is given by (1.14) whi h when written is oordinate notation gives

x(; ) = + y(; ) = +

(1  (1 (1  (1

 ) (1 ) x0;0 + (1  )  x0;1 ) x1;0 +   x1;1 ;  ) (1 ) y0;0 + (1  )  y0;1 ) y1;0 +   y1;1 :

(B.3)

The program is in:



fortran/analyti /bilinear.f

B.1.4 Program twod For two dimensional grids, it is assumed that formulas x = x(; ) and y = y(; ) are given and that the grid is given by

i j i j ; ) ; yi;j = y( ; ) ; 0  i  M ; 0  j  N : (B.4) M N M N There are programs for reating general grids given by formulas, the identity grid, polar grids, paraboli grids, ellipti grids, horseshoe grids, modi ed horseshoe grids, and bipolar grids. xi;j = x(

       

fortran/analyti /twod.f fortran/analyti /identity2.f fortran/analyti /polar.f fortran/analyti /paraboli .f fortran/analyti /ellipti .f fortran/analyti /horse.f fortran/analyti /modi ed.f fortran/analyti /bipolar.f

B.2 Trans nite Interpolation (TFI) See Se tion 1.5 for a des ription of the algorithm. The main program is in the

transf.for le. The subroutines are in:

   

fortran/analyti /transf.for fortran/analyti /b parm.for fortran/analyti /bset.for fortran/analyti /dis rtz.for



1992 by P.M. Knupp, September 8, 2002

  

236

fortran/analyti /sele t.for fortran/analyti /t .for fortran/analyti /ts.for

B.3 Hosted Equations There are odes for solving one- and two-dimensional s alar hosted equations with Diri hlet boundary onditions.

B.3.1 One-D-Programs The one-dimensional main program is in hosted 1d.f. The subroutines are in:

        

fortran/hosted/one/hosted 1d.f fortran/hosted/one/alp.f fortran/hosted/one/bndry.f fortran/hosted/one/error.f fortran/hosted/one/exa t.f fortran/hosted/one/grid gen.f fortran/hosted/one/sor.f fortran/hosted/one/sten ils.f fortran/hosted/one/trans.f

B.3.2 Two-D Programs The two-dimensional main program is in hosted 2d.f. The subroutines are in:

          

fortran/hosted/two/hosted 2d.f fortran/hosted/two/alp.f fortran/hosted/two/bet.f fortran/hosted/two/bndry.f fortran/hosted/two/error.f fortran/hosted/two/exa t.f fortran/hosted/two/gam.f fortran/hosted/two/grid gen.f fortran/hosted/two/sor 9pt.f fortran/hosted/two/sten ils.f fortran/hosted/two/trans.f



1992 by P.M. Knupp, September 8, 2002

237

B.4 LINE GENERATORS Codes for Chapter 3 proje ts:

  

fortran/line/proj345.f fortran/line/proj346.f fortran/line/proj347.f

B.5 Hyperboli Grid Generator Codes for the hyperboli grid generator are in:

  

fortran/planar/hyperboli /boundary.f fortran/planar/hyperboli /hyperboli .f fortran/planar/hyperboli /weight.f

B.6 TTM Generator The main ode for the TTM generator is in ittm.f. Here is a listing of all of the les:

           

fortran/planar/ttm/b parm.for fortran/planar/ttm/bset.for fortran/planar/ttm/ oe ittm.f fortran/planar/ttm/dis rtz.for fortran/planar/ttm/ittm.f fortran/planar/ttm/mets.f fortran/planar/ttm/pq.f fortran/planar/ttm/sele t.for fortran/planar/ttm/sor 9pt.f fortran/planar/ttm/t .for fortran/planar/ttm/tngts.f fortran/planar/ttm/ts.for

B.7 Variational Generators B.7.1 Length Fun tional This ode numeri ally solves the unweighted length equations 5.42:



fortran/planar/length/length.f



1992 by P.M. Knupp, September 8, 2002

238

B.7.2 Weighted Combination Fun tional This ode numeri ally solves the weighted Euler-Lagrange equations based on equation (6.70). The main ode is in omb.f. Here is a list of all of the les:

  

fortran/planar/ omb/ oe mb.f fortran/planar/ omb/ omb.f fortran/planar/ omb/sor 9pt xy.f

The ode also uses some of the subroutines in B.6.

B.7.3 Metri Elements Fun tional This ode numeri ally solves equation (8.35) with H an arbitrary fun tion of the elements of the metri tensor. The main ode is in tensor.f. Here is a list of all of the les:

        

fortran/planar/vari/ oe .f fortran/planar/vari/grd met.f fortran/planar/vari/hessian.f fortran/planar/vari/partials.f fortran/planar/vari/tensor.f fortran/planar/vari/tnsr.f fortran/planar/vari/t11.f fortran/planar/vari/t12.f fortran/planar/vari/t22.f

The ode also uses some of the subroutines in B.6.

Appendix C

A Rogue's Gallery of Grids The appendix provides a large number of examples on some regions that are nontrivial to grid.

239



240

1992 by P.M. Knupp, September 8, 2002

Figure C.1: Unit square grids TFI on Unit Square

Winslow on Unit Square

TFI

Length on Unit Square

Winslow

Area on Unit Square

Length

Area



241

1992 by P.M. Knupp, September 8, 2002

Area & Length on Unit Square

Area & Length

Orthogonality I on Unit Square

Orthogonality I

Orthogonality III on Unit Square

Orthogonality III



242

1992 by P.M. Knupp, September 8, 2002

AO on Unit Square

AO-Squared on Unit Square

AO

Liao on Unit Square

AO-Squared

Modified Liao on Unit Square

Liao

Modi ed Liao



243

1992 by P.M. Knupp, September 8, 2002

Figure C.2: Trapezoid grids TFI on Trapezoid

Winslow on Trapezoid

TFI

Length on Trapezoid

Winslow

Area on Trapezoid

Length

Area



1992 by P.M. Knupp, September 8, 2002

Area/Length on Trapezoid

Area & Length

244



245

1992 by P.M. Knupp, September 8, 2002

AO on Trapezoid

AO-Squared on Trapezoid

AO

Liao on Trapezoid

AO-Squared

Modified Liao on Trapezoid

Liao

Modi ed Liao



246

1992 by P.M. Knupp, September 8, 2002

Figure C.3: Annulus grids TFI on Annulus

Winslow on Annulus

TFI

Length on Annulus

Winslow

Area on Annulus

Length

Area



247

1992 by P.M. Knupp, September 8, 2002

Area/Length on Annulus

Area & Length

Orthogonality I on Annulus

Orthogonality I

Orthogonality III on Annulus

Orthogonality III



248

1992 by P.M. Knupp, September 8, 2002

AO on Annulus

AO-Squared on Annulus

AO

Liao on Annulus

AO-Squared

Modified Liao on Annulus

Liao

Modi ed Liao



249

1992 by P.M. Knupp, September 8, 2002

Figure C.4: Horseshoe grids TFI on Horseshoe

Winslow on Horseshoe

TFI

Length on Horseshoe

Winslow

Area on Horseshoe

Length

Area



1992 by P.M. Knupp, September 8, 2002

Area/Length on Horseshoe

Area & Length

250



251

1992 by P.M. Knupp, September 8, 2002

AO on Horseshoe

AO-Squared on Horseshoe

AO

Liao on Horseshoe

AO-Squared

Modified Liao on Horseshoe

Liao

Modi ed Liao



252

1992 by P.M. Knupp, September 8, 2002

Figure C.5: Swan grids TFI on Swan

Winslow on Swan

TFI

Length on Swan

Winslow

Area/Length on Swan

Length

Area & Length



253

1992 by P.M. Knupp, September 8, 2002

AO on Swan

AO-Squared on Swan

AO

Liao on Swan

AO-Squared

Modified Liao on Swan

Liao

Modi ed Liao



254

1992 by P.M. Knupp, September 8, 2002

Figure C.6: Chevron grids TFI on Chevron

Winslow on Chevron

TFI

Length on Chevron

Winslow

Area on Chevron

Length

Area



1992 by P.M. Knupp, September 8, 2002

Area/Length on Chevron

Area & Length

255



256

1992 by P.M. Knupp, September 8, 2002

AO on Chevron

AO-Squared on Chevron

AO

Liao on Chevron

AO-Squared

Modified Liao on Chevron

Liao

Modi ed Liao



257

1992 by P.M. Knupp, September 8, 2002

Figure C.7: Airfoil grids TFI on Airfoil

Winslow on Airfoil

TFI

Winslow

Length on Airfoil

Length



258

1992 by P.M. Knupp, September 8, 2002

AO on Airfoil

AO-Squared on Airfoil

AO

Liao on Airfoil

AO-Squared

Modified Liao on Airfoil

Liao

Modi ed Liao



259

1992 by P.M. Knupp, September 8, 2002

Figure C.8: Dome grids TFI on Dome

Winslow on Dome

TFI

Length on Dome

Winslow

Area on Dome

Length

Area



1992 by P.M. Knupp, September 8, 2002

Area/Length on Dome

Area & Length

260



261

1992 by P.M. Knupp, September 8, 2002

AO on Dome

AO-Squared on Dome

AO

Liao on Dome

AO-Squared

Modified Liao on Dome

Liao

Modi ed Liao



262

1992 by P.M. Knupp, September 8, 2002

Figure C.9: Valley grids TFI on Valley

Winslow on Valley

TFI

Length on Valley

Winslow

Area on Valley

Length

Area



1992 by P.M. Knupp, September 8, 2002

Area/Length on Valley

Area & Length

263



264

1992 by P.M. Knupp, September 8, 2002

AO on Valley

AO-Squared on Valley

AO

Liao on Valley

AO-Squared

Modified Liao on Valley

Liao

Modi ed Liao



265

1992 by P.M. Knupp, September 8, 2002

Figure C.10: Ba kstep grids TFI on Backstep

Winslow on Backstep

TFI

Length on Backstep

Winslow

Liao on Backstep

Length

Liao



266

1992 by P.M. Knupp, September 8, 2002

AO on Backstep

AO-Squared on Backstep

AO

AO-Squared



267

1992 by P.M. Knupp, September 8, 2002

Figure C.11: Plow grids TFI on Plow

Winslow on Plow

TFI

Winslow

Length on Plow

Length



268

1992 by P.M. Knupp, September 8, 2002

Liao on Plow

Modified Liao on Plow

Liao

AO on Plow

Modi ed Liao

AO-Squared on Plow

AO

AO-Squared



269

1992 by P.M. Knupp, September 8, 2002

Figure C.12: C grids TFI on ’C’

Winslow on ’C’

TFI

Winslow

Length on ’C’

Length



270

1992 by P.M. Knupp, September 8, 2002

AO on ’C’

AO-Squared on ’C’

AO

Liao on ’C’

AO-Squared

Modified Liao on ’C’

Liao

Modi ed Liao

Index AH generator 55 Aerodynami s 3 Airfoils 113 Airfoil 111 Algebrai grid generation 103 Algebrai methods 22 Analyti fun tion 107 Annulus 16 Ar length 76 Basi problem 10 Basi problem 8 Beltrami operator 94 Beltrami operator 96 Biharmoni operator 114 Bilinear maps 12 Biorthogonal 85 Biorthogonal 89 Bipolar oordinates 18 Blending fun tions 23 Boundary onditions, numeri al 1 Boundary onditions 3 Boundary onforming 1 Boundary onforming 6 Boundary onforming 9 Boundary layers 14 Boundary layer 69 Boundary, impli it 7 Boundary, numeri al 7 Boundary, parametri 7 Boundary- onforming oordinates 39 Boundary-value problems 29 Boundary-value problem 36 Boundary 7 Cal ulus of variations 49 Cal ulus of variations 65 Cau hy-Riemann 108 Central average 31 Chevron 25 Cir le 16 Computer graphi s 4 Conformal mapping 107

Conformal module 108 Conne ted 8 Conservative form of derivatives 38 Conservative form of derivative 38 Conservative form 52 Contravariant normal ve tor 89 Contravariant normals 95 Contravariant normals 95 Contravariant 89 Convex region 11 Coordinates 4 Corner test 13 Covariant tangent ve tors 94 Covariant tangent ve tor 89 Covariant tangents 95 Covariant 89 Curvature 98 Curves 5 Curvilinear oordinates 1 Cylindri al oordinates 20 Cylindri al oordinates 20 Di eomorphism 10 Di eren e, entral 31 Diri hlet boundary ondition 36 Diri hlet onditions 115 Dis rete values 32 Dis riminant 28 Disk, unit 7 Domain 8 Ele tromagneti s 3 Ellipti ylinder oordinates 17 Ellipti generator, simplest 115 Ellipti generator 101 Ellipti grid generator 114 Error of approximation 2 Estuary ow 3 Euler-Lagrange equation, fourth-order 67 Euler-Lagrange equations 65 Euler-Lagrange equation 64 Feature-adaptive weights 69 271



272

1992 by P.M. Knupp, September 8, 2002

Finite di eren es 39 Finite element 12 Finite-di eren e approximation 58 First Fundamental Form 93 Fluid dynami s 1 Fluid dynami s 3 Folded transformation 2 Folded 25 Folding 9 Fourth-order PDE 113 Fun tional, 1-D example 64 Gauss identities 97 General oordinates 5 Geometry, omplex 1 Gradient 79 Grid generation 1 Grid, exponentially stret hed 14 Grids, large 3 Grid 2 Hessian matrix 62 Horseshoe Domain 17 Horseshoe 24 Hosted equation 1 Hosted equation 27 Hyperboli 111 Interpolation 21 Interpolation 7 Invariant boundary-value problem 31 Inverse Mapping Theorem 11 Inverse Mapping Theorem 11 Inverse transformation 2 Isoparametri maps 12 Ja obian matrix 10 Ja obian, zero 2 Ja obian 10 Lagrange Interpolating Polynomials 104 Lagrange polynomials 23 Lapla e equation 115 Lapla ian, s aled 110 Length proportional to weights 50 Lo al 11 Logi al domain 1 Logi al domain 22 Logi al region 1 Logi al region 1 Logi al spa e grid 32 Logi al spa e 1 Logi al spa e 4 Logi al spa e 5

Logi al-spa e weight 50 Logi ally re tangular 2 Mapping 2 Map 2 Map 5 Master element 2 Matrix, oeÆ ient 35 Metri identity, planar 94 Metri identity 96 Metri identity 96 Metri matrix 90 Metri matrix 90 Metri tensor 90 Metri -matrix 117 Metri 91 Modi ed Horseshoe 18 Netlib 116 Neumann boundary ondition 113 Nonlinear BVP 57 Nonlinear iteration 59 Nonsingular 11 One-to-one 9 Onto 9 Orthogonal oordinates 92 Orthogonal grids 109 Orthogonal grids 2 PDE, nonlinear 54 Paraboli ylinder oordinates 17 Paraboli grid generation 113 Parameterization, boundary 15 Physi al domain 1 Physi al obje t 1 Physi al region 1 Physi al region 1 Physi al spa e grid 32 Physi al spa e 1 Physi al spa e 4 Physi al spa e 5 Physi al-spa e weight 53 Physi al-spa e weight 56 Pi ard algorithm 118 Plasma physi s 3 Poisson equations 55 Polar oordinates 16 Polar oordinates 16 Programming languages 4 Proje tion operators 105 Proportional to the weight 52 Quasi- onformal 108 Rank 11



273

1992 by P.M. Knupp, September 8, 2002

Re-parameterize 8 Regions 5 Reparameterization 14 Riemann Mapping Theorem 108 S alar produ t 73 S hwarz-Christo el symbols 97 Se ant ve tor 75 Se ond-order DEs 50 Simply onne ted 8 Smoothness generator 116 Smooth 10 Solution adapted 3 Solution-adaptive grids 49 Solution-adaptivity 69 Sphere, unit 7 Spheri al oordinates 20 Spheri al oordinates 20 Spillover 9 Sten ils 43 Sten il 35 Sten il 41 Stru tures 3 Su

essive-substitution 118 Surfa es 5 Swan 25 Symmetri form of derivatives 38 Symmetri form of derivative 38 Symmetri form of the derivative 30 Symmetri tridiagonal system 58 TFI, examples 23 TFI 22 TFI 23 TTM generator 116 TTM generator 56 Tangent perpendi ulars 95 Tangent ve tor 75 Thompson-Thames-Mastin generator 116 Tidal ow 3 Trans nite interpolation 104 Trans nite interpolation 22 Trans nite interpolation 23 Transformations 5 Transformation 1 Transformation 1 Transformation 2 Transformed boundary-value problem 30 Transformed derivatives 30 Trilinear maps 13

View publication stats

Triple s alar produ t 73 Type of hosted equation 27 Unit ube 5 Unit interval 5 Unit square 5 Variational prin iples 61 Ve tor produ t 73 Weight fun tion 50 Winslow grid generator 116