Exterior map

Exterior map

Methods

ExteriorMap(p::Polygon[;tol::Float64][,ncoeff::Int]) <: ConformalMap

Create a Schwarz-Christoffel map from the interior or exterior of the unit circle to the exterior of polygon p.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p)
Schwarz-Christoffel map of unit circle to exterior of polygon with 4 vertices

ExteriorMap(p;tol=1e-12) manually sets the tolerance to 1e-12 (the default is 1e-8).

ExteriorMap(p;ncoeff=200) manually sets the number of coefficients of negative powers of the multipole expansion of the mapping to 200 (the default is 100).

The resulting map m can be evaluated at a single or vector of points ζ with m(ζ[;inside::Bool]). The points are assumed to lie outside the unit circle, unless the optional argument inside=true, in which case they are assumed to lie inside the circle.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> ζ = [0.1,0.5-0.75im,-0.25-0.3im];

julia> m(ζ;inside=true)
3-element Array{Complex{Float64},1}:
   -6.9344-7.68965im
 0.0439774-1.11249im
   2.41181-0.044779im

julia> ζ = [1.0+3.0im,-2.0-2.0im,0.0+1.1im];

julia> m(ζ)
3-element Array{Complex{Float64},1}:
   0.81614+3.02956im
  -2.25237-2.08523im
 -0.333104+0.975837im
source
KarmanTrefftzMap(ν,ϵ,δ,C[;N = 200]) <: ConformalMap

Create a map from the exterior of the unit circle to the exterior of a Karman-Trefftz airfoil.

The form of the mapping is

\[\frac{z-\nu C}{z+\nu C} = \left(\frac{\tilde{\zeta}-C}{\tilde{\zeta}+C}\right)^\nu\]

where $\tilde{\zeta}$ are the coordinates in an intermediate plane, in which the circle is of radius $a$ and centered at $\epsilon C e^{i\delta}$:

\[\tilde{\zeta} = \epsilon C e^{i\delta} + a \zeta\]

Note that $a/C \geq 1$ and is determined by the choices for $\epsilon$ and $\delta$.

The trailing edge angle, $(2-\nu)\pi$ is specified by $\nu$. The thickness is controlled by $\epsilon C \cos\delta$ and the camber by $\epsilon C \sin\delta$. The airfoil chord length is approximately $4C$. Generally, $\epsilon$ should be much smaller than 1 and $\delta$ between $\pi/2$ and $\pi$.

The resulting map m can be evaluated at a single or a vector of points ζ with m(ζ).

Example

julia> ν = 1.9; ϵ = 0.1; δ = π; C = 0.25;

julia> m = KarmanTrefftzMap(ν,ϵ,δ,C)
Karman-Trefftz map

julia> ζ = [1.0+3.0im,-2.0-2.0im,0.0+1.1im];

julia> m(ζ)
3-element Array{Complex{Float64},1}:
   0.268188+0.764722im
  -0.624265-0.502634im
 -0.0390996+0.126737im
source
PowerMap(c::Vector{Complex12}[;N = 200]) <: ConformalMap

Create a power series map from the exterior of the unit circle to the exterior of a shape defined by the power series coefficients c.

The form of the mapping is

\[z(\zeta) = c_{1}\zeta + c_{0} + \sum_{j=1}^{N_{c}} \frac{c_{-j}}{\zeta^{j}}\]

The entries in c correspond as follows: c[1]$\rightarrow c_{1}$, c[2]$\rightarrow c_{0}$, c[3]$\rightarrow c_{-1}$, etc.

The resulting map m can be evaluated at a single or a vector of points ζ with m(ζ).

Example

julia> c = Complex128[1,0,1/4];

julia> m = PowerMap(c)
Power series map

julia> ζ = [1.0+3.0im,-2.0-2.0im,0.0+1.1im];

julia> m(ζ)
3-element Array{Complex{Float64},1}:
   1.025+2.925im
 -2.0625-1.9375im
     0.0+0.872727im
source
Base.summaryMethod.
summary(m::ConformalMap)

Returns a summary of data for a conformal map

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> summary(m)
Schwarz-Christoffel map of unit circle to exterior of polygon with 4 vertices
   vertices: (-1.0,-1.0), (0.2,-1.0), (1.0,0.5), (-1.0,1.0),
   interior angles/π: 0.5, 0.656, 0.422, 0.422,
   prevertices on circle: (1.0,0.0), (0.3764,-0.9265), (-0.9024,-0.4309), (-0.1868,0.9824),
   prevertex angles/π: -0.7291, -0.3519, 0.1291, 0.7111,
   constant = 0.6722 + 0.7669im, accuracy = 1.0e-8,
   number of multipole coefficients = 100
source
Jmoment(m::ConformalMap) -> Float64

Returns the second area moment of the shape described by the mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> Jmoment(m)
1.5768333333333333
source
addedmass(m::ConformalMap) -> Array{Float64,2}

Returns the added mass matrix of the shape described by the conformal mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> addedmass(m)
3×3 Array{Float64,2}:
  0.725129    0.0944902  -1.37387
  0.0944902   3.67634    -0.255119
 -1.37387    -0.255119    3.59231
source
area(m::ConformalMap) -> Float64

Returns the area of the shape described by the mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> area(m)
2.9
julia> c = Complex128[1];

julia> m = PowerMap(c);

julia> area(m)
3.141592653589793
source
centroid(m::ConformalMap) -> Complex128

Returns the complex centroid position of the shape described by the mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> centroid(m)
-0.20919540229885059 - 0.04022988505747128im
source
coefficients(m::ConformalMap) -> Tuple{Vector{Complex128},Vector{Complex128}}

Returns a tuple of vectors of the complex coefficients of the multipole expansion of the mapping $z(\zeta)$ described by m as well as the coefficients of the square magnitude of the mapping $|z(\zeta)|^2$.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> ccoeff, dcoeff = coefficients(m);
source
moments(m::ExteriorMap) -> Vector{Complex128}

Return the moments of the prevertices for exterior polygon mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> mom = moments(m);
source
parameters(m::ExteriorMap) -> Tuple{Vector{Complex128},Complex128}

Returns a tuple of a vector of the prevertices and the complex factor of the exterior polygon mapping m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> prev, C = parameters(m);

julia> prev
4-element Array{Complex{Float64},1}:
       1.0+0.0im
  0.376406-0.926455im
 -0.902383-0.430935im
 -0.186756+0.982406im
source
DerivativeMap(m::ConformalMap)

Constructs new conformal maps from the first and second derivatives of the conformal map m.

These new conformal maps can be evaluated at a single or vector of points just as m is. The first entry in the tuple returned is the first derivative, the second entry is the second derivative.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> dm = DerivativeMap(m);

julia> ζ = [0.1,0.5-0.75im,-0.25-0.3im];

julia> dz, ddz = dm(ζ;inside=true);

julia> dz
3-element Array{Complex{Float64},1}:
  67.2068+76.6284im
 -1.11666+0.544576im
  3.99129-5.30641im
source
InverseMap(m::ConformalMap)

Constructs the inverse conformal map of the conformal map m.

This inverse conformal map can be evaluated at a single or vector of points. Points should be outside the body. Whether the resulting point in the circle plane is interpreted inside or outside the circle is determined by the optional argument inside, which defaults to false.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> m⁻¹ = InverseMap(m);

julia> ζ = [1.0+3.0im,-2.0-2.0im,0.1+1.1im];

julia> m⁻¹(m(ζ))
3-element Array{Complex{Float64},1}:
  1.0+3.0im
 -2.0-2.0im
  0.1+1.1im
source
Base.lengthMethod.
length(m::ConformalMap) -> Integer

Returns the number of control points/vertices of the map m.

Example

julia> p = Polygon([-1.0,0.2,1.0,-1.0],[-1.0,-1.0,0.5,1.0]);

julia> m = ExteriorMap(p);

julia> length(m)
4
source

Index