Featured Post

My co-author and I recently published the 3rd edition of our finite element book1 utilizing routines written with MAPLE. In this latest edition, we include a chapter on the meshless method. The meshless method is a unique numerical method for solving PDEs. The finite element method requires the establishment of a mesh associated with node points. Consideration must be given in establishing a good mesh (and minimizing the bandwidth associated with node numbering). The meshless method does not require a mesh to connect nodes. The following excerpt describes the application of the meshless method for a simple 1-D heat transfer simulation using six nodes.

Consider the 1-D expression for heat transfer in a bar defined by the relation2

     (1)

where the 1-D domain is bounded by 0 ≤ xL. The exact solution to this problem is

     (2)

with the exact derivative of the temperature given by

     (3)

 

In order to solve the 1-D problem, a multiquadric (MQ) radial basis function (RBF) is used 

     (4)

where  is the radial (Euclidean) distance from the expansion point  to any point , c is a shape parameter that controls the flatness of the RBF and is set by the user, and n is an integer. With n = 1, we retrieve the inverse multiquadric

     (5)

that will be used to solve Eq. (1). Other types of RBFs are available; the MQ is accurate and popular.

 

A global expansion for the 1-D temperature can be expressed as

     (6)

with the second derivative of the temperature given as

     (7)

Introducing the RBF expansion for the terms in the governing equation, and collocating at the interior points, we obtain

     (8)

At the boundaries, we collocate the RBF expansion to impose the boundary conditions

     (9)

Defining the operator

     (10)

we can now assemble into a fully populated matrix as,

     (11)

 

The solutions obtained using finite difference, finite volume, finite element, boundary element, and the meshless method are listed in Table 1 for 6 equally spaced nodes3 with To = 15 and TL = 25, and L = 1. The interior nodes do not have to be uniformly spaced.

Table 1. Comparison of errors for interior temperatures i = 2,3,…N-1

 

The Maple code listing follows:

> restart:
   with(LinearAlgebra):with(plots):

# MESHLESS METHOD SOLUTION USING MULTIQUADRIC RADIAL BASIS
FUNCTIONS (RBF) il:=6:To:=15:TL:=25:L:=1:
>   x:=[0,1/5,2/5,3/5,4/5,1]:
>   S:=1000:n:=1:dx:=1/(il-1):
>   C:=Array(1..il,1..il):phi:=Array(1..il,1..il):d2phi:=Array(1..il,1..il):
b:=Vector(1..il):TM:=Vector(1..il):alpha:=Vector(1..il):
for i from 1 to il do
   for j from 1 to il do
      phi[i,j]:=(1+(x[i]-x[j])^2/(S*dx^2))^(n-3/2):
      d2phi[i,j]:=3*((x[j]-x[i])/20)^2/(4*((x[j]-x[i])^2/40+1)^(5/2) )-1/(40*((x[j]-x[i])^2/40+1)^(3/2)):
   end do:
end do:
>   for i from 2 to il-1 do    
>       for j from 1 to il do
>         C[i,j]:=d2phi[i,j]+phi[i,j];
            b[i]:=-x[i];
>         C[1,j]:=phi[1,j];
           C[il,j]:=phi[il,j];
         end do:
      end do:
      b[1]:=To:b[il]:=TL:
> #ConditionNumber(C);
>   alpha:=LinearSolve(convert(C,Matrix),b):
TM[1]:=To:TM[6]:=TL:
for i from 2 to il-1 do
   for j from 1 to il do
>         TM[i]:=TM[i]+alpha[j]*(1+(x[i]-x[j])^2/(S*dx^2))^(n-3/2);
 >     end do:
>   end do:
     evalf(TM);

                     

> TE:=To*cos(xx)+(TL+L-To*cos(L))/sin(L)*sin(xx)-xx:
> TE:=subs(TE):
> TE:=plot(TE,xx=0..1,color=blue,legend="Exact",thickness=3):
> MEM:=[seq([subs(x[i]),subs(TM[i])],i=1..6)]:
> T:=plots[pointplot](MEM,style=line,color=red,legend="MEM", thickness=3): 
  MEM:=plots[pointplot](MEM,color=red,legend="MEM",symbol=box, symbolsize=15):

>  plots[display](TE,MEM,T,axes=BOXED,title="Solution - MEM");

              

 

Additional examples for two-dimensional domains are described in the text, along with a chapter on the boundary element method. The meshless method is an interesting numerical approach that belongs to the family of weighted residual techniques. The matrix condition number is on the order of 1010 and can give surprisingly good results – however, the solution can fluctuate when repeatedly executed, eventually returning to the nearly correct solution; this is not an issue when using local assembly instead of the global assemble performed here4. The method can be used to form hybrid schemes, e.g., a finite element method can easily be linked with a meshless method to solve a secondary system of equations for problems involving large domains. Results are not sensitive to the location of the nodes; a random placement of points gives qualitatively similar results as a uniform placement.

Featured Post

Many of you enjoyed our profile on one of our developers, Paulina Chin, so we’re happy to bring you another one!

Today, we’ll be talking with John May, Senior Developer of Maple. Let’s get started.

  1. What do you do at Maplesoft?
    Until recently I was consulting on-site at the NASA Jet Propulsion Laboratory helping people there more effectively solve their engineering problems using Maplesoft products.  But my main job that I am back to full time now is the development and maintenance of various parts of the Maple library.
     
  2. What did you study in school?
    I studied both Pure and Applied Mathematics at the University of Oregon,  focusing a lot on Abstract Algebra.  In graduate school, I specialized more in computation mathematics like computer algebra and numerical analysis.  My Ph.D. work focused on effective numerical algorithms for problems in polynomial algebra – with implementations in Maple!
     
  3. What area(s) of Maple are you currently focusing on in your development?
    Right now I am focused on addressing complaints I’ve gotten from engineers about the usability of units with other parts of the math library.
     
  4. What’s the coolest feature of Maple that you’ve had a hand in developing?
    A lot of the cool things I’ve built live pretty deep in the internals of Maple.  I’ve done a lot of meta-heuristic tuning to seamlessly integrate high-performance libraries into top-level Maple commands.

    I had a lot of fun developing a lot of the stuff for manipulation and visualization of colors in the ColorTools package.
     
  5. What do you like most about working at Maplesoft? How long have you worked here?
    I started working at Maple in 2007, but I’ve been a Maple user since 1997.  I love being part of the magic that brings powerful algorithmic mathematics to everyone.  The R&D team is also full of eccentric nerds who are great fun to work with.
     
  6. Favourite hobby?
    It varies by the season, but right now it is prime for mountain biking in southern California.  I ride my local trails a couple times a week, and when I get I chance, I love to get away on epic bikepacking adventures (like this one: https://www.bikemag.com/features/two-wheeled-escape-one-hour-from-l-a/  this is me: https://cdn.bikemag.com/uploads/2016/05/16File.jpg ).
     
  7. What do you like on your pizza?
    Anything and everything. Something different every time. My all-time favorite pie my from grad school days is the “Rio Rancho” from the dearly departed That’s Amore Pizza (which was next to the comic book store and across the street from North Carolina State University).  It was an olive oil and mozzarella pizza with chopped bacon that was covered in sliced fresh roma tomatoes and drizzled with ranch dressing when it came out of the oven. 
     
  8. What’s your favourite movie?
    It’s really hard to pick just one.  So, I’ll go with the safe answer and say the greatest movie of all time, and “Weird Al” Yankovic’s only foray into movies, UHF, is my favorite.
    http://www.imdb.com/title/tt0098546/
     
  9. What skill would you love to learn? (That you haven’t already) Why?
    Another hard one.  I feel like I’ve dabbled in lots of things that I would like to get better at.  At the top of the list is probably unicycling.  I’d love to get good enough to play Unicyle Football or do Muni (mountain unicyling).
    https://en.wikipedia.org/wiki/Mountain_unicycling
    http://www.unicyclefootball.com/
     
  10. Who’s your favourite mathematician?
    Batman. https://youtu.be/AcMEckOyoaM

 



ball rolling on a surface

Maple asked by AndrewG 130 December 10

Strange output for Vector

Maple 2017 asked by vv 3157 December 11

Problem in execute .mpl file

Maple asked by pyramid 5 December 11

OpenMaple encoder problem

Maple asked by hieudvm 5 Yesterday