    

 ## On this page

  

 

 # Class ansys::dpf::Model

 Last update: 25.03.2026 

<a id="classansys-dpf-model"></a>

![](https://img.shields.io/badge/language-C%2B%2B-blue "C++")![](https://img.shields.io/badge/-public-brightgreen "public")

Encapsulation of mesh and results.

## Members

- [CreateMeshQuery](classansys-dpf-model.md#classansys-dpf-model-1aa7b9083700bfa4fe6fae6b08c878eebc)
- [CreateResultEvaluationWorkflow](classansys-dpf-model.md#classansys-dpf-model-1a34060c2b318e850b8b468b9e4371e651)
- [CreateResultEvaluationWorkflow](classansys-dpf-model.md#classansys-dpf-model-1a346a4ed1937d88f3b094041d51b68b13)
- [getMesh](classansys-dpf-model.md#classansys-dpf-model-1a48c91a341bc268e48fe4efd1e8c8cb0f)
- [getMeshesContainer](classansys-dpf-model.md#classansys-dpf-model-1abadaeac1d698448632bc92df349f0ed9)
- [getResultInfo](classansys-dpf-model.md#classansys-dpf-model-1a4c81175ac5b1652728ceb587b414857e)
- [getTimeFreqSupport](classansys-dpf-model.md#classansys-dpf-model-1a431d3eb5237f3b5f9f99631c259c53d2)
- [Model](classansys-dpf-model.md#classansys-dpf-model-1a76d48e79b13741b01c3e0bb37ea56cc1)
- [Model](classansys-dpf-model.md#classansys-dpf-model-1aa7d8460544b5133e3d144a72f4f8d78b)
- [ReleaseHandles](classansys-dpf-model.md#classansys-dpf-model-1ac6d249ff396b756eb860b1ea46dc2fa1)
- [~Model](classansys-dpf-model.md#classansys-dpf-model-1a6d0f6e29b54a53f4e9c856da139fae8d)

## Public functions

<a id="classansys-dpf-model-1a6d0f6e29b54a53f4e9c856da139fae8d"></a>

### Function ~Model

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
virtual ansys::dpf::Model::~Model()

```

**Return type**:

<a id="classansys-dpf-model-1a76d48e79b13741b01c3e0bb37ea56cc1"></a>

### Function Model

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::Model::Model(const std::string &filePath)

```

Create model from given file.

**Parameters**:

- const std::string &amp; **filePath**: @ \[in\] File from which to create model.

**Return type**:

<a id="classansys-dpf-model-1aa7d8460544b5133e3d144a72f4f8d78b"></a>

### Function Model

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::Model::Model(const DataSources &data_sources)

```

Create model from given data sources.

**Parameters**:

- const [DataSources](classansys-dpf-datasources.md#classansys-dpf-datasources) &amp; **data\_sources**: \[in\] Data sources from which to create model.

**Return type**:

<a id="classansys-dpf-model-1a48c91a341bc268e48fe4efd1e8c8cb0f"></a>

### Function getMesh

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
MeshedRegion ansys::dpf::Model::getMesh(int timestep=0)

```

**Returns**:

Meshed region for given timestep.

**Parameters**:

- int **timestep** = 0 : \[in\] Optional timestep for which to get meshed region.

**Return type**: [MeshedRegion](classansys-dpf-meshedregion.md#classansys-dpf-meshedregion)

<a id="classansys-dpf-model-1abadaeac1d698448632bc92df349f0ed9"></a>

### Function getMeshesContainer

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
MeshesContainer ansys::dpf::Model::getMeshesContainer()

```

**Returns**:

Meshes container for model.

**Return type**: [MeshesContainer](classansys-dpf-meshescontainer.md#classansys-dpf-meshescontainer)

<a id="classansys-dpf-model-1a431d3eb5237f3b5f9f99631c259c53d2"></a>

### Function getTimeFreqSupport

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
TimeFreqSupport ansys::dpf::Model::getTimeFreqSupport()

```

Retrieves the time/freq support to have access to the analysis domain (number times steps/frequences, correspending times/frequences/ harmonic indices, rpms) **Returns**:

Time frequency support for model.

**Return type**: [TimeFreqSupport](classansys-dpf-timefreqsupport.md#classansys-dpf-timefreqsupport)

<a id="classansys-dpf-model-1a4c81175ac5b1652728ceb587b414857e"></a>

### Function getResultInfo

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ResultInfo ansys::dpf::Model::getResultInfo()

```

[Result](classansys-dpf-result.md#classansys-dpf-result) Info allows to access to:

- available results
- unit
- analysis type
- physics type

**Returns**:

[Result](classansys-dpf-result.md#classansys-dpf-result) info for model.

**Return type**: [ResultInfo](classansys-dpf-resultinfo.md#classansys-dpf-resultinfo)

<a id="classansys-dpf-model-1a34060c2b318e850b8b468b9e4371e651"></a>

### Function CreateResultEvaluationWorkflow

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
Result ansys::dpf::Model::CreateResultEvaluationWorkflow(const char *res_name, Scoping meshScoping=Scoping(), Location requested_location=Location(), int cs_id=0)

```

**Returns**:

[Result](classansys-dpf-result.md#classansys-dpf-result) for given result name.

**Parameters**:

- const char \* **res\_name**: \[in\] Result name for which to get Result.
- [Scoping](classansys-dpf-scoping.md#classansys-dpf-scoping) **meshScoping** = [Scoping](classansys-dpf-scoping.md#classansys-dpf-scoping)() : \[in\] Scoping of mesh elements or nodes.
- [Location](structansys-dpf-location.md#structansys-dpf-location) **requested\_location** = [Location](structansys-dpf-location.md#structansys-dpf-location)() : \[in\] Location of evaluated result (nodal, elemental, or elemental\_nodal).
- int **cs\_id** = 0 : \[in\] Not used.

**Return type**: [Result](classansys-dpf-result.md#classansys-dpf-result)

<a id="classansys-dpf-model-1a346a4ed1937d88f3b094041d51b68b13"></a>

### Function CreateResultEvaluationWorkflow

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
Result ansys::dpf::Model::CreateResultEvaluationWorkflow(const char *res_name, const char *named_selection, Location requested_location=Location(), bool bInclusive=true, int cs_id=0)

```

**Returns**:

[Result](classansys-dpf-result.md#classansys-dpf-result) for given result name and named\_selection of mesh.

**Parameters**:

- const char \* **res\_name**: \[in\] Result name for which to get Result.
- const char \* **named\_selection**: \[in\] Name of selected region in mesh. For MAPDL, names are capitalized.
- [Location](structansys-dpf-location.md#structansys-dpf-location) **requested\_location** = [Location](structansys-dpf-location.md#structansys-dpf-location)() : \[in\] Location of evaluated result (nodal, elemental, or elemental\_nodal).
- bool **bInclusive** = true : \[in\] When named\_selection is a nodal region and requested\_location is elemental, true indicates take elements with all nodes in region.
- int **cs\_id** = 0 : If false, take elements with at least 1 node in region. \[in\] Not used.

**Return type**: [Result](classansys-dpf-result.md#classansys-dpf-result)

<a id="classansys-dpf-model-1aa7b9083700bfa4fe6fae6b08c878eebc"></a>

### Function CreateMeshQuery

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
MeshQuery ansys::dpf::Model::CreateMeshQuery()

```

**Returns**:

[MeshQuery](classansys-dpf-meshquery.md#classansys-dpf-meshquery).

**Return type**: [MeshQuery](classansys-dpf-meshquery.md#classansys-dpf-meshquery)

<a id="classansys-dpf-model-1ac6d249ff396b756eb860b1ea46dc2fa1"></a>

### Function ReleaseHandles

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::Model::ReleaseHandles()

```

Closes the files that were kept open to retrieve data.

**Return type**: void