# Fault (`fault`)

> A short circuit that joins chosen lines of a three-phase system, or those lines and ground, during a time window.

![fault](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/fault.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/switches/fault/)

**Group:** Switches · **Kind:** `{"kind":"fault"}`

## When to use it

Use it to see the fault current, to test a breaker or a protection scheme, or to study a voltage dip. To short any other part of a circuit, use Ideal Switch.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `a` | electrical | Line a |
| `b` | electrical | Line b |
| `c` | electrical | Line c |
| `g` | electrical | Ground; needed by the types that end in g |

## Common parameters

- `type`: Which lines are joined: ag, bg, cg, ab, bc, ca, abg, bcg, cag, abc or abcg (Default: ag)
- `rf`: Resistance of the fault in each joined line (Default: 10m)
- `tstart`: Time when the fault starts (Default: 0)
- `tend`: Time when the fault ends (Default: optional (off))
- `rg`: Resistance between the joined lines and ground (Default: 0)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `type` | — | ag |  | Which lines are joined: ag, bg, cg, ab, bc, ca, abg, bcg, cag, abc or abcg |
| `rf` | Ω | 10m |  | Resistance of the fault in each joined line |
| `rg` | Ω | 0 |  | Resistance between the joined lines and ground |
| `tstart` | s | 0 |  | Time when the fault starts |
| `tend` | s | optional (off) |  | Time when the fault ends |
| `roff` | Ω | 100meg |  | Resistance when it is off |

_Parameter descriptions are in English in both languages._

**Use for:** Short-circuit studies · Protection settings · Voltage sag causes

**Not for:** Opening a line on a trip or at a time → [`breaker`](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/switches/breaker/)

## Formulas

| Formula | Equation | Source |
|---|---|---|
| Three-phase fault current per line | I = Vph/(Zs + Rf) | Grainger & Stevenson, Power System Analysis (1994), ch. 10 (symmetrical faults) |
| Line-to-line fault current | I = Vll/(2·(Zs + Rf)) | Grainger & Stevenson, Power System Analysis (1994), ch. 12 (unsymmetrical faults) |
| Line-to-ground fault current | I = Vph/(Zs + Rf + Rg) | Grainger & Stevenson, Power System Analysis (1994), ch. 12 (unsymmetrical faults) |

## Quick check

Inputs:

- `vll`: Line-to-line voltage, rms = 380 V
- `zs`: Source impedance per phase = 500m Ω
- `rf`: Fault resistance = 10m Ω, `rf`
- `rg`: Resistance to ground = 100m Ω, `rg`

Outputs:

- `vph`: Phase voltage, rms = `vll/sqrt(3)` V
- `i3`: Three-phase fault current per line = `vph/(zs + rf)` A
- `ill`: Line-to-line fault current = `vll/(2*(zs + rf))` A
- `ig`: Line-to-ground fault current = `vph/(zs + rf + rg)` A

## Model logic

- Before the run the fault becomes one ideal switch for each joined line, with the resistance rf when on, to one common point.
- For a type with g the common point goes to ground through rg; without g it floats, so two lines are joined through two rf.
- The switches close at tstart and open at tend; without tend the fault stays on.
- The current of a joined line is the current of the part named name.sw_a, name.sw_b or name.sw_c.

## Model

Before the run the fault becomes one ideal switch for each joined line, with the resistance rf when on, from the line to one common point. For a type with g, the common point goes to ground through rg. Without g the common point floats, so two lines are joined through two rf. The switches close at tstart and open at tend, and without tend the fault stays. The types are ag, bg and cg for one line to ground, ab, bc and ca for line to line, abg, bcg and cag for two lines to ground, abc for three lines, and abcg for three lines to ground. The current of a joined line is the current of the part named name.sw_a, name.sw_b or name.sw_c.

## Common mistakes

- A fault to ground needs pin g on a ground net. Without it the run is refused.
- A very small rf gives a very large current. The default of 10 milliohm is close to a bolted fault. Use a larger value for an arc or a high-impedance fault.
- An ideal source with no impedance in front of the fault gives an unrealistic current. Add the line impedance, for example with Three-Phase R-L-C.

Problems rules: `compile.error`

## Datasheet and sources

The fault values come from the study, not from a datasheet. rf is the fault resistance, such as an arc or an earth contact, and tstart and tend are the times when the fault begins and is cleared.

## Example

Open the example with the command `file.openExample` and the name `demo:fault`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
