> 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/hypersim/model-and-simulation/import-models-from-external-software-or-code/import-from-powerfactory/export-and-compare-simulation-results.md).

# Export and Compare Simulation Results

Export simulation results from PowerFactory to compare them with HYPERSIM results.

{% stepper %}
{% step %}

## Configure and run initial conditions

1. Open the **Calculation of Initial Conditions** window
2. In **Basic Options** **>** **General**, select **Instantaneous values (electromagnetic transients)**
3. In **Step Size** **>** **General**, set the desired **Integration step size** and set he **Start time** to `0 s`
4. In **Solver Options >** **General**, set the **Damping factor** to ≥ 0.99
5. Click **Execute** to run the **Calculation of Initial Conditions**

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-fb6e7fbed058473cf4758d76fa17a279c7dbe94b%2Fpowerfactory-initial-conditions.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Select result variables and run the simulation

1. Click **Edit Result Variables**
2. Select the required components and variables
3. Ensure the correct section is used: **EMT variables** (separate from RMS variables)
4. Open the **Run Simulation** window
5. Set the **Stop time**
6. Click **Execute**

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-026cc027e3d593cf5a7cdd4546ff166d9e572d8b%2Fpowerfactory-run-simulation.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Configure Plot and export simulation data

1. Create a new **Plot Page**
2. Insert a **Simulation RMS/EMT** plot
3. Use the **Data Series** window to select variables
4. Apply **auto-scale** on the X-axis
5. Right-click the plot and select **Export Shown Data…**
6. Choose the export format:
   * **CSV**, or
   * **COMTRADE**
7. If using COMTRADE:
   * Set **Sampling frequency = 1 / Integration step size**
8. Configure export:
   * Specify file name and location
   * Enable **Export only selected variables**
9. Click **Execute**

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-2db158d4383ac8a1aa08e59f4b5383efa96dd2a4%2Fpowerfactory-export-results.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Load COMTRADE files into ScopeView (if applicable)

1. Launch **ScopeView**
2. Open the `.cfg` file and change the revision year from **2000 to 2001**
3. In ScopeView:
   * Select **COMTRADE** as the file type
   * Load the `.cfg` file

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-b95fba93c99c9e93507617bdc0c9d84e933d481e%2Fpowerfactory-load-results.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Load CSV files into ScopeView (if applicable)

1. Launch **ScopeView**
2. Open the `.csv` file in a text editor
3. Keep only **one header line**
4. Adjust signal names if required
5. In ScopeView:
   * Select **Spreadsheet** as the file type
   * Load the `.csv` file

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-73ab739971fe8a5e8e1ca422145b8083f9a993ba%2Fpowerfactory-load-csv-results.gif?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# 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/hypersim/model-and-simulation/import-models-from-external-software-or-code/import-from-powerfactory/export-and-compare-simulation-results.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.
