Wrapper of velocity distribution solver written in Fortran
Project description
vdist-solver-fortran
Lang: 日本語 | English
Fortran で実装した速度分布ソルバを Python から利用するためのパッケージです。
コアは EMSES 計算結果の上でバックトレース (時間逆行) と、境界に紐付けた
ソース分布 (Maxwellian、raycast 光電子、吸収) を組み合わせて位相空間
確率密度を評価します。共有ライブラリを ctypes ラッパ経由で Python
から駆動する構成です。
必要環境
gfortranmakefpm- Python 3.7 以上 (開発は
.venv/内の 3.12 で実施)
インストール
PyPI からのインストールを推奨します。pip のビルド中に make install が
走り、Fortran 共有ライブラリをビルドして Python package に同梱します。
[!Note] macOS でもビルド自体は通る想定ですが CI では検証していません。
python -m pip install -U pip setuptools wheel
python -m pip install vdist-solver-fortran
開発版を GitHub から直接入れることもできます。
python -m pip install "git+https://github.com/Nkzono99/vdist-solver-fortran.git"
pip 経由のビルドでは既定で INSTALL_PROFILE=auto を使います。必要なら
INSTALL_PROFILE=generic や INSTALL_PROFILE=camphor を環境変数で
指定してください。
INSTALL_PROFILE=generic python -m pip install vdist-solver-fortran
クイックスタート
import emout
from vdsolverf.core import Particle
from vdsolverf.emses import get_backtrace
data = emout.Emout("EMSES-simulation-directory")
ts, probability, positions, velocities = get_backtrace(
directory=data.directory,
ispec=0, # 0 電子, 1 イオン, 2 光電子
istep=-1,
particle=Particle([32, 32, 400], [0, 0, -10]),
dt=data.inp.dt,
max_step=300_000,
output_interval=1,
use_adaptive_dt=False,
)
光電子の評価には EMSES の namelist /emissn/ に use_raycast = .true.
を設定する必要があります。詳細は
Namelist リファレンス を参照。
ドキュメント
| ドキュメント | 概要 |
|---|---|
| 使用方法 | Python レシピ集: 単一/多粒子バックトレース、位相空間確率 |
| Namelist リファレンス | サポートしている plasma.inp のグループとパラメータ |
| 物理モデル | リウビル定理、Maxwellian 放出、raycast 光電子 |
| アーキテクチャ | Fortran / Python レイアウト、モジュール依存、拡張ポイント |
| 開発ガイド | ビルド、テスト、貢献手順 |
サンプルノートブック
ライセンス
Apache License 2.0。詳細は LICENSE。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file vdist_solver_fortran-1.5.0.tar.gz.
File metadata
- Download URL: vdist_solver_fortran-1.5.0.tar.gz
- Upload date:
- Size: 72.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
399c547c345bde068cac6411587301d5c5564e8b3eea779ae7ef768898c051f7
|
|
| MD5 |
8d986ec8557d862e510a0ddaaafe5171
|
|
| BLAKE2b-256 |
f6d16049269b001b7966da884fe052d60c41ca1eb45bcbe60bca02df5acb5c70
|
Provenance
The following attestation bundles were made for vdist_solver_fortran-1.5.0.tar.gz:
Publisher:
publish-pypi.yml on Nkzono99/vdist-solver-fortran
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vdist_solver_fortran-1.5.0.tar.gz -
Subject digest:
399c547c345bde068cac6411587301d5c5564e8b3eea779ae7ef768898c051f7 - Sigstore transparency entry: 1565005333
- Sigstore integration time:
-
Permalink:
Nkzono99/vdist-solver-fortran@424cb87046e0f96b10c0a647cb2394219230454d -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/Nkzono99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@424cb87046e0f96b10c0a647cb2394219230454d -
Trigger Event:
release
-
Statement type: