Model class
Last update: 18.06.2026Namespace: Ans.DataProcessing
Summary
Entity able to access the model's metadata and results thanks to the result file path
Example
my_model = Ans.DataProcessing.Model(r"../.../file.rst")
my_model.TimeFreqSupport.NumberSets
my_model.MeshedRegion.NodeCount
my_model.MeshedRegion.ElementCount
my_model.ResultInfo.PhysicsType
disp_op = my_model.results.displacement()
Class Information
| Property | Value |
|---|---|
| Namespace | Ans.DataProcessing |
| Assembly | CS_DataProcessing |
Constructors
Constructor
Model(allowKeepFileOpen)
Parameters:
allowKeepFileOpen(bool)
Constructor
Model(dataSources, allowKeepFileOpen)
Parameters:
dataSources(DataSources)allowKeepFileOpen(bool)
Constructor
Model(resultPath, extension, allowKeepFileOpen)
Parameters:
resultPath(str)extension(str)allowKeepFileOpen(bool)
Constructor
Model(resultPath, allowKeepFileOpen)
Parameters:
resultPath(str)allowKeepFileOpen(bool)
Methods
SetResultFilePath
Method SetResultFilePath change or set the result file path
obj.SetResultFilePath(filePath, sKey)
Parameters:
filePath(str)sKey(str)
ReleaseStreams
Method ReleaseStreams if the model was allowed to keep files open using streams (see constructors), this method closes the files.
obj.ReleaseStreams()
CreateOperator
Method CreateOperator create an operator with its name and connect the datasources/streams to it. If plugins have been loaded, inputs and outputs APIs are available.
result = obj.CreateOperator(opName, config)
Parameters:
opName(str)config(OperatorConfig (optional))
Returns: BaseOperator
ToString
result = obj.ToString()
Returns: str
GetNamedSelection
Method GetNamedSelection get the scoping related to the asked named selection
result = obj.GetNamedSelection(name)
Parameters:
name(str)
Returns: Scoping
Properties
results
Access results provider of the model
Type: ModelsResults
# Get or set the property
value = obj.results
obj.results = new_value
DataSources
Property DataSources containing the file paths
Type: DataSources
# Get or set the property
value = obj.DataSources
obj.DataSources = new_value
TimeFreqSupport
Property TimeFreqSupport describes the time or frequency support of the model
Type: TimeFreqSupport
# Get the property (read-only)
value = obj.TimeFreqSupport
TimeFreqSupportProvider
Property TimeFreqSupportProvider operator allowing to access the TimeFreqSupport
Type: BaseOperator
# Get the property (read-only)
value = obj.TimeFreqSupportProvider
Mesh
Property Mesh contains spatial information of the model
Type: MeshedRegion
# Get the property (read-only)
value = obj.Mesh
MeshProvider
Property MeshProvider operator allowing to access the MeshedRegion
Type: BaseOperator
# Get the property (read-only)
value = obj.MeshProvider
ResultInfo
Property ResultInfo contains information about the analysis
Type: ResultInfo
# Get the property (read-only)
value = obj.ResultInfo
ResultInfoProvider
Property ResultInfoProvider operator allowing to access the ResultInfo
Type: BaseOperator
# Get the property (read-only)
value = obj.ResultInfoProvider
ResultFilePath
Property ResultFilePath path to the result file registered in the data sources
Type: str
# Get or set the property
value = obj.ResultFilePath
obj.ResultFilePath = new_value
StreamsProvider
Property StreamsProvider operator allowing to access the Streams containing the DataSources and allowing to keep some data in cache
Type: Operator
# Get the property (read-only)
value = obj.StreamsProvider
AvailableNamedSelections
Property AvailableNamedSelections list of named selections' names availables in the mesh
Type: list
# Get the property (read-only)
value = obj.AvailableNamedSelections