Seiten

Samstag, 24. Januar 2015

Install FEAPpv on Ubuntu 14.04

FEAPpv is a general purpose Finite Element Software developed at the University of Berkley. FEAPpv is the chargefree private Version of FEAP. One can find all information at [1] and [2].
As a tool for experimentation, practice and education, FEAP was used in lectures about FEM and material mechanics. There, I got in touch with it and like it very much, due to its excellent extensibillity, documentation and scripting features that reveal what happens behind and not to forget the great community [3].
Now that I didn't work with FEM for several years, I decided to toy arround with FEAP again.

The first thing ist always installation. On Linux the recommended way is to build it from source. In the following, I would like to show how it worked for me on Ubuntu 14.04.

First of all, download the source code from [1]. At the time of this writing, it is version 3.1, so you get a file called feappv31.zip. Unpack it with 7z or what else fits your needs and you get a directory called ver31. Inside this direktory one finds the files makefile and makefile.in. We have to configure the file makefile.in.

In this file you have to set a path variable FEAPPVHOME3_1 that points to your ver31-Directory. In my case this looks like follows:

export FEAPPVHOME3_1=/home/marco/projekte/feappv/ver31

Actually, I had to export FEAPPVHOME3_1 on the bash by hand bevor I started make.

The compiler settings worked for me with the default set to:

FF = gfortran
CC = gcc

In my case, I had to install gfortran. On Ubuntu, that's easily done with apt:

sudo apt-get install gfortran

Now we can build the executable with:

make install

which gives us the binary feappv in ver31/main/. For feappv, we have to set  x-bit to make it executable:

chmod -x feappv

Just start it now by typing: ./feappv

When I tried to view the postprozessing data of my first toy model, I encountered some problems with the plotting modul. FEAPpv abborted with an error because the default font Helvetica was not installed on my machine. The source of this problem is the file x11u.c in the folder unix. The font used by the plot modul seems to be defined there:

if ( Min ( dw->x_len , 1.27*dw->y_len ) < 440 )
     nfont        = XLoadFont(disp,"*helvetica-medium-r-normal--8*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 600. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--10*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 760. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--12*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 920. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--14*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 1080. )
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--18*");
else
     nfont        = XLoadFont(disp,"*helvetica-bold-r-normal--20*");

In my case, I fixed this by replacing helvetica with misc-fixed:

if ( Min ( dw->x_len , 1.27*dw->y_len ) < 440 )
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--10*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 600. )
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--10*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 760. )
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--13*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 920. )
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--14*");
else if ( Min ( dw->x_len , 1.27*dw->y_len ) < 1080. )
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--18*");
else
     nfont        = XLoadFont(disp,"*misc-fixed-medium-r-normal--20*");

whitch was already installed. xlsfonts prints all available fonts on the shell. After that I built it again an everything has been working just fine. I found this solution in a thread on the great FEAP Forum [4]

Hope this helps to get started with FEAPpv, whitch is really a great tool. One day, I will also find out how to highlight code in posts ;)



[1] Official FEAPpv website: http://www.ce.berkeley.edu/projects/feap/feappv/

[2] Official FEAP website:  http://www.ce.berkeley.edu/projects/feap/

[3] FEAP user forum: http://feap.berkeley.edu/forum/index.php

[4] The thread about font problems: http://feap.berkeley.edu/forum/index.php?topic=104.0

1 Kommentar: