Skip to content

Latest commit

 

History

History
219 lines (130 loc) · 7.81 KB

Installation_instructions.md

File metadata and controls

219 lines (130 loc) · 7.81 KB

Installation of MicroSim

  1. Running dependencies checker
  2. Installing GUI for MicroSim
  3. Running the Solvers

1. Running Dependency Checker

A small script that checks for the the dependencies required to run all the solvers. Navigate into the folder Dependency_Checker

  • Navigate to the folder named Dependency_Checker.

  • open up a terminal and run :

      sh Dep_Checker.sh
    
  • Check for any missing or improperly configured dependencies .

  • Install the dependencies and run Dependency Checker again.

N.B- This script uses simple version check commands that can generally be accessed from any location. So if any location is not added to the PATH, will show up a 'NOT FOUND' message even though it is installed.

If all the Status of the Dependent libraries are shown as OK then only the user can run all the Solvers.

P.S- Paraview is the preferred software to visualize the data generated. Not installing it wont affect the solvers.

2. Installing GUI for MicroSim

  • Navigate into the MicroSim Lab Folder and go into the folder bearing the Operating system matching that of the user

  • run the script as sudo

       sudo sh install.sh
    

This is a necessary step but not mandatory for running the solvers.

If the user is handy with the operations of the linux, Solvers can be also run individualy by changing the example input files by text editors _(For more info about Infiles, refer section 6 in MicroSim
Infiles can alsobe generated by running the InfileGenerator.py manually using the folowing code in the terminal:

python3 InfileGenerator.py

run the code after navigating to the parent folder.

3. Running the Solvers

The solvers can be run from the GUI. For running the solvers the steps are given below. for more information refer to the readme in each solvers.
Visit the link below to redirected to the Official Youtube Channel

MicroSim in Action:Workshop-cum-Demo

a) Cahn Hillard

It solves Allen-Cahn and Cahn–Hilliard equations using FFTW3.

  • Navigate to the folder 'Cahn_Hilliard_FFT_2D'

  • Compile the code using the following

      make 
    
  • Compilation creates "microsim_ch_fft" file.

  • To use TDB file as input for Gibbs energy expressions, execute:

      python3 GEdata_writer.py Input.in
    

    If TDB file input is not considered or the files with Gibbs energy functions are already generated then proceed for the execution of the code by

      ./microsim_ch_fft Input.in Filling.in output
    

    Authors: Dasari Mohan and M P Gururajan

    This is alpha version of the code and check for updates in future release.

    Copyright (c) 2021 Materials and Process Modelling Laboratory, Department of Metallurgical Engineering and Materials Science, Indian Institute of Technology Bombay, Mumbai 400076 INDIA.

b) Grand-Potential Model (SERIAL)

This is multiphase multi-component phase-field solver based on the grand-potential formalism. This is a 2D serial CPU version of the code.

  • Navigate to the folder 'Grand_potential_Finite_difference_2D_serial'

  • Compile by running :

      make
    
  • Run using the following command:

Syntax: ./microsim_gp <name_of_infile> <name_of_filling_file> <name_of_output_files>

Example:

   ./microsim_gp Input.in Filling.in Outputabc
  • The files generated can be found in the DATA folder in the <name_of_output_files>.vtk format.

    For the above code the output files will be Outputabc_0.vtk,Outputabc_100.vtk, etc.

The code has been developed at IISc Bangalore, Department of Materials Engineering by Prof. Abhik Choudhury.

c) Grand-Potential Model (MPI)

This is multiphase multi-component phase-field solver based on the grand-potential formalism. The solver is parallelized using MPI on CPUs and requires the h5pcc compiler for compilation and execution.

  • Navigate to the folder 'Grand_potential_Finite_difference_2D_MPI'

  • Compile by running :

      make
    

For running the code on the cluster please use a script. For testing on your desktops/laptops the following execution command is required:

Syntax: mpirun -np <num_processors> ./microsim_gp <name_of_infile> <name_of_filling_file> <name_of_output_files> <num_workers_x> <num_workers_y>

N.B- the<num_workers_x> * <num_workers_y> = <num_processors>

Example:

    mpirun -np 4 ./microsim_gp Input.in Filling.in Outputabcd 2 2

For .h5 files, with WRITEHDF5=1(in the Input file), output files need to be transformed in .xml format using the following command

  • Navigate outside the DATA folder that is created upon execution of the above command.

    Syntax: ./write_xdmf <name_of_infile> <name_of_output_file> <start_time> <end_time>

<start_time> and <end_time> refers to the timesteps that is included in the name of the Output files in the DATA folder.

Example:

    ./write_xdmf Input.in Outputabcd 0 100000

For ASCII files in .vtk format the consolidated output files needs to be reconstructed out of separate processor files that are written in the DATA folder that is created upon execution

Syntax: ./reconstruct <name_of_infile> <name_of_output_file> <number_of_workers> <start_time> <end_time>

For More info on WRITEHDF5, ASCII, etc refer MicroSim

The code has been developed at IISc Bangalore, Department of Materials Engineering by Prof. Abhik Choudhury.

The code is built on work by past PhD students

a) Sumeet Rajesh Khanna

d) KKS GPU OPENCL Model

OpenCL code for solidification microstructure evolution using Kim-Kim Suzuki Model

  • Navigate into the folder 'KKS_Opencl'

  • Compile the code using

      make
    

Successful Compilation creates 'kim_soldfn.out' file.

  • GEdata_writer.py is used for generation of Gibbs energy and its derivatives
  • To generate Gibbs energies and execute the program with

Syntax: ./kimsldfn.sh <Input_file_name> <Filling_file_name> <Output_file_name>

Example:

    ./kimsldfn.sh Input.in Filling.in Output

It is always safe to run above command for execution of the code.

  • If Gibbs energies are generated already then generating Gibbs energies can be skipped and directly execute following command. For executing

Syntax: ./microsim_kks_opencl <Input_file_name> <Filling_file_name> <Output_file_name>

Example:

    ./microsim_kks_opencl Input.in Filling.in Output 

The Output file names can be user defined.

Authors: Dasari Mohan and G Phanikumar Acknowledgement to P. Gerald Tennyson for contributions towards code development at IITM

This is alpha version of the code and check for updates in future release.

e) KKS GPU CUDA Model

This code solves the problem of precipitate growth using a multiphase field solver on the GPU. The code is tested on Tesla P100 and Tesla V100. For Tesla K80, one needs to comment "CudaMemPrefetchAsync" in solverloop/evolve.h

  • Navigate inside the folder 'KKS_CuFFT'

  • to create executable 'microsim_kks_cufft'

    run in terminal :

       make
    
  • To run the solver ,
    Syntax: ./microsim_kks_cufft <Input_file_name> <Filling_file_name> <Output_file_name>

      ./microsim_kks_cufft Input.in Filling.in Output
    

The code uses CUDA version 11, CUFFT and CUDA-CUB libraries. nvcc version 11.2 is used for compilation of the codes.

_Input.in contains all numerical and physical parameters used in the simulations.

Makefile creates a DATA folder where the datafiles (in the form of VTK files) are stored. VTK files can be viewed using Paraview._

This is the alpha version of code. We will continue to add more features in future release.

  • GPU Phase-Field Developer Team @ IITH (Pankaj, Saurav Shenoy, Saswata Bhattacharya)

The following contributers are acknowledged

  1. Tushar Jogi
  2. Hemanth Kumar Sandireddy