Magnetic field lines form in concentric circles around a cylindrical current-carrying conductor, such as a length of wire. The direction of such a magnetic field can be determined by using the "right-hand grip rule" (see figure at right). The strength of the magnetic field decreases with distance from the wire. (For an infinite length wire the strength is inversely proportional to the distance.) Bending a current-carrying wire into a loop concentrates the magnetic field inside the loop while weakening it outside. Bending a wire into multiple closely spaced loops to form a coil or "solenoid" enhances this effect. A device so formed around an iron core may act as an electromagnet, generating a strong, well-controlled magnetic field. An infinitely long cylindrical electromagnet has a uniform magnetic field inside, and no magnetic field outside. A finite length electromagnet produces a magnetic field that looks similar to that produced by a uniform permanent magnet, with its strength and polarity determined by the current flowing through the coil. The magnetic field generated by a steady current (a constant flow of electric charges, in which charge neither accumulates nor is depleted at any point) is described by the Biot–Savart law: where the integral sums over the wire length where vector is the vector line element with direction in the same sense as the current , is the magnetic constant, is the distance between the location of and the location where the magnetic field is calculated, and is a unit vector in the direction of . For example, in the case of a sufficiently long, straight wire, this becomes: where . The direction is tangent to a circle perpendicular to the wire according to the right hand rule. A slightly more general way of relating the current to the -field is through Ampère's law: where the line integral is over any arbitrary loop and is the current enclosed by that loop. Ampère's law is always valid for steady currents and can be used to calculate the -field for certain highly symmetric situations such as an infinite wire or an infinite solenoid. In a modified form that accounts for time varying electric fields, Ampère's law is one of four Maxwell's equations that describe electricity and magnetism. Force on moving charges and current Force on a charged particle A charged particle moving in a -field experiences a sideways force that is proportional to the strength of the