Skip to content

AlScN point-defect thermodynamic model notebook [SOF-8054] - #368

Open
svbarabash wants to merge 9 commits into
mainfrom
feature/SOF-8054
Open

svbarabash wants to merge 9 commits into
mainfrom
feature/SOF-8054

Conversation

@svbarabash

Copy link
Copy Markdown

Adds other/experiments/alphafilm/AlScN_defect_thermodynamic_model.ipynb, the point-defect thermodynamic model built on the numbers the extraction notebook digitises, and updates Lee2024_AlScN_defects.ipynb.

Model

Two flavours over one set of shared ingredients:

  • Bulk equilibrium (4.2) — defects form at the anneal temperature with E_F set self-consistently by charge neutrality.
  • Depth-resolved freeze-in (4.3.1, slide 5) — the film is grown one lattice plane at a time and each layer is frozen the moment it is buried. At every stage the growth front is the free surface, so every layer meets the same second boundary condition when its concentration is set; the only thing that varies with depth is how much of the electrode's Dirichlet condition still reaches the front. E_F(z) comes from the electrode and Poisson alone — there is no neutrality solve in the depth model.

4.3.2 stubs the multi-stage flavour (slide 6) so the structure does not need rearranging later.

Controls

  • Oxygen is a (mode, value) condition. Either pin the total [O_N] and back-solve mu_O, or fix mu_O and let [O_N] be predicted; ("concentration", 0.0) removes O_N entirely. Every result in section 6 is reported both with O_N and with none, for the bulk model and the film alike. Kinetic modelling of the actual transport is noted as the third option and needs research first.
  • Two meshes, kept separate. Charge sits on lattice planes c/2 = 0.25 nm apart; Poisson runs on a mesh m times finer. 6.2.3 shows m = 1 and m = 4 agree to 0.000 meV — the finite-difference Laplacian is exact for the piecewise-linear potential that plane charges produce, so the Poisson mesh has nothing to converge — and separately sweeps the plane spacing, which is physics rather than a numerical knob.

Guards on the output

Each run prints the assumptions behind the figure it produces: the chemical and oxygen conditions, the temperatures, where each defect's ground-state charge flips with depth, the screening length against the plane spacing, and a warning wherever defect occupancy breaks the dilute limit the formation energies assume. The most N-poor limit trips that warning across the whole film and is flagged rather than quietly reported.

Notebook outputs are stripped, and quiet leaf sections are collapsed so the outline stays scannable.

🤖 Generated with Claude Code

svbarabash and others added 3 commits September 7, 2026 23:43
…24 [SOF-8054]

Step 1 of the defect model: 41 cells, 25/25 internal checks. 244 charge-state
lines recovered from the main text and supplement as exact PDF vector segments
rather than pixel digitization - 4 compositions x 2 chemical-potential limits x
{O absent, present}, with band gaps 5.924/5.656/5.188/5.040 eV.

Validation: slopes integer to 5.6e-4; reconstructed lower envelopes match the
drawn ones to 0.031 eV; N-poor minus N-rich energies match the supplement's
chemical-potential tables to 0.004 eV without those tables entering the
extraction. Site densities are composition-weighted, which matters - using the
full cation density misplaces x = 0.042 by 1.39 decades.

Open item for step 2: Fig. 2(b) O_N reproduces only up to a factor of 24.2 +/- 1.4,
and log10(24) = 1.380 matches a site-count normalisation of one site per 48-atom
SQS rather than its 24 N sites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ions) and some changes to the extraction notebook [SOF-8054]

AlScN_defect_thermodynamic_model.ipynb builds the point-defect thermodynamic
model on top of the numbers the extraction notebook digitises. It carries a
bulk equilibrium model and a depth-resolved freeze-in model grown layer by
layer, with the oxygen condition and both meshes exposed as inputs.

Lee2024_AlScN_defects.ipynb gains the Balestra effective-mass section, a
classification manifest separating model inputs from validation-only data,
and role tags on every heading.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…, plot fixes [SOF-8054]

Oxygen is now a (mode, value) condition rather than a hard-wired target. Either
pin the total [O_N] and back-solve mu_O, or fix mu_O and let [O_N] be predicted;
("concentration", 0.0) removes O_N entirely. Every result in section 6 is
reported both with O_N and with none, for the bulk and the film alike.

Two meshes, separated. Charge sits on lattice planes c/2 = 0.25 nm apart; Poisson
runs on a mesh m times finer. Section 6.2.3 shows m = 1 and m = 4 agree to
0.000 meV -- the FD Laplacian is exact for the piecewise-linear potential that
plane charges produce -- and sweeps the plane spacing, which is physics and not
free to refine.

The free surface now sits one plane spacing above the last occupied plane, so no
charge plane lands on the boundary node. That removes the half-weight self-term
that was lifting the first layer's Fermi level past neutral and making the second
layer freeze in negative; the profile is monotone at every spacing tested.

Formation-energy and concentration panels now carry one line per defect: the
lowest-energy charge state, and the concentration summed over charge states.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 388a65a8-2392-4a4b-8160-0fff6d3bf1f7


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

svbarabash and others added 6 commits September 14, 2026 17:44
…r [SOF-8054]

Removes SURFACE_FORMATION_ENERGY_REDUCTION. Slide 5's reduced energies are
surface_formation_energies, which already exists; subtracting a further 1 eV
inside surface_populations both invented a number and broke the requirement that
the three dH sets start identical to the bulk values. Its removal moves the
thick-film E_F by +0.333 eV and confines the most-N-poor dilute-limit breach from
the whole film to the first two planes.

Adds 2.1.5 Ambacher et al., J. Appl. Phys. 130, 045102 (2021): eps_33(x) measured
by C-V over x = 0-0.5, replacing a guessed constant 10.5. That is the static
constant along the polar axis, which is what a space-charge problem needs; at
x = 0.25 it is 18.5, not 10.5. Their P_SP is deliberately not carried - it is
zinc-blende referenced and would be mixed up with the measured P_r.

The free-surface charge is no longer an opaque 1e12. It is now the bound charge
from the measured P_r (6.2e14 e/cm^2) times UNCOMPENSATED_FRACTION, so the actual
guess - 0.16%, the bottom of the documented sensitivity range - is the input.

Hole mass becomes a function of composition, constant for now. Film thickness is
documented as a maximum, and the occupancy threshold says what it is for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…es [SOF-8054]

Chemical conditions are no longer discrete strings decoded inside the results
functions. muN() takes a corner name or a number in eV and returns something
callable on composition - it has to stay a function of x, because the most N-poor
vertex moves with x and the bulk model sweeps x. muO() takes ("concentration", c)
or ("potential", eV), a bare number meaning delta mu_O, or "none". Call sites now
read bulk_results(muN("N-rich"), muO(variant), temperature=...).

T_eff,surf is threaded through as a parameter rather than read from module scope,
so it is an experimental input on the same footing as the growth temperature.
Both temperatures are named at every call site.

Depth figures are drawn on linear axes as well as log. The structure sits in the
first few nm and log is what shows it, but linear is what a result should be read
off, so both are produced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…al [SOF-8054]

FREE_SURFACE_CONDITION picks between the two forms, and grow_film takes it as a
parameter rather than reading a module constant:

  ("charge", e/cm^2)   Neumann, eps dphi/dz = -sigma. The floating, unbiased case;
                       what survives of the bound charge sets the field.
  ("potential", volts) Dirichlet on the growth front. Biased deposition, where an
                       applied bias fixes the potential across the stack and the
                       charge is whatever the solution needs. Also the form the
                       adsorbate-reservoir picture wants.

Field is not offered as a third option: specifying the field just inside the
surface is the same statement as specifying the charge, E = sigma/eps.

The plasma sheath is documented as deliberately absent rather than merely omitted.
At ~3e8 e/cm^2 it moves the frozen profile by 0.0 meV, measured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…F-8054]

dH = E_def - E_bulk + sum_i n_i mu_i ran over nitrogen and oxygen only. V_Al and
V_Sc were given n_N = 0, so they did not move with the chemical condition at all.
At the most N-poor vertex that is a 3.2 eV error, and it is why the N-poor runs
put V_Sc at ~18% of its sublattice: cation vacancies should be strongly
suppressed under cation-rich conditions, and instead they were unchanged.

The four parallel per-species dicts become one ATOMS_REMOVED table - the literal
n_i of the formula - so a defect cannot silently omit a species it touches.

The vertex potentials are now read off the published panels rather than typed in:
a vacancy removes one atom, so dH(N-poor) - dH(N-rich) for V_i IS Delta mu_i.
That gives all three host species instead of nitrogen alone, and the panels agree
that the shift is charge-independent to ~1 meV, which is what makes it a chemical
potential rather than a fit. Three checks now hold the result: the nitrogen column
matches the SI corner table to 50 meV, Delta mu_Al = -Delta mu_N as
mu_Al + mu_N = H_f(AlN) requires, and Delta mu_Sc departs from -Delta mu_N by up
to 0.49 eV - so the cations cannot be collapsed onto the nitrogen potential.

Effect at x = 0.25, most N-poor: V_Sc falls from 3.3e18 to 4.5e8 cm^-3, and the
depth model's dilute-limit breach goes from the whole film to 3 of 400 planes.

Also restores the bulk table to 1000 K, which an earlier commit had silently moved
to the deposition temperature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…8054]

The generator assigned a fresh uuid to every cell on every build, so rebuilding
an unchanged notebook showed up as all 80 cells modified. Ids are now a hash of
the cell's kind and content: identical input gives a byte-identical notebook, and
a diff means something actually changed.

This commit is that one-time id renumbering; no content changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
H_f(AlScN) = mu_N + x mu_Sc + (1-x) mu_Al is one equation in two cation unknowns,
so something has to close it. Treating the alloy as AlN and ScN in equilibrium
adds mu_Al + mu_N = H_f(AlN) and mu_Sc + mu_N = H_f(ScN), giving
Delta mu_Al = Delta mu_Sc = -Delta mu_N. One number then sets every species, which
is what makes an intermediate chemical condition well defined rather than a guess
about which vertex to walk towards - the previous commit could only interpolate
between two named corners.

Lee's published corners are not exactly on this tieline, and the reason is worth
recording: Delta mu_Al sits within 50 meV of it everywhere, but Delta mu_Sc departs
by up to 0.83 eV at x = 0.042 - and the ternary and quaternary panels depart in
OPPOSITE directions by nearly equal amounts (+0.35/-0.35 at x = 0.125,
+0.09/-0.09 at x = 0.25, +0.004/+0.001 at x = 0.333). The two published references
straddle the tieline rather than sitting on one side of it.

Cost of the simplification, measured against the published most-N-poor panel:
0.49 eV for V_Sc at x = 0.042, 0.09 eV at x = 0.25, few meV at x = 0.333. The
build-time check now walks the tieline too, so it reports this rather than
validating a conversion the model no longer performs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant