Skip to main content

vdist-solver-fortran

Lang: 日本語 | English

DOI CI PyPI version

Fortran で実装した速度分布ソルバを Python から利用するためのパッケージです。

コアは EMSES 計算結果の上でバックトレース (時間逆行) と、境界に紐付けた ソース分布 (Maxwellian、raycast 光電子、吸収) を組み合わせて位相空間 確率密度を評価します。共有ライブラリを ctypes ラッパ経由で Python から駆動する構成です。

必要環境

  • gfortran
  • make
  • fpm
  • Python 3.7 以上 (開発は .venv/ 内の 3.12 で実施)

インストール

PyPI からのインストールを推奨します。pip のビルド中に make install が 走り、Fortran 共有ライブラリをビルドして Python package に同梱します。

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,
    use_electric_field=True,             # False にすると電場を無効化
    use_magnetic_field=True,             # False にすると背景磁場を含む磁場を無効化
)

この2つのキーワード引数は逆追跡・確率計算・速度範囲推定、および MPI 版で 共通です。既定では両方有効です。無効化した場の出力ファイルは不要です。 逆追跡は MPIEMSES3D の通常の Boris 更新を逆の順序でたどります。 磁場回転と往復性の条件は 物理モデル を参照。

光電子の評価には EMSES の namelist /emissn/ に use_raycast = .true. を設定する必要があります。詳細は Namelist リファレンス を参照。

ドキュメント

ドキュメント 概要
使用方法 Python レシピ集: 単一/多粒子バックトレース、位相空間確率
速度空間 Octree 確率ソルバ adaptive/sparse な速度空間探索、アルゴリズム、実行方法、sample/leaf 出力
速度範囲自動推定 セルごとの速度範囲推定、validation、diagnostics
Namelist リファレンス サポートしている plasma.inp のグループとパラメータ
物理モデル リウビル定理、Maxwellian 放出、raycast 光電子
アーキテクチャ Fortran / Python レイアウト、モジュール依存、拡張ポイント
開発ガイド ビルド、テスト、貢献手順

サンプルノートブック

ライセンス

Apache License 2.0。詳細は LICENSE。

Metadata

Release files for vdist-solver-fortran 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vdist-solver-fortran 1.7.0
File Size Uploaded
vdist_solver_fortran-1.7.0.tar.gz 125.2 kB Details

Release files / vdist_solver_fortran-1.7.0.tar.gz

Download URL vdist_solver_fortran-1.7.0.tar.gz
Size 125.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ed5ba3dde1a9581e1dc659bd9adfd032d6a961930b06dc047799f02488b51d16
BLAKE2b-256 checksum
How to use checksums
c4dd78e488f1896d91322fb0e6de2cfae7a43c8e8df78e91de0f62cc41b478cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

1.7.1

1 release file

This release

1.7.0 This release

1 release file

1.6.0

1 release file

1.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page