Tag: Work

How to get up-to-date Python packages without bothering your cluster admin

If you have ever been stuck as a user on an out-of-date cluster without root access it can be frustrating to ask the admin guy to install packages for you. Even if they respond, by the time they get round to it you might have moved onto something else. The moment could be gone.

Luckily, as far as Python is concerned, the pyenv project allows users to install their own local Python version or even assign different versions to different directories/projects.

Sir Andrew Smith - A. Smith: Illustrations of the zoology of South Africa, Reptilia. Smith, Elder, and Co., London 1840 PYTHON NATALENSIS (Southern African Python) (Reptilia Plate 9) in A. Smith: Illustrations of the zoology of South Africa, Reptilia. Smith, Elder, and Co., London 1840

Public domain image.

João Moreira has written a great beginner’s guide on the Amaral Lab homepage in order to get started. I now have the latest version of Python 2 (v2.7.12) installed along with essential packages like Scipy and Pandas, which I added using pip.

Installation of pyenv is easy.

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash 

Different versions of python can then be installed with

pyenv install 3.4.0

Switching your global Python version is then as simple as typing

pyenv global 3.4.0

From first impressions I can say I highly recommend pyenv, and will continue to learn about it over the coming days through using it. Please refer to João’s excellent post for more details.




[PDF] “Grain-size dependent demagnetizing factors in permanent magnets” reprint update

The reprint of our Journal of Applied Physics (JAP) paper “Grain-size dependent demagnetizing factors in permanent magnets” has been updated since the old version was not being discovered by the Google Scholar crawler.

There is also now a version on arXiv. I hope that Google Scholar will now correctly index the paper so that it’s easier for people to find!

The full, correct reference for the paper is:

S. Bance, B. Seebacher, T. Schrefl, L. Exl, M. Winklhofer, G. Hrkac, G. Zimanyi, T. Shoji, M. Yano, N. Sakuma, M. Ito, A. Kato and A. Manabe, “Grain-size dependent demagnetizing factors in permanent magnets”, J. Appl. Phys. 116, 233903 (2014); http://dx.doi.org/10.1063/1.4904854

 




5 Tips for making finite element models with Salome

Salome is an open source software package used to create geometric models and finite element meshes for use in numerical simulations. It is also able to perform its own numerical simulations and has post-processing capabilities built in.

Here are my 5 tips for anyone who is interested in using Salome for model and mesh creation.

1. Practice manually first

This goes without saying. Although Salome has a powerful Python-based scripting capability, it is worth practicing with manual model generation. By that I mean, clicking with your mouse in the GUI. Manual practice lets you get familiar with the quirks of the Salome workflow, which has a different mentality to many other model generator programs.

2. Use the Notebook

In Salome the Notebook is a useful tool that allows you to set size parameters in the beginning as model variables. This means that later on you can edit the notebook variable values and re-build the model using different sizes; something that cannot be done normally, while typing size values in to construct geometric objects. The Notebook is like having some of the power of scripting while still making the model manually in the GUI. A great halfway step up to full scripting.

3. Learn to use scripting

Once you are familiar with Salome’s way of thinking, automation through scripting can become a critical component of being productive. Often it is necessary to compare many similar models where just one specific parameter (say the size of some part) is being changed.

In this recent paper we had to compare the effects of different soft magnetic defect thicknesses in a permanent magnetic grain.  By scripting the model generation I was able to rapidly generate similar models from one template script.

Reversal

4. Small size adjustments can get you out of a rut

Sometimes with Salome (and actually with other modelling software too) you find an annoying problem that makes no sense. For example, you made the model with no problems but now you increased the size of part A and it doesn’t want to build anymore. These kind of problems can occur because designing such a powerful piece of software to work universally is hard. You might be attempting something that the software designers did not anticipate.

One trick that often works for me goes like this. Change the parameter again by a small, arbitrary amount. If size A is 100 nm large, try changing it to 100.001. The simulation result will be virtually identical but you might find the model generation can now function without problems.

I remember in an earlier version of GiD, doing a boolean volume operation on two objects would fail if the edges of the objects overlapped perfectly. So I always had to make sure to translate one of the objects by a tiny amount. Then the Boolean operation would usually work. The makers of GiD fixed this in later versions and most good model software can handle such things.

The same problem often occurs with meshing algorithms. Depending on the type, an algorithm may be trying to fill a certain volume with elements but is being constrained for element size. This can cause the algorithm to fail, but a small change in the specified mesh size can get it to work again.

5. Check your dumped scripts

When making a model using the GUI it is really cool to be able to dump the model as a Python script, which can then be edited and run using the script mode. As I highlighted in another post, it helps to take care that Explode functions do not reorder the exploded entities. The default behaviour is to reorder, and it is easy to forget this when using the script, leading to confusion when the wrong objects are subject to later operations.

Exploding planet




[Paper] “Thermal Activation in Permanent Magnets” published in JOM

Explanation of method for calculating the thermally activated coercivity of using micromagnetics.

Explanation of method for calculating the thermally activated coercivity of using micromagnetics.

This week our new paper titled “Thermal Activation in Permanent Magnets” has been published in JOM (Springer). The invited paper is under a special topic, “Permanent Magnets beyond Nd-Dy-Fe-B“.  An author manuscript (reprint) is available here.

In the paper we provide a more detailed overview of the micromagnetic methods we have developed to model the thermal activation of permanent magnets. These methods allow us to simulate and understand the behaviour of permanent magnets at finite temperatures, which is important since the generators in wind turbines and electric motors in green cars operate at higher temperatures. For example, in electric cars the typical operation temperature of the motors can be around 450ºK (177º C).

Using two examples from our work with Toyota and the ROMEO project we highlight the importance of reversal mechanisms in explaining the observed performance (for example, coercivity) of the magnets.

The paper is initially published “online first” here with the permanent DOI 10.1007/s11837-015-1415-7. It can be cited as follows:

S. Bance, J. Fischbacher, A. Kovacs, H. Oezelt, F. Reichel, T. Schrefl, “Thermal Activation in Permanent Magnets”, JOM  2015 DOI:10.1007/s11837-015-1415-7

Abstract

The coercive field of permanent magnets decays with temperature. At non-zero temperatures, the system can overcome a finite energy barrier through thermal fluctuations. Using finite element micromagnetic simulations, we quantify this effect, which reduces coercivity in addition to the decrease of the coercive field associated with the temperature dependence of the anisotropy field, and validate the method through comparison with existing experimental data.




“ROMEO” project featured on TV news

Our EU-funded FP7 project “Replacement and Original Magnet Engineering Options” (ROMEO) has recently been covered in the news in Slovenia, to promote the participation of our Slovenian collaborators.

News footage of the ROMEO project

Click for news footage of the ROMEO project >>>

There is also now a project newsletter highlighting the aims and progress of the project. Please click here to download it.