Datasets
Last updated
Was this helpful?
Last updated
Was this helpful?
iota.Dataset()
Description
Iota Dataset object.
Methods
Dataset constructor
Arguments
filename
: (str) file path of the dataset (extension .meta required)
mode
: (IO_Type) access mode: WRITE or READ_ONLY. (Default: iota.IO_Type.WRITE)
Example
Get dataset name Return the name as a string
Example
Get dataset software
Example
Get dataset type Returns a value of type iota.DatasetType
Example
Get dataset reader format Returns the internal reader format as string
Example
Get the list of timesteps Returns a list of string that contains the timesteps of the dataset
Example
Checks for the existsence of a timestep on a given mesh Returns a boolean value True if timestep exists, or False otherwise
Arguments
timestep
: (int) timestep index to be checked
mesh
: (str) name of the mesh to be checked
Example
Get the number of timesteps for a given mesh Returns the number of timesteps as an integer
Arguments
mesh
: (str) name of the mesh
Example
Get maximum global value for pair (result,analysis) for the whole simulation dataset Returns a value of type equal to the result type
Arguments
result
: (str) name of the result
analysis
: (str) name of the analysis
Example
Get minimum global value for pair (result,analysis) for the whole simulation dataset Returns a value of type equal to the result type
Arguments
result
: (str) name of the result
analysis
: (str) name of the analysis
Example
Get type of the result pair (result,analysis) Returns a value of type iota.ResultType representing the type
Arguments
result
: (str) name of the result
analysis
: (str) name of the analysis
Example
Get the list of all results in the dataset for all the meshes, or for a specific mesh Returns a list of strings if no mesh defined, of a list of (string,string) pairs with result name and analysis if a mesh is defined
Arguments
mesh
: (str) name of the mesh (Default: None)
Example
Get the number of results for for a specific mesh Returns an integer that corresponds to the number of results for the specified mesh
Arguments
mesh
: (str) name of the mesh
Example
Check for the existence of a result on a given timestep and mesh
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
Example
Get a list of values per vertex/particle of a specific result,analysis and component Returns a value of type iota.ArrayXX representing the values of result component. If component is iota.ALL_COMPONENTS, all components of the result are returned. Otherwise, an iota.ArrayFloat is returned
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
Example
Get minimum result value for a given step, mesh, result and analysis Returns a value of type equal to the result
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
Example
Get maximum result value for a given step, mesh, result and analysis Returns a value of type equal to the result type
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
Example
Get a result array for a given step, mesh ad result/analysis, including min and max values Returns a tuple (iota.ArrayXX, min_value, max_value), where XX is a Float or Int depending on the result type
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
Example
Get information of a given result Returns a dictionary containing: type, name, analysis and list of meshes
Arguments
result
: (str) result name
analysis
: (str) analysis name
Example
Get the list of component labels for a given result/analysis
result
: (str) result name
analysis
: (str) analysis name
Example
Get the legend of the result as shown in the colorbar of result screenshot/animation Returns the string used as label for a given result/analysis, including result name, component and units (if available). If component is iota.ALL_COMPONENTS, a list with legend for each component is returned
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
Example
result
: (str) result name
analysis
: (str) analysis name
Example
Get result type Returns a variable of type iota.ResultType
result
: (str) result name
analysis
: (str) analysis name
Example
Get values of a result for a given step, mesh, result and analysis Returns an iota.ArrayXX where XX is a Float or Int depending on the result type
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
Example
Get type of a mesh in the dataset Returns a variable of type iota.MeshType
Arguments
mesh
: (str) mesh name
Example
Get the list of meshes in the dataset Returns a list of strings representing the name of the meshes
Example
Get a mesh for a given step in the dataset Returns a variable of type iota.mesh.Mesh
Arguments
mesh
: (str) mesh name
step
: (int) timestep index
Example
Get the vertices of a mesh vertices for a given step in the dataset Returns an array containing the position of each vertex in the mesh
Arguments
mesh
: (str) mesh name
step
: (int) timestep index
Example
Get the information on a specific mesh Returns a dictionary containing the variables name, type and dynamic
Arguments
mesh
: (str) mesh name
Example
Get the value of an attribute/variable for a given step and particle mesh Returns an array of values representing for the given attribute/variable: position, orientation, type, group, labels or spheres
Arguments
step
: (int) timestep index
mesh
: (str) particles mesh name
variable
: (str) attribute name: position, orientation, type, group, labels or spheres
Example
Get the value of a result/analysis in a given point for one or all timesteps Returns a pair (iota.ArrayFloat,list[iota.ArrayFloat]),where the first element is the array of values representing the timesteps and the second one is the list of result arrays per component
Arguments
mesh
: (str) mesh name
point
: (iota.Vector3d) point to evaluate the result
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
step
: (int) timestep index (Default: iota.ALL_STEPS)
Example
Get the evolution of different statistical variables for a given mesh/result/analsys Returns a pair (iota.ArrayFloat,list[iota.ArrayFloat]),where the first element is the array of values representing the timesteps and the second one is the list of result arrays per variable
Arguments
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
step
: (int) timestep index (Default: iota.ALL_STEPS)
data
: (list[str]) list of statistical values to be evaluated: min, max, mean, stdev, median, cov (Default: [])
Example
Get the results evaluated in a give line through a mesh Returns a pair (iota.ArrayFloat,list[iota.ArrayFloat]),where the first element is the array of values representing the point/positions in the line and the second one is the list of result arrays per component
Arguments
mesh
: (str) mesh name
point_start
: (iota.Vector3d) point representing the start of the line
point_end
: (iota.Vector3d) point representing the end of the line
num_points
: (int) number of points in the line to evaluate the result
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
step
: (int) timestep index
x_type
: (str) variable to be used in the x axis of the graph: 'x', 'y', 'z', 'dist' (Default: 'dist')
Example
Get the volume/area integral of a result/analysis over a given mesh Returns a pair (iota.ArrayFloat,list[iota.ArrayFloat]),where the first element is the array of values representing the timesteps and the second one is the list of result arrays per component
Arguments
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
component
: (int) component index
step
: (int) timestep index (Default: iota.ALL_STEPS)
Example
Sets the name of the dataset
Arguments
name
: (str) new name of the dataset
Example
Adds a mesh of particles (DEM) to a existing step in the dataset
Arguments
step
: (int) timestep index
mesh
: (iota.mesh.DEM_Mesh) particle (DEM) mesh class
name
: (str) mesh name (Default: 'particles')
Example
Adds a mesh to a existing step in the dataset
Arguments
step
: (int) timestep index or iota.STATIC_MESH if the mesh to be added is static
mesh
: (iota.mesh.Mesh) mesh to be added to the dataset
Examples
Adds a result to a existing mesh and step in the dataset
Arguments
step
: (int) timestep index
mesh
: (str) mesh name
result
: (str) result name
analysis
: (str) analysis name
data
: (iota.ArrayXX) array of results to be added to dataset
Example
Creates a mesh slice/cut-plane defined by a pair of vectors (origin,normal) representing the plane and it is added to the dataset as new mesh
Arguments
mesh
: (str) name of the mesh to be cut
normal
: (iota.Vector3d) vector representing the normal direction to define the slice/cut-plane
origin
: (iota.Vector3d) vector contained in the slice/cut-plane plane
result
: (str) name of an existing result in the dataset to be interpolated on the slice/cut-plane. If empty, all results in the dataset are included (Default: '')
analysis
: (str) name of the analysis of an existing result in the dataset. If empty, all analysis are included (Default: '')
step
: (int) timestep index (Default: iota.ALL_STEPS)
Examples
Adds a new timestep to the dataset
Arguments
timestep
: (str) timestep to be added
Example
Deletes a mesh from the dataset
Arguments
mesh
: (str) mesh name
Example
Check of a mesh deletion process have finished Returns a pair (bool,str) with the status of the process. If process finished correctly, the boolean is True and message empty. In case of error, the error message is added as the second element of the pair
Example
Get list of result legends to shown in graph/animation for a given result/analysis Returns a list of strings representing the labels per component. Equivalent to