OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
random_seeds.hpp File Reference

Random distribution of crystalline seeds initial condition. More...

#include <random>
#include "../field_modifier.hpp"
#include "openpfc/field/operations.hpp"
#include "seed.hpp"
Include dependency graph for random_seeds.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pfc::RandomSeeds
 

Detailed Description

Random distribution of crystalline seeds initial condition.

This file defines the RandomSeeds class, which places spherical crystalline seeds at random locations throughout the domain. Useful for:

  • Realistic polycrystalline microstructures
  • Statistical studies of grain growth
  • Homogeneous nucleation simulations

The number and properties of seeds are configurable. Seeds are randomly positioned using the Mersenne Twister random number generator.

Usage:

auto ic = std::make_unique<pfc::RandomSeeds>();
ic->set_amplitude(0.2);
ic->set_density(0.5);
simulator.add_initial_condition(std::move(ic));
See also
seed.hpp for seed construction helper
field_modifier.hpp for base class
Author
OpenPFC Contributors
Date
2025