Skip to main content

Rocky PrePost scripting 2026 R1

RASimulatorRun

Last update: 23.02.2026

class RASimulatorRun

Rocky PrePost Scripting wrapper for solver settings.

This wrapper corresponds to the “Solver” item on a project’s data tree. Access it from the RAStudy with:

simulator_run = study.GetSimulatorRun()

Methods:

Name Description
AddCurve(curve_name, timesteps, values, unit) Add a curve to the element with a time-steps domain
AddCustomCurve(name[, curve_type, ...]) Add a custom curve in the database. :param name: The name of the curve to be set. :param curve_type: The type of the custom curve to be added. :param output_unit: The output unit, in which case the unit database will be queried for a quantity that makes sense. If None, the quantity is considered unknown. :param scope: The scope to be set. :param sources: A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set.
AddCustomProperty(name[, property_type, ...]) Add a custom property to the database
AddGridFunction(grid_function_name, ...[, ...]) Adds a grid function to the grid.
CreateCurveOutputVariable(curve_name[, ...]) Used to create an output variable based on a curve which doesn't change at each new timestep (i.e.: a curve with a single value for each time).
CreateGridFunction(values[, location, time_step]) Create a grid function from the given values, location and time-step.
CreateGridFunctionArrayOnCells([time_step]) Creates a numpy array with the number of elements based on the cells and returns it.
CreateGridFunctionStatisticOutputVariable(...) Used to create an output variable based on a grid function statistic (i.e.: will get a grid function, compute its statistic based on statistic_operation and then based on the statistic values will apply the operation to get a single scalar).
CreateTransientCurveOutputVariable(curve_name) Used to create an output variable based on a curve for which there's a completely new representation for each time step -- such as Power : Impact X Belt Width (i.e.: will get the curve multiple times based on the time range, compute a value for each time based on the operation, to convert the multiple curves into a single curve and then will apply the time_operation to get a single scalar from those values).
DisableCompressedFile() Set the value of "Compressed File" to False.
DisableDpmBlockingEffectForSinglePhaseSimulations() The "Use DPM Blocking Effect For Single Phase Simulations" parameter was removed from Rocky since 25R2.
DisableFEMForces() Disables the "FEM Forces" calculations.
DisableHtcCalculator() Disables the "HTC" calculations.
DisableMoveCfdCellsWithRockyBoundaries() Set the value of "Move Cfd Cells With Rocky Boundaries" to False.
DisableNegateInitialOverlaps() Set the value of "Negate Initial Overlaps" to False.
DisableSortingDistanceFactor() Set the value of "Sorting Distance Factor" to False.
DisableUse3RdPowerForCfdCgm() Set the value of "Use 3Rd Power For Cfd Cgm" to False.
EditCustomCurve(edit_curve[, new_name, ...]) Edit a custom curve saved in the database. :param edit_curve: The name of the curve to be edited. :param new_name: The new name of the curve to be set. :param sources: A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set.
EditCustomProperty(edit_property[, ...]) Edit a custom property saved in the database. :param edit_property: The name of the property to be edited. :param new_name: The new name of the property to be set. :param sources: A dict pointing the variable used to the property association it represents and a string indicating in which unit the input data should be gotten. :param expression: The expression to be set.
EnableCompressedFile() Set the value of "Compressed File" to True.
EnableDpmBlockingEffectForSinglePhaseSimulations() The "Use DPM Blocking Effect For Single Phase Simulations" parameter was removed from Rocky since 25R2.
EnableFEMForces() Enables the "FEM Forces" calculations.
EnableHtcCalculator() Enables the "HTC" calculations.
EnableMoveCfdCellsWithRockyBoundaries() Set the value of "Move Cfd Cells With Rocky Boundaries" to True.
EnableNegateInitialOverlaps() Set the value of "Negate Initial Overlaps" to True.
EnableSortingDistanceFactor() Set the value of "Sorting Distance Factor" to True.
EnableUse3RdPowerForCfdCgm() Set the value of "Use 3Rd Power For Cfd Cgm" to True.
GetActivesArray([time_step]) Get an array representing the cells' "active" status.
GetArraysGrowthRate() Get the value of "Arrays Growth Rate".
GetAvailableModulesOutputProperties()
GetAvailableOutputRootProperties(root_key) Deprecated: Use GetAvailableStandardOutputProperties instead.
GetAvailableOutputRoots() Deprecated: Use GetAvailableStandardOutputProperties instead.
GetAvailableStandardOutputProperties()
GetBoundingBox([unit, time_step]) Get the element's bounding box.
GetBreakageDelayAfterRelease([unit]) Get the value of "Breakage Delay After Release".
GetBreakageOverlapFactor() Get the value of "Breakage Overlap Factor".
GetBreakageStart([unit]) Get the value of "Breakage Start".
GetCellAreaAsArray([time_step]) Get an array containing the area of each cell.
GetCellCenterAsArray([time_step]) Get an array containing the center coordinates of each cell.
GetCellDzAsArray([time_step]) Get an array containing the thickness (in Z) of each cell.
GetCellFromIJK(i, j, k[, time_step]) Creates a grid cell handle from the current I, J, K indexes
GetCellIJK(cell_handle[, time_step]) Converts the given cell handle to it's I, J, K indexes
GetCellNumberOfVertices(cell[, time_step]) Get an array containing the number of vertices of each cell.
GetCellPointsAsFunction([time_step]) Get a function for the points (vertices) of each cell.
GetCellVolumeAsArray([time_step]) Get an array with the volume of each cell.
GetContactNeighboringDistanceBetweenParticles([unit]) Get the value of "Contact Neighboring Distance Between Particles".
GetContactNeighboringDistanceBetweenParticlesAndTriangles([unit]) Get the value of "Contact Neighboring Distance Between Particles And Triangles".
GetCurve(curve_name[, simulation_name, ...]) Override base class method to check for a request of a grid function statistic.
GetCurveNames([simulation_name]) @param simulation_name: unicode
GetCurveNamesAssociation([simulation_name]) Get this element's curve names.
GetDeformableMassMatrixType() Get "Deformable Mass Matrix Type" as a string.
GetDisableTrianglesOnPeriodicBoundaries() Get the value of "Disable Triangles On Periodic Boundaries".
GetDragLimiterFactor() Get the value of "Drag Limiter Factor".
GetElementCurve(element_name, curve_name[, ...]) Return the curves for the given element and name.
GetFacePositions([time_step]) Get the index of the faces.
GetFaceVertices([time_step]) Get the index of the vertices for all faces.
GetFixedTimestep([unit]) Get the value of "Fixed Timestep".
GetFluentOutputsMultiplier() Get the value of "Fluent Outputs Multiplier".
GetGeometryQuantity() Get the quantity corresponding to the grid's geometry.
GetGeometryTransform([time_step]) Get the geometry transform for the grid at the given time step.
GetGeometryUnit() Get the grid's geometry's unit.
GetGridFunction(grid_function_name[, ...]) Gets a grid function given its name.
GetGridFunctionNames([translated, context]) Overridden to filter out deprecated property names.
GetJointElasticRatio() Get the value of "Joint Elastic Ratio".
GetLinearHystDamp() Get the value of "Linear Hyst Damp".
GetLoadingNSteps() Get the value of "Loading N Steps".
GetMaximumNumberOfIterations() Get the value of "Maximum Number of Iterations".
GetMeshColoring(window) Get the RAMeshColoring related to the current object and a window.
GetMinimumLengthDeformationTolerance() Get the value of "Minimum Length Deformation Tolerance".
GetMinimumVolumeTolerance() Get the value of "Minimum Volume Tolerance".
GetModulesOutputPropertiesData()
GetModulesOutputPropertyEnabled(*output_property) Retrieve enable state of given "Modules Output Property".
GetMoveCfdCellsWithRockyBoundaries() Get the value of "Move Cfd Cells With Rocky Boundaries".
GetMpiHeterogeneous() Get the value of "Mpi Heterogeneous".
GetMpiHostfile() Get the value of "Mpi Hostfile".
GetMpiHosts() Get the value of "Mpi Hosts".
GetMpiNumberOfProcesses() Get the value of "Mpi Number of Processes".
GetMpiNumberOfThreads() Get the value of "Mpi Number of Threads".
GetMpiWithinScheduler() Get the value of "Mpi Within Scheduler".
GetMultiGpuSlicingDirection() Get "Multi Gpu Slicing Direction" as a string.
GetNegateInitialOverlaps() Get the value of "Negate Initial Overlaps".
GetNeighborSearchModel() Get "Neighbor Search Model" as a string.
GetNumberOfCells([time_step]) Get the total number of cells.
GetNumberOfNodes([time_step]) Get the total number of nodes (vertices).
GetNumberOfProcessors() Get the value of "Number of Processors".
GetNumpyCurve(curve_name[, unit, realization]) Returns a curve as a tuple of numpy arrays (time, property) for the given element and name.
GetOutputPropertyEnabled(root_key, property_name) Deprecated: Use GetStandardOutputPropertyEnabled instead.
GetOutputRootEnabled(root_key) Deprecated: Use GetStandardOutputPropertyEnabled instead.
GetOutputVariableValue(variable_name) Get the value of a previously-created output variable.
GetOverRelaxationCoefficient() Get the value of "Over Relaxation Coefficient".
GetOverlapParticlesDelay([unit]) Get the value of "Overlap Particles Delay".
GetParticleSizeLimitForReordering([unit]) Get the value of "Particle Size Limit For Reordering".
GetProcessingUnit() Get "Processing Unit" as a string.
GetRefineConcaveSearch() Get the value of "Refine Concave Search".
GetReleaseParticlesWithoutOverlapCheck() Get the value of "Release Particles Without Overlap Check".
GetResetOnlyPhysicalContactsData() Get the value of "Reset Only Physical Contacts Data".
GetResumeDataFrequency() Get the value of "Resume Data Frequency".
GetSimulationDuration([unit]) Get the value of "Simulation Duration".
GetSolverCurvesFrequency() Get the value of "Solver Curves Frequency".
GetSortingDistanceFactor() Get the value of "Sorting Distance Factor".
GetSpecialReorderingForWidePsd() Get the value of "Special Reordering For Wide Psd".
GetStandardOutputPropertiesData()
GetStandardOutputPropertyEnabled(...) Retrieve enable state of given "Standard Output Property".
GetSuccessiveOverRelaxationTolerance() Get the value of "Successive Over Relaxation Tolerance".
GetTargetGpu() Get the value of "Target Gpu".
GetTargetGpus()
GetTimeInterval([unit]) Get the value of "Time Interval".
GetTimeSet() Get the list of time-steps associated to the grid.
GetTimeStatistics() Get the object responsible for handling time-statistics grid functions for this process.
GetTimeStep(time_step[, accept_global]) Get the timestep corresponding to the given time.
GetTimestepModel() Get "Timestep Model" as a string.
GetTopologyShape([time_step]) Get the shape of the topology (similar to the shape of numpy arrays).
GetUse2023R2CellVolumeFractionUpdateApproach() Get the value of "Use 2023 R2 Cell Volume Fraction Update Approach".
GetUse2023R2SourceTermsApproach() Get the value of "Use 2023 R2 Source Terms Approach".
GetUse3RdPowerForCfdCgm() Get the value of "Use 3Rd Power For Cfd Cgm".
GetUseArraysGrowthRate() Get the value of "Use Arrays Growth Rate".
GetUseBreakageOverlapFactor() Get the value of "Use Breakage Overlap Factor".
GetUseCompressedFiles() Get the value of "Use Compressed Files".
GetUseContactNeighboringDistanceBetweenParticles() Get the value of "Use Contact Neighboring Distance Between Particles".
GetUseContactNeighboringDistanceBetweenParticlesAndTriangles() Get the value of "Use Contact Neighboring Distance Between Particles And Triangles".
GetUseDpmBlockingEffectForSinglePhaseSimulations() The "Use DPM Blocking Effect For Single Phase Simulations" parameter was removed from Rocky since 25R2.
GetUseDragLimiterFactor() Get the value of "Use Drag Limiter Factor".
GetUseFixedTimestep() Get the value of "Use Fixed Timestep".
GetUseMpi() Get the value of "Use Mpi".
GetUseNonRoundTorqueCorrection() Get the value of "Use Non Round Torque Correction".
GetUseSortingDistanceFactor() Get the value of "Use Sorting Distance Factor".
GetValidDeformableMassMatrixTypeValues() Get a list of all possible values for "Deformable Mass Matrix Type".
GetValidMultiGpuSlicingDirectionValues() Get a list of all possible values for "Multi Gpu Slicing Direction".
GetValidNeighborSearchModelValues() Get a list of all possible values for "Neighbor Search Model".
GetValidProcessingUnitValues() Get a list of all possible values for "Processing Unit".
GetValidTimestepModelValues() Get a list of all possible values for "Timestep Model".
GetVertices([time_step]) Get the geometry vertices of the grid at the given time step.
GetWearGeometryUpdateInterval([unit]) Get the value of "Wear Geometry Update Interval".
GetWearStart([unit]) Get the value of "Wear Start".
HasFEMForcesEnabled() Whether the simulation is configured to collect forces for FEM analysis.
HasGridFunction(grid_function_name) Whether the grid has the given grid function.
HasHtcCalculatedData() Whether the "HTC" is being calculated.
IsCellActive(i, j, k[, time_step]) Checks if the given cell is active or not
IsCompressedFileEnabled() Check if the "Compressed File" is enabled.
IsDpmBlockingEffectForSinglePhaseSimulationsEnabled() The "Use DPM Blocking Effect For Single Phase Simulations" parameter was removed from Rocky since 25R2.
IsMoveCfdCellsWithRockyBoundariesEnabled() Check if the "Move Cfd Cells With Rocky Boundaries" is enabled.
IsNegateInitialOverlapsEnabled() Check if the "Negate Initial Overlaps" is enabled.
IsSortingDistanceFactorEnabled() Check if the "Sorting Distance Factor" is enabled.
IsUse3RdPowerForCfdCgmEnabled() Check if the "Use 3Rd Power For Cfd Cgm" is enabled.
IterCellVertices(cell[, time_step]) Iterate on the vertices of active grid cells at the given time.
IterCells([time_step]) Iterate on the active grid cells at the given time.
Modified(*args, **kwargs) Resets all the cache information after a change in the subject being tracked.
RemoveCustomCurve(name) Remove the curve from the database :param name: The name of the curve to be removed.
RemoveCustomProperty(name) Remove the property from the database :param name: The name of the property to be removed.
RemoveOutputVariable(variable_name) Removes some output variable.
RemoveProcess() It is not possible to remove the item "Solver" from the project.
RestoreOutputPropertiesDefaults() Restore default values of "Output Properties".
SetArraysGrowthRate(value) Set the value of "Arrays Growth Rate".
SetBreakageDelayAfterRelease(value[, unit]) Set the value of "Breakage Delay After Release".
SetBreakageOverlapFactor(value) Set the value of "Breakage Overlap Factor".
SetBreakageStart(value[, unit]) Set the value of "Breakage Start".
SetContactNeighboringDistanceBetweenParticles(value) Set the value of "Contact Neighboring Distance Between Particles".
SetContactNeighboringDistanceBetweenParticlesAndTriangles(value) Set the value of "Contact Neighboring Distance Between Particles And Triangles".
SetCurrentTimeStep(time_step) Sets the current time step.
SetDeformableMassMatrixType(value) Set the value of "Deformable Mass Matrix Type".
SetDisableTrianglesOnPeriodicBoundaries(value) Set the value of "Disable Triangles On Periodic Boundaries".
SetDragLimiterFactor(value) Set the value of "Drag Limiter Factor".
SetFixedTimestep(value[, unit]) Set the value of "Fixed Timestep".
SetFluentOutputsMultiplier(value) Set the value of "Fluent Outputs Multiplier".
SetJointElasticRatio(value) Set the value of "Joint Elastic Ratio".
SetLinearHystDamp(value) Set the value of "Linear Hyst Damp".
SetLoadingNSteps(value) Set the value of "Loading N Steps".
SetMaximumNumberOfIterations(value) Set the value of "Maximum Number of Iterations".
SetMinimumLengthDeformationTolerance(value) Set the value of "Minimum Length Deformation Tolerance".
SetMinimumVolumeTolerance(value) Set the value of "Minimum Volume Tolerance".
SetModulesOutputPropertiesData(data_dict) Set the current value of "Modules Output Properties".
SetModulesOutputPropertyEnabled(...) Set enable state of given "Modules Output Property".
SetMoveCfdCellsWithRockyBoundaries(value) Set the value of "Move Cfd Cells With Rocky Boundaries".
SetMpiHeterogeneous(value) Set the value of "Mpi Heterogeneous".
SetMpiHostfile(value) Set the value of "Mpi Hostfile".
SetMpiHosts(value) Set the value of "Mpi Hosts".
SetMpiNumberOfProcesses(value) Set the value of "Mpi Number of Processes".
SetMpiNumberOfThreads(value) Set the value of "Mpi Number of Threads".
SetMpiWithinScheduler(value) Set the value of "Mpi Within Scheduler".
SetMultiGpuSlicingDirection(value) Set the value of "Multi Gpu Slicing Direction".
SetNegateInitialOverlaps(value) Set the value of "Negate Initial Overlaps".
SetNeighborSearchModel(value) Set the value of "Neighbor Search Model".
SetNumberOfProcessors(value) Set the value of "Number of Processors".
SetOutputPropertyEnabled(root_key, ...) Deprecated: Use SetStandardOutputPropertyEnabled instead.
SetOutputRootEnabled(root_key, enabled) Deprecated: Use SetStandardOutputPropertyEnabled instead.
SetOverRelaxationCoefficient(value) Set the value of "Over Relaxation Coefficient".
SetOverlapParticlesDelay(value[, unit]) Set the value of "Overlap Particles Delay".
SetParticleSizeLimitForReordering(value[, unit]) Set the value of "Particle Size Limit For Reordering".
SetProcessingUnit(value) Set the value of "Processing Unit".
SetRefineConcaveSearch(value) Set the value of "Refine Concave Search".
SetReleaseParticlesWithoutOverlapCheck(value) Set the value of "Release Particles Without Overlap Check".
SetResetOnlyPhysicalContactsData(value) Set the value of "Reset Only Physical Contacts Data".
SetResumeDataFrequency(value) Set the value of "Resume Data Frequency".
SetSimulationDuration(value[, unit]) Set the value of "Simulation Duration".
SetSolverCurvesFrequency(value) Set the value of "Solver Curves Frequency".
SetSortingDistanceFactor(value) Set the value of "Sorting Distance Factor".
SetSpecialReorderingForWidePsd(value) Set the value of "Special Reordering For Wide Psd".
SetStandardOutputPropertiesData(data_dict) Set the current value of "Standard Output Properties".
SetStandardOutputPropertyEnabled(...) Set enable state of given "Standard Output Property".
SetSuccessiveOverRelaxationTolerance(value) Set the value of "Successive Over Relaxation Tolerance".
SetTargetGpu(value) Set the value of "Target Gpu".
SetTargetGpus(gpus) It will configure the IDs of GPUs that will be used in simulation based on the list of IDs or names of GPUs passed.
SetTimeConfiguration(duration, time_interval) Shortcut to set both the simulation's duration and its time interval.
SetTimeInterval(value[, unit]) Set the value of "Time Interval".
SetTimestepModel(value) Set the value of "Timestep Model".
SetUse2023R2CellVolumeFractionUpdateApproach(value) Set the value of "Use 2023 R2 Cell Volume Fraction Update Approach".
SetUse2023R2SourceTermsApproach(value) Set the value of "Use 2023 R2 Source Terms Approach".
SetUse3RdPowerForCfdCgm(value) Set the value of "Use 3Rd Power For Cfd Cgm".
SetUseArraysGrowthRate(value) Set the value of "Use Arrays Growth Rate".
SetUseBreakageOverlapFactor(value) Set the value of "Use Breakage Overlap Factor".
SetUseCompressedFiles(value) Set the value of "Use Compressed Files".
SetUseContactNeighboringDistanceBetweenParticles(value) Set the value of "Use Contact Neighboring Distance Between Particles".
SetUseContactNeighboringDistanceBetweenParticlesAndTriangles(value) Set the value of "Use Contact Neighboring Distance Between Particles And Triangles".
SetUseDpmBlockingEffectForSinglePhaseSimulations(value) The "Use DPM Blocking Effect For Single Phase Simulations" parameter was removed from Rocky since 25R2.
SetUseDragLimiterFactor(value) Set the value of "Use Drag Limiter Factor".
SetUseFixedTimestep(value) Set the value of "Use Fixed Timestep".
SetUseMpi(value) Set the value of "Use Mpi".
SetUseNonRoundTorqueCorrection(value) Set the value of "Use Non Round Torque Correction".
SetUseSortingDistanceFactor(value) Set the value of "Use Sorting Distance Factor".
SetWearGeometryUpdateInterval(value[, unit]) Set the value of "Wear Geometry Update Interval".
SetWearStart(value[, unit]) Set the value of "Wear Start".

AddCurve(curve_name, timesteps, values, unit, realization=None, timesteps_unit=None, initial_date=None)

Add a curve to the element with a time-steps domain

  • Parameters:
    • curve_name (unicode or SemanticAssociation) – The curve’s name or semantic association
    • timesteps (list *(*TimeStep ) or list *(*float ) or TimeSet) – The list of time-steps, in such case a initial date can be provided The list of elapsed time as floats, in such case a timesteps_units can be provide or days will be used The curve’s TimeSet
    • values (list *(*float )) – The list of curve image values
    • unit (unicode or Quantity) – The curve image unit or quantity
    • realization (unicode) – An additional keyword to identify the curve realization
    • timesteps_units (unicode) – The elapsed time values unit It should be given if a list of floats is used to define the time-set If not given days are assumed
    • initial_date (tuple *(*int , int , int , int , int , int ) or TimeStep) – The initial date for the time-steps given A tuple with the year, month, day, hour, minute and seconds Or a TimeStep

AddCustomCurve(name: str, curve_type: str = 'simple', output_unit: str = '', scope: str = 'user', sources: dict[str, str] | None = None, expression: str = '')

Add a custom curve in the database. :param name:

> The name of the curve to be set.

  • Parameters:
    • curve_type – The type of the custom curve to be added.
    • output_unit – The output unit, in which case the unit database will be queried for a quantity that makes sense. If None, the quantity is considered unknown.
    • scope – The scope to be set.
    • sources – A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten.
    • expression – The expression to be set.

AddCustomProperty(name: str, property_type: str = 'simple', output_unit: str = '', scope: str = 'user', sources: dict[str, str] | None = None, expression: str = '')

Add a custom property to the database

  • Parameters:
    • name – The name of the property to be set.
    • property_type – The type of the custom property to be added.
    • output_unit – The output unit, in which case the unit database will be queried for a quantity that makes sense. If None, the quantity is considered unknown.
    • scope – The scope to be set.
    • sources – A dict pointing the variable used to the property association it represents and a string indicating in which unit the input data should be gotten.
    • expression – The expression to be set.

AddGridFunction(grid_function_name, grid_function, unit: str | IQuantity = '', location: str = 'cell', realization: str = 'user_generated', time_step: str | int | ITimeStep | None = None)

Adds a grid function to the grid.

  • Parameters:
    • grid_function_name (unicode or SemanticAssociation) – The name of the grid function to be stored in this grid or the semantic association representing the grid function.
    • grid_function (list *(*double ) or numpy array) – The values of the grid function to be added.
    • unit (unicode or IQuantity) – The unit (or quantity) in which the grid function is being given.
    • location (unicode) – The location of the grid function (currently only ‘cell’ is accepted).
    • realization (unicode) – The realization used to identify the grid function among other grid functions. If None, this information is ignored.
    • time_step – if None if given a static grid function will be created otherwise a transient grid function is created and the given array associated with this time-step

SEE ALSO

KAContextDependentElement.GetTimeStep

CreateCurveOutputVariable(curve_name: str, operation: str = 'max', time_range: str = 'all', initial_time_range: float = 0.0, final_time_range: float = 0.0)

Used to create an output variable based on a curve which doesn’t change at each new timestep (i.e.: a curve with a single value for each time).

  • See: CreateTransientCurveOutputVariable for dealing with curves that are transient.
  • Parameters:
    • curve_name – The name of the curve for which the output variable is wanted.

    • operation

      The operation we want to do to convert the curve into a single value.

      Valid operations: : ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

    • time_range

      Defines the time range for the curve to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

      Valid time ranges: : ’app_time_filter’: : Uses the application time filter to get the relevant times.
      ’all’ : Uses all the times in the simulation.
      ’last_output’ : Uses only the last time in the simulation.
      ’absolute’ : Defines a time range using the initial_time_range and final_time_range.
      ’single’ : Defines a single time to be used as the time range specified as the initial_time_range.
      ’absolute_only_start’ : Defines a time range using all the values after the given initial_time_range.
      ’relative_to_end’ : Uses all the values considering initial_time_range as a delta from the end of the simulation.

    • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

    • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • Return type: str
  • Returns: Returns the name of the variable to be used later on to reference the output variable.

CreateGridFunction(values: list[float] | ndarray, location: str = 'cell', time_step: str | int | ITimeStep = 'current')

Create a grid function from the given values, location and time-step.

  • Parameters:
    • values – The values of the grid function to be added.
    • time_step – if None if given a static grid function will be created otherwise a transient grid function is created and the given array associated with this time-step
  • Returns: The created grid function.

CreateGridFunctionArrayOnCells(time_step: str | int | ITimeStep = 'current')

Creates a numpy array with the number of elements based on the cells and returns it. A different time may be specified to create the grid function based on a different time.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to create the array or an int identifying the time step index to be used based on the global time set
  • Returns: Returns a numpy float32 array with the number of elements equal to the number of cells.

CreateGridFunctionStatisticOutputVariable(grid_function_name: str, operation: str = 'max', statistic_operation: str = 'max', time_range: str = 'last_output', initial_time_range: float = 0.0, final_time_range: float = 0.0)

Used to create an output variable based on a grid function statistic (i.e.: will get a grid function, compute its statistic based on statistic_operation and then based on the statistic values will apply the operation to get a single scalar).

  • Parameters:
    • grid_function_name – The name of the grid function for which the output variable is wanted.

    • operation

      The operation used to select which value to get based on the statistic values obtained.

      Valid operations: : ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

    • statistic_operation

      The statistic operation which should be applied to the grid function for each time to obtain a single value for each time.

      Valid operations: : ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

    • time_range

      Defines the time range for the grid functions to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

      Valid time ranges: : ’app_time_filter’: : Uses the application time filter to get the relevant times.
      ’all’ : Uses all the times in the simulation.
      ’last_output’ : Uses only the last time in the simulation.
      ’absolute’ : Defines a time range using the initial_time_range and final_time_range.
      ’single’ : Defines a single time to be used as the time range specified as the initial_time_range.
      ’absolute_only_start’ : Defines a time range using all the values after the given initial_time_range.
      ’relative_to_end’ : Uses all the values considering initial_time_range as a delta from the end of the simulation.

    • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

    • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • Returns: Returns the name of the variable to be used later on to reference the output variable.

CreateTransientCurveOutputVariable(curve_name: str, operation: str = 'max', time_operation: str = 'max', time_range: str = 'last_output', initial_time_range: float = 0.0, final_time_range: float = 0.0, domain_range: str = 'all', initial_domain_range: float = 0.0, final_domain_range: float = 0.0, domain_unit: str | None = None)

Used to create an output variable based on a curve for which there’s a completely new representation for each time step – such as Power : Impact X Belt Width (i.e.: will get the curve multiple times based on the time range, compute a value for each time based on the operation, to convert the multiple curves into a single curve and then will apply the time_operation to get a single scalar from those values).

  • Parameters:
    • curve_name – The name of the transient curve for which the output variable is wanted.

    • operation

      The operation we want to do at the curve in each time (i.e.: go from transient curve to a regular curve).

      Valid operations: : ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

    • time_operation

      The operation that we want to do at the curve when the curve is already converted to a regular time-based curve (by applying the ‘operation’ at each time).

      Valid operations: : ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

    • time_range

      Defines the time range for the curve to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

      Valid time ranges: : ’app_time_filter’: : Uses the application time filter to get the relevant times.
      ’all’ : Uses all the times in the simulation.
      ’last_output’ : Uses only the last time in the simulation.
      ’absolute’ : Defines a time range using the initial_time_range and final_time_range.
      ’single’ : Defines a single time to be used as the time range specified as the initial_time_range.
      ’absolute_only_start’ : Defines a time range using all the values after the given initial_time_range.
      ’relative_to_end’ : Uses all the values considering initial_time_range as a delta from the end of the simulation.

    • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

    • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

    • domain_range

      Define the domain range for the curve to create the output variable

      Valid domain_range: : ’all’ : Uses all the domain in the simulation
      ’single’ : Defines a single time to be used as the time range specified as the initial_domain_range
      ’absolute’ : Defines a domain range using the initial_domain_range and final_domain_range.

    • initial_domain_range – A value for the beginning of the domain (whose actual meaning depends on the defined domain_range).

    • final_domain_range – A value for the end of the domain (whose actual meaning depends on the defined domain_range).

    • domain_unit – A unit for the domain_range

  • Return type: str
  • Returns: Returns the name of the variable to be used later on to reference the output variable.

DisableCompressedFile()

Set the value of “Compressed File” to False.

DisableDpmBlockingEffectForSinglePhaseSimulations()

The “Use DPM Blocking Effect For Single Phase Simulations” parameter was removed from Rocky since 25R2.

DisableFEMForces()

Disables the “FEM Forces” calculations.

DisableHtcCalculator()

Disables the “HTC” calculations.

DisableMoveCfdCellsWithRockyBoundaries()

Set the value of “Move Cfd Cells With Rocky Boundaries” to False.

DisableNegateInitialOverlaps()

Set the value of “Negate Initial Overlaps” to False.

DisableSortingDistanceFactor()

Set the value of “Sorting Distance Factor” to False.

DisableUse3RdPowerForCfdCgm()

Set the value of “Use 3Rd Power For Cfd Cgm” to False.

EditCustomCurve(edit_curve: str, new_name: str | None = None, sources: dict[str, str] | None = None, expression: str | None = None)

Edit a custom curve saved in the database. :param edit_curve:

> The name of the curve to be edited.

  • Parameters:
    • new_name – The new name of the curve to be set.
    • sources – A dict pointing the variable used to the curve association it represents and a string indicating in which unit the input data should be gotten.
    • expression – The expression to be set.

EditCustomProperty(edit_property: str, new_name: str | None = None, sources: dict[str, str] | None = None, expression: str | None = None)

Edit a custom property saved in the database. :param edit_property:

> The name of the property to be edited.

  • Parameters:
    • new_name – The new name of the property to be set.
    • sources – A dict pointing the variable used to the property association it represents and a string indicating in which unit the input data should be gotten.
    • expression – The expression to be set.

EnableCompressedFile()

Set the value of “Compressed File” to True.

EnableDpmBlockingEffectForSinglePhaseSimulations()

The “Use DPM Blocking Effect For Single Phase Simulations” parameter was removed from Rocky since 25R2.

EnableFEMForces()

Enables the “FEM Forces” calculations.

EnableHtcCalculator()

Enables the “HTC” calculations.

EnableMoveCfdCellsWithRockyBoundaries()

Set the value of “Move Cfd Cells With Rocky Boundaries” to True.

EnableNegateInitialOverlaps()

Set the value of “Negate Initial Overlaps” to True.

EnableSortingDistanceFactor()

Set the value of “Sorting Distance Factor” to True.

EnableUse3RdPowerForCfdCgm()

Set the value of “Use 3Rd Power For Cfd Cgm” to True.

GetActivesArray(time_step: str | int | ITimeStep = 'current')

Get an array representing the cells’ “active” status.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the actives array or an int identifying the time step index to be used based on the global time set
  • Returns: Returns a numpy array with booleans where True means the cell is active and False means it’s not active.

GetArraysGrowthRate()

Get the value of “Arrays Growth Rate”.

static GetAvailableModulesOutputProperties()

  • Returns: The available “Modules Output Properties”.

GetAvailableOutputRootProperties(root_key: str)

Deprecated: Use GetAvailableStandardOutputProperties instead.

GetAvailableOutputRoots()

Deprecated: Use GetAvailableStandardOutputProperties instead.

static GetAvailableStandardOutputProperties()

  • Returns: The available “Standard Output Properties”.

GetBoundingBox(unit: str | None = None, time_step: str | int | ITimeStep = 'current')

Get the element’s bounding box.

  • Parameters:
    • unit – The unit in which the bounding box should be gotten (by default it uses the same unit of the geometry).
    • time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the bounding box or an int identifying the time step index to be used based on the global time set
  • Returns: The minimum and maximum geometry coordinates of the grid or None if the time step is not available at the requested time.

GetBreakageDelayAfterRelease(unit: str | None = None)

Get the value of “Breakage Delay After Release”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetBreakageOverlapFactor()

Get the value of “Breakage Overlap Factor”.

GetBreakageStart(unit: str | None = None)

Get the value of “Breakage Start”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetCellAreaAsArray(time_step: str | int | ITimeStep = 'current')

Get an array containing the area of each cell.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell volume or an int identifying the time step index to be used based on the global time set
  • Returns: An array with the cell area (the unit will be the geometry unit ** 2)

GetCellCenterAsArray(time_step: str | int | ITimeStep = 'current')

Get an array containing the center coordinates of each cell.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell center or an int identifying the time step index to be used based on the global time set
  • Returns: An array with the cell center coordinates (each element will be a point to the center of the cell).

GetCellDzAsArray(time_step: str | int | ITimeStep = 'current')

Get an array containing the thickness (in Z) of each cell.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell dz or an int identifying the time step index to be used based on the global time set
  • Returns: An array with cell thicknesses computed in the Z direction.

GetCellFromIJK(i: int, j: int, k: int, time_step: str | int | ITimeStep = 'current')

Creates a grid cell handle from the current I, J, K indexes

  • Parameters:
    • i – The topological I cell index
    • j – The topological J cell index
    • k – The topological K cell index
    • time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell from the i, j, k or an int identifying the time step index to be used based on the global time set
  • Returns: Returns the cell handle to be used for the given I, J, K indexes. Or None if the given I, J and K indexes are invalid or refer to an inactive cell
  • Raises: IndexError – An IndexError is raised if the cell is inactive or out of range.

GetCellIJK(cell_handle: int, time_step: str | int | ITimeStep = 'current')

Converts the given cell handle to it’s I, J, K indexes

  • Parameters:
    • cell_handle – The cell handle
    • time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the i, j, k from the cell. or an int identifying the time step index to be used based on the global time set
  • Returns: The cell I, J, K indexes

GetCellNumberOfVertices(cell: int, time_step: str | int | ITimeStep = 'current')

Get an array containing the number of vertices of each cell.

  • Parameters:
    • cell_handle – The cell handle
    • time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the number of vertices for the given cell or an int identifying the time step index to be used based on the global time set
  • Returns: The total number of vertices on the given cell

GetCellPointsAsFunction(time_step: str | int | ITimeStep = 'current')

Get a function for the points (vertices) of each cell.

  • Parameters: time_step (unicode , ITimeStep or int) – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell points or an int identifying the time step index to be used based on the global time set
  • Return type: PointsFunction
  • Returns: A function that provides access to the points of a cell (i.e.: vertices).

NOTE

Each point from a cell must be accessed by a tuple(cell_handle, point_id). In a reservoir grid, the point id is a value from 0 to 7.

@usage:

#To get vertex 0 of a cell:
points_function = grid.GetCellPointsAsFunction()
cell = grid.GetCellFromIJK(0, 0, 0)
x, y, z = points_function[(cell, 0)]

#To iterate over all the vertices of a cell:
points_function = grid.GetCellPointsAsFunction()
cell = grid.GetCellFromIJK(0, 0, 0)
for vertex in grid.IterCellVertices(cell):
    x, y, z = points_function[vertex]

GetCellVolumeAsArray(time_step: str | int | ITimeStep = 'current')

Get an array with the volume of each cell.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the cell volume or an int identifying the time step index to be used based on the global time set
  • Returns: An array with the cell volume (the unit will be the geometry unit ** 3)

GetContactNeighboringDistanceBetweenParticles(unit: str | None = None)

Get the value of “Contact Neighboring Distance Between Particles”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

GetContactNeighboringDistanceBetweenParticlesAndTriangles(unit: str | None = None)

Get the value of “Contact Neighboring Distance Between Particles And Triangles”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

GetCurve(curve_name, simulation_name=None, realization=None, time_step: str | int | ITimeStep | None = None)

Override base class method to check for a request of a grid function statistic.

GetCurveNames(simulation_name=None)

@param simulation_name: unicode : An optional parameter for defining the simulation to get the curve from.

  • Returns: list(str) The list of curve names

GetCurveNamesAssociation(simulation_name=None)

Get this element’s curve names.

  • Parameters: simulation_name (unicode) – The name of the simulation to query the curve names If None is given the current element simulation will be used
  • Return type: dict(unicode, ISemanticAssociation)
  • Returns: The curve names for this element in the given simulation name

GetDeformableMassMatrixType()

Get “Deformable Mass Matrix Type” as a string.

  • Returns: The returned value will be one of [‘lumped’, ‘consistent’].

GetDisableTrianglesOnPeriodicBoundaries()

Get the value of “Disable Triangles On Periodic Boundaries”.

GetDragLimiterFactor()

Get the value of “Drag Limiter Factor”.

GetElementCurve(element_name, curve_name, simulation_name=None, realization=None, time_step=None)

Return the curves for the given element and name.

  • Parameters:
    • element_name (unicode) – The name of the element
    • curve_name (unicode) – The name of the curve
    • simulation_name (unicode) – An optional parameter for defining the simulation to get the curve from.
    • realization (unicode) – An additional keyword to identify the curve realization
    • time_step (TimeStep) – For transient curves a time-step must be given.

GetFacePositions(time_step: str | int | ITimeStep = 'current')

Get the index of the faces. Use this in conjunction with GetFaceVertices to obtain the index of vertices in each face.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the geometry transform or an int identifying the time step index to be used based on the global time set
  • Returns: a numpy array with the face index of the grid at the given time step.

GetFaceVertices(time_step: str | int | ITimeStep = 'current')

Get the index of the vertices for all faces. Use this in conjunction with GetFacePositions to obtain the index of vertices in each face. The index is related to the vertices obtained via GetVertices.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the geometry transform or an int identifying the time step index to be used based on the global time set
  • Returns: a numpy array with the vertices index of the grid at the given time step.

GetFixedTimestep(unit: str | None = None)

Get the value of “Fixed Timestep”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetFluentOutputsMultiplier()

Get the value of “Fluent Outputs Multiplier”.

GetGeometryQuantity()

Get the quantity corresponding to the grid’s geometry.

  • Returns: The grid geometry quantity

GetGeometryTransform(time_step: str | int | ITimeStep = 'current')

Get the geometry transform for the grid at the given time step. This should be used in conjunction with GetVertices to obtain the transformed vertices of the grid.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the geometry transform or an int identifying the time step index to be used based on the global time set
  • Returns: The geometry transform as a tuple of (translation, rotation) or None if the object has no motion frame associated to it.

GetGeometryUnit()

Get the grid’s geometry’s unit.

  • Returns: The unit for the grid geometry

GetGridFunction(grid_function_name, simulation_name=None, translated=False)

Gets a grid function given its name. It provides a representation that’s valid for all times, so, one can do: grid.GetGridFunction(‘Pressure’).GetMax()

To get the values of a given time, use:

time_set = grid.GetTimeSet()
grid.GetGridFunction('Temperature').GetArray(unit='degC', time_step=time_set[10])

NOTE

if it’s used without a time parameter, it’ll get the array at the current application time.

  • Parameters:
    • grid_function_name – The name of the grid function to be gotten in this grid.
    • simulation_name – An optional parameter for defining the simulation to get the grid function from.
    • translated – If False, the internal names of the grid functions will be returned, otherwise, the name returned will be the translated name (based on the settings chosen on how to see grid functions – i.e.: Cognitive, ECLIPSE, IMEX).
  • Returns: The grid function found
  • Raises: ValueError – if the grid function is not found.

GetGridFunctionNames(translated: bool = False, context: str | None = None)

Overridden to filter out deprecated property names.

GetJointElasticRatio()

Get the value of “Joint Elastic Ratio”.

GetLinearHystDamp()

Get the value of “Linear Hyst Damp”.

GetLoadingNSteps()

Get the value of “Loading N Steps”.

GetMaximumNumberOfIterations()

Get the value of “Maximum Number of Iterations”.

GetMeshColoring(window: str | KAWorkspaceWindow)

Get the RAMeshColoring related to the current object and a window.

  • Parameters: window – The window that the coloring is acting. The window must be a str of the name of the window or a KAWorkspaceWindow.
  • Raises: RockyApiError – If window is not a str or KAWorkspaceWindow. Additionally, raises an error if no window is found or no coloring for the given item exists.

GetMinimumLengthDeformationTolerance()

Get the value of “Minimum Length Deformation Tolerance”.

GetMinimumVolumeTolerance()

Get the value of “Minimum Volume Tolerance”.

GetModulesOutputPropertiesData()

  • Returns: The current value of “Modules Output Properties”.

GetModulesOutputPropertyEnabled(*output_property: str)

Retrieve enable state of given “Modules Output Property”.

  • Parameters: output_property – The output property name.

GetMoveCfdCellsWithRockyBoundaries()

Get the value of “Move Cfd Cells With Rocky Boundaries”.

GetMpiHeterogeneous()

Get the value of “Mpi Heterogeneous”.

GetMpiHostfile()

Get the value of “Mpi Hostfile”.

GetMpiHosts()

Get the value of “Mpi Hosts”.

GetMpiNumberOfProcesses()

Get the value of “Mpi Number of Processes”.

GetMpiNumberOfThreads()

Get the value of “Mpi Number of Threads”.

GetMpiWithinScheduler()

Get the value of “Mpi Within Scheduler”.

GetMultiGpuSlicingDirection()

Get “Multi Gpu Slicing Direction” as a string.

  • Returns: The returned value will be one of [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].

GetNegateInitialOverlaps()

Get the value of “Negate Initial Overlaps”.

GetNeighborSearchModel()

Get “Neighbor Search Model” as a string.

  • Returns: The returned value will be one of [‘BVH’, ‘RegularGrid’, ‘SparseGrid’].

GetNumberOfCells(time_step: str | int | ITimeStep = 'current')

Get the total number of cells.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the number of cells or an int identifying the time step index to be used based on the global time set
  • Returns: The total number of cells

GetNumberOfNodes(time_step: str | int | ITimeStep = 'current')

Get the total number of nodes (vertices).

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the number of cells or an int identifying the time step index to be used based on the global time set
  • Returns: The total number of nodes/vertices

GetNumberOfProcessors()

Get the value of “Number of Processors”.

GetNumpyCurve(curve_name, unit=None, realization=None)

Returns a curve as a tuple of numpy arrays (time, property) for the given element and name.

GetOutputPropertyEnabled(root_key: str, property_name: str)

Deprecated: Use GetStandardOutputPropertyEnabled instead.

GetOutputRootEnabled(root_key: str)

Deprecated: Use GetStandardOutputPropertyEnabled instead.

GetOutputVariableValue(variable_name: str)

Get the value of a previously-created output variable.

  • Parameters: variable_name (unicode) – The variable name whose value we want.
  • Returns: Returns a scalar with the value and unit for the given variable_name or None if no variable was found with the given name or if it couldn’t be computed.

GetOverRelaxationCoefficient()

Get the value of “Over Relaxation Coefficient”.

GetOverlapParticlesDelay(unit: str | None = None)

Get the value of “Overlap Particles Delay”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetParticleSizeLimitForReordering(unit: str | None = None)

Get the value of “Particle Size Limit For Reordering”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

GetProcessingUnit()

Get “Processing Unit” as a string.

  • Returns: The returned value will be one of [‘CPU’, ‘GPU’, ‘MULTI_GPU’].

GetRefineConcaveSearch()

Get the value of “Refine Concave Search”.

GetReleaseParticlesWithoutOverlapCheck()

Get the value of “Release Particles Without Overlap Check”.

GetResetOnlyPhysicalContactsData()

Get the value of “Reset Only Physical Contacts Data”.

GetResumeDataFrequency()

Get the value of “Resume Data Frequency”.

GetSimulationDuration(unit: str | None = None)

Get the value of “Simulation Duration”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetSolverCurvesFrequency()

Get the value of “Solver Curves Frequency”.

GetSortingDistanceFactor()

Get the value of “Sorting Distance Factor”.

GetSpecialReorderingForWidePsd()

Get the value of “Special Reordering For Wide Psd”.

GetStandardOutputPropertiesData()

  • Returns: The current value of “Standard Output Properties”.

GetStandardOutputPropertyEnabled(*output_property: str)

Retrieve enable state of given “Standard Output Property”.

  • Parameters: output_property – The output property name.

GetSuccessiveOverRelaxationTolerance()

Get the value of “Successive Over Relaxation Tolerance”.

GetTargetGpu()

Get the value of “Target Gpu”.

GetTargetGpus()

  • Returns: A list of IDs of the GPUs currently selected for Multi GPU simulation.

GetTimeInterval(unit: str | None = None)

Get the value of “Time Interval”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetTimeSet()

Get the list of time-steps associated to the grid.

  • Returns: The list of time-steps associated to the grid

GetTimeStatistics()

Get the object responsible for handling time-statistics grid functions for this process. This call will return None if the process doesn’t support time statistics.

GetTimeStep(time_step, accept_global=False)

Get the timestep corresponding to the given time.

  • Parameters:
    • time_step (unicode , ITimeStep or int) –

      Either a string with : ’current’ identifying the current time step ‘global’ identifying that the global limits should be gotten (note that if accept_global=False and ‘global’ is passed, an error is raised).

      or an ITimeStep identifying the time to get the limits

      or an int identifying the time step index to be used based on the global time set

    • accept_global (bool) – If True, a global time step is accepted (and returns None), otherwise, an error is raised if ‘global’ is passed.

  • Return type: ITimeStep
  • Returns: Returns the time step to be used or None if accept_global == True and the time step passed is ‘global’.

GetTimestepModel()

Get “Timestep Model” as a string.

  • Returns: The returned value will be one of [‘constant’, ‘variable’].

GetTopologyShape(time_step: str | int | ITimeStep = 'current')

Get the shape of the topology (similar to the shape of numpy arrays).

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the topology shape or an int identifying the time step index to be used based on the global time set
  • Returns: The grid shape as a tuple of the grid size in each topological dimension.

GetUse2023R2CellVolumeFractionUpdateApproach()

Get the value of “Use 2023 R2 Cell Volume Fraction Update Approach”.

GetUse2023R2SourceTermsApproach()

Get the value of “Use 2023 R2 Source Terms Approach”.

GetUse3RdPowerForCfdCgm()

Get the value of “Use 3Rd Power For Cfd Cgm”.

GetUseArraysGrowthRate()

Get the value of “Use Arrays Growth Rate”.

GetUseBreakageOverlapFactor()

Get the value of “Use Breakage Overlap Factor”.

GetUseCompressedFiles()

Get the value of “Use Compressed Files”.

GetUseContactNeighboringDistanceBetweenParticles()

Get the value of “Use Contact Neighboring Distance Between Particles”.

GetUseContactNeighboringDistanceBetweenParticlesAndTriangles()

Get the value of “Use Contact Neighboring Distance Between Particles And Triangles”.

GetUseDpmBlockingEffectForSinglePhaseSimulations()

The “Use DPM Blocking Effect For Single Phase Simulations” parameter was removed from Rocky since 25R2.

GetUseDragLimiterFactor()

Get the value of “Use Drag Limiter Factor”.

GetUseFixedTimestep()

Get the value of “Use Fixed Timestep”.

GetUseMpi()

Get the value of “Use Mpi”.

GetUseNonRoundTorqueCorrection()

Get the value of “Use Non Round Torque Correction”.

GetUseSortingDistanceFactor()

Get the value of “Use Sorting Distance Factor”.

GetValidDeformableMassMatrixTypeValues()

Get a list of all possible values for “Deformable Mass Matrix Type”.

  • Returns: The returned list is [‘lumped’, ‘consistent’].

GetValidMultiGpuSlicingDirectionValues()

Get a list of all possible values for “Multi Gpu Slicing Direction”.

  • Returns: The returned list is [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].

GetValidNeighborSearchModelValues()

Get a list of all possible values for “Neighbor Search Model”.

  • Returns: The returned list is [‘BVH’, ‘RegularGrid’, ‘SparseGrid’].

GetValidProcessingUnitValues()

Get a list of all possible values for “Processing Unit”.

  • Returns: The returned list is [‘CPU’, ‘GPU’, ‘MULTI_GPU’].

GetValidTimestepModelValues()

Get a list of all possible values for “Timestep Model”.

  • Returns: The returned list is [‘constant’, ‘variable’].

GetVertices(time_step: str | int | ITimeStep = 'current')

Get the geometry vertices of the grid at the given time step. This should be used in conjunction with GetGeometryTransform to obtain the transformed vertices of the grid at a given time_step, otherwise it may return the vertices without any transformation.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get the geometry transform or an int identifying the time step index to be used based on the global time set
  • Returns: a numpy array with the vertices of the grid at the given time step.

GetWearGeometryUpdateInterval(unit: str | None = None)

Get the value of “Wear Geometry Update Interval”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

GetWearStart(unit: str | None = None)

Get the value of “Wear Start”.

  • Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “s”.

HasFEMForcesEnabled()

Whether the simulation is configured to collect forces for FEM analysis.

HasGridFunction(grid_function_name: str)

Whether the grid has the given grid function.

  • Parameters: grid_function_name – The name of the grid function to be checked.
  • Returns: Returns True if the grid function exists and False otherwise.

HasHtcCalculatedData()

Whether the “HTC” is being calculated.

IsCellActive(i: int, j: int, k: int, time_step: str | int | ITimeStep = 'current')

Checks if the given cell is active or not

@param i, j, k: : The cell i, j, k

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to get if the cell is active or an int identifying the time step index to be used based on the global time set
  • Returns: True if the cell is active

IsCompressedFileEnabled()

Check if the “Compressed File” is enabled.

IsDpmBlockingEffectForSinglePhaseSimulationsEnabled()

The “Use DPM Blocking Effect For Single Phase Simulations” parameter was removed from Rocky since 25R2.

IsMoveCfdCellsWithRockyBoundariesEnabled()

Check if the “Move Cfd Cells With Rocky Boundaries” is enabled.

IsNegateInitialOverlapsEnabled()

Check if the “Negate Initial Overlaps” is enabled.

IsSortingDistanceFactorEnabled()

Check if the “Sorting Distance Factor” is enabled.

IsUse3RdPowerForCfdCgmEnabled()

Check if the “Use 3Rd Power For Cfd Cgm” is enabled.

IterCellVertices(cell: int, time_step: str | int | ITimeStep = 'current')

Iterate on the vertices of active grid cells at the given time.

  • Parameters:
    • cell_handle – The cell handle
    • time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to iterate the vertices of a cell or an int identifying the time step index to be used based on the global time set
  • Return type: vertex_handle
  • Returns: The iterator over all the cell’s vertices.

IterCells(time_step: str | int | ITimeStep = 'current')

Iterate on the active grid cells at the given time.

  • Parameters: time_step – Either a ‘current’ string with meaning the current time step or an ITimeStep identifying the time to iterate the cells or an int identifying the time step index to be used based on the global time set
  • Return type: iterator
  • Returns: The iterator over all the active grid cells for the given time.

Modified(*args, **kwargs)

Resets all the cache information after a change in the subject being tracked.

RemoveCustomCurve(name: str)

Remove the curve from the database :param name:

> The name of the curve to be removed.

RemoveCustomProperty(name: str)

Remove the property from the database :param name:

> The name of the property to be removed.

RemoveOutputVariable(variable_name: str)

Removes some output variable.

  • Parameters: variable_name – The name of the variable to be removed.

RemoveProcess()

It is not possible to remove the item “Solver” from the project. It’s a standard Rocky item in project.

RestoreOutputPropertiesDefaults()

Restore default values of “Output Properties”.

SetArraysGrowthRate(value: str | float)

Set the value of “Arrays Growth Rate”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetBreakageDelayAfterRelease(value: str | float, unit: str | None = None)

Set the value of “Breakage Delay After Release”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetBreakageOverlapFactor(value: str | float)

Set the value of “Breakage Overlap Factor”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetBreakageStart(value: str | float, unit: str | None = None)

Set the value of “Breakage Start”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetContactNeighboringDistanceBetweenParticles(value: str | float, unit: str | None = None)

Set the value of “Contact Neighboring Distance Between Particles”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

SetContactNeighboringDistanceBetweenParticlesAndTriangles(value: str | float, unit: str | None = None)

Set the value of “Contact Neighboring Distance Between Particles And Triangles”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

SetCurrentTimeStep(time_step)

Sets the current time step.

  • Parameters: time_step (ITimeStep) – The time step to be considered the ‘current’ time step.

SetDeformableMassMatrixType(value: str)

Set the value of “Deformable Mass Matrix Type”.

  • Parameters: value – The value to set. Must be one of [‘lumped’, ‘consistent’].
  • Raises: RockyApiError – If value is not a valid “Deformable Mass Matrix Type” option.

SetDisableTrianglesOnPeriodicBoundaries(value: bool)

Set the value of “Disable Triangles On Periodic Boundaries”.

  • Parameters: value – The value to set.

SetDragLimiterFactor(value: str | float)

Set the value of “Drag Limiter Factor”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetFixedTimestep(value: str | float, unit: str | None = None)

Set the value of “Fixed Timestep”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetFluentOutputsMultiplier(value: int)

Set the value of “Fluent Outputs Multiplier”.

  • Parameters: value – The value to set.

SetJointElasticRatio(value: str | float)

Set the value of “Joint Elastic Ratio”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetLinearHystDamp(value: str | float)

Set the value of “Linear Hyst Damp”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetLoadingNSteps(value: str | int)

Set the value of “Loading N Steps”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetMaximumNumberOfIterations(value: str | int)

Set the value of “Maximum Number of Iterations”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetMinimumLengthDeformationTolerance(value: str | float)

Set the value of “Minimum Length Deformation Tolerance”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetMinimumVolumeTolerance(value: str | float)

Set the value of “Minimum Volume Tolerance”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetModulesOutputPropertiesData(data_dict: dict)

Set the current value of “Modules Output Properties”.

  • Parameters: data_dict – The data dictionary to set.

SetModulesOutputPropertyEnabled(*output_property: str, enabled: bool)

Set enable state of given “Modules Output Property”.

  • Parameters:
    • output_property – The output property name.
    • enabled – The enable state of given “Modules Output Property”.

SetMoveCfdCellsWithRockyBoundaries(value: bool)

Set the value of “Move Cfd Cells With Rocky Boundaries”.

  • Parameters: value – The value to set.

SetMpiHeterogeneous(value: bool)

Set the value of “Mpi Heterogeneous”.

  • Parameters: value – The value to set.

SetMpiHostfile(value: str)

Set the value of “Mpi Hostfile”.

  • Parameters: value – The value to set.

SetMpiHosts(value: str)

Set the value of “Mpi Hosts”.

  • Parameters: value – The value to set.

SetMpiNumberOfProcesses(value: str | int)

Set the value of “Mpi Number of Processes”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetMpiNumberOfThreads(value: str | int)

Set the value of “Mpi Number of Threads”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetMpiWithinScheduler(value: bool)

Set the value of “Mpi Within Scheduler”.

  • Parameters: value – The value to set.

SetMultiGpuSlicingDirection(value: str)

Set the value of “Multi Gpu Slicing Direction”.

  • Parameters: value – The value to set. Must be one of [‘X_Parallel’, ‘Y_Parallel’, ‘Z_Parallel’].
  • Raises: RockyApiError – If value is not a valid “Multi Gpu Slicing Direction” option.

SetNegateInitialOverlaps(value: bool)

Set the value of “Negate Initial Overlaps”.

  • Parameters: value – The value to set.

SetNeighborSearchModel(value: str)

Set the value of “Neighbor Search Model”.

  • Parameters: value – The value to set. Must be one of [‘BVH’, ‘RegularGrid’, ‘SparseGrid’].
  • Raises: RockyApiError – If value is not a valid “Neighbor Search Model” option.

SetNumberOfProcessors(value: str | int)

Set the value of “Number of Processors”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetOutputPropertyEnabled(root_key: str, property_name: str, enabled: bool)

Deprecated: Use SetStandardOutputPropertyEnabled instead.

SetOutputRootEnabled(root_key: str, enabled: bool)

Deprecated: Use SetStandardOutputPropertyEnabled instead.

SetOverRelaxationCoefficient(value: str | float)

Set the value of “Over Relaxation Coefficient”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetOverlapParticlesDelay(value: str | float, unit: str | None = None)

Set the value of “Overlap Particles Delay”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetParticleSizeLimitForReordering(value: str | float, unit: str | None = None)

Set the value of “Particle Size Limit For Reordering”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

SetProcessingUnit(value: str)

Set the value of “Processing Unit”.

  • Parameters: value – The value to set. Must be one of [‘CPU’, ‘GPU’, ‘MULTI_GPU’].
  • Raises: RockyApiError – If value is not a valid “Processing Unit” option.

SetRefineConcaveSearch(value: bool)

Set the value of “Refine Concave Search”.

  • Parameters: value – The value to set.

SetReleaseParticlesWithoutOverlapCheck(value: bool)

Set the value of “Release Particles Without Overlap Check”.

  • Parameters: value – The value to set.

SetResetOnlyPhysicalContactsData(value: bool)

Set the value of “Reset Only Physical Contacts Data”.

  • Parameters: value – The value to set.

SetResumeDataFrequency(value: str | int)

Set the value of “Resume Data Frequency”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetSimulationDuration(value: str | float, unit: str | None = None)

Set the value of “Simulation Duration”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetSolverCurvesFrequency(value: str | int)

Set the value of “Solver Curves Frequency”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetSortingDistanceFactor(value: str | float)

Set the value of “Sorting Distance Factor”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetSpecialReorderingForWidePsd(value: bool)

Set the value of “Special Reordering For Wide Psd”.

  • Parameters: value – The value to set.

SetStandardOutputPropertiesData(data_dict: dict)

Set the current value of “Standard Output Properties”.

  • Parameters: data_dict – The data dictionary to set.

SetStandardOutputPropertyEnabled(*output_property: str, enabled: bool)

Set enable state of given “Standard Output Property”.

  • Parameters:
    • output_property – The output property name.
    • enabled – The enable state of given “Standard Output Property”.

SetSuccessiveOverRelaxationTolerance(value: str | float)

Set the value of “Successive Over Relaxation Tolerance”.

  • Parameters: value – The value to set. This value can be an expression with input variables or float type.

SetTargetGpu(value: str | int)

Set the value of “Target Gpu”.

  • Parameters: value – The value to set. This value can be an expression with input variables or int type.

SetTargetGpus(gpus: list[int | str])

It will configure the IDs of GPUs that will be used in simulation based on the list of IDs or names of GPUs passed.

  • Parameters: gpus – List with IDs or names of GPUs to be used in simulation. For example in the name “1 - Geforce GTX 980”, the ID is 1 and the name is “1 - Geforce GTX 980”.

SetTimeConfiguration(duration: float, time_interval: float)

Shortcut to set both the simulation’s duration and its time interval.

  • Parameters:
    • duration – The simulation duration (in seconds).
    • time_interval – The simulation time interval (in seconds).

SetTimeInterval(value: str | float, unit: str | None = None)

Set the value of “Time Interval”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetTimestepModel(value: str)

Set the value of “Timestep Model”.

  • Parameters: value – The value to set. Must be one of [‘constant’, ‘variable’].
  • Raises: RockyApiError – If value is not a valid “Timestep Model” option.

SetUse2023R2CellVolumeFractionUpdateApproach(value: bool)

Set the value of “Use 2023 R2 Cell Volume Fraction Update Approach”.

  • Parameters: value – The value to set.

SetUse2023R2SourceTermsApproach(value: bool)

Set the value of “Use 2023 R2 Source Terms Approach”.

  • Parameters: value – The value to set.

SetUse3RdPowerForCfdCgm(value: bool)

Set the value of “Use 3Rd Power For Cfd Cgm”.

  • Parameters: value – The value to set.

SetUseArraysGrowthRate(value: bool)

Set the value of “Use Arrays Growth Rate”.

  • Parameters: value – The value to set.

SetUseBreakageOverlapFactor(value: bool)

Set the value of “Use Breakage Overlap Factor”.

  • Parameters: value – The value to set.

SetUseCompressedFiles(value: bool)

Set the value of “Use Compressed Files”.

  • Parameters: value – The value to set.

SetUseContactNeighboringDistanceBetweenParticles(value: bool)

Set the value of “Use Contact Neighboring Distance Between Particles”.

  • Parameters: value – The value to set.

SetUseContactNeighboringDistanceBetweenParticlesAndTriangles(value: bool)

Set the value of “Use Contact Neighboring Distance Between Particles And Triangles”.

  • Parameters: value – The value to set.

SetUseDpmBlockingEffectForSinglePhaseSimulations(value: bool)

The “Use DPM Blocking Effect For Single Phase Simulations” parameter was removed from Rocky since 25R2.

SetUseDragLimiterFactor(value: bool)

Set the value of “Use Drag Limiter Factor”.

  • Parameters: value – The value to set.

SetUseFixedTimestep(value: bool)

Set the value of “Use Fixed Timestep”.

  • Parameters: value – The value to set.

SetUseMpi(value: bool)

Set the value of “Use Mpi”.

  • Parameters: value – The value to set.

SetUseNonRoundTorqueCorrection(value: bool)

Set the value of “Use Non Round Torque Correction”.

  • Parameters: value – The value to set.

SetUseSortingDistanceFactor(value: bool)

Set the value of “Use Sorting Distance Factor”.

  • Parameters: value – The value to set.

SetWearGeometryUpdateInterval(value: str | float, unit: str | None = None)

Set the value of “Wear Geometry Update Interval”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

SetWearStart(value: str | float, unit: str | None = None)

Set the value of “Wear Start”.

  • Parameters:
    • value – The value to set. This value can be an expression with input variables or float type.
    • unit – The unit for value. If no unit is provided, value is assumed to be in “s”.

Connect with Ansys