Magnetic Force on a Wire

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction to magnetic force on a current-carrying wire

This calculator models the magnetic force on a straight wire carrying current through a uniform magnetic field. It applies the standard relation

F = I · L · B · sin(θ)

and uses that force as the constant drive in a simple mass–spring–damper simulation. This lets you observe the wire's modeled deflection, velocity, and mechanical energy while changing electrical, magnetic, and mechanical inputs.

Set the current, active wire length, field strength, angle, and mechanical parameters in the form. The simulation then displays the wire's vertical displacement and reports its time, displacement, velocity, and energy distribution as it evolves.

Magnetic-wire variables and SI units

For this current-carrying-wire force model, each input has the following meaning and SI unit:

The magnetic-force calculation and the motion model use SI inputs. Convert any other units before entering values so that the reported force is in newtons and the displayed displacement is in meters.

Magnetic force formula for a straight wire

For a straight conductor of length L carrying current I through a uniform magnetic field of magnitude B, this wire calculator uses the force magnitude

F = I L B sin ( θ )

Here, θ is the angle between the current direction and the magnetic field. The force direction is perpendicular to both directions; the animation represents that force as vertical motion in its simplified screen-plane model.

For the angle input, two useful magnetic-force cases are:

Mass–spring–damper model of wire deflection

The magnetic-wire simulation treats the wire as a rigid bar attached to a linear spring and damper and constrained to one vertical direction. Its magnetic force is constant for fixed inputs, and the vertical displacement is denoted by y(t). The equation used for the motion is

md2ydt2=ILBsin(θ)kycdydt

Dividing the magnetic-wire equation of motion by mass gives the form integrated by the simulation:

d2ydt2+cmdydt+kmy=ILBsin(θ)m

The right-hand side remains constant while current, length, field, and angle remain fixed. The spring term opposes displacement, while the damping term opposes velocity.

Mechanical energy in the wire simulation

The current-carrying-wire simulation tracks these mechanical energy components:

The magnetic force can add mechanical energy as it drives the wire, while damping removes energy from the motion. The bars show the current total mechanical energy and the kinetic and spring-energy shares, rather than an energy balance that includes work supplied by the magnetic force.

Reading the magnetic-wire simulation results

When the magnetic-force simulation is initialized or playing, the output area shows:

If a required value is missing or non-numeric, or if mass or time step is not positive, the wire simulation reports invalid inputs and does not initialize. Nonnegative spring and damping values are accepted, including zero for an undamped or unstiffened idealized case.

Worked example: magnetic force and wire equilibrium

With the calculator's displayed default magnetic-wire inputs, the force calculation can be checked directly:

Because sin(90°) = 1, the magnetic force is:

F = I · L · B · sin(θ) = 10 × 0.20 × 0.50 × 1 = 1.0 N

Starting from rest at y = 0, the modeled spring and damping forces are initially zero. The initial acceleration is therefore:

a(0) = F / m = 1.0 / 0.050 = 20 m/s²

As the wire moves, spring force increases with displacement and damping resists its velocity. For this constant-force model, the static equilibrium condition is k yeq = F, giving yeq = F / k = 1.0 / 5.0 = 0.20 m. Damping causes transient oscillations about that position to decay.

Comparison of magnetic-force and motion cases

Changing magnetic or mechanical inputs affects the current-carrying wire model in different ways:

Parameter change Effect on magnetic force F Effect on motion
θ = 0° (field parallel to current) F = 0 No magnetic-driven motion; spring and damping only affect initial conditions.
θ = 90° (field perpendicular to current) F = I · L · B (maximum) Largest deflection and strongest oscillations for given I, L, B.
Increase I, L, or B F increases in direct proportion Larger driving force, greater equilibrium displacement and higher energies.
Increase k (stiffer spring) No change to F itself Smaller equilibrium deflection and higher natural frequency.
Increase c (more damping) No change to F itself Oscillations die out more quickly; motion may become overdamped.

Magnetic-wire model assumptions and limitations

This magnetic-force animation makes the following simplifying assumptions:

Because of these assumptions, this tool is an educational visualization of magnetic force on a current-carrying conductor and its idealized spring-supported motion, not a detailed design model for electromagnetic machinery.

How to use the magnetic force on a wire calculator

To explore magnetic force and wire deflection systematically:

Testing the current, field angle, stiffness, and damping separately helps distinguish what changes the magnetic driving force from what changes the wire's mechanical response.

Enter the current, wire length, magnetic field, angle, and mechanical parameters, then run the simulation to see the magnetic force, wire deflection, and energy over time.

Arcade Mini-Game: Magnetic Force on a Wire Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.

Results will appear here after calculation.

Wire deflection under magnetic force; kinetic energy red, spring energy blue.

Simulation not started.