martes, 3 de febrero de 2015


I proudly announce the conclusion of this very important part of my academic career.
The thesis passed with and Excellent Cum Laude today, 3rd February 2015, in the Universitat Politecnica de Catalunya.
 I would like to thank both my mentors Prof. Jaume Roset (UPC) and Prof. Vojko Kilar (University of Ljubjana), and all those that were with me all along...

Following is the abstract of the thesis:


This thesis explores a very well understood area of physics: computational structural dynamics. The aim is to stretch its boundaries by merging it with another very well established discipline such as structural design and optimization. In the recent past both of them have made significant advances, often unaware one of each other for different reasons. It is the aim of this thesis to serve as a bridging tool between the realms of physics and engineering.
The work in divided in three parts: variational mechanics, structural optimization and implementation.
The initial part deals with deterministic variational mechanics. Two chapters are dedicated to probe the applicability of energy functionals in the structural analysis. First, by mapping the state of the art regarding the vast field of numerical methods for structural dynamics; second, by using those functionals as a tool to compare the methods. It is shown how, once the methods are grouped according to the kind of differential equations they integrate, it is easy to establish a framework for benchmarking. Moreover, if this comparison is made using balance of energy the only parameter needed to observe is a relatively easy to obtain scalar value.
The second part, where structural optimization is treated, has also two chapters. In the first one the non-deterministic tools employed by structural designers are presented and examined. An important distinction between tools for optimization and tools for analysis is highlighted. In the following chapter, a framework for the objective characterization of structural systems is developed. This characterization is made on the basis of the thermodynamics and energetic characteristics of the system. Finally, it is successfully applied to drive a sample simulated annealing algorithm.
In the third part the resulting code employed in the numerical experiments is shown and explained. This code was developed by means of a visual programming environment and allows for the fast implementation of programs within a consolidated CAD application. It was used to interconnect simultaneously with other applications to seamlessly share simulation data and process it. Those applications were, respectively, a spreadsheet and a general purpose finite element.

miércoles, 31 de julio de 2013

Montecarlo method for matrix inversion

One of the countless applications of stochastic concepts to real life problems is the approximate solution of large systems of algebraic equations.
After some research, I have accumulated some references on the topic and tried to implement their described algorithms in order to use them in my thesis. All the works are based on a 40's paper by Ulam and Neumann, later re-visited by Leibler and Forsythe in 1950 (Matrix inversion by a Montecarlo method). The most prominent contributions afterwards are (in my opinion) those by Halton, Dimov, Alexandrov and Mascagni, all of them available in the web.
Unfortunately, these descriptions are not really suitable for the layman and in all cases come wrapped in the (allegedly) more precise "mathematical language". This has caused me an enormous amount of trouble just to get to the conclusion that Montecarlo matrix inversion methods are not suitable for real time simulation or engineering purposes.
This assert is based on the fact that those methods are only directly applicable to diagonally dominant matrices. This means matrices whose diagonal values are bigger than the sum of all the other values in their respective rows. I made the mistake of assuming that, in FEM, as the diagonal always has the highest values, it should be equivalent, but no...

Of course, different authors have developed and adapted the method to more general cases, but I believe that then the gain in computational velocity one achieves by simply approximating is lost in all the preparatives.

As a conclusion, a much more simple and better documented algorithm to be used instead is Conjugate Gradient.

viernes, 7 de septiembre de 2012


The past 25th June I had to present my (unexpected) master thesis in the UPC.
I want to thank my mentors Prof. Jaume Roset and Prof Vojko Kilar for their support and tutoring during the whole process of writing that led to a mark of 8 over 10 at the UPC Physics Department.
The following is an excerpt of the content of the document that will hopefully soon be published in the Physics department's webpage (



This work focuses on the particular application of the variational principles of Lagrange and Hamilton for structural analysis. Different numerical methods are compared in their computation of the elastic energy through time.
According to variational mechanics, the difference between the stored elastic energy and the applied work should be null on each time step, so by computing this difference we can account for the level of accuracy of each combination of numerical methods. Moreover, in some situations when numerical instabilities are difficult to perceive due to high complexities, this procedure allows for the control and straightforward visualization of them, being an excellent source of hindsight on the behaviour of the analysed system.
The purpose of this dissertation is to present a scheme where the current numerical methods can be benchmarked in a qualitative as well as in a quantitative manner. It is shown how different combinations of methods, even for a simple model, can give very different results, particularly in the field of dynamics, where often also instabilites arise.
The first half of the thesis is a thorough explanation of these concepts and their application in terms of structural analysis. In the second part, a review on the numerical methods in general and of those implemented for our experiments is provided, followed by the experimental results and their interpretation. The model of choice, for simplicity and availability of analytical results is one cantilever column. Bending elastic energy of the column is monitored under transient regimes of different shapes, computing the total action of the system as its integral through time.


Targets and interest of our research

Variational mechanics date back as far as the XVIII century, when Leibniz, Euler, Maupertuis and eventually Lagrange devised the calculus of variations and the principle of least action. This methodology of treating physical phenomena is based on the notion that everything in Nature tends to a state of minimal energy(1).
In this work we will be focusing on its particular application in structural analysis, where one deals with “engineering scales” whose dimensions span between 100 times bigger or smaller than those of a human being. This is in contrast with other areas of applied physics like astronomy or molecular dynamics but will be shown how those variational principles still apply and even become powerful tools for the comprehension of the behaviour of our built environment.
Numerical methods, on the other hand, have proliferated since the 1950s alongside with the ever increasing power of computers as a means to simulate physical phenomena. This ceaseless growth in number and terminology has given place to a cumbersome mix of mathematical, physics and computer science often difficult to grasp.
Choosing one simple cantilever beam as our test model, we will utilize and compare different combinations of these methods to compute its elastic energy under transient loading regimes of different shapes. This will render useful in future research in nonlinear analysis of more complex structural systems.

Variational mechanics

According to the principles of variational mechanics (2) , the difference between the measured energy and the applied work should be minimal, so by accounting this difference in each time step of our simulations we should be able to infer the degree of accuracy provided by each combination and discuss the reasons that lead to differences in result using the energy as the natural norm for analysing the error(3).

Numerical methods for structural analysis

In a previous work by the authors (4)(5), it was shown how the vast amount of existing numerical methods can be grouped into three main sets according to the kind of physical phenomena they model and the type of differential equations they discretize: matter integration techniques (Partial Differential Equations), constraint integration techniques (Algebraic Differential Equations) and time integration techniques (Ordinary Differential Equations).
According to this, we will particularize in the following matter integration implementations: Finite Element (FEM), Finite Differences (FDM) and Mass Spring Systems (MSS). For the constraint integration we will be comparing Penalty Method (PM) and Lagrange Multipliers (LM). And for the time integration techniques we will employ Newmark Beta (NB), Houbolt's (HBT), and the Linear Acceleration Method (LAM).
Other combinations are also possible, as the proposed scheme is easily extensible, but for our current purposes it should suffice.

Discussion and future work

A numerical comparison of methods commonly employed in structural mechanics was presented.
It was made on the basis of energy principles and eventually the total action of a system under transient loading has been computed for each possible combination of methods.
It was shown how variational principles and an energetic norm can be employed in the benchmarking and assessment of the accuracy and stability of different implementations.
The scheme provided, tested on a simple example, is easily extensible to more complex systems with more elements. The advantage of this approach is that it allows for the monitoring of the global behaviour by means of one simple scalar, whose value is to be compared against that of an analytical computed from external forces or accelerations.
Also, a conceptual framework for the classification and treatment of numerical methods, grouping them into time, matter and constraint integrators, was used for the systematic analysis of the results.

Future work aims at the application of the same methodology in nonlinear analysis and more complex structures.
The combination with stochastic techniques for the integration of the action and the search of minimal energy states is one of the final targets of the current research.


1) C. Lanczos, 1970, “The variational principles of mechanics”, University of Toronto Press, Canada
2) W. Wunderlich, W Pilkey, 2002. “Mechanics of structures. Variational and computational methods”, CRC Press, pp.: 852-877
3) G. Bugeda, 1991, “Estimacion y correccion del error en el analisis estructural por el MEF”, Monografia 9, CIMNE, Barcelona
4) R. Andujar, J. Roset, V. Kilar, 2011. “Beyond Finite Element Method: An overview on physics simulation tools for structural engineers“, TTEM 3 / 2011. BiH.
5) R. Andujar, J. Roset, V. Kilar, 2011. “Interdisciplinary approach to numerical methods for structural dynamics”, WASJ Vol 14 Num.8, 2011. Iran.
6) J.H. Argyris, 1960, “Energy theorems and structural analysis”, Butterworths Scientific publications, London, UK.
7) R. Aguiar, 2005, “Analisis estatico de estructuras”, Colegio de ingenieros civiles de Pichincha, Quito, Ecuador.
8) H.P. Gavin, 2012, “Strain energy in linear elastic solids”, Duke University, Department of Civil and Enironmental Engineering, USA.
9) A. Nealen, M. Müller, R. Keiser, E. Boxerman, M. Carlson, “Physically Based Deformable Models in Computer Graphics” in Computer Graphics Forum, Vol. 25, issue 4, 2005
10) T.M. Wasfy, A.K. Noor, “Computational strategies for flexible multibody systems” in Appl. Mech. Rev. vol 56, no 6, Nov 2003
11) G.R. Liu, 2003, “Mesh free Methods: Moving Beyond Finite Element Methods”, CRC Press, USA.
12) J. S. Przemieniecki, 1968,  “Theory of matrix structural analysis”, McGraw-Hill. Inc, USA
13) G.D. Smit, 1978, “Numerical Solution of Partial Differential Equations by Finite Difference Methods”, 2nd ed. Oxford Applied Mathematics and Computing Science Series, UK.
14) M. Müller, 2008, “Real Time Physics course notes”, Siggraph USA.
15) K.J Bathe, 1995, “Finite element procedures in engineering analysis”, Prentice Hall, USA.

7. Key words
Finite Element, Finite Differences, Variational mechanics, Euler-Bernoulli beam

viernes, 30 de marzo de 2012

Nonlinearities in structural mechanics

Two years have already gone in the preparation of this thesis and now it seems in order to pass to the next part: the study of stochasticity.
Altogether with the preparation of our next article I am already summarizing and setting things up for the account for uncertainties in the structural design.
For such purpose, and after so much research into elasticity, dynamics and numerical methods, I have done the following scheme where most of the nonlinearities (which not surprisingly are often associated to randomness) can be fit into.
The scheme is based on the ubiquitous "Governing Equations" that serve as basis for every mechanician.
  • System's internal balance equations (Statics or dynamics)
    • Nonlinear damping
  • Constitutive equations (Material)
    • Plasticity
    • Viscosity
    • Creeping
    • Hiperelasticity
  • Kinematic equations (Geometry)
    • Large deformations with small strains
    • Large strains
    • Buckling
    • Instability
  • Boundary conditions
    • Forces
      • Pressure
      • Loads
      • Wind
      • Waves
      • Friction
    • Displacements
      • Contact
      • Link rupture
In the following months I will try to expand this list at the same time as I will try to understand how these nonlinearities are tackled in a deterministic manner.

The main point of my thesis is that stochastic methods are way more suitable for this purpose than deterministic ones...we will see...:)

Soon I will be getting back to my loved Ljubljana for a while, far from noisy Barcelona...