# Coil magnetostatics

`COIL_MAGNETOSTATICS` chains current conduction into magnetostatics: it solves a coil's current distribution, then the magnetic field that current drives. It also reads the [Magnetostatics](<https://docs.femforge.io/user-guide/conditions/magnetostatics/index.md>) conditions, so magnets and force Components work as they do there. See [Conditions and physics](<https://docs.femforge.io/user-guide/conditions/index.md>) for how conditions attach and where they land.

| Frame | Solves as | Solver stack |
| --- | --- | --- |
| [Solid](<https://docs.femforge.io/user-guide/frames/solid/index.md>) | `COIL_MAGNETOSTATICS` | CoilCurrentSolver, MagnetoDynamicsSolver, MagnetoDynamicsCalcFieldsSolver, SaveScalarsSolver, ResultOutputSolver |
| [Axisymmetric](<https://docs.femforge.io/user-guide/frames/axisymmetric/index.md>) | no form |  |
| [Cartesian2D](<https://docs.femforge.io/user-guide/frames/cartesian-2d/index.md>) | no form |  |

## Material-wired conditions

| Condition | Target | Sets | Frames |
| --- | --- | --- | --- |
| [`Magnetization`](<https://docs.femforge.io/user-guide/conditions/magnetostatics/#magnetization>) | body | `direction` | [Solid](<https://docs.femforge.io/user-guide/frames/solid/index.md>) |

## Boundary conditions

| Condition | Target | Sets | Frames |
| --- | --- | --- | --- |
| [`CoilTerminal`](<https://docs.femforge.io/user-guide/conditions/coil-magnetostatics/#coilterminal>) | outer shell | `role` | [Solid](<https://docs.femforge.io/user-guide/frames/solid/index.md>) |

### CoilTerminal

**Physics** `COIL_MAGNETOSTATICS` · **Target** outer shell · **Section** Boundary Condition · **Kind** `coil_terminal` · **API** CoilTerminal

One end of an open coil, its start or end electrode.

| Field | Symbol | Unit | Meaning | Sif keyword | Default |
| --- | --- | --- | --- | --- | --- |
| `role` |  |  | Which end of the coil this electrode is; CoilSolver's normalized current flows start -\> end. |  | required |

Writes: The `Coil Start` or `Coil End` flag for this `role`.

The electrode's end face must lie on the domain boundary (`GeometryConfig.terminate_electrodes`). Positive coil current flows from the start electrode to the end electrode.

## Components

| Condition | Target | Sets | Frames |
| --- | --- | --- | --- |
| [`CoilDrive`](<https://docs.femforge.io/user-guide/conditions/coil-magnetostatics/#coildrive>) | body | `current` \[A\] | [Solid](<https://docs.femforge.io/user-guide/frames/solid/index.md>) |
| [`CalculateMagneticForce`](<https://docs.femforge.io/user-guide/conditions/magnetostatics/#calculatemagneticforce>) | body | `label`, `calculate_magnetic_force`, `calculate_magnetic_torque`, `torque_origin` \[m\], `torque_axis` | [Solid](<https://docs.femforge.io/user-guide/frames/solid/index.md>) |

### CoilDrive

**Physics** `COIL_MAGNETOSTATICS` · **Target** body · **Section** Component · **Kind** `coil_drive` · **API** CoilDrive

A driven massive coil: the bodies that share one `CoilDrive` form one coil that carries `current`.

| Field | Symbol | Unit | Meaning | Sif keyword | Default |
| --- | --- | --- | --- | --- | --- |
| `current` | `I_coil` | A | The total coil current CoilSolver normalizes this coil's solved distribution to. | `Desired Coil Current` | required |

Writes: The `Desired Coil Current` and the massive `Coil Type`.

Bodies that share one `CoilDrive` instance form one coil. Reverse a coil by swapping its terminal roles, and keep `current` positive. Without a `CoilDrive`, the sif writer warns that the coil has no source. `COIL_MAGNETOSTATICS` leaves `FixedPotential` inert.
