Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Fast Radial Basis Functions for Engineering Applications
Fast Radial Basis Functions for Engineering Applications
Fast Radial Basis Functions for Engineering Applications
Ebook636 pages5 hours

Fast Radial Basis Functions for Engineering Applications

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This book presents the first “How To” guide to the use of radial basis functions (RBF). It provides a clear vision of their potential, an overview of ready-for-use computational tools and precise guidelines to implement new engineering applications of RBF.

Radial basis functions (RBF) are a mathematical tool mature enough for useful engineering applications. Their mathematical foundation is well established and the tool has proven to be effective in many fields, as the mathematical framework can be adapted in several ways. A candidate application can be faced considering the features of RBF: 

multidimensional space (including 2D and 3D), numerous radial functions available, global and compact support, interpolation/regression.

This great flexibility makes RBF attractive – and their great potential has only been partially discovered. This is because of the difficulty in taking a first step toward RBF as they are not commonly part of engineers’ cultural background, but also due to the numerical complexity of RBF problems that scales up very quickly with the number of RBF centers. Fast RBF algorithms are available to alleviate this and high-performance computing (HPC) can provide further aid. Nevertheless, a consolidated tradition in using RBF in engineering applications is still missing and the beginner can be confused by the literature, which in many cases is presented with language and symbolisms familiar to mathematicians but which can be cryptic for engineers.

The book is divided in two main sections. The first covers the foundations of RBF, the tools available for their quick implementation and guidelines for facing new challenges; the second part is a collection of practical RBF applications in engineering, covering several topics, including response surface interpolation in n-dimensional spaces, mapping of magnetic loads, mapping of pressure loads, up-scaling of flow fields, stress/strain analysis by experimental displacement fields, implicit surfaces, mesh to cad deformation, mesh morphing for crack propagation in 3D, ice and snow accretion using computational fluid dynamics (CFD) data, shape optimization for external aerodynamics, and use of adjoint data for surface sculpting. For each application, the complete path is clearly and consistently exposed using the systematic approach defined in the first section.

LanguageEnglish
PublisherSpringer
Release dateMar 29, 2018
ISBN9783319750118
Fast Radial Basis Functions for Engineering Applications

Related to Fast Radial Basis Functions for Engineering Applications

Related ebooks

Computers For You

View More

Related articles

Reviews for Fast Radial Basis Functions for Engineering Applications

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Fast Radial Basis Functions for Engineering Applications - Marco Evangelos Biancolini

    © Springer International Publishing AG, part of Springer Nature 2017

    Marco Evangelos BiancoliniFast Radial Basis Functions for Engineering Applicationshttps://doi.org/10.1007/978-3-319-75011-8_1

    1. Introduction

    Marco Evangelos Biancolini¹  

    (1)

    Department of Enterprise Engineering Mario Lucertini, University of Rome Tor Vergata, Rome, Italy

    Marco Evangelos Biancolini

    Email: biancolini@ing.uniroma2.it

    Abstract

    In this chapter the Fast Radial Basis Functions for Engineering Applications book is introduced. The basic Radial Basis Functions concepts and the needs to have fast implementations suitable for engineering applications are explained. The vision of the author toward the topic is presented together with an overview of the book contents described on a chapter by chapter basis.

    The topic covered in this book is explained in the title Fast Radial Basis Functions for Engineering Applications. The mathematical framework of the radial basis functions (RBF) is introduced aiming at its understanding rather than at the rigorous mathematical demonstration. The reader interested in a deeper knowledge of RBF background theory could consider the book written by Buhmann (2003).

    The concept Fast Radial Basis Functions can sound strange to the reader without an experience in advanced engineering and scientific computing. The Fast feature is a key point to enable the usage of RBF for large problems solution due to the poor performances that are observed when dealing with large dataset. Some concepts for the acceleration of RBF calculation are exposed in this book. The purpose is to guide the reader in such a complex world, in which performances are usually achieved sacrificing the great flexibility of RBF, providing information useful for the definition of a proper strategy for the Fast RBF implementation.

    A rich collection of Engineering Applications that can be faced using RBF is then provided showing how the Fast feature is a key enabler as it allows to boost calculations feasible using standard method and, in many cases, it also makes feasible a problem that is not doable at all with standard method.

    This book should not be intended as a review of all possible RBF applications in engineering, but rather as a source of inspiration for the identification of new applications that can be tackled using RBF and as a guide for their effective solution implementation. To this end, the applications described and demonstrated in this book are limited to those for which the author has a direct experience.

    RBF were introduced as interpolators of scattered data in sixties. The RBF equation is represented and explained in Fig. 1.1. Usually the interpolation comprises a sum of weighted radial interactions and a polynomial correction. RBF are commonly used to interpolate a scalar function defined in a multi-dimensional space ( $${\mathbb{R}}^{n} \to {\mathbb{R}}$$ ). Interactions of a generic probe point $$\varvec{x}$$ with all source points $$\varvec{x}_{\varvec{s}}$$ , also referred to as RBF centres in the book, are computed evaluating the inter-distance (radius $${\mathbb{R}}^{n} \to {\mathbb{R}}$$ ), transforming the distance into a radial interaction using the radial interaction function ( $${\mathbb{R}} \to {\mathbb{R}}$$ ) and multiplying the result by a scalar weight that can be seen as the intensity of the source point. All the interactions are summed up and, in some cases, a polynomial term is added.

    ../images/333252_1_En_1_Chapter/333252_1_En_1_Fig1_HTML.gif

    Fig. 1.1

    Overview of a generic RBF with polynomial correction

    The concept of radial interaction is explained in Fig. 1.2. Source points are arranged in the plane and the coefficients of the RBF are computed so that the function is zero at all the source points along the square edges and is ±1 valued at two internal points. The interaction of the point $$\varvec{x}$$ with all source points $$\varvec{x}_{\varvec{s}}$$ can be repeated many times varying the position of the point $$\varvec{x}$$ inside the square, and the resulting scalar value ( $${\mathbb{R}}^{2} \to {\mathbb{R}}$$ ) can be represented as an height in the 3d plot.

    ../images/333252_1_En_1_Chapter/333252_1_En_1_Fig2_HTML.gif

    Fig. 1.2

    RBF interactions: two-dimensional source points distribution (left) and three-dimensional plot constructed evaluating the RBF in an uniformly spaced grid defined inside the square (right)

    In Chap. 2 the RBF mathematical concepts are exposed considering firstly the interpolation problem with the RBF function defined by known values at source points; a first hands-on example is provided showing how RBF work. Further topics of RBF theory are then introduced considering the differentiation of RBF, the fitting of an RBF with known values at locations different from the source points, the use of regression instead of exact interpolation and finally the management of noisy datasets.

    Fast RBF foundation concepts are described in Chap. 3. Details are provided for an effective usage of the direct method using advanced linear algebra strategies and libraries. Methods for data compression which allow to represent the same information with a smaller and less expensive cloud are introduced. Space localization methods are successively considered firstly with compact supported RBF, whose interaction distance is limited in the RBF function itself, and then with partition of unity (POU) that consists of the superposition and blending of smaller clouds. Approximated evaluation of the far field of full supported RBF is described and an overview of the fast multipole method (FMM) is given. Information about iterative solvers and parallel computing are finally provided to complete the chapter.

    Chapter 4 provides an overview of calculation tools that are usually required for the implementation of RBF based engineering workflows. The aim here is to provide the reader with a strategy to evaluate whether an application can be faced using RBF and how the various tools can be combined to make it effective.

    The Engineering Applications Section begins with Chap. 5 where the implicit surface method is explained and demonstrated. The classical method that consists of the definition of a scalar valued function in the 3D space that is null at on-surface points and positive (negative) at off-surface points that are positioned outside (inside) the surface is firstly introduced. The projection onto the surface is achieved by computing the gradient of the implicit function. The second one is a novel method that consists of the creation of a projection field (vector valued RBF) defined on the surface and at off-surface points that is zero at on-surface points whereas it is equal to the vector moving to the surface at off-surface points. The effectiveness of both methods is demonstrated with practical examples.

    Chapter 6 provides an introduction to the use of RBF for basic mesh morphing. A vector valued RBF, 2D or 3D, is used to propagate in the morphing domain the information known at a cloud of control points. As the method is meshless, the field can be defined at nodal positions of the mesh to be deformed or at other locations (on or off-surface). Usually the cloud that defines the source of morphing includes a set of points whose field is generated using simple rules for the generation of the displacements (rigid movement, rigid rotations, scaling). Auxiliary geometry can be adopted to generate more complex fields (constant offset vs. a surface, surface targets).

    Examples of advanced mesh morphing for biomechanical applications are collected in Chap. 7 where the benefits of meshless deformation is demonstrated for situation in which an underlying CAD geometry is not available. Virtual surgery using CFD simulation of the hemodynamics is faced showing how a morphing interaction can provide the insight in the estimation of the evolution of a pathology or to plan the insertion of a cannula in a virtual environment where patient shapes and medical devices shapes coexist and can interact. The use of mesh morphing for the remodelling is then demonstrated on a femur and a tibia bones. FEA method is adopted for the structural assessment and mesh morphing can be used as a tool to transform a baseline (library) geometry onto the patient one. The approach is useful not just as a simplified mesh generation tool (adapting is faster than remeshing), but rather because it allows to enable the direct comparison between models preserving the one-to-one nodes correspondence.

    Optimizations based on adjoint sensitivity data are presented in Chap. 8. In this case RBF are adopted to set up an advanced filtering tool suitable for removing the noise usually observed when shape sensitivities data are computed using CFD so as to enable the adjoint sculpting method where surfaces are updated according to the information provided by the flow solution to get the desired performances (as drag reduction or pressure loss control). Also in this case advanced mesh morphing is used to propagate, once properly filtered if needed, the shape data known at surfaces into the full volume mesh required for the calculation. The concept is demonstrated for FEM as well (in this case noise is not generated by the adjoint solution) showing how a bracket and a T-beam can be reshaped to control a target displacement. The adjoint preview approach, which consists of the computation of derivatives with respect of shape variations known in advance (as the ones described in Chap. 6) is also detailed. A collection of fluid shape optimizations, taking into account both internal and external flows, is provided at the end of the Chapter.

    Evolutionary mesh morphing workflow are covered in Chap. 9. There are many situations where the local shape evolution is computed by the physics itself and unknown in advance. Ice and snow accretion examples are provided: mesh morphing is adopted to reshape wetted surface to account of the ice/snow thickness produced during the evolution and predicted by the multi-physics CFD model. A similar approach is then presented for mechanical applications where the evolution of an elliptical crack into a three-dimensional body is studied: the local crack speed computed using fracture mechanics can be easily converted in a local crack advance along the front. The Biological Growth Method (BGM) is finally demonstrated showing how mesh morphing can be used to support the reshape of structures miming the behaviour observed in nature: the local surface growth of trees trunk is promoted by the level of local stress so that the shape evolves toward reduced peak stress configurations.

    Advanced workflow for Fluid Structure Interaction (FSI) modelling using CAE tools suitable for the simulation of fluids (CFD) and structures (CSM) are demonstrated in  Chap. 10. In this context, RBF are adopted to interface the structure and the fluid. In the two-way approach loads computed using CFD (pressures and shear forces) are transferred to the structure using RBF interpolation for the mapping at surfaces (the mapping topic is further deepened in Chap. 13). Deformation computed using the CSM are then transferred to the CFD mesh using mesh morphing. The latter approach can be used to transfer on the CFD mesh modal shapes computed using eigenvalues extraction by FE analysis. The effectiveness of the two possible FSI approaches is demonstrated on practical applications considering aeronautical and motorsport fields. The reported FSI implementation can be used to tackle both steady and transient problems. The chapter is concluded showing how the method can handle vortex shedding excited oscillations and the vibration induced by the separation of a store from the wing of an aircraft.

    In Chap. 11 a collection of RBF applications for the interpolation in multi-dimensional spaces is reported. RBF are in this case used as interpolator for the definition of a surrogate model in the parametric design space according to the optimization method based on the response surface that is suitable for objective functions that have an high evaluation cost. Design space is first sampled according to the design of experiment (DOE) approach. In the proposed application design points (DPs), which are typically computed or measured, identify the performance evaluated using CFD. The system response is eventually evaluated on the RBF interpolated model. The method is demonstrated with two aeronautical applications: the optimization of a NACA0012 aerofoil using 2D CFD and the optimization of a glider using 3D CFD. The chapter is concluded with a study of parametric sails that produces a surrogate model suitable to be coupled with velocity prediction programs (VPP) useful for mission performance prediction.

    A collection of advanced post-processing methods based on RBF fields is supplied in Chap. 12. The idea is that field information known at discrete points in a continuum domain (displacement field of an elastic body subjected to load and deformed, local speed and pressure in a fluid) can be interpolated so that scattered information becomes continuous and, in some cases, differentiable. Examples based on the theory of elasticity are firstly provided: the post-processing of FEA solution available as a displacement field can be used to compute strains and stress with the benefit to make them mesh independent (and so ready to be used for the generation of various plot) and better resolved in the space despite the coarseness of the field. Experimental data can be processed according to the same principle so that RBF become an useful tool for strain and stress evaluation by image processing. The chapter then addresses another useful application of RBF mapping suitable for the compensation of metrological data: a complex environment that loads the structure and can adversely affect the quality of the measurement can be subtracted by the inverse mapping of the displacement field achieved by FEA so that measured points can be corrected and positioned in their undeformed configuration for an effective comparison with reference CAD geometry. The chapter is concluded showing how RBF can be used for the interpolation of experimentally acquired flow information related to hemodynamics and showing the potential of an upscaling post processing toward the reduction of the resolution of in vivo acquired flow field (and so the exposition time of the patient).

    Chapter 13 details a generic mapping algorithm based on RBF. Mapping allows to interpolate information known at discrete locations across not-matching numerical grids of the same geometrical entities. After an overview of mapping procedures, examples of CFD computed pressure field mapping onto structural mesh adopted for FEA based CSM (see Chap. 11) is demonstrated starting with a simple reference geometry (a catenoid) and then with actual complex three-dimensional shapes of aircraft wings. The volume mapping is then addressed with a specific focus of the mapping of electro magnetic (EM) loads onto structural meshes. Examples in which magnetic loads are already available as force density or as magnetic field and density current (so that load density is computed on the FEA as a Lorentz Force). Practical examples involving the toroidal field (TF) Coil of DEMO superconductor magnet are shown with details of the stress response of the structure subjected to the EM loads.

    Since many commercial software are cited in the text, the author wants to clarify that Mathcad® is a registered trademark of PTC Inc., MATLAB® is a registered trademark of MathWorks Inc., ANSYS® ACT™, ANSYS® DesignXplorer™, ANSYS® Fluent™, ANSYS® ICEM CFD™, ANSYS® Mechanical™ are ANSYS, Inc. and its subsidiaries’ registered and unregistered trademarks in the U.S. and other countries, Abaqus® is a registered trademark of Abaqus, Inc. in the United States and other countries, Patran® is a registered trademark of MSC.Software Corporation, FEMAP® is a trademark of SIEMENS Product Lifecycle Management Software Inc., RBF Morph™ is a registered trademark of RBF Morph company, OPENFOAM® is a registered trademark of OpenCFD Ltd (ESI Group) and CFD++ is a registered trademark of Metacomp Technologies, Inc., TOSCA solver is the name of a legacy version of the Opera-3d Static Electromagnetics Module of OPERA Simulation software by Cobham plc.

    Reference

    Buhmann MD (2003) Radial basis functions: theory and implementation. Cambridge University Press, New York

    Part IFast RBF for Engineering Applications

    © Springer International Publishing AG, part of Springer Nature 2017

    Marco Evangelos BiancoliniFast Radial Basis Functions for Engineering Applicationshttps://doi.org/10.1007/978-3-319-75011-8_2

    2. Radial Basis Functions

    Marco Evangelos Biancolini¹  

    (1)

    Department of Enterprise Engineering Mario Lucertini, University of Rome Tor Vergata, Rome, Italy

    Marco Evangelos Biancolini

    Email: biancolini@ing.uniroma2.it

    Abstract

    In this chapter the RBF mathematical concepts are exposed considering firstly the interpolation problem with the RBF function defined by known values at source points; a first hands-on example is provided showing how RBF work. Further topics of RBF theory are then introduced considering the differentiation of RBF, the fitting of an RBF with known values at locations different from the source points, the use of regression instead of exact interpolation and finally the management of noisy datasets. The chapter contents will not provide the details of mathematical theory but they will be mainly focused on the relevant results suitable for a wise and aware practical application of RBF.

    2.1 RBF Theory Background

    Radial basis were born as an interpolation method for scattered data (Hardy 1971, 1990) and consist of a very powerful tool because they are able to interpolate everywhere in the space a scalar function defined at discrete points giving the exact values at original points. The behaviour of the function between points depends on the kind of the adopted radial function. The RBF, here introduced as an interpolation method that recovers exactly scalar fields known at original points, can be extended to include the case in which the scalar information is known at locations not coincident with the source points of the RBF (see Sect. 2.5) and the case of regression (Sect. 2.6) in which the information known at many locations is approximated by a smaller set of source points.

    The radial function can be fully or compactly supported. In some situations a polynomial corrector is added to guarantee solvability and uniqueness of the fit. As it will be shown in detail, a linear system of order equal to the number of the introduced source points, needs to be solved for sought coefficients calculation. Once the unknown coefficients are determined, the scalar function at an arbitrary location inside or outside the domain (interpolation/extrapolation) results to be expressed by the summation of the radial contribution of each source point (RBF centre) and of a polynomial term (if any).

    The interpolation function, composed by the radial basis and the polynomial, is defined as follows:

    $$s\left( \varvec{x} \right) = \mathop \sum \limits_{i = 1}^{N} \gamma_{i} \varphi \left( {\left\| {\varvec{x} - \varvec{x}_{{\varvec{s}_{i} }} } \right\|} \right) + h\left( \varvec{x} \right)$$

    (2.1)

    The $$s( \cdot )$$ scalar function is defined for an arbitrary sized variable $$\varvec{x}$$ and represents a transformation $${\mathbb{R}}^{n} \to {\mathbb{R}}$$ . At a given point $$\varvec{x}$$ the value of the RBF is obtained accumulating the interactions with all source points $$\varvec{x}_{\varvec{s}}$$ gained computing the radial distance between $$\varvec{x}$$ and each $$\varvec{x}_{{\varvec{s}_{i} }}$$ processed by the radial function $$\varphi ( \cdot )$$ , consisting of a transformation $${\mathbb{R}} \to {\mathbb{R}}$$ , which is then multiplied by the weight $$\gamma_{i}$$ . The polynomial term is then added. The degree of the polynomial has to be chosen depending on the kind of the adopted radial function. The radial basis fit exists if the weights $$\gamma$$ and the coefficients of the polynomial can be found such that the desired function values $$g_{s}$$ are obtained at source points:

    $$s\left( {\varvec{x}_{{\varvec{s}_{i} }} } \right) = g_{{s_{i} }} , \quad 1 \le i \le N$$

    (2.2)

    The number of equations is not enough as the number of unknowns is equal to the number of weights (N) plus the number of coefficients of the polynomial. The system is completed if the orthogonality conditions:

    $$\mathop \sum \limits_{i = 1}^{N} \gamma_{i} p\left( {\varvec{x}_{{\varvec{s}_{i} }} } \right) = 0$$

    (2.3)

    are verified for all polynomials p with a degree less or equal than that of polynomial h. The minimal degree of polynomial h depends on the choice of the basis function. A good reference in which a table of polynomial augmentations is collected is reported in Boyd and Gildersleeve (2011). An unique interpolant exists if the basis function is a conditionally positive definite function. If the basis functions are conditionally positive definite of order m ≤ 2, a linear polynomial can be used. The subsequent exposition will assume valid the aforementioned hypothesis. A consequence of using a linear polynomial is that rigid body translations are exactly recovered. In a 3D space the linear polynomial has the form:

    $$h\left( \varvec{x} \right) = \beta_{1} + \beta_{2} x + \beta_{3} y + \beta_{4} z$$

    (2.4)

    and the orthogonality conditions (2.3) can be expressed as:

    $$\mathop \sum \limits_{i = 1}^{N} \gamma_{i} = \mathop \sum \limits_{i = 1}^{N} \gamma_{i} x_{{s_{i} }} = \mathop \sum \limits_{i = 1}^{N} \gamma_{i} y_{{s_{i} }} = \mathop \sum \limits_{i = 1}^{N} \gamma_{i} z_{{s_{i} }} = 0$$

    (2.5)

    The values for the weights of RBF vector $$\varvec{\gamma}$$ and the coefficients vector $$\varvec{\beta}$$ of the linear polynomial can be obtained by solving the system obtained imposing the conditions (2.2) and (2.5) that can be compactly expressed as:

    $$\left( {\begin{array}{*{20}c} \varvec{M} & {\varvec{P}_{\varvec{s}} } \\ {\varvec{P}_{\varvec{s}}^{\varvec{T}} } & 0 \\ \end{array} } \right)\left( {\begin{array}{*{20}c}\varvec{\gamma}\\\varvec{\beta}\\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\varvec{g}_{\varvec{s}} } \\ 0 \\ \end{array} } \right)$$

    (2.6)

    where $$\varvec{g}_{\varvec{s}}$$ contains the known values at the source points. $$\varvec{M}$$ is the interpolation matrix defined calculating all the radial interactions between source points:

    $$M_{ij} = \varphi \left( {\left\| {\varvec{x}_{{\varvec{s}_{i} }} - \varvec{x}_{{{\text{s}}_{j} }} } \right\|} \right), \quad 1 \le i \le N,1 \le j \le N$$

    (2.7)

    and $$\varvec{P}_{\varvec{s}}$$ is a constraint matrix that arises balancing the polynomial contribution and contains a column of 1 and the $$\left( {x,y,z} \right)$$ positions of source points in the others three columns:

    $$\varvec{P}_{\varvec{s}} = \left( {\begin{array}{*{20}c} 1 & {x_{{s_{1} }} } & {y_{{s_{1} }} } & {z_{{s_{1} }} } \\ 1 & {x_{{s_{2} }} } & {y_{{s_{2} }} } & {z_{{s_{2} }} } \\ \vdots & \vdots & \vdots & \vdots \\ 1 & {x_{{s_{N} }} } & {y_{{s_{N} }} } & {z_{{s_{N} }} } \\ \end{array} } \right)$$

    (2.8)

    Radial basis interpolation works for scalar fields, but the fit can be repeated many times using the same interpolation and constraint matrixes. In this case, the $$\varvec{g}$$ vector is replaced by a rectangular matrix and solved on a column wise fashion computing the coefficients $$\varvec{\gamma}$$ and $$\varvec{\beta}$$ related to each column (see Sect. 2.3 for further details).

    If a deformation vector field has to be fitted in 3D (space morphing), each component of the displacement prescribed at the source points is interpolated as follows:

    $$\left\{ {\begin{array}{*{20}c} {s_{x} \left( \varvec{x} \right) = \mathop \sum \limits_{i = 1}^{N} \gamma_{i}^{x} \varphi \left( {\left\| {\varvec{x} - \varvec{x}_{{\varvec{s}_{i} }} } \right\|} \right) + \beta_{1}^{x} + \beta_{2}^{x} x + \beta_{3}^{x} y + \beta_{4}^{x} z } \\ {s_{y} \left( \varvec{x} \right) = \mathop \sum \limits_{i = 1}^{N} \gamma_{i}^{y} \varphi \left( {\left\| {\varvec{x} - \varvec{x}_{{\varvec{s}_{i} }} } \right\|} \right) + \beta_{1}^{y} + \beta_{2}^{y} x + \beta_{3}^{y} y + \beta_{4}^{y} z } \\ {s_{z} \left( \varvec{x} \right) = \mathop \sum \limits_{i = 1}^{N} \gamma_{i}^{z} \varphi \left( {\left\| {\varvec{x} - \varvec{x}_{{\varvec{s}_{i} }} } \right\|} \right) + \beta_{1}^{z} + \beta_{2}^{z} x + \beta_{3}^{z} y + \beta_{4}^{z} z } \\ \end{array} } \right.$$

    (2.9)

    If the evaluation is required at given set of evaluation points $$\varvec{x}_{\varvec{e}}$$ , a direct mapping matrix able to directly provide the interpolated scalar quantities at evaluation points as a linear transformation of $$\varvec{g}_{\varvec{s}}$$ at source points can be constructed. The interpolation matrix, which relates evaluation points $$\varvec{x}_{\varvec{e}}$$ and source points $$\varvec{x}_{\varvec{s}}$$ , is first defined:

    $$A_{ij} = \varphi \left( {\varvec{x}_{{\varvec{e}_{i} }} - \varvec{x}_{{{\text{s}}_{j} }} } \right), \quad 1 \le i \le N_{e} ,1 \le j \le N_{s}$$

    (2.10)

    In the case of pure RBF, namely without the polynomial term, the scalar at evaluation points $$\varvec{g}_{\varvec{e}}$$ can be written as a linear function of the scalar at source points $$\varvec{g}_{\varvec{s}}$$ :

    $$\varvec{g}_{\varvec{e}} = \varvec{AM}^{ - 1} \varvec{g}_{\varvec{s}} = \varvec{Hg}_{\varvec{s}}$$

    (2.11)

    It is worth to notice that the $$\varvec{H}$$ matrix can be precomputed in advance and allows to give a direct transformation from the source points to the evaluation points. Nevertheless, this approach is not commonly used in engineering applications because of the high cost required for the computation and the storage of the inverse matrix.

    2.2 Radial Functions

    The RBF fit guarantees the passage of the interpolated function through all the points of the original dataset with the prescribed value. The behaviour of the function between points (interpolation) or outside the dataset (extrapolation) depends on the radial function used.

    The complexity of the fit is strongly related to the radial function. Many options are available and some of them are summarized in Table 2.1. We can roughly classify the radial functions in two families: the global supported ones and the compact supported ones.

    Table 2.1

    Radial basis functions with global and compact support

    When the global support is used, all the points of the cloud interact themselves. High accuracy is achieved using global support but the numerical problem becomes very challenging because a dense fully populated matrix has to be solved in the fit stage. Fast methods can be used to accelerate both the fit process and the evaluation of global supported RBF but only for specific cases (see Sect. 3.​6 for further details).

    Compact supported RBF are used when long distance interaction is not desired. The interaction radius can be defined. The Wendland functions (Wendland 1995) with different continuity class are collected in the Table 2.1. The function is active only inside the sphere, identified by the interaction radius, whilst it is zero outside. It is worth to notice that the compact support affects not only the fitting and interpolation behaviour, but it can also simplify the fitting process as the matrix of the system becomes sparse and, as explained in Sect. 3.​4,  can be managed with numerical algorithms specifically conceived for this class of problems.

    2.3 A First Example of RBF at Work

    In this section a first simple example in which RBF theory is put at work using Mathcad¹ is described. Detailed tools suitable for facing this problem are provided in Sect. 4.​1. In this example the RBF fit is demonstrated for a 2D topometric sculpting application. Flat surfaces are reshaped in curved ones adding a third coordinate (altitude) that is controlled using RBF centres both on the boundary of the flat domain and inside it.

    2.3.1 Definition of the Source Points

    The first shape examined is a rectangle of sides $$a$$ and $$b$$ . The points spacing along the boundary is controlled by the variable $$n_{edge}$$ constraining at zero the altitude at such points, while a single point located at the centre of the rectangle is used to control the altitude. Mathcad constants² are used for the definition of the sides:

    $$\begin{aligned} & {\text{a}}: = 1. 0\\ & {\text{b}}: = 1. 0\\ \end{aligned}$$

    (2.12)

    The points on the boundary are generated using the following piece of code³:

    ../images/333252_1_En_2_Chapter/333252_1_En_2_Equ13_HTML.gif

    (2.13 )

    The spacing $$n_{edge}$$ is first assigned as a local variable of the programming block and set to 5; the increments $$dx$$ and $$dy$$ in $$x$$ and $$y$$ directions are computed (notice that all global variable defined outside the programming block are available inside); the for block is then used with the range variable i looping from 1 to $$n_{edge}$$ .⁴ The subscripts with a proper numbering offset are used to generate simultaneously the points of the vector P on the four edges starting from the second point of the lower horizontal edge, the first point of the upper horizontal edge, the second point of the left vertical edge and the first point of the right vertical edge.⁵ It is worth to notice that this algorithm does not generate duplicates at corners. According to Mathcad syntax, the last entry of the programming block is passed as final result. In this case the internal vector $$P$$ is assigned to $$P_{square}$$ . In this example the vector nesting is used: the vector $$P_{square}$$ is a single column of length 20 (the number of points) in which each entry is a 2D vector containing the position $$\left( {x,y} \right)$$ of the points. The array of the internal control points (one point in this first example) is directly assigned on a point-wise basis:

    $${\text{P}}_{\text{control}} : = \left[ {\left( {\begin{array}{*{20}c} {\frac{\text{a}}{2}} \\ {\frac{\text{b}}{2}} \\ \end{array} } \right)} \right]$$

    (2.14)

    Generated data can be displayed on Cartesian plot using the following range variables:

    $$\begin{array}{*{20}l} {{\text{iplot1}}: = 1{\mkern 1mu} ..{\mkern 1mu} {\text{rows}}\left( {{\text{P}}_{{{\text{square}}}} } \right)} \hfill \\ {{\text{iplot2}}: = 1{\mkern 1mu} ..{\mkern 1mu} {\text{rows}}\left( {{\text{P}}_{{{\text{control}}}} } \right)} \hfill \\ {{\text{rows}}\left( {{\text{P}}_{{{\text{square}}}} } \right) = 20} \hfill \\ {{\text{rows}}\left( {{\text{P}}_{{{\text{control}}}} } \right) = 1} \hfill \\ \end{array}$$

    (2.15)

    The range variables iplot1 and iplot2 range from the first index to the last one of the two arrays of points; the special function rows(·) returns the number of the rows of a matrix. The plot is shown in Fig. 2.1 and exploits the ability of Mathcad of showing multiple data on the same Cartesian graph. Notice that plotted points are visited according to range variables iplot1 and iplot2 used as array subscripts; components x and y are extracted using nested information subscripts 1 and 2.

    ../images/333252_1_En_2_Chapter/333252_1_En_2_Fig1_HTML.gif

    Fig. 2.1

    Cartesian plot showing the points arrangement. Points on the boundary are plotted as red squares, internal control points are plotted as blue circles

    The RBF problem can be posed defining the target values at source points that, in this case, are zero at the boundary and different from zero (0.5 in this example) at the control point:

    ../images/333252_1_En_2_Chapter/333252_1_En_2_Equ16_HTML.gif

    (2.16 )

    The function stack(·) gives as output a matrix obtained stacking by rows the input matrixes which must contain the same number of columns.

    2.3.2 Fitting the RBF

    The radial function is first defined and, to this end, the bi-harmonic spline in 2D, identified by the relationship

    $$\varphi \left( r \right) = r^{2} { \log }\left( r \right)$$

    is used. The interpolation matrix, defined according to Eq. (2.7), is computed as:

    $$\begin{aligned} & {\text{M}}: = {\text{for}}\quad {\text{i}} \in 1\,..\,{\text{rows}}\left( {{\text{x}}_{\text{s}} } \right) \\ & \quad \quad \,{\text{for}}\quad {\text{j}} \in 1\,..\,{\text{rows}}\left( {{\text{x}}_{\text{s}} } \right) \\ & \quad \quad \quad {\text{M}}_{\text{i,j}} \leftarrow\upphi\left( {\left| {{\text{x}}_{{{\text{s}}_{\text{i}} }} - {\text{x}}_{{{\text{s}}_{\text{j}} }} } \right|} \right) \\ \end{aligned}$$

    (2.17)

    where the $$\left| . \right|$$ operator is used for the computation of the modulus of a vector. Considering that, data are stored as points, the subtraction operation between two points gives as a result the vector connecting the two points and, so, the radial distance is retrieved and processed by the radial function. On the other hand, the constraint matrix, defined according to Eq. (2.8), is computed as:

    ../images/333252_1_En_2_Chapter/333252_1_En_2_Equ18_HTML.gif

    (2.18 )

    Notice that the size of the space (2 in this example) is retrieved measuring the size of the first point. An auxiliary function to define an arbitrary sized matrix with zero is first defined as:

    ../images/333252_1_En_2_Chapter/333252_1_En_2_Equ19_HTML.gif

    (2.19)

    The matrixes are finally assembled to form and solve the system of Eq. (2.6):

    $$\begin{aligned} {\text{MP}}: = \;& {\text{augment}}\left( {{\text{stack}}\left( {{\text{M}},{\text{P}}^{\text{T}} } \right),{\text{stack}}\left( {{\text{P}},{\text{zero}}\_{\text{mat}}\left( {{\text{rows}}\left( {{\text{x}}_{{{\text{s}}_{1} }} } \right) + 1,{\text{rows}}\left( {{\text{x}}_{{{\text{s}}_{1} }} } \right) + 1} \right)} \right)} \right) \\ {\text{g0}}: =\; & {\text{stack}}\left( {{\text{g}}_{\text{s}} ,{\text{zero}}\_{\text{mat}}\left( {{\text{rows}}\left( {{\text{x}}_{{{\text{s}}_{1} }} } \right) + 1,{\text{cols}}\left( {{\text{g}}_{\text{k}} } \right)} \right)} \right) \\\upgamma \upbeta : = \;& {\text{lsolve}}\left( {{\text{MP}},{\text{g0}}} \right) \\\upgamma: =\; & {\text{submatrix}}\left( {\upgamma \upbeta , 1,{\text{rows}}\left( {{\text{x}}_{\text{s}} } \right),1,1} \right) \\\upbeta: =\; & {\text{submatrix}}\left( {\upgamma \upbeta ,{\text{rows}}\left( {{\text{x}}_{\text{s}} } \right) + 1,{\text{rows}}\left( {\upgamma \upbeta } \right),1,1} \right) \\ \end{aligned}$$

    (2.20)

    The function augment(·) gives as output a matrix obtained pairing by columns the input matrixes (that must contain the same number of rows). The function lsolve(·) solves a linear system using the direct method; as referred in the Mathcad Guide this function is based on the BLAS/LAPACK libraries provided by Intel. The function submatrix(·) gives as output a sub-matrix and it is here used to split the coefficients γ of the RBF and the weights β of the polynomial.

    2.3.3 Evaluating the RBF

    Once the fitted coefficients are computed, the RBF can be evaluated as a point function using the Eq. (2.1) whose calculation is assigned in the worksheet as:

    $${\text{s}}_{\text{Z}} ({\text{x)}}: = \sum\limits_{\text{i = 1}}^{{{\text{rows(x}}_{\text{s}} )}} {\left( {\upgamma_{\text{i}} \cdot\upphi\left( {\left| {{\text{x}} - {\text{x}}_{{{\text{s}}_{\text{i}} }} } \right|} \right)} \right)} +\upbeta \cdot {\text{stack(1}},{\text{x)}}$$

    (2.21)

    It is worth to notice that this expression works for an arbitrary dimension of the space (2D in this example) because the module operator is dimension independent and the dot product spans the weights β of the polynomial on all the components (the 1 is stacked to the x vector to account for the constant term contained in the first row of β).

    The correctness of the interpolation can be checked by computing the RBF at some of the input points:

    $$\begin{aligned} {\text{s}}_{\text{Z}} \left( {{\text{x}}_{{{\text{s}}_{1} }} } \right) & = 0\\ {\text{s}}_{\text{Z}} \left( {{\text{x}}_{{{\text{s}}_{2} }} } \right) & = 0\\ {\text{s}}_{\text{Z}} \left( {{\text{x}}_{{{\text{s}}_{21} }} } \right) & = 0. 5\\ \end{aligned}$$

    (2.22)

    2.3.4 Exploring the Interpolated Function

    The RBF interpolation can be explored in other locations using plotting. For instance, a range variable can be used to move the coordinate along horizontal segments at different constant values of

    Enjoying the preview?
    Page 1 of 1