Physics-PVD

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

# Physics::PVD

**Physical Vapor Deposition simulation framework in Perl**

A comprehensive library for simulating PVD thin film growth using Kinetic Monte Carlo (kMC) for atomistic film formation and Direct Simulation Monte Carlo (DSMC) for vapor-phase transport. Includes optional interfaces to OpenFOAM, LAMMPS, and Quantum...

---

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Optional Dependencies](#optional-dependencies)
- [Quick Start](#quick-start)
- [API Reference](#api-reference)
  - [Physics::PVD](#physicspvd-main-module)
  - [Physics::PVD::KMC](#physicspvdkmc)
  - [Physics::PVD::DSMC](#physicspvddsmc)
  - [Physics::PVD::Film](#physicspvdfilm)
  - [Physics::PVD::Interface::OpenFOAM](#physicspvdinterfaceopenfoam)
  - [Physics::PVD::Interface::LAMMPS](#physicspvdinterfacelammps)
  - [Physics::PVD::Interface::QuantumATK](#physicspvdinterfacequantumatk)
- [Examples](#examples)
- [Physical Models](#physical-models)
- [License](#license)

---

## Features

### Core Simulation Engines

| Engine | Description |
|--------|-------------|
| **KMC** | BKL rejection-free Kinetic Monte Carlo: adsorption, diffusion, desorption, Ehrlich-Schwoebel barriers, oblique deposition, multi-species |
| **DSMC** | Direct Simulation Monte Carlo: Thompson energy distribution, cos^n angular emission, gas-phase collisions, Knudsen number characterization |
| **Hybrid** | DSMC transport → KMC growth coupling (flux/energy/angle distributions) |

### Film Analysis

- Thickness measurement (average height)
- RMS surface roughness
- Film density and porosity
- Composition profiles along growth direction
- Export to XYZ (OVITO/VMD) and LAMMPS data formats

### External Tool Interfaces

| Tool | Capabilities |
|------|-------------|
| **OpenFOAM** | dsmcFoam+ case generation, mesh, BCs, particle injection, parallel execution |
| **LAMMPS** | Deposition MD, sputtering cascades, post-deposition annealing, EAM/MEAM/Tersoff potentials, dump/log parsing |
| **QuantumATK** | DFT/DFTB binding energies, sputter yield (BCA+MD), adatom diffusion MD, electronic transport |

### Key Physics

- **Arrhenius kinetics**: temperature-dependent rates via `k = ν₀ exp(-Ea/kBT)`
- **Ehrlich-Schwoebel barrier**: step-edge descent asymmetry
- **Thompson energy distribution**: `P(E) ∝ E/(E+Eb)³`
- **Variable hard-sphere collisions**: energy-dependent cross-sections
- **Knudsen number classification**: free-molecular, transitional, continuum regimes
- **Shadow effects**: geometric shadowing for oblique-angle deposition

---

## Installation

### From source (this repository)

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

### Using local lib (no root)

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

### With cpanm (once published)

```bash
cpanm Physics::PVD
```

### Prerequisites

- **Perl** ≥ 5.16
- Core modules: `Carp`, `POSIX`, `List::Util`, `File::Path`, `File::Spec`, `File::Temp`
- **Test::More** (for running tests)

All core dependencies are included with standard Perl installations.

---

## Optional Dependencies

These are only needed if you use the corresponding interface modules:

### PDL (for visualization examples)

```bash
cpanm PDL PDL::Graphics::Gnuplot
```

### OpenFOAM (for `Physics::PVD::Interface::OpenFOAM`)



( run in 1.199 second using v1.01-cache-2.11-cpan-e7c6538aa59 )