RASPHResidenceTime#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

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

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

selection_process = study.GetElement('SPH')
calculations = study.GetCalculations()
residence_time = 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_sph_residence_time import RASPHResidenceTime

Method detail#

classmethod RASPHResidenceTime.GetWrappedClass() → type[rocky30.plugins.sph.calculations.residence_time.sph_selection_residence_time_calculator.SphSelectionResidenceTimeCalculator]#
classmethod RASPHResidenceTime.GetClassName() → str#
RASPHResidenceTime.GetGridFunctionName() → str#

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

RASPHResidenceTime.GetCalculatorName() → str#

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

RASPHResidenceTime.GetNameMask() → str#

Get the value of “Name Mask”.

RASPHResidenceTime.SetNameMask(value: str) → None#

Set the value of “Name Mask”.

Parameters:

value – The value to set.

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

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

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

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