Using multiple softwares for performing a simulation

Discussion about building and installing Elmer
annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 07 Nov 2014, 12:05

Using Elmer with gmsh in Onelab VirtualMachine
The Open Numerical Engineering LABoratory (ONELAB) uses the Elmer finite element solver.
http://www.onelab.info/wiki/Main_Page

The installation procedures for Elmer in ONELAB virtual machine are described here. The ONELAB virtual machine is configured in such a way that Elmer and GMSH can be installed by using simple terminal commands as described in the link

Yours
Anil Kunwar
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 13 Dec 2014, 11:43

Tutorials on C Programming,C++ Programming , Cmake
http://www.cprogramming.com/tutorial/templates.html
http://www.tutorialspoint.com/c_standar ... n_atoi.htm
http://myweb.stedwards.edu/laurab/help/ ... ehelp.html
http://www.aosabook.org/en/cmake.html (reference on cmake)
http://www.cmake.org/
http://www.cmake.org/Wiki/CMake
http://www.cmake.org/cmake-tutorial/
http://www.vtk.org/Wiki/CMake_FAQ#What_is_CMake.3F
http://www.elpauer.org/stuff/learning_cmake.pdf
http://rachid.koucha.free.fr/tech_corne ... anual.html
http://brunoabinader.com/?p=29
http://public.kitware.com/cgi-bin/viewc ... ial/Step1/
https://techbase.kde.org/Development/Tutorials/CMake
http://johnlamp.net/cmake-tutorial-1-ge ... arted.html(Tutorial for CMake)
an example for using cmake
virtual functions in C++
polymorphism in C++
http://geoffair.net/unix/cmake.htm
some concepts in using cmake platform
Tutorial on C++ Class and Object from www dot tutorialspoint dot com
Function Overloading in C++ Tutorials from www dot tutorialspoint dot com
undefined reference to 'function' in makefile
notes on 'the undefined reference to' message emitted by linker
Invalid initialization error in C++
C++ shared library makefile template

Class and Objects in C++
Objects are defined within the main function
int main() { define objectname in this position}

Code: Select all

#include <iostream>
using namespace std;

//Define Class and Class Attributes 
class ClassName
{
public:
class attributes ...
};

//Define object(s) of the class that will utilise the class attributes
 int main()
{
ClassName objectname1;
ClassName objectname2;
ClassName objectname3;
...
};

Shared libraries in FORTRAN (-kPIC or FPIC options)
1. https://software.intel.com/en-us/node/525275
2. http://www.shocksolution.com/2009/10/bu ... n-library/
3. https://docs.oracle.com/cd/E19059-01/st ... tions.html
4. http://stackoverflow.com/questions/1011 ... s-not-work (very important condition for fortran dynamically linking libraries).
5. http://tinf2.vub.ac.be/~dvermeir/manual/uintro/gpp.html
6. http://www.ugrad.cs.ubc.ca/~cs219/Cours ... aries.html
7. https://www.gnu.org/software/libtool/ma ... files.html
8. http://makepp.sourceforge.net/1.19/makepp_tutorial.html


MPI for C,fortran and C++;Python; FORTRAN Programming
Examples of MPI with C++
MPI and Python
parallel computing in python
Running programs with mpirun
running mpi jobs using openmpi
http://particlephysicsandcode.com/tag/i ... pi-ubuntu/
http://www.open-mpi.org/faq/
https://likymice.wordpress.com/2015/03/ ... -04-13-10/

Distribution MPI and Installed MPI Path
Ubuntu Distribution MPI

Code: Select all

$mpicxx -showme
g++ -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread -L/usr//lib -L/usr/lib/openmpi/lib -lmpi_cxx -lmpi -ldl -lhwloc
OpenMPI environment created for use in MOOSE

Code: Select all

$moose
$mpicxx -showme
g++ -I/opt/moose/openmpi/openmpi-1.8.4/gcc-opt/include -pthread -Wl,-rpath -Wl,/opt/moose/openmpi/openmpi-1.8.4/gcc-opt/lib -Wl,--enable-new-dtags -L/opt/moose/openmpi/openmpi-1.8.4/gcc-opt/lib -lmpi_cxx -lmpi
Last edited by annier on 10 Jun 2016, 17:36, edited 24 times in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 19 Dec 2014, 17:41

Last edited by annier on 20 Jul 2016, 17:40, edited 9 times in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 15 Jan 2015, 16:27

Hi,
-Print command in Fortran 90
-Print without a newline
-Notes on Fortran 90 programming language can be found here.
-Tutorials on Finite Element Method can be found here.

Yours
Anil Kunwar
Last edited by annier on 29 May 2016, 17:32, edited 1 time in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 23 Jan 2015, 17:21

OpenCALPHAD
In the article entitled OpenCalphad - a free thermodynamic software , the structure and working of the OpenCalphad software is discussed in detail. Similarly, the use of OpenCalphad in thermodynamic equilibria for multi-component systems has been discussed in the article entitled The implementation of an algorithm to calculate thermodynamic equilibria for multi-component systems with non-ideal phases in a free software. OCASI has been discussed in the article The opencalphad thermodynamics software interface.
OpenCALPHAD utilizes Compound Energy Formalism (CEF) for calculating Gibbs energy.

Modules for OpenCALPHAD software:
1. Application programs utilizing the OpenCALPHAD application software interface.
2. Performance of calculation and creating diagrams.
3. Single equilibrium calculation for the given flexible external conditions on temperature, pressure,overall composition, chemical potentials, specification of fixed phases etc.
4.Different thermodynamic models to calculate the molar Gibbs energy and partial derivatives with respect to temperature, pressure and composition for each phase in the system.

Major Fortran Modules of OpenCALPHAD_V2 Software
  • 1. General Thermodynamic Package (GTP) -->> models\pmod25.F90
    2. Hillert's Minimizer(liboceq) -->> minimizer\matsmin.F90
    3. Numlib -->> numlib\lukasnum.F90
    4. StepMapPlot utilizing gnuplot -->> stepmapplot\smp1.F90
    5. METLIB used by GTP -->> utilities\metlib3.F90
    6. TPFUNLIB -->> utilities\tp4fun.F90
    7. userif_command_line_monitor_oc_2 -->> userif\pmon6.F90


Major Fortran Modules of OpenCALPHAD_V3 Software(2016_01_04)
  • 1. General Thermodynamic Package (GTP) -->> models\gtp3.F90
    2. METLIB utilities used by GTP -->> utilities\metlib3.F90
    3. Hillert's Minimizer(liboceq) -->> minimizer\matsmin.F90
    4. Numlib -->> numlib\lukasnum.F90
    5. Numlib -->> numlib\imdifllib.F90
    6. StepMapPlot utilizing gnuplot -->> stepmapplot\smp1.F90
    7. userif_command_line_monitor_oc_3b -->> userif\pmon6.F90
Notes:

Different versions of OpenCALPHAD in Ubuntu 14.04

A. The Location of Software Versions
Let's consider that the directories of different versions of OpenCALPHAD software are put inside the directory ~/OpenCalphad_Projects , as:
  • ~/OpenCalphad_Projects/ocversion1a/
    ~/OpenCalphad_Projects/ocversion2a/
    ~/OpenCalphad_Projects/ocversion3a/
    ~/OpenCalphad_Projects/ocversion3b
    /
The corresponding executables after compilation of makefile are found within a version directory (eg. for ocversion1a, the executable oc1A is resulted within this directory).

B. Defining the path of each executable and assigning an alias for each pathnames
1. Create a directory called OpenCalphad_Bin in home directory and creates files for pathnames for each versions

Code: Select all

$mkdir OpenCalphad_Bin

Code: Select all

$cd OpenCalphad_Bin

Code: Select all

$gedit ocv1a
2. Paste the following code for PATH definition

Code: Select all

#OpenCalphad Environment
#1 refers to the version 
export OC_HOME=$HOME/OpenCalphad_Projects/ocversion1a
export PATH=$PATH:$OC_HOME
3. Repeat gedit command of step 1 for other files ocv2a, ocv3a and ocv3b. Then put the following typecode of step 2 for each files as

Code: Select all

#OpenCalphad Environment
#Na/Nb in ocversionNa or ocversionNb refers to the version 
export OC_HOME=$HOME/OpenCalphad_Projects/.^.^. 
 #ocversion2a or ocversion3a or ocversion3b in the place of .^.^.
export PATH=$PATH:$OC_HOME
4. Create the alias names for OpenCALPHAD Versions 1A , 2A, 3A and 3B in bash shell

Code: Select all

$gedit ~/.bashrc

Code: Select all

#Alias names for different versions of OpenCalphad
alias opencalphad1a='. $HOME/OpenCalphad_Bin/ocv1a'
alias opencalphad2a='. $HOME/OpenCalphad_Bin/ocv2a'
alias opencalphad3a='. $HOME/OpenCalphad_Bin/ocv3a'
alias opencalphad3b='. $HOME/OpenCalphad_Bin/ocv3b'
5. Save the bash file . Close all the open terminals and open a new terminal. In the new termnal, type the alias name of a version of OpenCalphad (eg. version1) to get redirected to the executable of the OC version.

Code: Select all

$opencalphad1a
Now, the executable of the opencalphad version1a can be accessed by typing :

Code: Select all

$ oc1A
The similar procedure can be followed to utilize or access executables of other versions of OpenCALPHAD.

6. To run the macros code with the filename macrofilename.OCM with the executable oc3b

Code: Select all

$./oc3B

Code: Select all

OC3: mac macrofilename
The macrofilename.OCM and the database.TDB should be in the same directory with the executable oc3b.
The executable oc3b corresponds to the OpenCalphad version 3.


Tutorial in OpenCALPHAD (GRAPHS)

1. AgCu.TDB
AgCu_Phase_Diagram
AgCu_Phase_Diagram
OpenCALPHAD_Tutorial_AgCu_Phase_Diagram.png (31.75 KiB) Viewed 8699 times
AgCu_PhaseDiagram_in_3(blackplusadditional2_Colours-red,lightgreen)
AgCu_PhaseDiagram_in_3(blackplusadditional2_Colours-red,lightgreen)
Ag_Cu_PhaseDiagram.png (47.93 KiB) Viewed 7055 times
Thermodynamic Database
Cu-Sn Alloys


Phase Diagrams and Computational Thermodynamics
Introductory lectures on Thermodynamics and Phase Diagrams
Scientific Publications
Metallic Properties of Intermetallic Compounds
http://www.metallurgy.nist.gov/phase/solder/cusn.html
http://www.tms.org/pubs/journals/JOM/97 ... -9712.html
CALPHAD method lectures using ThermoCALC
Thermodynamic properties of Sn-Ag-Cu solders in liquid state
Thermodynamic description of the Cu-Sn system
Thermocalc user guide version 2015b
Thermocalc console user guide 2013
Thermocalc database manager guide
Thermocalc examples with DICTRA
Thermodynamic modeling using CALPHAD and its application to innovative materials
First principles methods for thermodynamics study of Al-Co-Cr System
Computational Thermodynamics/CALPHAD Departments in ICAMS, Ruhr-Universitat Bochum , Ruhr, Germany
The thermodynamic properties of cementite

CALPHAD and/or Electromigration Coupling
1. Three dimensional interdiffusion under stress field
2. Thermal , thermodynamic and kinetic modeling of lead-free solders
3. Influence of Sn Orientation on the EM in Idealized Lead Free Interconnects
4. Thermodynamics and kinetics for materials science
5. Thermodynamic and kinetic modeling of multicomponent alloys
6. Model for excess gibbs free energy at high pressures
7. Method for calculating excess gibbs free energy at isothermal conditions
8. Coating , mechanical constraints and pressure effects on electromigratioin
9. Thermocalc illustrations

Some Essential Notes on FORTRAN
1. http://nbviewer.ipython.org/github/cert ... agic.ipynb
2. http://objectmix.com/fortran/244092-gfo ... print.html

Interfacing OC with application software
OpenCalphad Application Software Interface (OCASI), February 2016
Interfacing OC in OpenPhase software and OpenPhase poster
Dendritic solidification of AlCu material
Dendritic solidification modeling by phase field method
Command for downloading and Installing OpenPhase Software in Ubuntu 14.04
1. Download OpenPhase software source files

Code: Select all

$ svn checkout  https://dev.icams.rub.de/OpenPhase/stable/OpenPhase.1308.May2014 
Accept temporarily

Code: Select all

$ t
2. Download fftw-3.3.4.tar.gz from http://www.fftw.org/download.html.

3. Unzip the fftw-3.3.4.tar.gz tar file and install it by jumping into the fftw-3.3.4 directory

Code: Select all

$ ./configure

Code: Select all

$ make

Code: Select all

$ sudo make install
4. Jump into the directory OpenPhase.1308.May2014 and install it as:

Code: Select all

$ make
Also, for installing tutorials use make command as it as:

Code: Select all

$ make examples
Review Article on Calphad by Ursula R. Kattner (2016)
diffusion and oxidation in metal oxides

NIST materials genome initiative
1. Software tools for NIST MGI
2. Generic Materials Design Toolkit

Software for Calculation of InterDiffusion Coefficients
1. HIgh-Throughput Determination of Interdiffusion Coefficients (HitDIC)
2. https://hitdic.com/docs/installation.html#linux


Yours
Anil Kunwar
Last edited by annier on 11 Jan 2018, 19:19, edited 71 times in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 02 Feb 2015, 17:01

Hi,

Installing Python based thermodynamic modules in Ubuntu 14.04:
Thermopy contains python utilities for thermodynamics and thermochemistry.
1. Download thermopy-0.3 (thermopy-0.3.tar.gz) from https://pypi.python.org/pypi/thermopy.
2. Untar the file using

Code: Select all

$tar -zxvf thermopy-0.3.tar.gz
3. Download ez_setup-0.9 (ez_setup-0.9.tar.gz) from https://pypi.python.org/pypi/ez_setup.
4. Untar the file using

Code: Select all

$tar -zxvf ez_setup-0.9.tar.gz
5. Place the ez_setup-0.9 folder within thermopy-0.3 directory i.e. the location of its contents is at (~/thermopy-0.3/ez_setup-0.9/)
6. Jump into ez_setup-0.9 at ~/thermopy-0.3/ez_setup-0.9/ as root user and install the ez_setup.py

Code: Select all

$sudo -s

Code: Select all

#python ez_setup.py install
7.Jump back into the thermopy-0.3 folder and run setup.py.

Code: Select all

#cd ..

Code: Select all

#python setup.py install
8. The thermopy-0.3 python package is installed in Ubuntu 14.04.

Note:
1. Although an older version of ez_setup.py is already present in the thermopy-0.3.tar.gz, running this with python2.7 in Ubuntu 14.04 produces the following result:

Code: Select all

#python ez_setup.py install
install_dir /usr/local/lib/python2.7/dist-packages/
Searching for install
Reading http://pypi.python.org/simple/install/
Couldn't find index page for 'install' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for install
error: Could not find suitable distribution for Requirement.parse('install')
.
So, in Ubuntu 14.04, it is required to run ez_setup.py from newer versions of ez_setup.

2. A code used in context of division of numbers(real,integer, float etc.) in python.

Code: Select all

from __future__ import division
Links:
http://pythonhosted.org//thermopy/
http://pythonhosted.org//thermopy/utili ... mopy.units
Running a thermopy module using python
1. Create a file named abcd.py and paste therein the following:

Code: Select all

#this is an example of running thermopy.units module
from thermopy.units import *
enthalpy = Enthalpy(100)
print 'enthalpy in kJ/kg=',enthalpy.kJkg
2. Jump into the directory containing the file abcd.py and type the following:

Code: Select all

$python abcd.py
3. The print in the terminal is

Code: Select all

$enthalpy in kJ/kg= 0.1
4. Or, we can run it directly in the terminal as:

Code: Select all

$python
>>> from thermopy.units import *
>>> h_1=Enthalpy(100)
>>> print h_1.kJkg
0.1
>>>exit()

yours
Anil Kunwar
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 07 Mar 2015, 15:15

pycalphad
http://nbviewer.ipython.org/github/rich ... ee/master/
https://github.com/richardotis/pycalphad
It is a python based library for CALculation of PHAse Diagram, developed by Richard Otis.


Yours
Anil Kunwar
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium


annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 24 Mar 2015, 20:09

Last edited by annier on 25 Mar 2015, 12:57, edited 1 time in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

annier
Posts: 1123
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Using multiple softwares for performing a simulation

Post by annier » 25 Mar 2015, 12:38

Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium

Post Reply