Skip to content

Solenoid

Fields

cfsem.flux_density_ideal_solenoid

flux_density_ideal_solenoid(
    current: float, num_turns: float, length: float
) -> float

Axial B-field on centerline of an ideal (infinitely long) solenoid.

This calc converges reasonably well for coil L/D > 20.

Parameters:

Name Type Description Default
current float

[A] solenoid current

required
num_turns float

[#] number of conductor turns

required
length float

[m] length of winding pack

required

Returns:

Type Description
float

[T] B-field on axis (in the direction aligned with the axis)

Source code in cfsem/__init__.py
def flux_density_ideal_solenoid(current: float, num_turns: float, length: float) -> float:
    """
    Axial B-field on centerline of an ideal (infinitely long) solenoid.

    This calc converges reasonably well for coil L/D > 20.

    Args:
        current: [A] solenoid current
        num_turns: [#] number of conductor turns
        length: [m] length of winding pack

    Returns:
        [T] B-field on axis (in the direction aligned with the axis)
    """
    b_on_axis = MU_0 * num_turns * current / length
    return b_on_axis  # [T]