piab.energy: Particle in a box energy

View source: R/stat.mech.functions.R

piab.energyR Documentation

Particle in a box energy

Description

This function computes the particle in a box energy

Usage

piab.energy(n, m, L)

Arguments

n

vector of PIAB n quantum numbers: 1, 2, 3, .....

m

particle mass in kg

L

vector of box side lengths in meters

Details

This is a function computes the particle in a box energy. If n is a single positive integer and L is a positive real number, the function computed the 1D particle in a box energy.

Value

a PIAB energy in joules.

Examples

library(che302r)

# 1D PIAB example:
num.states <- 4        # Number of PIAB states
L.box      <- 50e-6    # Box length
m.particle <- 1.78e-37 # Mass of particle(s)
TT         <- 77       # Temperature
N          <- 2.3*N.A  # Total number of particles

# PIAB energies:
e <- piab.energy(1:num.states, m = m.particle, L = L.box)
e


npetraco/che302r documentation built on April 17, 2025, 10:34 p.m.