RAResidenceTime#

class ansys.rocky.app.ra_residence_time.RAResidenceTime(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper to manipulate Residence Time Calculators in a project.

The class corresponds to an individual “Residence Time” calculation under the “Particles Calculation” item on the project’s data tree. To create the RAResidenceTime from a RACalculations, use:

selection_process = study.GetElement('Particles')
particles_calculations = study.GetCalculations()
residence_time = particles_calculations.CreateSelectionResidenceTime(selection_process)

Overview#

GetGridFunctionName

Get the grid function name. This name can be used to access the grid

GetCalculatorName

Get the grid function name. This name can be used to access the grid

GetNameMask

Get the value of “Name Mask”.

SetNameMask

Set the value of “Name Mask”.

GetStopTime

Get the value of “Stop Time”.

SetStopTime

Set the value of “Stop Time”.

GetStartTime

Get the value of “Start Time”.

SetStartTime

Set the value of “Start Time”.

Import detail#

from ansys.rocky.app.ra_residence_time import RAResidenceTime

Method detail#

classmethod RAResidenceTime.GetWrappedClass() type[rocky30.plugins.particles_calculations.selection_residence_time_calculation.ParticlesSelectionResidenceTimeCalculator]#
classmethod RAResidenceTime.GetClassName() str#
RAResidenceTime.GetGridFunctionName() str#

Get the grid function name. This name can be used to access the grid function on a particle-based process.

RAResidenceTime.GetCalculatorName() str#

Get the grid function name. This name can be used to access the grid function on a particle-based process.

RAResidenceTime.GetNameMask() str#

Get the value of “Name Mask”.

RAResidenceTime.SetNameMask(value: str) None#

Set the value of “Name Mask”.

Parameters:

value – The value to set.

RAResidenceTime.GetStopTime(unit: str | None = None) float#

Get the value of “Stop Time”.

Parameters:

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

RAResidenceTime.SetStopTime(value: str | float, unit: str | None = None) None#

Set the value of “Stop Time”.

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”.

RAResidenceTime.GetStartTime(unit: str | None = None) float#

Get the value of “Start Time”.

Parameters:

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

RAResidenceTime.SetStartTime(value: str | float, unit: str | None = None) None#

Set the value of “Start Time”.

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”.