This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Add thomas fermi ion #59
Open
cmoissar
wants to merge
5
commits into
PlasmaPy:main
Choose a base branch
from
cmoissar:add_Thomas_Fermi_ion
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
49acc88
Added fit for ionisation from Fermi model
cmoissar 11f14d0
Merge branch 'main_from_plasmapy' into main
cmoissar deb325a
Added fit for ionisation from Fermi model
cmoissar da0321a
Corrected fit for ionisation from Fermi model - now this works
cmoissar 6eb94cb
Update hack/Ionisation/Thomas_Fermi_ionisation.py
cmoissar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import numpy as np | ||
| import astropy.units as u | ||
| from plasmapy.particles import * | ||
|
|
||
|
|
||
| def Zav_TF(particle: Particle, rho: u.g/u.cm , T: u.eV=0) -> u.dimensionless_unscaled: | ||
| """ | ||
| Finite Temperature Thomas Fermi Charge State using | ||
| R.M. More (1985), "Pressure Ionization, Resonances, and the | ||
| Continuity of Bound and Free States", Adv. in Atomic | ||
| Mol. Phys., Vol. 21, p. 332 (Table IV). | ||
|
|
||
| This is a light-weight fit of the Thomas-Fermi model, not the model itself. | ||
| """ | ||
|
|
||
| Z = atomic_number(particle) | ||
| A = mass_number(particle) | ||
|
|
||
| alpha = 14.3139 | ||
| beta = 0.6624 | ||
| a1 = 0.003323 | ||
| a2 = 0.9718 | ||
| a3 = 9.26148e-5 | ||
| a4 = 3.10165 | ||
| b0 = -1.7630 | ||
| b1 = 1.43175 | ||
| b2 = 0.31546 | ||
| c1 = -0.366667 | ||
| c2 = 0.983333 | ||
|
|
||
| rho1 = rho / A * Z | ||
| T1 = T / Z ** (4. / 3.) | ||
| Tf = T1 / (1 + T1) | ||
| Ac = a1 * T1 ** a2 + a3 * T1 ** a4 | ||
| B = -np.exp(b0 + b1 * Tf + b2 * Tf ** 7) | ||
| C = c1 * Tf + c2 | ||
| Q1 = Ac * rho1 ** B | ||
| Q = (rho1 ** C + Q1 ** C) ** (1 / C) | ||
| x = alpha * Q ** beta | ||
|
|
||
| return Z * x / (1 + x + np.sqrt(1 + 2. * x)) | ||
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.