> 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/smart-power-simulation-software-sps/blocks-functions-tools/basics/sources/ac-current-source.md).

# AC Current Source

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-5dbf6864c04bf6d71c14cc66cab082f80762dbce%2FAC_current_source_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **AC Current Source** block, located in the **OPAL-RT SPS Software/Sources** library, implements an ideal AC current source. The positive current direction is indicated by the arrow in the block icon. The generated current I is described by the following relationship:

$$
I = A \sin(\omega t + \varphi), \space
\omega = 2\pi f, \space
\varphi = \text{Phase in radians}.
$$

Negative values are allowed for amplitude and phase. A zero frequency and a 90-degree phase specify a DC current source. You cannot enter a negative frequency; the software returns an error in that case, and the block displays a question mark in the block icon. You can modify the first three block parameters at any time during the simulation.

## Parameters

<table data-header-hidden><thead><tr><th width="170"></th><th></th></tr></thead><tbody><tr><td>Peak amplitude</td><td>The peak amplitude of the generated current, in amperes (A). Default is <code>10</code>.</td></tr><tr><td>Phase</td><td>The phase in degrees (deg). Specify a frequency of 0 and a phase of 90 degrees to implement a DC current source. Default is <code>0</code>.</td></tr><tr><td>Frequency</td><td>The source frequency in hertz (Hz). Default is <code>60</code>. Specify a frequency of <code>0</code> and a phase of <code>90</code> degrees to implement a DC current source.</td></tr><tr><td>Sample time</td><td>The sample period in seconds (s). The default is <code>0</code>, corresponding to a continuous source.</td></tr><tr><td>Measurements</td><td>Default is <code>None</code>. Select <code>Current</code> to measure the current flowing through the AC Current Source block.</td></tr></tbody></table>

Place a Multimeter block in your model to display the selected measurements during the simulation. In the Available Measurements list box of the Multimeter block, the measurement is identified by a label followed by the block name.

Measurements table:

| Measurement | Label   |
| ----------- | ------- |
| **Current** | `Isrc:` |

## Examples

The `power_accurrent` example uses two AC Current Source blocks in parallel to sum two sinusoidal currents in a resistor.


---

# 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/smart-power-simulation-software-sps/blocks-functions-tools/basics/sources/ac-current-source.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.
