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

Fixed boundary condition with smooth transition. More...

Include dependency graph for fixed_bc.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pfc::FixedBC
 

Detailed Description

Fixed boundary condition with smooth transition.

This file defines the FixedBC class, which enforces fixed values at domain boundaries with a smooth transition region. The boundary condition:

  • Sets field values to specified low/high values at domain edges
  • Uses smooth exponential transition to avoid sharp discontinuities
  • Configurable transition width and strength

Useful for:

  • Dirichlet boundary conditions
  • Fixed-wall simulations
  • Controlled boundary reservoirs

Usage:

auto bc = std::make_unique<pfc::FixedBC>(0.0, 1.0); // low, high values
bc->set_field_name("density");
simulator.add_boundary_condition(std::move(bc));
See also
field_modifier.hpp for base class
moving_bc.hpp for time-dependent boundary condition
Author
OpenPFC Contributors
Date
2025