Sunday, September 21, 2014

Saturday, May 24, 2014

Mount SWAP on Amazon EC2


By default the amazon instance is going without swap. So you need to create and attach a volume

mkswap /dev/xvdn

Then use the commnad

swapon /dev/hdxx

where /dev/hdxx is your new swap partition (or swap file). You can use more than one swap partition/file just by enabling swap on all the swap files/partitions your system knows about with swapon -a.

Wednesday, March 12, 2014

How to mount a VirtualBox VDI image

sudo apt-get install qemu-utils
modprobe nbd
qemu-nbd -c /dev/nbd0 <vdi-file>
mount /dev/nbd0p1 /mnt


umount /mnt
qemu-nbd -d /dev/nbd0

Tuesday, January 7, 2014

ExaFMM installation



ExaFMM is written in C++/CUDA OpenMP/MPI. Code is available from: https://bitbucket.org/exafmm/exafmm. A development version with higher performance but less features is available from: https://bitbucket.org/rioyokota/exafmm-dev.



The code requires CUDA. If you used Ubuntu 12.04, the steps are as follows.


1. Install the Nvidia driver.

2. Install requisite tools

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

3. Download the CUDA tools

4. Add requisite lines  to the end of ~/.bashrc (the nice example is here ) as follows

 export PATH=$PATH:/usr/local/cuda-5.0/bin
 export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/lib

5. If a problem arises with libglut, find it with


    sudo find /usr -name libglut\*

    Now we can create a softlink to it

   sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib /libglut.so

 

 
 

 

Friday, August 2, 2013

Abaqus/Standard may generate inaccurate external work (ALLWK) in static non-linear analyses (finite hyperelasticity)

It should be noted that Abaqus/Standard may generate inaccurate external work (ALLWK) in a static geometrically non-linear analysis (finite hyperelasticity) and, consequently, will cause ETOTAL to be inaccurate.


For example, we assume that a hyperelastic solid is only subjected to body forces. It doesn't matter a linear or non-linear analysis will be, the external work of the body forces can be calculated over reference configuration

$\;\;\;\;\;\;\;W^{ext}=\int_{\Omega_0} \boldsymbol{f}_0(\boldsymbol{X})\cdot \boldsymbol{U} \;dV $

For linear static analysis, we obtain the almost identical values of the external work provided by Abaqus and using custom post-processing calculation. Turning to finite elasticity, the difference may be significant and leads to the erroneous results in the external work estimation.

P.S. Recall that for a static problem a value of external work reported by Abaqus is half of "true" external work.


Friday, June 21, 2013

CAPLET - fast-field electrostatic solvers scaled up by parallelizing

Looking for a new generation of fast-field solvers capable of being scaled up by parallelizing, recently I find the interesting project CAPLET on the same MIT site we can find FASCTAP.


Project CAPLET is a capacitance extraction toolkit that extract capacitance at field-solver accuracy. This is the open-source code under GNU Lesser General Public license aimed for ultra-fast extraction of small-to-medium structures with 5% accuracy of reference solutions and efficiently parallelized.Thought the author claimes the simplified installation procedure, it demands some steps. We did it on Ubuntu 10.04. You can use any virtual machine (VirtualBox, etc.), install Ubuntu 10.04, upgrade the OS and install the following package:


apt-get update; sudo apt-get upgrade
   apt-get install g++
   apt-get install libcr-dev mpich2 mpich2-doc
   apt-get install libblas3gf libblas-doc libblas-dev
   apt-get install liblapack3gf liblapack-doc liblapack-dev
   apt-get install gfortran
   apt-get install openmpi-bin openmpi-doc libopenmpi-dev

To compile QT GUI you can download, for example, Qt Creator 2.4.1 and Qt 4.7.0.

The toolkit has three solvers:

 1. Caplet (based on instantiable basis functions), 
 2. FastCap (additional link to the solver is required), and
 3. Standard BEM solver (piecewise constant basis functions with collocation testing, obviously without any acceleration).

We compared the standard BEM solver verus FASTCAP with -d0 option on the proven configuration (two parallel 100x2000x200 plates). The results are not the same :-0.


Thursday, February 7, 2013

Compatibility of constrained displacement field in the case of simply connected body


In nonlinear elasticity we regard the compatibility as a restriction of the motion (of a simple body) in terms of the strain measures: deformation tensor F or right Cauchy-Green deformation tensor C (also left Cauchy-Green deformation tensor b).



Commonly when we talk about the compatibility we consider an inverse problem. Given F (or C) we need to derive the deformation map. To do this certain mathematical restrictions must be placed upon the strain measures in order that the inverse problem have a solution. We call these mathematical restrictions the compatibility conditions or more precisely the integrability conditions, since in general the compatibility is equivalent to path independence of the solution dealing with integrations of the strains. So, the main question to answer is,  given F (or C or b), is there a deformation mapping?


Now we consider the forward problem. Given a deformation mapping (smooth immersion), it is easy to compute the strain measure. And following Truesdell C.A, Toupin R.A., Ericksen J.L, "The Classical Field Theories",
In a problem formulated entirely in terms of the deformation, the conditions of compatibility need not be regarded, since they are satisfied automatically in virtue of the definitions of b and C. 

It's look simple.

Now the question is raised when the deformation mapping itself is constrained. For instance, instead of assuming that here is the deformation mapping from the abstract space R^3 to the Euclidean space E^3, we consider the mapping from R^3 to  R^3 times  R^N times R^M times SO(3). What's going on the compatibility conditions in this case?

Saturday, February 2, 2013

2013: Still with FASTCAP. Towards ExaFMM?

Electrostatics. Looking for the parallel fast field solver.

I successfully used the FASTCAP fast field solver long years ago for capacitance calculation and electrostatic charge density and forces derivation. Incorporating this solver into a finite element code, solution of multiphysics coupled problems can be obtained quickly. With staggered scheme of course.
 

Recently coming back  to the electrostatic problem calculation, I tried to find a new generation of the fast field codes. My feeling that here is still no ready open source code except the premium FASTCAP.


The FASTCAP itself is acceptable from the accuracy standpoint, particularly for my problems in the hand. I have compared the BEM results with FEM reference solutions  and found it quite acceptable. Also for the science community it is a common practice to compare new and more efficient solvers versus FASTCAP. The problem is the speed of runs. The code was born in 90's, in the era of single-core computations. Nowadays impressed by "Biomolecular electrostatics using a fast multipole BEM on up to 512 gpus and a billion unknowns" I think to write a custom electrostatic code with ExaFMM library. Obviously it would take a long time and  perhaps I'll go flop. As a result the simple, open source,  parallel performance, electrostatic solver is still looking for.

Friday, September 21, 2012

Work conjugacy error in commercial finite-element codes: its magnitude and how to compensate for it

Most commercial finite element (FE) programs use the Hencky (or logarithmic) finite strain tensor for which the associated (or work-conjugate) objective stress rate is the Jaumann rate of Kirchhoff stress. However the stress rate of FE program misses the volumetric term and the error due to this term violates energy balance.


The error in using the "incorrect" Jaumann rate of Cauchy stress was pointed out in the literature long ago, are but has either been ignored or thought to cause only negligible errors. Indeed, the error is generally less than 0.1 per cent for metals and other materials that are inelastically incompressible. It now appears, though, that this is not true for highly compressible inelastic materials.

http://rspa.royalsocietypublishing.org/content/early/2012/05/22/rspa.2012.0167.abstract

How to create automatically the user subroutine UMAT


Another way to create automatically the user subroutine UMAT is by automatic UMAT code generation procedure for pseudoelastic materials using the symbolic mathematics package Mathematica, described in the article "Automatic Generation of User Material Subroutines for Biomechanical Growth Analysis", here, and also here.

We found the PhD thesis where many interesting details of the Mathematica implementation for FORTRAN UMAT subroutine generation and examples of the subroutines itself are available.

In this thesis the author claim that they have published the Mathematica notebooks in the Journal of Biomechanical Engineering ASME as supplemental material, where it is free to access and download. Unfortunately, we failed to find these notebooks on WEB. If you know how to get it - please comment it.

How to Encrypt and Decrypt Files With GPG on Linux

https://www.howtogeek.com/427982/how-to-encrypt-and-decrypt-files-with-gpg-on-linux/