mm-969 Subject: Re: [Q] Shape functions for conforming plate bending element > We are developing a Þnite element code for plate bending elements. The > nodal degrees of freedom are u, v, w, dw/dx, dw/dy and d2w/dx*dy. > The interpolation functions are Hermite functions which impose that w, > dw/dx, dw/dy or d2w/dx*dy should be one in one particular node, and that > all other degrees of freedom should be zero. The formulation of the > stiffness matrix is based on the traditional variational principles. > This works Þne for rectangular plate elements, but once the initial > element geometry is distorted (for example to a trapezium), the results > are rather inaccurate. There is about 1 % error on the displacements, > but the error on the bending moments is much larger (10 % to 50 %). > I do not Þnd any documentation on how this problem is solved in > commercial codes, because these distorted meshes yield good results in > Abaqus. > Does anybody have any suggestions ? > Wim Van Paepegem > E-mail : Wim.VanPaepegem@UGent.be The 16-DOF Hermitian plate element, along with three other variants, was derived and tested long ago by Bogner, Fox and Schmit. Reference: F. K. Bogner, R. L. Fox and L. A. Schmit Jr. (1966). The generation of interelement compatible stiffness and mass matrices by the use of interpolation formulas, {it Proc. Conf. on Matrix Methods in Structural Mechanics}, WPAFB, Ohio, 1965, in {it AFFDL TR 66-80}, pp. 397--444. This was the Þrst all-FEM-oriented Conference. The Proceedings may be purchased as used book through internet search engines like http://www3.addall.com The 16-DOF BFS element is very accurate for rectangular geometries. If extended to nonrectangular shapes (there are several ways to do that), it fails the patch test and thus becomes useless. That explains why this model (and variants) vanished from the FEM scene. === Subject: Re: Errors incurred in one variable space when solving a diffusion equation in another? I assume you mean the simple Taylor¹s theorem which is the basis of many numerical schemes. In my prior attempts to understand this problem I looked at the error terms in the variable space I was solving the problem in and used the variable transforms to try and understand how they affected the solution in the other variable space. This gives me some idea, but no real feel for what is going on. One person who had this problem described it to me as an anomalous diffusion in the other variable space. I tried to see if I could show that this is indeed a good description of what the numerical errors are doing, but could not derive anything that looked like a diffusion term. This would be very convenient, then I could compare the diffusion coefÞcient that I derived to real diffusion coefÞcients in that space. Can this be understood as a diffusion in the other space? Is there a different way to understand it? Maybe it could be viewed in a different way. I hope that I have done a better job of explaining what I am looking for. I am far from an expert in this Þeld and while I will continue looking in other directions to Þnd my answer, I thought I would see if the experts had a quick reference for me. Shawn > > I am numerically solving a diffusion equation in one variable >space, but I am concerned about how the errors in that variable space >will affect a different space where the answers are more physically >meaningful to many people. To illustrate my concern, if I were to do >a calculation in a two dimensional space (say {u,v}) for a system that >was only one dimensional in the variables {x,y} (say the system only >depended on x in this variable space). How would errors in the {u,v} >space show up in {x,y} space if the variables transformed as x=x(u,v), >y=y(u,v) instead of something like x=x(u), y=y(v)? The errors in >{u,v} space would likely show up as some kind of anomalous diffusion >in the y direction in {x,y} space an there would probably be anomalous >cross-diffusion as well, but how do I estimate that? I would think >this has been looked at before, so I am hoping someone can point me to >a text that discusses this? > >Shawn > ?????? you have > x=x(u,v), y=y(u,v) > and solved a problem in terms of u,v with some errors > what are the erros induced in x ,y > is this your question??? > -> look up Taylors theorem > hth > peter === Subject: Re: Help with golf shaft þex equation Hugh > Answered in part below: >> >> Frequency is measured in numbers from 2.0 to 8.0. 5.0 being regular >> stiffness. 6.0 is stiff, 7.0 is extra stiff (Tiger Woods swings at >> 7.0). >> >> Is there a precise deÞnition of this number (e.g. the amount of load >> required to produce a given deþection of the head)? If not, then >> there¹s no way to Þnd an analytic equation for it. > Yes there is. In fact up until about 20 years ago they used to use a > board where you hung a weight on the clubhead. By how much it þexed is > how you could tell how stiff it was. > In that case, you could get a scientiÞc formula out of that information > if you wanted to go through the effort. If the shape of a golf club shaft > is deÞned entirely by its length, you can solve the beam bending > differential equations to get formulas for the lowest vibrational > frequency as a function of length and the deþection as a function of > length and weight, and then solve for one in terms of the other. If the > shaft is simple enough (e.g. a cylinder with the same diameter everywhere) > then someone will have already done the calculus for you and you can use > their algebraic formulas, like the vibration formula in the other reply > you got. >> But people keep stealing our graphs. Is there any way to determine a >> formula instead of relying on a graph? >> >> You can always turn the graph into an approximate formula. Scan it, >> then measure enough points and Þnd a curve (piecewise smooth cubic >> will be easy if the graph is smooth enough) that Þts it to whatever >> tolerance you need. > Yeah, that¹s what I¹m looking for, a formula. The line is just that, a > line. Cycles is on the left side of the graph and length is on the > bottom. The graph is a line, or actually, many lines all parallel to > each other representing 2.0, 3.0 ,4.0, 5.0 etc.... > The lines are all parallel, and all straight? That¹ll Þt with a single > linear function, then. Try picking three points on the graph (low > stiffness + short length, low stiffness + long length, and high stiffness > + short length), and plug in the coordinates for each of those points into > the equation cycles = A*length + B*stiffness + C. Three equations and > three unknowns, so you can solve for A, B, and C. Then try plugging in a > fourth point (high stiffness + long length) and see how close the equation > comes to the graph. If it Þts, you¹re done. If not, then (presuming you > did the arithmetic right) the lines either weren¹t as straight or weren¹t > as parallel as you thought, and things get a little more complicated. > --- > Roy Stogner === Subject: Eigenvalues of a Non-Symmetric Real Tridiagonal Matrix Hi! I¹m looking for an efÞcient algorithm to compute (selected) eigenvalues and (if desired) the corresponding eigenvectors of a non-symmetric real tridiagonal matrix. Is there such a routine? I¹ve been searching netlib.org without success, actually, all algorithms that I found treat tridiagonal matrix as symmetric (why?). In this case, how can I transform to a symmetric matrix? Under what conditions this transformation can be done? Any help is welcome, yours sincerely, Bernhard. === Subject: Re: Eigenvalues of a Non-Symmetric Real Tridiagonal Matrix > Hi! > I¹m looking for an efÞcient algorithm to compute (selected) > eigenvalues and (if desired) the corresponding eigenvectors of a > non-symmetric real tridiagonal matrix. Is there such a routine? I¹ve > been searching netlib.org without success, actually, all algorithms > that I found treat tridiagonal matrix as symmetric (why?). In this > case, how can I transform to a symmetric matrix? Under what conditions > this transformation can be done? Any help is welcome, If the product of the off-diagonal element is positive you can Þnd a diagonal similarity transformation to symmetric form. If not, you can use the LR algorithm with shifts, but it may be numerically unstable; that¹s why it is not in general use. See A. Dax and S. Kaniel, The ELR method for computing the eigenvalues of a general matrix, Arnold Neumaier === Subject: What keywords that I should search for references for this kind of problems - vector comparison? Set partitions? I have two vectors of 1 by 3 dimension and each cell can only take value of either 0 or 1. For example, vector A can be (0,1,1), (1,0,1) or (1,1,0) and vector B can be (0,1,1), (1,0,1) or (1,1,0). My question is that how many ways (permutations?) that vector B is greater than vector A? I need the deÞnition of comparing vectors. In my example above, (1,1,0) > (0,1,1) and (1,0,1) > (0,1,1). Therefore, there are two situations that vector B > vector A. Couple you please tell me what keywords (vector comparison, set partition, combinatorial, etc) that I should use to search for the references of this kind of problem? John === Subject: Re: A very traditional question > I¹d like to know about methods for Þnding a few (or a few hundred) of > the smallest real eigenvalues and associated eigenvectors of a large (say > 60k*60k) sparse (say seven entries per row) matrix. The matrix has no > particular structure beyond the sparsity, though I suspect its bandwidth > is of the order of the square root of its size. What you want is an implementation of the Lanczsos algorithm. It is described in many books; e.g. Golub & van Loan. But if you want to know for sure that you got the k smallest eigenvalues, which can be done (only) if your matrix is Hermitian, you need a spectrum slicing technique, described, e.g. in Parlett¹s book. But this means that you need to do many factorizations, and your matrix may well be too large for that. Arnold Neumaier === Subject: Re: A very traditional question > What you want is an implementation of the Lanczsos algorithm. It is described in > many books; e.g. Golub & van Loan. Sorry, wrong spelling - should be ŒLanczos algorithm¹ AN. === Subject: Re: A very traditional question > I¹d like to know about methods for Þnding a few (or a few hundred) of > the smallest real eigenvalues and associated eigenvectors of a large (say > 60k*60k) sparse (say seven entries per row) matrix. The matrix has no > particular structure beyond the sparsity, though I suspect its bandwidth > is of the order of the square root of its size. Do you know anything in advance about how many eigenvalues correspond to each eigenvector? The simplest way to get the largest eigenvalue of a matrix that I remember is to take an arbitrary starting vector and repeatedly multiply by the matrix and normalize the result. That will converge (how rapidly depends on the ratio of the largest two eigenvalues) to an eigenvector whose eigenvalue (the length you end up dividing by) is the largest the matrix has. You can get other eigenvalues by changing which matrix you multiply by. If you want the smallest eigenvalue of A, you can get it as 1 divided by the largest eigenvalue of A^-1. If you want the second largest eigenvalue of A after you¹ve already found the largest eigenvalue (call it a), you can get it as the largest eigenvalue of A-a*I. > Google isn¹t very helpful, it gives me the manuals for a great number > of packages that can compute these things, but I¹m at the dichotomy of > either wanting a import this python package and say > matrix.SmallSparseEigenvalues(50), or wanting a description whereby > I could actually implement the algorithm. If you want a description, try adding terms like raleigh quotient, power method and QR factorization to your search, and read whatever that gives you instead of relying on my fuzzy memory above. > The context is http://tom.womack.net/projects/lagrange.html - I¹d like > to produce better images of the mode functions, and that¹s going to > need eigenvectors for sparse matrices. I¹d also appreciate comments > on what I¹ve got up there already, if people don¹t mind too much. You say you want an automatic way to nicely distribute points, and you¹re familiar with Voronoi cells; have you heard of centroidal Voronoi tesselations? All you do is iteratively move vertices toward the centroids of the Voronoi cells they generate, and you get a neatly spaced set of vertices which will give you a nice triangulation. --- Roy Stogner === Subject: Re: A very traditional question Originator: twomack@chiark.greenend.org.uk ([193.201.200.170]) >> I¹d like to know about methods for Þnding a few (or a few hundred) of >> the smallest real eigenvalues and associated eigenvectors of a large (say >> 60k*60k) sparse (say seven entries per row) matrix. The matrix has no >> particular structure beyond the sparsity, though I suspect its bandwidth >> is of the order of the square root of its size. > Do you know anything in advance about how many eigenvalues > correspond to each eigenvector? I presume you mean that the other way round, how many eigenvectors per eigenvalue; in which case I¹m not quite certain, but I know the answer is not 1 and I suspect it¹s not very much more than 2 - you see on the web page some examples of ŒconÞguration¹ and ŒconÞguration rotated 45 degrees¹, which I believe had extremely close eigenvalues, probably would have been equal had I done the calculations exactly rather than to double-precision. > The simplest way to get the largest eigenvalue of a > matrix that I remember is to take an arbitrary starting vector and > repeatedly multiply by the matrix and normalize the result. That will > converge (how rapidly depends on the ratio of the largest two eigenvalues) > to an eigenvector whose eigenvalue (the length you end up dividing by) is > the largest the matrix has. I¹d spent a while on my walk home from work thinking about that, but it does unavoidably give the _largest_ eigenvalue, and I can¹t see why it wouldn¹t fail fairly horribly if the matrix has nearly-equal eigenvalues. >You can get other eigenvalues by changing which matrix you multiply by. >If you want the smallest eigenvalue of A, you can get it as 1 divided by >the largest eigenvalue of A^-1. But I don¹t think computing A^-1 explicitly is practical in this situation, since computing Av for a vector v is only really practical because A is very sparse, and A^-1 is not remotely sparse. I suppose there are techniques for solving sparse linear equations efÞciently, so instead of computing A^-1 and then calculating A^-1 v, I could compute w : Aw = v directly. What are the relevant terms to look up for that kind of thing? > If you want the second largest > eigenvalue of A after you¹ve already found the largest eigenvalue (call > it a), you can get it as the largest eigenvalue of A-a*I. I don¹t think largest eigenvalue of A-a*I works; what I was thinking might work would be the iteration temp = A * v [ or temp = sparse_solve(A,v), depending ...] temp = temp - (temp dot evec1)*evec1 - (temp dot evec2)*evec2 ... where I take the image of temp in the orthogonal complement of the set of known eigenvectors. Does that sound reasonable; does it have a name? > You say you want an automatic way to nicely distribute points, and you¹re > familiar with Voronoi cells; have you heard of centroidal Voronoi > tesselations? All you do is iteratively move vertices toward the > centroids of the Voronoi cells they generate, and you get a neatly spaced > set of vertices which will give you a nice triangulation. Ooh, that¹s a really nice argument, now all I need is the Voronoi code. There¹s an awful lot of wondrous stuff out there, the awkward bit is just writing the interfaces to plug it into python ... Tom === Subject: Re: A very traditional question >> Do you know anything in advance about how many eigenvalues >> correspond to each eigenvector? > I presume you mean that the other way round, how many eigenvectors per > eigenvalue; Right; sorry for expressing it poorly. > I¹d spent a while on my walk home from work thinking about that, but > it does unavoidably give the _largest_ eigenvalue, and I can¹t see why > it wouldn¹t fail fairly horribly if the matrix has nearly-equal > eigenvalues. Yup, that¹s pretty much worst-case. If you have exactly equal largest eigenvalues, your guess vector should be projected toward the space spanned by the eigenvectors, but if you have just nearly equal eigenvalues, then you¹ll get to the span of their eigenvectors quickly but converge toward the one true eigenvector horribly slowly. That circular drum problem is pretty awful in this regard too, isn¹t it? Every eigenfunction that isn¹t axially symmetric should give you an inÞnite number of other eigenfunctions with the same eigenvalue, just by rotating around the axis. It¹s not just conÞguration rotated 45 degrees which will give you problems, it¹s conÞguration rotated 0.1 degrees, conÞguration rotated 0.01 degrees, etc. right up to whatever your mesh can hold. >>You can get other eigenvalues by changing which matrix you multiply by. >>If you want the smallest eigenvalue of A, you can get it as 1 divided by >>the largest eigenvalue of A^-1. > But I don¹t think computing A^-1 explicitly is practical in this > situation, since computing Av for a vector v is only really practical > because A is very sparse, and A^-1 is not remotely sparse. Right. > I suppose there are techniques for solving sparse linear equations > efÞciently, so instead of computing A^-1 and then calculating A^-1 v, I > could compute w : Aw = v directly. What are the relevant terms to look > up for that kind of thing? Probably linear solver. This is what you¹d want to do, and it shouldn¹t be too hard. Are you getting symmetric matrices out of your Þnite difference approach, by the way? If not you might want to try Þnite elements instead; the code won¹t be any harder than the least squares Þts you¹re doing now, and for Laplace¹s operator it¹ll give you a symmetric matrix and make more linear solver options (conjugate gradient is easy to implement) practical. > what I was thinking might work would be the iteration > temp = A * v [ or temp = sparse_solve(A,v), depending ...] temp = temp > - (temp dot evec1)*evec1 - (temp dot evec2)*evec2 ... > where I take the image of temp in the orthogonal complement of the set > of known eigenvectors. Does that sound reasonable; does it have a name? It sounds familiar, which probably means it¹s something I learned once and forgot the name to. Sorry. ;-) It¹s similar to the deþation approach Ron Shepard suggested, though. > Ooh, that¹s a really nice argument, now all I need is the Voronoi code. > There¹s an awful lot of wondrous stuff out there, the awkward bit is > just writing the interfaces to plug it into python ... Have you ever played with SWIG? ( http://www.swig.org/ ) I¹ve heard recommendations for it, it may be simpler than Python¹s native facility for wrapping C/C++/Fortran code (it¹s certainly simpler than Perl¹s...), and you¹ll probably Þnd wrapping somebody else¹s numerical code to be no harder than debugging your own. --- Roy Stogner === Subject: Re: A very traditional question > If you want the second largest > eigenvalue of A after you¹ve already found the largest eigenvalue (call > it a), you can get it as the largest eigenvalue of A-a*I. In case anyone else hasn¹t spotted the error yet, I¹m clearly being confused here - A-a*I may take the eigenvalue a out of the picture as far as power method iteration is concerned, but it will also shift around every other eigenvalue and so won¹t give you the second largest eigenvalue of A. I think I was misremembering shifted inverse iteration, where you use (A-a*I)^-1 to Þnd the eigenvalue closest to a. Sorry, --- Roy Stogner === Subject: Re: A very traditional question > If you want the second largest > eigenvalue of A after you¹ve already found the largest eigenvalue (call > it a), you can get it as the largest eigenvalue of A-a*I. > In case anyone else hasn¹t spotted the error yet, I¹m clearly being > confused here - A-a*I may take the eigenvalue a out of the picture as far > as power method iteration is concerned, but it will also shift around > every other eigenvalue and so won¹t give you the second largest eigenvalue > of A. I think I was misremembering shifted inverse iteration, where you > use (A-a*I)^-1 to Þnd the eigenvalue closest to a. Also, the power method gives you the vector corresponding to the eigenvalue of largest magnitude, which may not be the largest eigenvalue. For example, if the largest eigenvalue happens to be zero, then the power method will never converge to it, even if the initial vector is only eps away from the exact eigenvector. Another possibly useful approach is to use the modiÞed matrix A-a*v*v¹ where v is the eigenvector that corresponds to the largest eigenvalue a. This deþation approach leaves all the other eigenvalues and vectors unchanged, but it shifts the eigenvalue that was a to zero. Once the second eigenvalue has been found, then the matrix can be deþated again for the third eigenvalue, and so on. There can be numerical problems with this approach if v is poorly converged. As far as methods to Þnd selected eigenpairs for sparse matrices, I would suggest iterative subspace methods. These methods would be ideal for symmetric or hermitian problems, but you sometimes have to be careful with nonsymmetric cases, even those that are known to have real eigenvalues. Look up Jacobi-Davidson and see if you can Þnd something that Þts your problem. If the matrix is diagonally dominant, then straight Davidson with a simple diagonal preconditoner may be a good approach. $.02 -Ron Shepard === Subject: Helmholtz equation, sign problem Resolving 1-dimensional Helmholtz equation for TE and TM modes in wavequide planar structure, using Finite Element Method, some of the eigenfunctions (modes) has a wrong sign, but the absolute values are properly computed. I have tried many diffrent steps (basically the step is equal to lambda divided by 20, where lambda is the wavelenght of light). The wavequide structure is divided into three regions (substrat, wavequide and cover layer). The central difference scheme were being used. To compute the eigenvalues and eigenfunctions the Matlab functuion eig were used. The refractive index is distributed along the structure. I tried both Dirichlet and Neumann boundary conditions. Would you tell me why some eigenfunctions have the wrong sign? d^2E/dx^2+k^2*(n^2-nef^2)*E=0 E - the electric Þeld intensity ( eigenfunction E(x) ) k - the wave number (constant value), related to wavelenght of light x - the spatial varbial n - refractive index distributed along the structure nef - effective refractive index (eigenvalue) Author-Supplied-Address: bds ipp mpg de === Subject: Re: Helmholtz equation, sign problem Mail-To-News-Contact: abuse@dizum.com |> Resolving 1-dimensional Helmholtz equation for TE and TM modes in |> wavequide planar structure, using Finite Element Method, some of the |> eigenfunctions (modes) has a wrong sign, but the absolute values are |> properly computed. [...] Aren¹t the eigenfunctions themselves undetermined up to a constant? Maybe the signs depend on how the matrix of coefÞcients is ordered... The equation you give is indeed linear... -- cu, Bruce drift wave turbulence: http://www.rzg.mpg.de/~bds/ === Subject: Re: Helmholtz equation, sign problem > |> Resolving 1-dimensional Helmholtz equation for TE and TM modes in > |> wavequide planar structure, using Finite Element Method, some of the > |> eigenfunctions (modes) has a wrong sign, but the absolute values are > |> properly computed. > [...] > Aren¹t the eigenfunctions themselves undetermined up to a constant? > Maybe the signs depend on how the matrix of coefÞcients is ordered... > The equation you give is indeed linear... An eigenvector has an arbitrary scale factor (with an arbitrary sign) unless it is normalized to some criteria. There are various normalization criteria. The Helmholtz equation also applies to certain acoustic and vibration problems. In this case, the eigenvectors may be normalized so that: X^T M X = I where M = mass matrix I = identity matrix X = eigenvector matrix (column format) X^T is the transpose of the eigenvector matrix Tom Irvine www.vibrationdata.com === Subject: Re: The 0 is the number of evil ! > The 0 is really evil. > You can«t do x/0 , because the 0 is evil ! > The 0 is the devil , burn it ! After 30 years of scientiÞc research, now he tells me! -- Lou Pecora - My views are my own. === Subject: Re: Need help optimizing.... > I have a routine that evaluates a polynomial equation that have 3 variables > x,y,z of orders 1,2,3 the coefÞcients of the polynomial are in an array. > This routine is quite slow and I¹d like to optimize it. > Any suggestions? [...] > pts[pn].val = c[cn++] * pow(pts[pn].x, i) * zyexp; The problem is that you are using the pow() function inside of a set of nested loops, so you need to avoid that. There are two things to try. The Þrst is to factor the polonomial using Horner¹s rule. This results in a single þoating point mulitply and add combination in the inner-most loop. The second approach is to precompute a table of powers of the three variables, and replace the pow() function with the appropriate table lookup in the innermost loop. Depending on the integer powers involved, and on whether the coefÞcients are dense or sparse, either of these two approaches might be optimal. $.02 -Ron Shepard === Subject: Re: Need help optimizing.... > I have a routine that evaluates a polynomial equation that have 3 variables > x,y,z of orders 1,2,3 the coefÞcients of the polynomial are in an array. > This routine is quite slow and I¹d like to optimize it. > Any suggestions? > [...] > pts[pn].val = c[cn++] * pow(pts[pn].x, i) * zyexp; > The problem is that you are using the pow() function inside of a set > of nested loops, so you need to avoid that. There are two things to > try. > The Þrst is to factor the polonomial using Horner¹s rule. This > results in a single þoating point mulitply and add combination in > the inner-most loop. Yes I found out about horner¹s rule today, and while I understand it for polynomials with one variable I am wondering if it can be applied to polynomials of more than one variable. > The second approach is to precompute a table of powers of the three > variables, and replace the pow() function with the appropriate table > lookup in the innermost loop. > Depending on the integer powers involved, and on whether the > coefÞcients are dense or sparse, either of these two approaches > might be optimal. > $.02 -Ron Shepard === Subject: Re: What is gist of proof that series of reciprocal primes diverges. > [[ This message was both posted and mailed: see > the To, Cc, and Newsgroups headers for details. ]] > I have seen proof that the harmonic series, 1+1/2+1/3+1/4+ .... diverges. > I have also seen statements that a subset of that series, i.e, the > reciprocals of the prime numbers > 1+1/2+1/3+1/5+1/7+ .... > also diverges. > Can anyone describe the gist of a proof? > Because of the following observations: > If p is prime, then > 1 > ----- = 1 + 1/p + 1/p^2 + 1/p^3 + ... > 1-1/p > Now take the product over all primes p, and note that on the right-hand > side you get the sum of all 1/n for positive integers n, Perhaps mention that this comes from the factorization theorem for integers. > which is > inÞnite. It follows that > prod_{p prime} (1-1/p) = 0. > A necessary and sufÞcient condition for this is that > sum_{p prime} 1/p = infty. > --Ron Bruck -- Julian V. Noble Professor Emeritus of Physics jvn@lessspamformother.virginia.edu ^^^^^^^^^^^^^^^^^^ http://galileo.phys.virginia.edu/~jvn/ Science knows only one commandment: contribute to science. -- Bertolt Brecht, Galileo. === Subject: Loading octave on a computer I am a novice at this stuff. I am trying to Þnd out if there is a .exe Þle for octave that I can run on my computer. If yes, we can i get it. Any help will be greatly appreciated. I am working on a project and adding functions to octave is one of my options. I am trying to familiarize myself with the program.