RAFluidInlet#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper for a single Fluid Inlet input.

This wrapper class corresponds to an individual entry under the “Inputs” item on the project’s data tree. Particle inputs can be retrieved from the RAStudy or the RAInletsOutletsCollection via:

input_1 = study.GetElement('Fluid Inlet <1>')
input_2 = input_collection.GetParticleInput('Fluid Inlet <2>')

Instances of RAFluidInlet has properties that can be manipulated directly, such as the input’s name and the particle entry point.

Overview#

GetBoundaryCondition

Get “Boundary Condition” as a string.

SetBoundaryCondition

Set the value of “Boundary Condition”.

GetValidBoundaryConditionValues

Get a list of all possible values for “Boundary Condition”.

GetMassFlowRate

Get the value of “Mass Flow Rate”.

SetMassFlowRate

Set the value of “Mass Flow Rate”.

GetName

Get the value of “Name”.

SetName

Set the value of “Name”.

GetInjectionDuration

Get the value of “Injection Duration”.

SetInjectionDuration

Set the value of “Injection Duration”.

GetPeriodic

Get the value of “Periodic”.

SetPeriodic

Set the value of “Periodic”.

EnablePeriodic

Set the value of “Periodic” to True.

DisablePeriodic

Set the value of “Periodic” to False.

IsPeriodicEnabled

Check if the “Periodic” is enabled.

GetPeriod

Get the value of “Period”.

SetPeriod

Set the value of “Period”.

GetStartTime

Get the value of “Start Time”.

SetStartTime

Set the value of “Start Time”.

GetStopTime

Get the value of “Stop Time”.

SetStopTime

Set the value of “Stop Time”.

GetTemperature

Get the value of “Temperature”.

SetTemperature

Set the value of “Temperature”.

GetVelocity

Get the value of “Velocity”.

SetVelocity

Set the value of “Velocity”.

GetEntryPoint

Get the “Entry Point”.

SetEntryPoint

Set the “Entry Point”.

GetAvailableEntryPoints

Get all available Entry Points.

Import detail#

from ansys.rocky.app.ra_fluid_inlet import RAFluidInlet

Method detail#

classmethod RAFluidInlet.GetWrappedClass() type[rocky30.models.input.sph_inlet.SPHInlet]#
classmethod RAFluidInlet.GetClassName() str#
RAFluidInlet.GetBoundaryCondition() str#

Get “Boundary Condition” as a string.

Returns:

The returned value will be one of [‘mass_flow_rate’, ‘velocity’].

RAFluidInlet.SetBoundaryCondition(value: str) None#

Set the value of “Boundary Condition”.

Parameters:

value – The value to set. Must be one of [‘mass_flow_rate’, ‘velocity’].

Raises:

RockyApiError – If value is not a valid “Boundary Condition” option.

RAFluidInlet.GetValidBoundaryConditionValues() list[str]#

Get a list of all possible values for “Boundary Condition”.

Returns:

The returned list is [‘mass_flow_rate’, ‘velocity’].

RAFluidInlet.GetMassFlowRate(unit: str | None = None) float#

Get the value of “Mass Flow Rate”.

Parameters:

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

RAFluidInlet.SetMassFlowRate(value: str | float, unit: str | None = None) None#

Set the value of “Mass Flow Rate”.

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 “t/h”.

RAFluidInlet.GetName() str#

Get the value of “Name”.

RAFluidInlet.SetName(value: str) None#

Set the value of “Name”.

Parameters:

value – The value to set.

RAFluidInlet.GetInjectionDuration(unit: str | None = None) float#

Get the value of “Injection Duration”.

Parameters:

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

RAFluidInlet.SetInjectionDuration(value: str | float, unit: str | None = None) None#

Set the value of “Injection 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”.

RAFluidInlet.GetPeriodic() bool#

Get the value of “Periodic”.

RAFluidInlet.SetPeriodic(value: bool) None#

Set the value of “Periodic”.

Parameters:

value – The value to set.

RAFluidInlet.EnablePeriodic() None#

Set the value of “Periodic” to True.

RAFluidInlet.DisablePeriodic() None#

Set the value of “Periodic” to False.

RAFluidInlet.IsPeriodicEnabled() bool#

Check if the “Periodic” is enabled.

RAFluidInlet.GetPeriod(unit: str | None = None) float#

Get the value of “Period”.

Parameters:

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

RAFluidInlet.SetPeriod(value: str | float, unit: str | None = None) None#

Set the value of “Period”.

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

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

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

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

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

RAFluidInlet.GetTemperature(unit: str | None = None) float#

Get the value of “Temperature”.

Parameters:

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

RAFluidInlet.SetTemperature(value: str | float, unit: str | None = None) None#

Set the value of “Temperature”.

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

RAFluidInlet.GetVelocity(unit: str | None = None) float#

Get the value of “Velocity”.

Parameters:

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

RAFluidInlet.SetVelocity(value: str | float, unit: str | None = None) None#

Set the value of “Velocity”.

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

RAFluidInlet.GetEntryPoint()#

Get the “Entry Point”.

Return type:

RAInletGeometry, RARectangularSurface, RACircularSurface, RASurface

RAFluidInlet.SetEntryPoint(value) None#

Set the “Entry Point”.

:param unicode, RAInletGeometry, RARectangularSurface, RACircularSurface, RASurface value:

Either the API object wrapping the desired entity or its name.

RAFluidInlet.GetAvailableEntryPoints()#

Get all available Entry Points.

Return type:

List[RAInletGeometry, RARectangularSurface, RACircularSurface, RASurface] A list of RAInletGeometry, RARectangularSurface, RACircularSurface, RASurface.