NAME

Physics::PVD - Physical Vapor Deposition simulation framework

SYNOPSIS

use Physics::PVD;

my $pvd = Physics::PVD->new(
    method      => 'kmc',
    temperature => 600,   # K
    pressure    => 5e-3,  # Pa
);

# Configure and run KMC film growth
my $kmc = $pvd->kmc(lattice_size => [100, 100, 50]);
$kmc->add_species(name => 'Ta', mass => 180.95, binding_energy => 8.1);
$kmc->deposit(flux => 1e14, time => 60, angle => 0);

# Get results
my $film = $kmc->get_film;
printf "Thickness: %.1f nm\n", $film->thickness;
printf "Roughness: %.2f nm\n", $film->roughness;

DESCRIPTION

Physics::PVD provides a Perl framework for simulating Physical Vapor Deposition (PVD) processes. It combines:

  • Kinetic Monte Carlo (KMC)

    BKL rejection-free atomistic film growth: adsorption, surface diffusion, desorption, Ehrlich-Schwoebel step-edge barriers, oblique-angle deposition, and multi-species films.

  • Direct Simulation Monte Carlo (DSMC)

    Rarefied vapor transport using Thompson energy distributions, cos^n angular emission, variable hard-sphere collisions, and Knudsen-number characterization.

  • Hybrid coupling

    DSMC flux/energy/angle distributions can be fed into the KMC film growth engine for coupled transport-plus-growth simulations.

  • External interfaces (optional)

    Interfaces to OpenFOAM (dsmcFoam+), LAMMPS (molecular dynamics deposition/sputtering/annealing), and QuantumATK (DFT/DFTB binding energies and sputtering yields) enable multi-scale workflows.

VERSION

Version 0.02

METHODS

new(%options)

Create a new Physics::PVD simulation controller.

my $pvd = Physics::PVD->new(
    method      => 'kmc',       # 'kmc' | 'dsmc' | 'hybrid'
    temperature => 300,          # substrate temperature (K)
    pressure    => 1e-3,         # base pressure (Pa)
    verbose     => 0,            # print progress messages
    seed        => 12345,        # RNG seed for reproducibility
);

Defaults:

  • method: 'kmc'

  • temperature: 300 K

  • pressure: 1e-3 Pa

  • verbose: 0

  • seed: random 31-bit integer

configure(%params)

Update simulation parameters after construction.

$pvd->configure(temperature => 700, pressure => 2e-3);

kmc(%options)

Get or create the Physics::PVD::KMC engine. Options are forwarded to the engine constructor and override the controller defaults.

my $kmc = $pvd->kmc(
    lattice_size => [100, 100, 50],
    temperature  => 600,
);

dsmc(%options)

Get or create the Physics::PVD::DSMC engine. Options are forwarded to the engine constructor and override the controller defaults.

my $dsmc = $pvd->dsmc(
    n_particles => 10000,
    pressure    => 2.0,
);

film(%options)

Get or create a Physics::PVD::Film analysis object.

my $film = $pvd->film;
printf "Thickness: %.1f nm\n", $film->thickness;

interface($name, %options)

Load and instantiate an external interface module on demand. $name must be one of the interfaces returned by "available_interfaces".

my $lmp  = $pvd->interface('lammps',
    executable => '/usr/bin/lmp',
);
my $foam = $pvd->interface('openfoam',
    case_dir => './my_case',
);
my $atk  = $pvd->interface('quantumatk',
    python_path => 'atkpython',
);

run(%options)

Run a complete PVD simulation using the configured or requested method.

# KMC film growth
my $film = $pvd->run(method => 'kmc', steps => 50000, flux => 1e14);

# DSMC vapor transport
my $dist = $pvd->run(method => 'dsmc', timesteps => 5000);

# Hybrid DSMC -> KMC
my $film = $pvd->run(
    method    => 'hybrid',
    steps     => 50000,
    timesteps => 2000,
    flux      => 5e13,
);

available_methods()

Return the list of supported simulation methods.

my @methods = $pvd->available_methods;
# ('kmc', 'dsmc', 'hybrid')

available_interfaces()

Return the list of available external tool interfaces.

my @interfaces = $pvd->available_interfaces;
# ('lammps', 'openfoam', 'quantumatk')

SUBMODULES

INSTALLATION

From the source distribution:

cd Physics-PVD
perl Makefile.PL
make
make test
make install              # or: make install DESTDIR=~/perl5

Install to a local directory without root privileges:

perl Makefile.PL INSTALL_BASE=~/perl5
make && make test && make install
export PERL5LIB=~/perl5/lib/perl5:$PERL5LIB

Once published on CPAN:

cpanm Physics::PVD

Prerequisites

  • Perl 5.16 or newer.

  • Core modules: Carp, POSIX, List::Util, File::Path, File::Spec, File::Temp.

  • Test::More for running the test suite.

OPTIONAL DEPENDENCIES

These are only required if you use the corresponding interface or examples:

  • PDL and PDL::Graphics::Gnuplot for visualization examples.

  • OpenFOAM executables blockMesh, dsmcInitialise, and dsmcFoam+ for Physics::PVD::Interface::OpenFOAM.

  • LAMMPS with the MANYBODY package for EAM/MEAM/Tersoff potentials in Physics::PVD::Interface::LAMMPS.

  • QuantumATK with a commercial license from Synopsys and the atkpython interpreter for Physics::PVD::Interface::QuantumATK.

  • Interatomic potentials from the NIST Interatomic Potentials Repository (Ta.eam.alloy, Cu.eam.alloy, CuTa.eam.alloy, etc.).

EXAMPLES

Basic KMC film growth

use Physics::PVD;

my $pvd = Physics::PVD->new(temperature => 600);
my $kmc = $pvd->kmc(lattice_size => [50, 50, 30]);
$kmc->add_species(name => 'Ta', mass => 180.95, binding_energy => 8.1);
$kmc->deposit(flux => 1e14, time => 30);

my $film = $kmc->get_film;
printf "Thickness: %.1f nm\n", $film->thickness;
$film->export_xyz('ta_film.xyz');

See examples/kmc_basic.pl.

DSMC vapor transport

use Physics::PVD;

my $pvd  = Physics::PVD->new(pressure => 2.0);
my $dsmc = $pvd->dsmc(n_particles => 5000, target_material => 'Ta');
$dsmc->run(timesteps => 3000);

printf "Knudsen: %.2f\n", $dsmc->knudsen_number;
printf "Mean arrival energy: %.2f eV\n", $dsmc->mean_arrival_energy;

See examples/dsmc_transport.pl.

Hybrid DSMC to KMC

use Physics::PVD;

my $pvd = Physics::PVD->new(
    method => 'hybrid', temperature => 400, pressure => 1.5,
);
my $film = $pvd->run(steps => 50000, timesteps => 2000, flux => 5e13);
printf "Film: %.1f nm, roughness: %.2f nm\n",
       $film->thickness, $film->roughness;

See examples/hybrid_dsmc_kmc.pl.

LAMMPS deposition MD

use Physics::PVD;

my $pvd = Physics::PVD->new;
my $lmp = $pvd->interface('lammps',
    substrate_material => 'Cu',
    deposit_species    => 'Ta',
    potential_file     => 'CuTa.eam.alloy',
);
$lmp->generate_input(template => 'deposition',
                     params => {n_deposits => 100});
$lmp->run;
my $frames = $lmp->parse_dump;

See examples/lammps_pvd.pl.

PHYSICAL MODELS

Kinetic Monte Carlo (KMC)

The BKL (Bortz-Kalos-Lebowitz, 1975) rejection-free algorithm:

1. Build a rate catalog from all possible events using Arrhenius rates: k = nu_0 * exp(-E_a / k_B T).
2. Select an event with probability proportional to its rate: P(event_i) = k_i / sum(k_j).
3. Advance physical time by delta_t = -ln(u) / R_total where u is uniform on (0,1) and R_total is the total rate.

Implemented events: adsorption (rate proportional to flux), surface diffusion, desorption (barrier equals binding energy), and Ehrlich-Schwoebel descent.

Direct Simulation Monte Carlo (DSMC)

Bird's method (1994) for rarefied gas dynamics:

1. Particle emission from the target with Thompson energy distribution P(E) proportional to E / (E + E_b)^3 and cosine^n angular distribution.
2. Free flight for a time step delta_t.
3. Collision using the null-collision method with variable hard-sphere cross-section: P_coll = n_gas * sigma * v_rel * delta_t.
4. Energy transfer via hard-sphere scattering in the center-of-mass frame.

Knudsen number regimes

Kn > 10        Free-molecular   Ballistic, line-of-sight transport
0.1 < Kn < 10  Transitional     Partial thermalization
Kn < 0.1       Continuum        Fully diffusive (continuum mechanics)

BUGS AND SUPPORT

Please report bugs and feature requests at the repository:

https://github.com/your-org/Physics-PVD.git

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself (Artistic License 2.0 / GPL v1+).

SEE ALSO