![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Phase Field Crystal model for solidification simulations. More...


Public Member Functions | |
| PFCModel (const World &world, std::unique_ptr< FFT > fft, double epsilon) | |
| Construct PFC model with specified domain. | |
| void | initialize (double dt) override |
| Initialize model: allocate fields and precompute operators. | |
| void | step (double time) override |
| Single time step: advance ψ(t) → ψ(t+dt) | |
| double | get_epsilon () const |
| Get current epsilon value. | |
| void | set_epsilon (double epsilon) |
| Set epsilon (for parameter studies) | |
Public Member Functions inherited from pfc::Model | |
| ~Model () | |
| Destroy the Model object. | |
| Model (FFT &fft, const World &world) | |
| Model (const Model &)=delete | |
| Disable copy constructor. | |
| Model & | operator= (const Model &)=delete |
| Disable copy assignment operator. | |
| bool | is_rank0 () const noexcept |
| Check if current MPI rank is 0. | |
| const World & | get_world () const noexcept |
| Get the decomposition object associated with the model. | |
| FFT & | get_fft () noexcept |
| virtual size_t | get_allocated_memory_bytes () const |
| bool | has_real_field (std::string_view field_name) const noexcept |
| Check if the model has a real-valued field with the given name. | |
| void | add_real_field (std::string_view name, RealField &field) |
| bool | has_complex_field (std::string_view field_name) const noexcept |
| void | add_complex_field (std::string_view name, ComplexField &field) |
| RealField & | get_real_field (std::string_view name) |
| const RealField & | get_real_field (std::string_view name) const |
| Retrieve a registered real-valued field by name (const version) | |
| ComplexField & | get_complex_field (std::string_view name) |
| const ComplexField & | get_complex_field (std::string_view name) const |
| Retrieve a registered complex-valued field by name (const version) | |
| void | add_field (const std::string &name, RealField &field) |
| Add a field to the model. | |
| void | add_field (const std::string &name, ComplexField &field) |
| Add a field to the model. | |
| bool | has_field (std::string_view field_name) const noexcept |
| virtual Field & | get_field () |
| Get a reference to the default primary unknown field. | |
Phase Field Crystal model for solidification simulations.
Implements single-mode PFC dynamics: ∂ψ/∂t = ∇²[ε·ψ + ψ³ + (1 + ∇²)²ψ]
Where: ψ - density field (deviation from liquid) ε - dimensionless temperature (controls undercooling)
Time integration: Semi-implicit spectral method
Construct PFC model with specified domain.
| world | Physical domain geometry |
| fft | FFT engine for spectral transforms |
| epsilon | Dimensionless temperature (ε < 0 for undercooling) |
|
inline |
Get current epsilon value.
Initialize model: allocate fields and precompute operators.
| dt | Time step size |
Implements pfc::Model.
Set epsilon (for parameter studies)
| epsilon | New dimensionless temperature |
Single time step: advance ψ(t) → ψ(t+dt)
| time | Current simulation time (unused in this model) |
Implements pfc::Model.