Schwarz-Christoffel Mapping in the 1980's* Lloyd N. Trefethen TR 93-1381 September 1993 Department of Computer Science Cornell University Ithaca, NY 14853-7501 *Reprinted from Numerical Analysis Report 89-1, Dept. of Mathematics, Massachusetts Institute of Technology, January, 1989. Note One day I hope to write a book on numerical Schwarz-Christoffel mapping. In the meantime. this document is the closest I have come to preparing a survey of the field. It consists of the transparencies (slightly edited) from my talk `?Schwarz-Christoffel mapping in the 19SO's?' delivered at the Conference on Computational Aspects of Complex Analysis organized by Al NIarden and Burt Rodin in Phoenix, Arizona. 11-14 January 19S9. The material is based on ten years of experience with solving conformal mapping problems. often brought to me by users or would-be users of my Fortran package SCPACK. NIy chief purpose here is to outline the wide range of variations on the theme of Schwarz- Christoffel mapping that arise in practical problems --H for only rarely does one encounter precisely the ?standard" problem of mapping a disk or half-plane onto a prescribed poly- gon. Details are omitted, but can be found in the references. NIy emphasis is entirely on algorithmic and numerical matters, and the references are heavily biased in that direction. Undoubtedly they are also biased towards my own contributions. and I apologize to others whom I may have accidentally slighted. I would like to highlight two themes that arise repeatedly in Schwarz-Christoffel mapping: Afodifled Schwarz.Christoffel integrals. The standard Schwarz-Christoffel integrand is a product f' = Hf? where each fk is an elementary conformal map (z--Hzk)?3?. By modifying the choice of fk in appropriate ways, this same prescription can be adapted to many different mapping problems, including exterior polygons. polygonal Riemann surfaces, doubly-connected polygons, maps of an infinite strip, and the maps that arise in ideal 2D free-streamline flows. o+ Generalized parameter problems. Almost any Schwarz-Christoffel map requires the solution of a parameter problem; in the simplest case one has to determine unknown "prevertices" (zk? such that the corresponding vertices ?wk) are separated by the correct side lengths I%L'k+i --Hwkl. and this amounts to a nonlinear system of equations to be solved numerically. Surprisingly often, however, this paradigm needs to be enlarged to a `?generalized parameter problem" --H which, fortunately. is often no harder to solve. For example, in an inverse problem one may wish to delete one of the side length conditions and replace it by a global condition involving the conformal module (see p. 25). To put it generally: not all the conditions that define a Schwarz-Christoffel map need be geometric. Often the geometry is only incompletely specified. or specified partly in the domain and partly in the range; and indeed. sometimes polygons do not enter into the problem at all except implicitly. N?Iy work on Schwarz-Christoffel mapping began in 197S at the suggestion of Peter Henrici. who died, too soon. in 1987. Nick Trefethen 2) January 1989 s CHWARZ- CHRISTOFFEL MAPPING IN THE 1980's Lloyd N. Trefethen 1. Fundamentals of S-C mapping, p. 3 2. Generalizations of the S-C formula, p. 11 3. Applications, p. 23 Summary, p. 31 Dept. of Conip. Sci. Cornell University LNT?cs cornell.edu Collaborators: Frederic Dias ?Vorcester Polytechnic Institute Alan Elcrat NVichita State University Peter Henrici ETH Zurich Louis Howell, NI.I.T. Ruth NVilliams, University of California at San Diego 2 1. Fundamentals of S-C Mapping 3 The Schwarz-Christoffel Idea H = upper half-plane P = polygonal region with n vertices f = conformal rnap from H to P fwk? = vertices of P? fzk? = `prevertices' Zk = f?'(wk) H Zk Zk+1 f Wk?1 N\Pk7t Wk Idea: arg f' is piecewise constant on the real &xis. Therefore ff can be wntten as a product of functions f?: = C ?fl fk(z), fk(z) = k=1 zk fk L 0 = fk(zk) Each fk introduces a jump in arg f' at Zk 4 The Schwarz-Christoffel Formula Integration gives Reminder f(z) = C?? fi (s--Hzk)?4ds Pk7r = turning angle at kth vertex Wk --H known zk = kth prevertex - unknown The same formula works for a disk as well as a half-plane, and vertices at cc are permitted. For maps of the half-plane, one preveftex may lie at cc and is then omitted from the S-C product (e.g. Z? = cc). Refs: Z. Nehari, Conformal Alapping, 1952. ??. Koppenfels & F. Stalimaun? Praxis der konf. Abbildung 1959. P. Henrici, Applied & Computational Complex Anai5rsis L 1974. 5 Numerical s-c Mapping To apply the S-C formula two obstacles rnust be oN?rcome: "PARAMETER PROBLEM9, Given vertices fwkl, the prevertices fzk? are unknown. 1) Formulate the problem as a system of constrained nonlinear equations involving the side lengths Wk+1 --H Wk 2) Change variables to eliminate the constraints Zk ? Zk+1: 3) Solve the system iteratively by standard optimization software (e.g. NSO1A or NIINflNCN); NUNIERICAL INTEGRATION The S-C integral cannot be evaluated analytically 1) Gauss-Jacobi quadrature (for endpoint singularities): 2) Adaptive subdivision (to combat "`crnwding"). ,Refs: K. Reppe, Siemens Forsch. u. Entwicld. Ber.,1979. R.T. Davis, 4th ALAA Comp. Fluid Dynamics Conf., 1979. L.N.T., SLAi\i J. Sci. Stat. Comp., 1980. 6 History GAUSS (1820's) --H idea of conformal mapping RIEMANN (1851) - Riemann mapping theorem CHRISTOFFEL (1868) SCHN\ARZ (1869?1870) --H independent POLOZNII (1955) NANTORON'ICH & NRYLOV (1958) SAVENKOV (1963?1964) GAIER (1964) --H book on numerical conformal mapping FILCHANOV (1961?1968?1969.1975) HAEUSLER (1966) LAWRENSON & GUPTA (1968) BEIGEL (1969) HOFFMAN (1971?1974) HO?E (1973) N?ECHESLA?V, TOLSTOBROVA KOKOULIN (1973?1974) CHEREDNICHENKO & ZHELANKINA (1975) SQUIRE (1975) NIEYER (1976,1979) --H comparison of algorithms NICOLAIDE (1978) HOPKINS & ROBERTS (1979) - solution by Kufarev?s method BINNS, REES, & KAHAN (1979) N?OLKOV (1979) REPPE (1979) --H first fully robust algoritlim DAN?IS SRIDHAR (1979?1982?1983) --H curved boundaries channel maps TREFETHEN (1980--H1988) - Fortran package SCPACK BRONVN (1981) TOZONI (1983) PROCHAZKA (1978,1982?1983) HOEKSTRA (1983?1986) - curved boundaries annuli FLORYAN ZEMACH (1985-1988) - channel maps. periodic domains BJORSTAD & GROSSE (1987) - circular polygons DIAS (1987--H1989) --H hydrodynamics applications DAPPEN (1988) - doubly-connected S-C HO?'ELL (1989) --H elongated polygons, circular polygons SCPACK Fortran package for S-C mapping (L.N.T. 1982) Polygons may be unbounded (i.e.? vertices permitted at oc) Available by tape or by e-mail (via ?`Netlib'?): r send index from conf ormal send scpdbl from conf ormal send sclibdbl from conformal mail neti ib?research.att.com or mail netl i b?orn1 gov The User's Guide can be obtained by contacting L.N.T. Refs: L.N.T., SCPACK User's Owde MIT. report, 1989. (Netlib:) J.J. Dongarra & E. Grosse, Commun. ACM, 1987. 8 Examples Map to disk: Map to half-plane: Map to infinite strip: Map to rectangle: 9 10 2. Generalizations of the S-C formula Refs: Scliwarz and Christoffel, 1868--H1870. J.NI. Floryan & C. Zemacli J. Comp. Phys., 1987 ii Riemann Surfaces Idea: f' is still piecewise constant on the real &xis. but may have zeros ? in the upper half-plane. Each ? introduces a factor bk(z) = in the S-C formula: f(z) = c;z fi (s--Hzk)?4 11B bk(s) ds k=1 k=1 no branch points No numerical implementations as yet one branch point Refs: D. Gilbarg, Proc. National Academy of Sciences, 1949. A. ?V. Goodman, Trans. Amer. Niath. Soc., 1950. 12 Exterior polygons Problem: map the upper half-plane to the exterior of a polygon, with f(i) = 00. Solution: analogous to R,iemann surface case. f'(z) is piecewise constant on the real ?xis with a double pole at z = f(z) = c ;Z fl (s--Hzk)?4 (s2+1)?2 ds k=1 j A --H? 0 Ref: L.N.T., unpublished memo 1987. 13 Doubly-Connected Polygons Idea; wnte f' = Cllfk, with k Zk fk fk can be expressed in terms of theta functions. Regions with higher connectivity: no S-C methods exist. Refs: P. Henrici, Applied & Computational Complex Analysis III. 19S6. NI. Hoekstra in Numerical Grid Generation, 1986. H.D. Da?ppen, PhD thesis, ETH Zurich9 1988. 14 Free boundaries with 1f11 = const. Standard S-C: arg f' = piecewise constant on real &M5 S-C for free-boundarv problems: arg f' = piecewise constant on [--H1,1], ff = const. elsewhere on real axis Applications: wakes, jets, cavities: area minimization (see p. 30) Idea: write f' = C II fk, with k fk(z) = 3k z --H zk 1 --H zkz + (l--Hz2)(l--Hzk)2 --H1 zk 1 fk fk(0o) 0 = fk(zk) Refs: AR. Elcrat & L.N.T., J. Comp. Appi. Math., 1986. D. Gajer, Results in Alathematics, 1986. F. Dias, A.R. Elcrat & L.N.T., J. Fluid Alech., 1987 15 fk(1) Gearlike Domains `Gearlike" domain G: bounded by radial line segments and concen- tric circular arcs Idea: P = log G is a polygon (possibly periodic) with horizontal and vertical sides Apply S-C type formula to P capacity = 1.08184 capacity = 1.72442 Refs: AW. Goodman, Urnv. Nat. Tucuman, 1960. L.N.T., unpublished memo, 1983 K.F. Jackson & J.C. Mason, in Algorithms for Appwximation 1987 K. Pearce, SlAM J. Sci. Stat. Comput., 1991 16 Channels and Elongated Polygons Niapping elongated regions via a disk or half-plane is too ill-conditioned to be feasible (the `crowding phenomenon?). Idea: use an infinite strip instead as fundamental domain. = C fi fk(z), fk(z) = (??sinh(z?zk))?Jk. k=1 Zk + 7ri/2 Examples: zk fk Refs: K.P. Sridhar & R.T. Davis, J. Fluids Engr. 1985. J.NI. Floryan? J. Comp. Phys., 1985. L.H. Howell and L.N.T., SLAAI J. Sci. Stat. Comp., to&ppcar. L. Greengard, "Potential flow in channels," toappcar. SlAM J. Sci. Stat. Conip., 1990 17 1990 Periodic Domains Ref: J. M. Floryan, J. Comp. Phys., 1986. 18 Fractals Example: (self-similar; map onto infinite strip) Ref: L. H. Howell & L.N.T., SLAAf J. Sci. Stat. Comp. 19 Polygonal fractal H S-C map with n = cc Applications in diffusion-limited aggregation. etc. Algorithms not yet developed 1990 Circular Polygons ?Circular polygon": bounded by circular (or straight) arcs The S-C integral becomes a 3rd-order o.d.e. Fully robust implementations not ??t available. Refs: P. Bj?rstad & E. Grosse SLAAI J. Sci. Stat. Comp., 1987. L.H. Howell . 0. Cornp. Appi. Math., 1993 20 General Curved Boundaries Standard S-C turning angle 7rPk at veftex z?: = c fi (z--Hzk)?4 --H Cexp[--H ??log(z--Hz?)]. k=1 k=1 Continuous S-C turning density function irP(z): = Cexp[--Hfr%P(t)log(z--Ht)dt? Integration gives: f(z) = C fZ exp [--Hfr% p(t) log(s--Ht) dt 1 ds $ (*) There are dozens of integral equations for numerical conformal map- ping besides (*), most of them simpler. Neveftheless (*) has proved ??ry useful for some problems. Refs: L.C. Woods, The Theory of Subsonic Plane Flow, 1961 R.T. Davis, 4th ALAA Comp. Fluid Dynamics Conf.. 1978. J.NI. Floryan, J. Comp. Phys. 1985. NI. Hoekstra, in Numerical Grid Generation, 1986. P. Henrici, Applied & Computational Complex Analysis III. 1986. L.N.T., ed., Numerical Conformal AMppTh? 1986. 21 22 3. Applications 23 Electrical Resistance Problem: find resistance (conformal module) of a `?quadnlateral?' 1) Niap the resistor conformally onto a rectangle 2) Resistance = Length/NVidth v =0 Examples: R = 1.11575250227 Refs: D. Gajer, Numer. Math., 1972. L.N.T., Z. Angew. Math. Phys., 1984. 24 II R = 4.55872841596 Inverse Problems, Side Conditions Standard S-C: geomet? fully specified (e.g.? n side lengths) S-C with side conditions: geometry partly specified (e.g. n--H1 side lengths) ? additional constraints (e.g.? specified conformal module) Generalized parameter problem" Example slit resistors with R = 2: slit length = 0.727775151589 Ref: L.N.T., Z. Angew. Niath. Phys., 1984. slit length = 0.330164529748 25 Piecewise Constant B.C.'s Resistance problem (p. 24) rectangle of unknown aspect ratio Laplace problems with a larger number of piecewise constant h.c `s rectilinear domain with slits of unknown dimensions generalized parameter problem (linear hence easy) Example: II - Refs: R.F. Wick.9 J. Appi. Phys., 1954. L.N.T. & R.J. Wilhariis, J. Comp. Appi. Math., 1986 26 Oblique Derivative B.C.'s Refs: R.F. Wick., J. Appi. Phys., 1954. L.N.T. & R.J. Williams, J. Gomp. Appi. Math., 1986. 27 4 Problem: V2u = 0 on a polygon. oblique Neumann b.c. `s 1) Find map f to another polygon with vertical b.c.?s 2) u := Ref Examples: Z3 f w4 Zj Classical Hall effect M Reflected Brownian inotioy\ (tandem queues, Vortex Methods in Fluid Dynamics N'iscous flow at high Reynolds number Simulation via point (or ?blob'?) vortices Boundary conditions imposed by method of images Conformal map to half-plane ensures one image per vortex Example: ?-----H-???-?- %???o+??`?`` - .-,. ?-- -.----,?,.- -.-- - - -?------ --H-.?=--------- -- ?---- - --H --H--H --H--H -------H--H?- --H--H r - -? - - ________ - - - - -?----??--%-:?-- = o+ .?, -,--H --H-,.- ,- , -, - - ----H-, --H --H--H --H Ref: A.F. Glioniem & Y. Gagnon, J. Comp. Phys., ?987. 28 Re = 191 Complex Soution Approximation; of Ax=b Given: domain Q with boundar?r V Fe;je'r Points on V: images of roots of unity under conformal map of exterior of unit disk to exterior of Q. ?Uniformly distributed?? hence good for polynomial interpolation. Application to iterative solution of Ax = b (nons??mmetric): 1) Determine estimate ? of spectrum of A 2) Calculate Feje'r points for Q via conformal map 3) Construct iteration based on interpolation of z?' Refs: J.L. ?Va1sh, Interpolation and Approximation... 1935. D. Gajer, Lectures on Complex Appwximation, 1987 B. Fischer & L. Reicliel, Numer. Alath., to&pp?ar. H. Tal-Ezer, SLAXI J. Sci. Stat. Comp., subruitted. L.N.T., Algorithms for Approximation IL toappzar. 29 1988 1990 Jets, Wakes, and Cavities (Ideal 2D flow, no gra;?rjty. see p. 15) eotent?a? ???eS ??a??? s?acea ecw?? --i Refs: A.R?. Elcrat & L.X.T. J. Comp. Appi. Viath., 1986. F. Dias A.R?. Elcrat & L.N.T., J. Fluid Mech., 1987. 30 Summary o+ Niost S-C problems can be solved to full machine precision in seconds or minutes (work = 0(n3)) o+ S-C variants ?modified S-C integrands'9 f' = II fk k o+ Often not all conditions are geometric generalized parameter problems" o+ All exactly-solvable conformal mapping problems are S-C! (well almost all. .. sometimes in disguise) 31