This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Physics

Statics

articleAIPhysicswritten with an agent#0395f15bda
Adam Zettel@adam1 min read

The tension in each of two ropes holding up a box

A box of weight W hangs from two ropes that make angles θ₁ and θ₂ with the ceiling. Balancing the sideways pulls and the upward pulls gives the tension in each rope in terms of W and the angles. The surprise is how large it gets: at 30° each rope holds half the weight, 49 N, but its tension is 98 N, because only half of the tension points up; a nearly flat rope needs a tension many times the weight.

A 98 N box hanging from two ropes at 30 degrees
W = 98 Nθ₁ = 30°θ₂ = 30°knot
The knot at 30 degrees: each pull split into a sideways and an upward part
θ₁T₁ = 98 NT₁ sin θ₁ = 49 NT₁ cos θ₁ = 84.9 Nθ₂T₂ = 98 NT₂ sin θ₂ = 49 NT₂ cos θ₂ = 84.9 NW = 98 Nacross: 84.9 N left, 84.9 N rightup: 49 N + 49 N = 98 N = W
The same 98 N box hung two ways; the colored arrows are the ropes' pulls, to scale
Both ropes at 30°
98 Nθ₁ = 30°θ₂ = 30°T₁ = 98 NT₂ = 98 N
Left rope at 60°, right rope at 30°
98 Nθ₁ = 60°θ₂ = 30°T₁ = 84.9 NT₂ = 49 N
Tension in each rope, as a multiple of the weight0246020406080angle of the ropes above the horizontal (degrees)tension / weight
both ropes at the same angletension equal to the weight

2 paragraphs · 10 functions · 1 min

✓ 5 tests passchecked when the site was built#statics#forces#tension#free-body-diagram

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Solids

Graphene's Dirac cones

An electron hopping between neighboring carbon atoms of a honeycomb has two energy bands, and they touch at the corners of the Brillouin zone. Near a corner the energy rises in a straight line in every direction, a cone, with slope . A centered finite difference at the corner gives to eight digits in every direction.

Graphene's two bands, nearest-neighbor tight binding
upper bandlower band
−202ΓKMΓcrystal momentum along the pathenergy E / t
The upper band over the k plane
kya
kxa
61 × 61 grid
✓ 6 tests passchecked when the site was built#graphene#tight-binding#band-structure#dirac-cones#fermi-velocity
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Quantum mechanics

demoAIPhysicswritten with an agent#6665325a9c

Tunneling through one and two barriers by transfer matrices

An electron meets a barrier it does not have the energy to climb. Chop the potential into flat pieces, and the wave on each side of every edge is related by a 2 by 2 matrix; the product of those matrices gives the chance of getting through, , and of bouncing back, . They add to 1 at every energy, to within . Two barriers 4 apart, each of which alone lets through less than 1% at , together let through 100% at that energy.

One barrier, V0 = 3 and width 1
transfer matricesclosed form
00.51.00246810energy Etransmission Tbarrier topqa=π
Two walls 4 apart: T on a log scale10⁻⁶10⁻⁴10⁻²10⁰00.511.522.533.5energy Etransmission T
two wallsone wallresonances found
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Also in Physics

demoAIPhysicswritten with an agent#8987b2b000

Silicon's band structure, from the crystal up

A density-functional calculation of silicon, one cell at a time: the crystal, a plane-wave basis, the pseudopotential, the Hamiltonian, the self-consistent loop and the bands from L through Gamma to X. It runs at a 5 Ha cutoff on four k-points so it fits in a browser tab; its tests check each stage, from the basis sizes to the band energies, against an independent numpy implementation at the same settings.

Silicon: LDA bands, 5 Ha cutoff, 4 k-points
valence 1valence 2valence 3valence 4conduction 1conduction 2
−10−50500.20.40.60.81.0path length (1/bohr): L 0, Gamma 0.53, X 1.14energy from the valence-band top (eV)
✓ 18 tests passchecked when the site was built#dft#plane-waves#pseudopotentials#band-structure#silicon#notebook
ReadOpen in the workbench

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • Explore

    Run it and step through what each part did, with the code, values and plots beside it.