RAAirFlow#

class ansys.rocky.app.ra_airflow.RAAirFlow#

Bases: ansys.rocky.app.ra_grid_process_element.RAGridProcessElementItem

Rocky PrePost Scripting wrapper for Lattice Boltzmann Air Flow.

This wrapper can be accessed via the project’s RACFDCoupling:

cfd_coupling = study.GetCFDCoupling()
cfd_coupling.SetupAirFlow()
airflow = cfd_coupling.GetAirFlow()

Overview#

SetPartIdIfValid

Set the AirFlow’s part_id, but only if AirFlow is enabled in the simulation.

GetAirDensity

Get the value of “Air Density”.

SetAirDensity

Set the value of “Air Density”.

GetAirKinematicViscosity

Get the value of “Air Kinematic Viscosity”.

SetAirKinematicViscosity

Set the value of “Air Kinematic Viscosity”.

GetBoundaryConditionType

Get “Boundary Condition Type” as a string.

SetBoundaryConditionType

Set the value of “Boundary Condition Type”.

GetValidBoundaryConditionTypeValues

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

GetCellSize

Get the value of “Cell Size”.

SetCellSize

Set the value of “Cell Size”.

GetInteractionScale

Get the value of “Interaction Scale”.

SetInteractionScale

Set the value of “Interaction Scale”.

GetMaxX

Get the value of “Max X”.

SetMaxX

Set the value of “Max X”.

GetMaxY

Get the value of “Max Y”.

SetMaxY

Set the value of “Max Y”.

GetMaxZ

Get the value of “Max Z”.

SetMaxZ

Set the value of “Max Z”.

GetMinX

Get the value of “Min X”.

SetMinX

Set the value of “Min X”.

GetMinY

Get the value of “Min Y”.

SetMinY

Set the value of “Min Y”.

GetMinZ

Get the value of “Min Z”.

SetMinZ

Set the value of “Min Z”.

GetSpeedOfSound

Get the value of “Speed of Sound”.

SetSpeedOfSound

Set the value of “Speed of Sound”.

GetStartWhenParticlesEnter

Get the value of “Start When Particles Enter”.

SetStartWhenParticlesEnter

Set the value of “Start When Particles Enter”.

GetStartTime

Get the value of “Start Time”.

SetStartTime

Set the value of “Start Time”.

GetUseAirflow

Get the value of “Use Airflow”.

SetUseAirflow

Set the value of “Use Airflow”.

Import detail#

from ansys.rocky.app.ra_airflow import RAAirFlow

Method detail#

classmethod RAAirFlow.GetWrappedClass()#
classmethod RAAirFlow.GetClassName() str#
RAAirFlow.SetPartIdIfValid() None#

Set the AirFlow’s part_id, but only if AirFlow is enabled in the simulation.

RAAirFlow.GetAirDensity(unit: str | None = None) float#

Get the value of “Air Density”.

Parameters:

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

RAAirFlow.SetAirDensity(value: str | float, unit: str | None = None) None#

Set the value of “Air Density”.

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 “kg/m3”.

RAAirFlow.GetAirKinematicViscosity(unit: str | None = None) float#

Get the value of “Air Kinematic Viscosity”.

Parameters:

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

RAAirFlow.SetAirKinematicViscosity(value: str | float, unit: str | None = None) None#

Set the value of “Air Kinematic Viscosity”.

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

RAAirFlow.GetBoundaryConditionType() str#

Get “Boundary Condition Type” as a string.

Returns:

The returned value will be one of [‘first_derivative’, ‘second_derivative’].

RAAirFlow.SetBoundaryConditionType(value: str) None#

Set the value of “Boundary Condition Type”.

Parameters:

value – The value to set. Must be one of [‘first_derivative’, ‘second_derivative’].

Raises:

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

RAAirFlow.GetValidBoundaryConditionTypeValues() list[str]#

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

Returns:

The returned list is [‘first_derivative’, ‘second_derivative’].

RAAirFlow.GetCellSize(unit: str | None = None) float#

Get the value of “Cell Size”.

Parameters:

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

RAAirFlow.SetCellSize(value: str | float, unit: str | None = None) None#

Set the value of “Cell Size”.

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

RAAirFlow.GetInteractionScale(unit: str | None = None) float#

Get the value of “Interaction Scale”.

Parameters:

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

RAAirFlow.SetInteractionScale(value: str | float, unit: str | None = None) None#

Set the value of “Interaction Scale”.

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

RAAirFlow.GetMaxX(unit: str | None = None) float#

Get the value of “Max X”.

Parameters:

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

RAAirFlow.SetMaxX(value: str | float, unit: str | None = None) None#

Set the value of “Max X”.

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

RAAirFlow.GetMaxY(unit: str | None = None) float#

Get the value of “Max Y”.

Parameters:

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

RAAirFlow.SetMaxY(value: str | float, unit: str | None = None) None#

Set the value of “Max Y”.

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

RAAirFlow.GetMaxZ(unit: str | None = None) float#

Get the value of “Max Z”.

Parameters:

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

RAAirFlow.SetMaxZ(value: str | float, unit: str | None = None) None#

Set the value of “Max Z”.

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

RAAirFlow.GetMinX(unit: str | None = None) float#

Get the value of “Min X”.

Parameters:

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

RAAirFlow.SetMinX(value: str | float, unit: str | None = None) None#

Set the value of “Min X”.

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

RAAirFlow.GetMinY(unit: str | None = None) float#

Get the value of “Min Y”.

Parameters:

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

RAAirFlow.SetMinY(value: str | float, unit: str | None = None) None#

Set the value of “Min Y”.

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

RAAirFlow.GetMinZ(unit: str | None = None) float#

Get the value of “Min Z”.

Parameters:

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

RAAirFlow.SetMinZ(value: str | float, unit: str | None = None) None#

Set the value of “Min Z”.

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

RAAirFlow.GetSpeedOfSound(unit: str | None = None) float#

Get the value of “Speed of Sound”.

Parameters:

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

RAAirFlow.SetSpeedOfSound(value: str | float, unit: str | None = None) None#

Set the value of “Speed of Sound”.

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

RAAirFlow.GetStartWhenParticlesEnter() bool#

Get the value of “Start When Particles Enter”.

RAAirFlow.SetStartWhenParticlesEnter(value: bool) None#

Set the value of “Start When Particles Enter”.

Parameters:

value – The value to set.

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

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

RAAirFlow.GetUseAirflow() bool#

Get the value of “Use Airflow”.

RAAirFlow.SetUseAirflow(value: bool) None#

Set the value of “Use Airflow”.

Parameters:

value – The value to set.