Mesh Mess

FEM, CFD, CAE, and all that.

Month: July, 2014

Offlineimap + mu4e

So I live in emacs most of the time: writing papers, coding, and composing emails. The markup from org mode and a latex front end such as auctex make it really uncessary to resort to any other writing/typesetting systems, let alone MS word, especially when I’m doing scientific writing. So after replacing a failed hard drive and upgrading to Ubuntu 14.04, one of the first things was to set up the email for emacs, so I can assure others that I am still kicking.

To do that is not difficult at all, by using offlineimap + mu4e. No I don’t use gnus and yes I’ve tried that and it didn’t work out. In this scenario, we use offlineimap as a mail manager and retriever, and use mu4e as the front-end of emacs to do the work. Setting up offlineimap is pretty straightforward, one needs only to set up a profile file “~/.offlineimaprc”. Setting up mu4e is pretty easy too, as everything should work out of box from a mu installation and a minimum emacs setup.

On top of these two, I needed to set up the “~/.authinfo” file so that I don’t have to type in password everytime checking mails. This can be done in several ways. I opt for a simple python script and emacs’s in-house EasyPG package. Basically what I did was make the offlineimap use the passphrase encrypted in the ~/.authinfo.gpg file.

And that’s it. Now I can fire up mu4e and manage emails through the message-mode. IMHO this is how emacs’ email management should be, and I’m not the only one.


Soft shell structure under hydrodynamical load

In the middle of constructing a reduced-order model (ROM) of a highly flexible structure interacting with surround flow, I built a structure model and loaded it with oscillating pressure at the lower part. The animation from the simulation is as follows.

There are several challenges to this type of FEA problems, mostly are related to the highly flexibility nature of the material. The structure is first subject to a quasi-static hydrostatic load, which makes it buckle to a new equilibrium position. After that, ambient oscillating pressure with a much smaller magnitude than the initial buckling load is applied to make the fabric vibrate.

This is a perfect example for using explicit-implicit switching for time integration. Since it’s usually difficult for an implicit solver to find the bulking configuration, as a result of the fact that the Newton-Ralphson method does not gaaranteeĀ  convergence, one needs to issue an explicit analysis for the initial loading stage. Some solvers provide specific “bulking simulation” controls for this type of the problem. After the initial loading the structure to a new equilibrium (passing a bifurcation point, as one clearly see in the animation), we proceed to impose the oscillating load. This type of load is supposed to be of a much smaller magnitude than the initial load, so that the structural vibration would be a perturbation near the new equilibrium.

Since explicit method suffers from a general stability problem (notorious forward Euler blow-up in every toy example in every textbook), it is only applicable to short-duration problems such as impact/contact, and it is very easy for the blow-up to happen during a cyclic loading problem, due to change of sign of the derivatives. Thus we need to turn off the explicit simulation and replace it with an implicit one. The benefit? (Unconditional) stability and hence greater allowable time step. The cost, on the other hand, is much higher since now we are actually inverting the stiffness matrix and perform in-time iterations.