> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/native-library-components/current-source-components.md).

# Current Source Components

## Introduction

ePHASORSIM native library includes two current source components that can be used to inject current or power at a specified bus. These components support load-flow initialization and can be controlled through I/O pins during simulation.

They can be used in both **positive-sequence** and **multiphase** networks.

## Controllable current source

The controllable current source can operate with or without external control and can be used to inject power or current at a specified bus.

* **Fixed operation:** The component is initialized from the power-flow solution and injects a constant current throughout the simulation.
* **Power-controlled operation:** The injected current is calculated from the specified active power (*P*), reactive power (*Q*), and bus voltage.
* **Current-controlled operation:** The component directly injects the specified current magnitude (*Imag*) and angle (*Iang*).

| Excel Column Name | Native Component Parameter | Description                                                     |
| ----------------- | -------------------------- | --------------------------------------------------------------- |
| **Bus**           | `bus`                      | Connected bus ID.                                               |
| **ID**            | `name`                     | Unique current source identifier.                               |
| **P (MW)**        | `power.re`                 | Active power (MW).                                              |
| **Q (MVAr)**      | `power.im`                 | Reactive power (MVAr).                                          |
| **Qmin (MVAr)**   | `reactivePowerLimits[0]`   | Minimum reactive power limit for load-flow calculations (MVAr). |
| **Qmax (MVAr)**   | `reactivePowerLimits[1]`   | Maximum reactive power limit for load-flow calculations (MVAr). |

## Current injector

The current injector component is used exclusively to inject current at a specified bus through I/O pins.

In **positive-sequence networks**, the injected current magnitude is specified in **per-unit (network base)**.

In **multiphase networks**, the injected current magnitude is specified in **amperes (A)**.

The injected current is defined by its RMS magnitude (**Imag**) and phase angle (**Iang**).

| Excel Column Name | Native Component Parameter | Description                         |
| ----------------- | -------------------------- | ----------------------------------- |
| **Bus**           | `bus`                      | Connected bus ID.                   |
| **ID**            | `name`                     | Unique current injector identifier. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/model-and-simulation/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/native-library-components/current-source-components.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
