Tuesday, March 06, 2007
Matlab optimization
Numerical issues are really severe for my current simulation with MATLAB. The computing speed is killing me if I use smaller time step for the purpose of stability, say, I have to wait for about 30 days to get sufficient results! That is not acceptable. So the past couple days, instead of switching to another language (this is also a time-consuming task), I spent lots of time to optimize my MATLAB code, and , fortunately, I did learn something and improved my code speed quite a lot. Now the speed is more than 10 times faster than before, which really surprised me. So I believe these experience are worthy of sharing:
So if you have spent one week for writing your code, I strongly suggest you to spend one more week to optimize it . I bet you will get what you paid for.
- Use sparse matrices when you can. They may save you a great deal of space and time. See matlab's sparse command.
- Use matrix operations instead of for loops - i.e. vectorise your code.
- Functions are faster than scripts - they get compiled internally the first time they are run.
- If you know the maximum size that a matrix will be, create it that size initially, rather than letting it grow incrementally.
- Use pack every so often to tidy up memory usage.
So if you have spent one week for writing your code, I strongly suggest you to spend one more week to optimize it . I bet you will get what you paid for.
Saturday, January 27, 2007
Nature Materials: Wrinkles are good
The current issue of Nature Materials highlights an interesting artcile using wrinkled thin films for fabricating microlens arrays. Check out the original paper by Chan and Crosby, Adv. Mater. doi:10.1002/adma.200601595 (2006). The wrinkling pattern looks quite interesting.
Saturday, December 23, 2006
Buckling Analysis with ABAQUS
In searching for helps with ABAQUS, I found this documentation page informational, although I am not sure if we are using Version 6.5.
The particular question I have at the moment is about a static buckling analysis. I found in Section 6.2 a good introduction to linear eigenvalue buckling predcition (6.2.3) and nonlinear post-buckling analysis (6.2.4).
The first step in buckling analysis is to find the critical load, which should be related to the lowest eigenvalue. However, to relate the output eigenvalues to the critical load, one must clarify the following:
(1) What is the base state? The buckling loads are calculated relative to the base state. This could be the initial condition or the current state of the model at the end of the last analysis step. Geometric nonlinearity may be included in the general analysis steps prior to the eigenvalue buckling analysis (a linear perturbation to the current state).
(2) Does the base state have a preload? It is not clear to me what this preload means and how it is specified in ABAQUS.
(3) What is the perturbation load pattern? This must be specified as applied load, which could be nodal forces, distributed pressure, or thermal load. The amplitude of the applied load is not important, becasue it will be scaled by the eigenvalues.
For example, to analyse buckling due to thermal stress, the critical temperature can be obtained by multiplying the lowest eigenvalue with the applied temperature, assuming a base state with zero preload.
The particular question I have at the moment is about a static buckling analysis. I found in Section 6.2 a good introduction to linear eigenvalue buckling predcition (6.2.3) and nonlinear post-buckling analysis (6.2.4).
The first step in buckling analysis is to find the critical load, which should be related to the lowest eigenvalue. However, to relate the output eigenvalues to the critical load, one must clarify the following:
(1) What is the base state? The buckling loads are calculated relative to the base state. This could be the initial condition or the current state of the model at the end of the last analysis step. Geometric nonlinearity may be included in the general analysis steps prior to the eigenvalue buckling analysis (a linear perturbation to the current state).
(2) Does the base state have a preload? It is not clear to me what this preload means and how it is specified in ABAQUS.
(3) What is the perturbation load pattern? This must be specified as applied load, which could be nodal forces, distributed pressure, or thermal load. The amplitude of the applied load is not important, becasue it will be scaled by the eigenvalues.
For example, to analyse buckling due to thermal stress, the critical temperature can be obtained by multiplying the lowest eigenvalue with the applied temperature, assuming a base state with zero preload.
ABAQUS Tutorial from Brown Univ.
This link could be a good place to start learning ABAQUS.
Wednesday, September 13, 2006
Methods for the synthesis of nanoparticles and nanomaterials
Synthesis of nanomaterials is what I am learning by taking Dr. Ferreira's course "Nanomaterials". Though it seems sort of way off the Mechanics projects we are doing, it does great help for better understanding of the materials properties at the Nano-scale level. I post a brief intruction about the methods for the synthesis of nanoparticles here, and hope you can get rough concepts about it.
Saturday, September 09, 2006
iMechanica
Dr. Zhigang Suo and his students at Harvard have set up a new multi-blog serving the research community in mechanics. Anyone can participate. See Why should you post in iMechanica and many other posts for details. My first post was on Modeling Place. We have been doing well here, but iMechanica offers much more. I urge you to register and post in iMechanica. Over time, we will migrate from Modeling Place to iMechanica, to be part of a larger community.
Thursday, September 07, 2006
Nanodot: the original nanotechnology weblog
Nanotechnology: from Feynman to Funding
Nanotube resonators break gigahertz barrier
Selected review article by Prof. Suo
In Dr Suo's homepage, he posted his favorite review articles.
1. Micromechanics of macroelectronics
2. Reliability of interconnect structures
3. Motions of microscopic surfaces in materials
4. Mixed-mode cracking in layered materials
some of artilcles were mentioned by Dr Huang in his thin film mechanics class. These are really good articles.
1. Micromechanics of macroelectronics
2. Reliability of interconnect structures
3. Motions of microscopic surfaces in materials
4. Mixed-mode cracking in layered materials
some of artilcles were mentioned by Dr Huang in his thin film mechanics class. These are really good articles.
Monday, August 28, 2006
Lecture Overheads on Delamination Mechanics
Prof. Hutchinson open his unpublished lecture note. you can look at his homepage. I linked his lecture notes. If you are interested in this subject, it will be useful.