Implement core physics engine (MCC, Diagnostics) and tests #11
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.
Implement Monte Carlo Collisions (MCC) and Diagnostics Suite
Summary
This PR introduces the necessary modules for the core kinetic simulation engine: the Monte Carlo Collision (MCC) module and the suite of Diagnostics tools. It includes comprehensive integration tests to ensure that the fundamental physics (thermalization, isotropization) is implemented correctly and stably.
Key Changes
src/test_particle_sim_1d/collisions.py: Implements probabilistic elastic scattering.src/test_particle_sim_1d/diagnostics.py: Adds all necessary measurement functions:compute_global_temperature,compute_component_temperatures,compute_density_profile, andcompute_energy_distribution(IEDF/EEDF).tests/test_physics_integration.py: Consolidates and expands verification tests.Verification
The physics tests confirm the correct operation of the collision and diagnostics pipeline:
compute_density_profileaccurately measures the spatial distribution without being corrupted by the collision process.