em_field
Calculate exact magnetostatic field of a long straight wire or solenoid from current, distance, or turns per meter; returns B in tesla and millitesla.
Instructions
Exact magnetostatic field of the two canonical sources (NO solver):
kind='wire' is the long straight wire B = μ₀·I/(2π·r) at distance_mm
(Ampère's law); kind='solenoid' is the long-solenoid interior
B = μ₀·μ_r·n·I with turns_per_m.
Returns {b_t, b_mt, …} (the field in tesla and millitesla).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | wire | |
| mu_r | No | ||
| current_a | No | ||
| distance_mm | No | ||
| turns_per_m | No |