"""
Snow Dust Physics Module v1.0
Scientifically Corrected Version

Core mathematical models for:
1. Mie scattering in snowstorms
2. Triboelectric charging
3. Electric field gradient analysis
"""

from .mie_scattering import SnowMieCalculator, MieResult
from .triboelectric import SnowTriboelectric, TriboelectricResult
from .field_gradients import FieldGradientAnalyzer, GradientResult

__version__ = "1.0.0"
__author__ = "Snow Dust Research Team"
__status__ = "Scientifically Corrected"

def test_all_models():
    """Run comprehensive tests on all physics models"""
    print(f"Snow Dust Physics Module v{__version__}")
    print("=" * 50)
    
    # Test Mie scattering
    print("\n1. Testing Mie scattering model...")
    mie = SnowMieCalculator()
    mie_result = mie.mie_for_snow(100e-6)
    print(f"   ✓ 100μm snow particle: Q_sca = {mie_result.scattering_coefficient:.4f}")
    
    # Test triboelectric
    print("2. Testing triboelectric model...")
    tribo = SnowTriboelectric()
    tribo_result = tribo.calculate_charge(2.5, 200e-6, 5.0)
    print(f"   ✓ Single collision: Q = {tribo_result.charge_per_particle:.2e} C")
    
    # Test gradients
    print("3. Testing gradient analyzer...")
    analyzer = FieldGradientAnalyzer()
    phi = np.array([1000.0, 1200.0, 1100.0, 1050.0])
    grad_result = analyzer.scalar_gradient(phi)
    print(f"   ✓ Gradient magnitude: {grad_result.gradient_magnitude:.1f} V/m")
    
    print("\n" + "=" * 50)
    print("✅ All physics models passed basic tests")
    return True

# Run tests if module is executed directly
if __name__ == "__main__":
    import numpy as np
    test_all_models()
