> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::Project::Simulation Class Reference

Subfolder of a [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_project), regrouping input files and [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) subfolders.

`#include "Simulation.hpp"`

Inheritance diagram for ansys::Project::Simulation:

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=0b7e4f5f95fc7e2f6b33be94f808343e)

## Public Member Functions

| Type | Name |
| - | - |
| | [Simulation](#a1353fad4a75cc2abe9ca84c4d307c3c4) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pIter) Constructor from [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). |
| virtual | [\~Simulation](#a39c89becbccfc91f156103066588507b) () |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [isValid](#ab8c7167e09e88042db12724531150af7) () const Returns error with message if invalid. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getData](#a08e4de6f33b578b6edbb8127fb398c25) () Return the current Data for the simulation. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getResult](#a34c022fa77e348bd7287a76c0d7871b8) (const std::string \&pDataType) Returns the latest result of the specified type, in the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md). |
| [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) | [newRun](#a4eb433d9185e539d85307aa6b869c291) (std::string pName, [Run::RunOutputType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md#a730f2ea4aef8f22f0886f12109c17092) pType) Create a [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md). |
| [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) | [newRunInFolder](#af9cd129be20c02c3be763952a6a8bba3) (std::string pName, [Run::RunOutputType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md#a730f2ea4aef8f22f0886f12109c17092) pType, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pFolder) Create a [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) subfolder. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getRun](#abf2669d8f42be00cdf588e7443caf598) (const std::string \&pName) const Returns [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) to the children [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) with the given name. |
| std::vector\< std::string > | [getRuns](#a38cc991a7916643a66a0268fb2f755ad) () const Returns list of children [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folders, as vector of their names (see: [getRun()](#abf2669d8f42be00cdf588e7443caf598) ) |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [removeRun](#a1d4061c3e84cb66b722de5e751feeee1) (const std::string \&pName, bool pFlagErase) Remove the specified run from the simulation. |
| [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) | [newRunGroup](#a3c4e9b6a70403ddafdb2dbd93c027aab) (std::string pName, [Run::RunOutputType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md#a730f2ea4aef8f22f0886f12109c17092) pType) Create a new [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) - a virtual group of separate runs, can be assigned a type. |
| [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) | [getRunGroup](#abe2f341b876cdaeaa82737df9eaf428a) (const std::string \&pName) const Return the [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) by this name, in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md). |
| std::vector\< std::string > | [getRunGroups](#a284554c45e7a609f560f4980ad969e72) () const Return the list of RunGroups, by name, in this simulation. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [removeRunGroup](#a7194248adaf93042eee0e5e60711877b) (const std::string \&pName, bool pFlagEraseRuns) |
| void | [newLink](#a41ced84b196ab472305df137411131d9) (const std::string pKey, const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pIter) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getLink](#af283d54a6e0ec70ed64ce6bacc4cd192) (const std::string pKey) |
| bool | [hasLink](#a2983aaea7346fd047121f263f4c81670) (const std::string pKey) |
| void | [setCurrentRun](#a607c98713399c26357da6ae6a92b21ec) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pRun) Set the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) in the simulation. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getCurrentRun](#aa53437d21b9d65376405d5302733b271) () const Return the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) in the simulation - see [setCurrentRun()](#a607c98713399c26357da6ae6a92b21ec) |

> [accordion] Public Member Functions inherited from ansys::Project::SimBase
>
> Public Member Functions inherited from [ansys::Project::SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md)
>
> | Type | Name |
> | - | - |
> | bool | [ok](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a006186f7ee51c0d5548bd6cad367b032) () const |
> | std::string | [getName](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a8aef8314dfc33a8d25e3963fa3fd07ba) () const Returns the object name in the project. |
> | virtual [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getCase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a1fb985412b84a850718aa3aae6e03147) () const Returns the case file associated with this folder. |
> | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [setCase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a2312d3c69d5f32a7c76bc567c942e945) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pCaseFile) Set the case file associated with this item. |
> | void | [setMainDataType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#ac44fe199d4f2c2c7aa8be5d22353740a) (const std::string \&pDataType) Set the result type expected as default output for runs. |
> | std::string | [getMainDataType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a743bc36e30200c87603dedaafe1d969d) () const Returns the result type expected as default output for runs (see: [setMainDataType()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#ac44fe199d4f2c2c7aa8be5d22353740a) ) |
> | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [copyInput](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#aeb5ffe7267a10b465dc8c2c825195074) ([Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) pPath, bool pInInputFolder=false) Copy the specified project file into the current folder. |
> | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [setInput](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a0b6fee750eeb02e8068640758c6d8b0d) ([Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_path.md) pPath) Register a files as Input/ to this folder. |
> | std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) > | [getInputs](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a2d532a01d1f99cb76ec85e8f4908d932) ([Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) \*pErrorPtr=0) const Return the list of registered inputs for this simulation. |
> | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getInputByType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a7eb8d0c48e61b171014c593fb63e85c6) (const std::string \&pType, std::string pSubtype="") const Search for a -single- input of the specified type (and optionally, subtype) |
> | std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) > | [getInputsByType](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#abc3d5315d8f3a3cff217c2112b4581a1) (const std::string \&pType, std::string pSubtype="", [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) \*pErrorPtr=0) const Search for one or multiple input of the specified type (and optionally, subtype) |
> | [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getMeta](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a067d578e43cf6085623921adb816d5f4) () Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a067d578e43cf6085623921adb816d5f4) |
> | const [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md) & | [getMeta](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#af6e6bd9bee7a4fe152ff2ac2f51ad8c9) () const Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a067d578e43cf6085623921adb816d5f4) |
> | virtual [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [getIterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a16f3c24244ab0ec6587d945785c7718d) () const Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) for this item. |
> | | [operator Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a0625d859da2633b26505821aaf569602) () const |

## Static Public Member Functions

| Type | Name |
| - | - |
| static bool | [isSimulation](#a9a500df90203b2a296d5185232dbbc17) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pIter) |

## Protected Member Functions

| Type | Name |
| - | - |
| std::vector\< std::string > | [getListOfSubclass](#aa623d14ca07c68e510f518a6c51e8951) (const std::string \&pSubclass) const Search child hierarchy for items of the specified subclass. |

> [accordion] Protected Member Functions inherited from ansys::Project::SimBase
>
> Protected Member Functions inherited from [ansys::Project::SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md)
>
> | Type | Name |
> | - | - |
> | | [SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a818fb26085d036e187d4363696c37804) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) pIter) |
> | virtual | [\~SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a5f50eff2ae40bad165b140399d9143e1) () |
> | [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_error.md) | [copyDatafileMeta](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a511aa7d1e5b9a422a7bec1812b1b2851) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pInput, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) \&pOutput) |

## Additional Inherited Members

> [accordion] Protected Attributes inherited from ansys::Project::SimBase
>
> Protected Attributes inherited from [ansys::Project::SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md)
>
> | Type | Name |
> | - | - |
> | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) | [aIter](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#ae97b15e35c30f6eda557fc6dfaec2b5f) |

## Detailed Description

Subfolder of a [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_project), regrouping input files and [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) subfolders.

Subclass of [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md), can be constructed from an [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md), the [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) is [ok()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a006186f7ee51c0d5548bd6cad367b032) only if the provided iterator is of the appropriate subclass.

```cpp theme={null}
  Iterator it = prj.get("/Sim1/");
  Simulation sim(it);
    sim.ok()
```

In a [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md), one or multiple [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) are created, to store the simulation Results, organized in [Output](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_output.md) subfolders. The [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) might have settings ([Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_metadata.md)) related to the solver settings, or common to all results in this folder hiearchy.

## Constructor & Destructor Documentation

### Simulation()

```cpp theme={null}
ansys::Project::Simulation::Simulation(Iterator pIter)
```

Constructor from [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md). \


The input [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) must be of subclass [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) If the subclass is not [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md), the [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) object is invalid ( !ok() )

### \~Simulation()

```cpp theme={null}
virtual ansys::Project::Simulation::~Simulation()
```

`inline` `virtual`

## Member Function Documentation

### getCurrentRun()

```cpp theme={null}
Iterator ansys::Project::Simulation::getCurrentRun() const
```

Return the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) in the simulation - see [setCurrentRun()](#a607c98713399c26357da6ae6a92b21ec)

### getData()

```cpp theme={null}
Iterator ansys::Project::Simulation::getData()
```

Return the current Data for the simulation.

The current data is the latest [Result](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_result.md), of the main data type, for the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md).

### getLink()

```cpp theme={null}
Iterator ansys::Project::Simulation::getLink(const std::string pKey)
```

### getListOfSubclass()

```cpp theme={null}
std::vector< std::string > ansys::Project::Simulation::getListOfSubclass(
    const std::string & pSubclass
) const
```

`protected`

Search child hierarchy for items of the specified subclass.

### getResult()

```cpp theme={null}
Iterator ansys::Project::Simulation::getResult(const std::string & pDataType)
```

Returns the latest result of the specified type, in the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md).

### getRun()

```cpp theme={null}
Iterator ansys::Project::Simulation::getRun(const std::string & pName) const
```

Returns [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) to the children [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) with the given name.

### getRunGroup()

```cpp theme={null}
RunGroup ansys::Project::Simulation::getRunGroup(const std::string & pName) const
```

Return the [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) by this name, in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md).

If the rungroup is in a subfolder the path to it is expected (same path type returned by [getRunGroups()](#a284554c45e7a609f560f4980ad969e72) ) Simulation/RunGroup -> [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) Simulation/folder/RunGroup -> folder/RunGroup

### getRunGroups()

```cpp theme={null}
std::vector< std::string > ansys::Project::Simulation::getRunGroups() const
```

Return the list of RunGroups, by name, in this simulation.

If the rungroup is in a subfolder the relative path to it is included Simulation/RunGroup -> [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) Simulation/folder/RunGroup -> folder/RunGroup

### getRuns()

```cpp theme={null}
std::vector< std::string > ansys::Project::Simulation::getRuns() const
```

Returns list of children [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folders, as vector of their names (see: [getRun()](#abf2669d8f42be00cdf588e7443caf598) )

If the run is in a subfolder the relative path to it is included Simulation/Run -> [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) Simulation/folder/Run -> folder/Run

### hasLink()

```cpp theme={null}
bool ansys::Project::Simulation::hasLink(const std::string pKey)
```

### isSimulation()

```cpp theme={null}
bool ansys::Project::Simulation::isSimulation(const Iterator & pIter)
```

`static`

### isValid()

```cpp theme={null}
Error ansys::Project::Simulation::isValid() const
```

`virtual`

Returns error with message if invalid.

Implements [ansys::Project::SimBase](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_sim_base.md#a3c713318a297544df6164b21df42454d).

### newLink()

```cpp theme={null}
void ansys::Project::Simulation::newLink(
    const std::string pKey,
    const Iterator & pIter
)
```

### newRun()

```cpp theme={null}
Run ansys::Project::Simulation::newRun(
    std::string pName,
    Run::RunOutputType pType
)
```

Create a [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md).

The [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder is physical or virtual, depending of the project [ProjectStoragePolicy](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_project_storage_policy.md) The new run is given a name, and a type.

**Parameters**

| Name | Description |
| - | - |
| pName | : Name of the new [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md), must be unique in the simulation |
| pType | Type of the new run (Transient, Steady, etc.) see [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) |

### newRunGroup()

```cpp theme={null}
RunGroup ansys::Project::Simulation::newRunGroup(
    std::string pName,
    Run::RunOutputType pType
)
```

Create a new [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) - a virtual group of separate runs, can be assigned a type.

From the type, the mandatory and automatic variable constraints will apply to the RunGroup->[Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) association, as it would normally for Run->[Output](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_output.md).

A [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) permits to define multiple levels of run type, for example a parametric [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md) would contain transient Runs. The design point parameters are then assigned at the [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) level, while the varying time values at the [Output](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_output.md) level.

**Parameters**

| Name | Description |
| - | - |
| pName | : Name of the new [RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run_group.md), must be unique in the simulation |
| pType | Type of the new group (Transient, Steady, etc.) see [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) . |

### newRunInFolder()

```cpp theme={null}
Run ansys::Project::Simulation::newRunInFolder(
    std::string pName,
    Run::RunOutputType pType,
    Iterator pFolder
)
```

Create a [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder in the current [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_simulation.md) subfolder.

The [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) folder is physical or virtual, depending of the project [ProjectStoragePolicy](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_project_storage_policy.md) The new run is given a name, and a type.

**Parameters**

| Name | Description |
| - | - |
| pName | : Name of the new [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md), must be unique in the simulation |
| pType | Type of the new run (Transient, Steady, etc.) see [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) |

### removeRun()

```cpp theme={null}
Error ansys::Project::Simulation::removeRun(
    const std::string & pName,
    bool pFlagErase
)
```

Remove the specified run from the simulation.

**Parameters**

| Name | Description |
| - | - |
| pFlagErase | If enabled, will erase the run folder and its data |

### removeRunGroup()

```cpp theme={null}
Error ansys::Project::Simulation::removeRunGroup(
    const std::string & pName,
    bool pFlagEraseRuns
)
```

### setCurrentRun()

```cpp theme={null}
void ansys::Project::Simulation::setCurrentRun(Iterator pRun)
```

Set the current [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) in the simulation.

The current run is the 'default' run to use for post-processing, or to load the latest results. Its automatically set to the latest [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_run.md) created

**Parameters**

| Name | Description |
| - | - |
| pRun | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r1/classansys_1_1_project_1_1_iterator.md) to the existing run to mark as current |
