Giter VIP home page Giter VIP logo

phasefield's Introduction

Build Status License: LGPL v2.1 DOI

Useful Links:

PRISMS-PF Website
Code repository
User manual (with installation instructions)
User registration link
User forum
Training slides/exercises
PFHub phase-field community

Version information:

This version of the code, v2.3, contains moderate changes from v2.2. It was released in March 20213. See version_changes.md for details.

What is PRISMS-PF?

PRISMS-PF is a powerful, massively parallel finite element code for conducting phase field and other related simulations of microstructural evolution. The phase field method is commonly used for predicting the evolution if microstructures under a wide range of conditions and material systems. PRISMS-PF provides a simple interface for solving customizable systems of partial differential equations of the type commonly found in phase field models, and has 24 pre-built application modules, including for precipitate evolution, grain growth, and solidification.

With PRISMS-PF, you have access to adaptive meshing and parallelization with near-ideal scaling for over a thousand processors. Moreover, the matrix-free framework from the deal.II library allows much larger than simulations than typical finite element programs โ€“ PRISMS-PF has been used for simulations with over one billion degrees of freedom. PRISMS-PF also provides performance competitive with or exceeding single-purpose codes. For example, even without enabling the mesh adaptivity features in PRISMS-PF, it has been demonstrated to be over 6x faster than an equivalent finite difference code.

This code is developed by the PRedictive Integrated Structural Materials Science (PRISMS) Center at University of Michigan which is supported by the U.S. Department of Energy (DOE), Office of Basic Energy Sciences, Division of Materials Sciences and Engineering under Award #DE-SC0008637.

Citing PRISMS-PF

Please cite the following reference when discussing PRISMS-PF in a publication:

S. DeWitt, S. Rudraraju, D. Montiel, W.B. Andrews, and K. Thornton. PRISMS-PF: A general framework for phase-field modeling with a matrix-free finite element method. npj Computuational Materials 6, 29 (2020).

If additionally you would like to cite a specific release of PRISMS-PF, please use the following format:

PRISMS-PF, v2.1.2 (2019). Available from https://github.com/prisms-center/phaseField. DOI: 10.5281/zenodo.3357005.

For DOI information for other releases, please refer to this site.

Quick Start Guide:

For detailed instructions on how to download and use PRISMS-PF, please consult the PRISMS-PF User Manual. A (very) abbreviated version of the instructions is given below.

Installation:

Please refer to the installation section of the user manual for details.

  1. Install CMake, p4est, and deal.II (version 9.5 recommended)

  2. Clone the PRISMS-PF GitHub repository

$ git clone https://github.com/prisms-center/phaseField.git
$ cd phaseField
$ git checkout master
$ cmake .
$ make -j <nprocs>

[here denotes the number of processors]

Running a Pre-Built Application:

Please refer to the Running a PRISMS-PF Example App for full details including instructions for visualization of the results.

Examples of various phase field models are located under the applications directory. The easiest way to get started on the code is to run the example apps in this folder.

The example apps are intended to serve as (1) Demonstration of the capabilities of this library, (2) Provide a framework for further development of specialized/advanced applications by users.

Apps that are still under development/testing are preceded by an underscore.

Entering the following commands will run one of the pre-built example applications (the Cahn-Hilliard spinodal decomposition application in this case):

$ cd applications/cahnHilliard
$ cmake .

For debug mode [default mode, very slow]:

$ make debug

For optimized mode:

$ make release

Execution (serial runs):

$ ./main

Execution (parallel runs):

$ mpirun -np <nprocs> ./main

[here denotes the number of processors]

Visualization:

Output of the primal fields fields is in standard vtk format (parallel:.pvtu, serial:.vtu files) which can be visualized with the following open source applications:

  1. VisIt (https://wci.llnl.gov/simulation/computer-codes/visit/downloads)
  2. Paraview (http://www.paraview.org/download/)

License:

GNU Lesser General Public License (LGPL). Please see the file LICENSE for details.

Further information, questions, issues and bugs:

phasefield's People

Contributors

david-montiel-t avatar jpluce avatar landinjm avatar qixinbo avatar rudraa avatar stvdwtt avatar wband avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phasefield's Issues

1D calculations are not supported

deal.II doesn't support distributed 1D triangulations. If we want to support true 1D calculations we would need to add support for a non-distributed triangulation. Currently, 1D simulations should be implemented as degenerate 2D simulations. The PRISMS-PF documentation should be updated to reflect this.

Clarify what "refine factor" does when adaptivity is turned on

The refine factor only sets up the very initial mesh where the initial conditions are first applied. It just has to be fine enough that it picks up the features that need further refinement.

Need to add a note in the parameters.in explanation of refine factor to tell this to users. I should also add a note in the user guide.

Possible indexing error with multiple vector fields

We haven't run a complete set of tests if multiple variables are vector fields. However, some initial investigations show that there might be an indexing error. We're currently investigating the problem.

Output filenames corrupted above 1,000,000 iterations

Above 1,000,000 iterations the filenames of the outputs have non-numerical characters in the hundred-thousands place. Also, they are not able to be loaded into VisIt (either with the original filename or if I manually fix them).

The problem can be found on the _single_precipitate branch of the private repo. I'm not copying a branch to the public repo because I noticed the issue in the singlePrecipitate application. Presumably, it affects all of the applications.

Fix subscriptor error

In v2.0 (and maybe earlier versions too), if you run a simulation in debug mode, it ends with a subscriptor error. This doesn't impact the solution, it just means that there may be a memory leak.

I'm looking into it now.

h/t to @jpluce for noticing this

Duplicate documentation in precipitateEvolution folder

There are two pdfs files in the precipitateEvolution applications folder, formulation_precipitateEvolution.pdf and precipitateEvolution.pdf. They both appear to have the same roughly the same content, although the commit comments suggest precipitateEvolutioin.pdf is an update to formulation_precipitateEvolution.pdf. To avoid confusion, I would suggest removing one of the pdf files.

Issue compiling cahn example

Hi folks,
I'm trying to compile the cahnHilliard example. I have deal II installed and after successfully running cmake, I get the following error with make:

/home/workgroups/reit/packages/phase-field/phaseField-1.0/applications/cahnHilliard/../../src/models/coupled/generalized_model_functions.h:1026:60: error: 'MPI_Send' was not declared in this scope
       MPI_Send(&numNuclei, 1, MPI_INT, 0, 0, MPI_COMM_WORLD);

I get similar errors for MPI_Barrier, MPI_Recv. MPI_DOUBLE, MPI_INT and more.
I have the MPI environment set up right; I have tested it with different combinations of intel and openmpi and no luck.
Any pointers?
Thank you

Add more adaptive meshing options

An ellipsoidal shell option has been developed, but isn't merged in get. A Kelly error estimator option is currently commented out, it still needs some work. @wband suggested one where the user sets a threshold for the magnitude of the gradient of selected variables, which should be easy to implement.

Please add any other ideas/requests here.

v2.0 wrap-up

At least:
update version_changes.txt
Reference the new anisotropy app in the user guide
add a pdf of the exercises

Four extra lines must be deleted for CHAC_anisotropy application?

Dear developers:
I have found that there are four extra lines in CHAC_anisotropy and CHAC_anisotropyRegularized.
They are Lines 38-41 at the ICs_and_BCs.h:
r=p.distance(Point<dim>(spanX/3.0,spanY/3.0)); scalar_IC = 0.5*(1.0-std::tanh((r-spanX/5.0)/(3*dx))); r=p.distance(Point<dim>(3.0*spanX/4.0,3.0*spanY/4.0)); scalar_IC += 0.5*(1.0-std::tanh((r-spanX/12.0)/(3*dx)));
When the dimension of the problem is set to be 3, then they will cause an error, since the dim in above code is refined to be 2.

dendritic-growth simulation has succeed using prisms-pf

Dear Steve:
A new example of using prisms-pf to simulate dendritic-growth has been conducted. The results are as follows:
2D
3D

Thank you so much!

My code is here:
code

However, currently, I cannot make a pull request, since I made some changes in the basic framework of prisms-pf.
For example, the governing equations of dendritic growth need two sets of SolutionSet: the current one solutionSet and the last one oldSolutionSet. So I change the solutionSet in the functions of computeRHS, getRHS and residualRHS to a vector containing solutionSet and oldSolutionSet.

I hope the main framework of prisms-pf can add a feature of receiving several sets of solutions in the RHS construction (or it has already such a feature?), so I can change my code and make a pull request to the main branch.

Xin-Bo Qi

Include p4est dependence in installation instructions

If you are building deal.II from source, you must install the p4est library before installing deal.II. If you are downloading a binary package (the recommended option for Macs), p4est already is in the package, so you don't have to worry about it.

The p4est library can be downloaded at:
http://www.p4est.org/ (download the tarball of the latest release)

Install it using the configure script that comes in the tarball:
./configure --prefix=/path/to/p4/ --enable-mpi
make
make install

When installing deal.II, make sure to pass it the flag that links it to p4est:
cmake -DCMAKE_INSTALL_PREFIX=/path/to/dealII -DP4EST_DIR=/path/to/p4/ -DDEAL_II_WITH_P4EST=ON -DDEAL_II_WITH_MPI=ON /path/to/dealIIsources/
make
make install

To verify that p4est is enabled in your installation of deal.II, you can open "summary.log" in the deal.II build directory and check to see if it says "DEAL_II_WITH_P4EST set up with external dependencies". If so, the installation includes p4est. If the log file instead says "DEAL_II_WITH_P4EST = OFF", then there was an issue in linking deal.II with your p4est installation.

Finally, some users have had issues installing deal.ii with the Intel compiler. We recommend using the GNU compiler instead.

Move to text-based input files

Currently, PRISMS-PF needs to be recompiled if any parameter is changed. We're planning to move to text-based input files so that simple parameter changes do not require recompilation.

Skipped checkpoint during pre-nucleation phase turns off checkpoints

Currently, if the first checkpoint occurs between the start of the simulation and when the first nucleus appears in a simulation with nucleation, no checkpoints are created.

Solution: Increment the checkpoint counter during the artificial time stepping in the nucleation function just like the time step counter and output counters are incremented.

fix DIM==1

more than one partial specialization matches the template argument list of class "dealii::FEEvaluationAccess<1, 2, 2, 1, double>".

Suggestion for PRISMS-PF user guide

Under section 8) Creating Custom Applications, I would suggest adding emphasis to the fact that the folder for the new project must be in the applications folder, otherwise the transferred code will not be able to find the files it needs to be able to run.

Add an automatic checkpoint system

Add the option for an automatic checkpoint system that saves to a vtk file periodically. In the case of a crash, this vtk file could be read in (unlike vtu files which would have to be converted to vtk files to be read). The larger size of the vtk files wouldn't matter much because the dataset would be continually overwritten once a new checkpoint is reached.

h/t to @erikhans who had the idea

Add documentation for skipPrintSteps

One can add:
#define skipPrintSteps [some number]

to not print out every time step. Currently, this isn't in the documentation (or in many of the example applications).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.