    

 ## On this page

  

 

 # ansys::dpf::Model Class Reference

 Last update: 16.07.2025 

`#include <dpf_model.h>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [Model](classansys_1_1dpf_1_1Model.xhtml#a76d48e79b13741b01c3e0bb37ea56cc1) (const std::string &amp;filePath)  [Model](classansys_1_1dpf_1_1Model.xhtml#aa7d8460544b5133e3d144a72f4f8d78b) (const [DataSources](classansys_1_1dpf_1_1DataSources.xhtml) &amp;data\_sources) [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) [getMesh](classansys_1_1dpf_1_1Model.xhtml#a48c91a341bc268e48fe4efd1e8c8cb0f) (int timestep=0) [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) [getMeshesContainer](classansys_1_1dpf_1_1Model.xhtml#abadaeac1d698448632bc92df349f0ed9) () [TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) [getTimeFreqSupport](classansys_1_1dpf_1_1Model.xhtml#a431d3eb5237f3b5f9f99631c259c53d2) () [ResultInfo](classansys_1_1dpf_1_1ResultInfo.xhtml) [getResultInfo](classansys_1_1dpf_1_1Model.xhtml#a4c81175ac5b1652728ceb587b414857e) () [Result](classansys_1_1dpf_1_1Result.xhtml) [CreateResultEvaluationWorkflow](classansys_1_1dpf_1_1Model.xhtml#a34060c2b318e850b8b468b9e4371e651) (const char \*res\_name, [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) meshScoping=[Scoping](classansys_1_1dpf_1_1Scoping.xhtml)(), [Location](structansys_1_1dpf_1_1Location.xhtml) requested\_location=[Location](structansys_1_1dpf_1_1Location.xhtml)(), int cs\_id=0) [Result](classansys_1_1dpf_1_1Result.xhtml) [CreateResultEvaluationWorkflow](classansys_1_1dpf_1_1Model.xhtml#a346a4ed1937d88f3b094041d51b68b13) (const char \*res\_name, const char \*named\_selection, [Location](structansys_1_1dpf_1_1Location.xhtml) requested\_location=[Location](structansys_1_1dpf_1_1Location.xhtml)(), bool bInclusive=true, int cs\_id=0) [MeshQuery](classansys_1_1dpf_1_1MeshQuery.xhtml) [CreateMeshQuery](classansys_1_1dpf_1_1Model.xhtml#aa7b9083700bfa4fe6fae6b08c878eebc) () <a id="details" name="details"></a>## Detailed Description

Encapsulation of mesh and results.

Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#_a83), [MeshQueryTest.cpp](MeshQueryTest_8cpp-example.xhtml#_a0), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#_a0), and [ResultTest.cpp](ResultTest_8cpp-example.xhtml#_a15).

## Constructor &amp; Destructor Documentation

<a id="a76d48e79b13741b01c3e0bb37ea56cc1" name="a76d48e79b13741b01c3e0bb37ea56cc1"></a>## [◆ ](#a76d48e79b13741b01c3e0bb37ea56cc1)Model() \[1/2\]

 ansys::dpf::Model::Model  ( const std::string &amp;  *filePath*)   inline 

Create model from given file.

Parameters filePath@ \[in\] File from which to create model. 



<a id="aa7d8460544b5133e3d144a72f4f8d78b" name="aa7d8460544b5133e3d144a72f4f8d78b"></a>## [◆ ](#aa7d8460544b5133e3d144a72f4f8d78b)Model() \[2/2\]

 ansys::dpf::Model::Model  ( const [DataSources](classansys_1_1dpf_1_1DataSources.xhtml) &amp;  *data\_sources*)   inline 

Create model from given data sources.

Parameters \[in\]data\_sourcesData sources from which to create model. 



## Member Function Documentation

<a id="aa7b9083700bfa4fe6fae6b08c878eebc" name="aa7b9083700bfa4fe6fae6b08c878eebc"></a>## [◆ ](#aa7b9083700bfa4fe6fae6b08c878eebc)CreateMeshQuery()

 [MeshQuery](classansys_1_1dpf_1_1MeshQuery.xhtml) ansys::dpf::Model::CreateMeshQuery  ( )   inline 

Returns[MeshQuery](classansys_1_1dpf_1_1MeshQuery.xhtml). Examples[MeshQueryTest.cpp](MeshQueryTest_8cpp-example.xhtml#a1).



<a id="a346a4ed1937d88f3b094041d51b68b13" name="a346a4ed1937d88f3b094041d51b68b13"></a>## [◆ ](#a346a4ed1937d88f3b094041d51b68b13)CreateResultEvaluationWorkflow() \[1/2\]

 [Result](classansys_1_1dpf_1_1Result.xhtml) ansys::dpf::Model::CreateResultEvaluationWorkflow  ( const char \*  *res\_name*,    const char \*  *named\_selection*,    [Location](structansys_1_1dpf_1_1Location.xhtml)  *requested\_location* = `<a class="el" href="structansys_1_1dpf_1_1Location.xhtml">Location</a>()`,    bool  *bInclusive* = `true`,    int  *cs\_id* = `0`   )   inline 

Returns[Result](classansys_1_1dpf_1_1Result.xhtml) for given result name and named\_selection of mesh. Parameters \[in\]res\_nameResult name for which to get Result. \[in\]named\_selectionName of selected region in mesh. For MAPDL, names are capitalized. \[in\]requested\_locationLocation of evaluated result (nodal, elemental, or elemental\_nodal). \[in\]bInclusiveWhen named\_selection is a nodal region and requested\_location is elemental, true indicates take elements with all nodes in region. cs\_idIf false, take elements with at least 1 node in region. \[in\] Not used. 



<a id="a34060c2b318e850b8b468b9e4371e651" name="a34060c2b318e850b8b468b9e4371e651"></a>## [◆ ](#a34060c2b318e850b8b468b9e4371e651)CreateResultEvaluationWorkflow() \[2/2\]

 [Result](classansys_1_1dpf_1_1Result.xhtml) ansys::dpf::Model::CreateResultEvaluationWorkflow  ( const char \*  *res\_name*,    [Scoping](classansys_1_1dpf_1_1Scoping.xhtml)  *meshScoping* = `<a class="el" href="classansys_1_1dpf_1_1Scoping.xhtml">Scoping</a>()`,    [Location](structansys_1_1dpf_1_1Location.xhtml)  *requested\_location* = `<a class="el" href="structansys_1_1dpf_1_1Location.xhtml">Location</a>()`,    int  *cs\_id* = `0`   )   inline 

Returns[Result](classansys_1_1dpf_1_1Result.xhtml) for given result name. Parameters \[in\]res\_nameResult name for which to get Result. \[in\]meshScopingScoping of mesh elements or nodes. \[in\]requested\_locationLocation of evaluated result (nodal, elemental, or elemental\_nodal). \[in\]cs\_idNot used. 



<a id="a48c91a341bc268e48fe4efd1e8c8cb0f" name="a48c91a341bc268e48fe4efd1e8c8cb0f"></a>## [◆ ](#a48c91a341bc268e48fe4efd1e8c8cb0f)getMesh()

 [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) ansys::dpf::Model::getMesh  ( int  *timestep* = `0`)   inline 

ReturnsMeshed region for given timestep. Parameters \[in\]timestepOptional timestep for which to get meshed region. Examples[ModelTest.cpp](ModelTest_8cpp-example.xhtml#a2).



<a id="abadaeac1d698448632bc92df349f0ed9" name="abadaeac1d698448632bc92df349f0ed9"></a>## [◆ ](#abadaeac1d698448632bc92df349f0ed9)getMeshesContainer()

 [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) ansys::dpf::Model::getMeshesContainer  ( )   inline 

ReturnsMeshes container for model. 



<a id="a4c81175ac5b1652728ceb587b414857e" name="a4c81175ac5b1652728ceb587b414857e"></a>## [◆ ](#a4c81175ac5b1652728ceb587b414857e)getResultInfo()

 [ResultInfo](classansys_1_1dpf_1_1ResultInfo.xhtml) ansys::dpf::Model::getResultInfo  ( )   inline 

[Result](classansys_1_1dpf_1_1Result.xhtml) Info allows to access to:

- available results
- unit
- analysis type
- physics type

Returns[Result](classansys_1_1dpf_1_1Result.xhtml) info for model. 



<a id="a431d3eb5237f3b5f9f99631c259c53d2" name="a431d3eb5237f3b5f9f99631c259c53d2"></a>## [◆ ](#a431d3eb5237f3b5f9f99631c259c53d2)getTimeFreqSupport()

 [TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) ansys::dpf::Model::getTimeFreqSupport  ( )   inline 

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

ReturnsTime frequency support for model. Examples[ModelTest.cpp](ModelTest_8cpp-example.xhtml#a12).