RAPhysics#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper to manipulate physics properties.

This class represents the “Physics” item on the project data tree. To get the RAPhysics from a RAStudy, use:

physics = study.GetPhysics()

Overview#

GetAdhesionModel

Get “Adhesion Model” as a string.

SetAdhesionModel

Set the value of “Adhesion Model”.

GetValidAdhesionModelValues

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

GetClosePackingVolumeFraction

Get the value of “Close Packing Volume Fraction”.

SetClosePackingVolumeFraction

Set the value of “Close Packing Volume Fraction”.

GetEnableCoarseGrainModeling

Get the value of “Enable Coarse Grain Modeling”.

SetEnableCoarseGrainModeling

Set the value of “Enable Coarse Grain Modeling”.

GetEnableThermalModel

Get the value of “Enable Thermal Model”.

SetEnableThermalModel

Set the value of “Enable Thermal Model”.

GetGravityStartTime

Get the value of “Gravity Start Time”.

SetGravityStartTime

Set the value of “Gravity Start Time”.

GetGravityStopTime

Get the value of “Gravity Stop Time”.

SetGravityStopTime

Set the value of “Gravity Stop Time”.

GetGravityXDirection

Get the value of “Gravity X Direction”.

SetGravityXDirection

Set the value of “Gravity X Direction”.

GetGravityYDirection

Get the value of “Gravity Y Direction”.

SetGravityYDirection

Set the value of “Gravity Y Direction”.

GetGravityZDirection

Get the value of “Gravity Z Direction”.

SetGravityZDirection

Set the value of “Gravity Z Direction”.

GetImpactEnergyModel

Get “Impact Energy Model” as a string.

SetImpactEnergyModel

Set the value of “Impact Energy Model”.

GetValidImpactEnergyModelValues

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

GetName

Get the value of “Name”.

SetName

Set the value of “Name”.

GetNormalForceModel

Get “Normal Force Model” as a string.

SetNormalForceModel

Set the value of “Normal Force Model”.

GetValidNormalForceModelValues

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

GetRollingResistanceModel

Get “Rolling Resistance Model” as a string.

SetRollingResistanceModel

Set the value of “Rolling Resistance Model”.

GetValidRollingResistanceModelValues

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

GetExponentLimit

Get the value of “Exponent Limit”.

SetExponentLimit

Set the value of “Exponent Limit”.

GetVolumeFractionLimit

Get the value of “Volume Fraction Limit”.

SetVolumeFractionLimit

Set the value of “Volume Fraction Limit”.

GetRestitutionModel

Get “Restitution Model” as a string.

SetRestitutionModel

Set the value of “Restitution Model”.

GetValidRestitutionModelValues

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

GetSearchDistanceMultiplier

Get the value of “Search Distance Multiplier”.

SetSearchDistanceMultiplier

Set the value of “Search Distance Multiplier”.

GetSphThermalTransferModel

Get “Sph Thermal Transfer Model” as a string.

SetSphThermalTransferModel

Set the value of “Sph Thermal Transfer Model”.

GetValidSphThermalTransferModelValues

Get a list of all possible values for “Sph Thermal Transfer Model”.

GetNumericalSofteningFactor

Get the value of “Numerical Softening Factor”.

SetNumericalSofteningFactor

Set the value of “Numerical Softening Factor”.

GetTangentialForceModel

Get “Tangential Force Model” as a string.

SetTangentialForceModel

Set the value of “Tangential Force Model”.

GetValidTangentialForceModelValues

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

GetThermalCorrectionModel

Get “Thermal Correction Model” as a string.

SetThermalCorrectionModel

Set the value of “Thermal Correction Model”.

GetValidThermalCorrectionModelValues

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

GetUpdateDistanceMultiplier

Get the value of “Update Distance Multiplier”.

SetUpdateDistanceMultiplier

Set the value of “Update Distance Multiplier”.

GetUseRadlEtAl

Get the value of “Use Radl Et Al”.

SetUseRadlEtAl

Set the value of “Use Radl Et Al”.

Import detail#

from ansys.rocky.app.ra_physics import RAPhysics

Property detail#

property RAPhysics.enable_thermal_model#

Method detail#

classmethod RAPhysics.GetWrappedClass()#
classmethod RAPhysics.GetClassName() str#
RAPhysics.GetAdhesionModel() str#

Get “Adhesion Model” as a string.

Returns:

The returned value will be one of [‘none’, ‘constant’, ‘linear’, ‘JKR’, ‘custom’].

RAPhysics.SetAdhesionModel(value: str) None#

Set the value of “Adhesion Model”.

Parameters:

value – The value to set. Must be one of [‘none’, ‘constant’, ‘linear’, ‘JKR’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Adhesion Model” option.

RAPhysics.GetValidAdhesionModelValues() list[str]#

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

Returns:

The returned list is [‘none’, ‘constant’, ‘linear’, ‘JKR’, ‘custom’].

RAPhysics.GetClosePackingVolumeFraction() float#

Get the value of “Close Packing Volume Fraction”.

RAPhysics.SetClosePackingVolumeFraction(value: str | float) None#

Set the value of “Close Packing Volume Fraction”.

Parameters:

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

RAPhysics.GetEnableCoarseGrainModeling() bool#

Get the value of “Enable Coarse Grain Modeling”.

RAPhysics.SetEnableCoarseGrainModeling(value: bool) None#

Set the value of “Enable Coarse Grain Modeling”.

Parameters:

value – The value to set.

RAPhysics.GetEnableThermalModel() bool#

Get the value of “Enable Thermal Model”.

RAPhysics.SetEnableThermalModel(value: bool) None#

Set the value of “Enable Thermal Model”.

Parameters:

value – The value to set.

RAPhysics.GetGravityStartTime(unit: str | None = None) float#

Get the value of “Gravity Start Time”.

Parameters:

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

RAPhysics.SetGravityStartTime(value: str | float, unit: str | None = None) None#

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

RAPhysics.GetGravityStopTime(unit: str | None = None) float#

Get the value of “Gravity Stop Time”.

Parameters:

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

RAPhysics.SetGravityStopTime(value: str | float, unit: str | None = None) None#

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

RAPhysics.GetGravityXDirection(unit: str | None = None) float#

Get the value of “Gravity X Direction”.

Parameters:

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

RAPhysics.SetGravityXDirection(value: str | float, unit: str | None = None) None#

Set the value of “Gravity X Direction”.

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

RAPhysics.GetGravityYDirection(unit: str | None = None) float#

Get the value of “Gravity Y Direction”.

Parameters:

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

RAPhysics.SetGravityYDirection(value: str | float, unit: str | None = None) None#

Set the value of “Gravity Y Direction”.

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

RAPhysics.GetGravityZDirection(unit: str | None = None) float#

Get the value of “Gravity Z Direction”.

Parameters:

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

RAPhysics.SetGravityZDirection(value: str | float, unit: str | None = None) None#

Set the value of “Gravity Z Direction”.

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

RAPhysics.GetImpactEnergyModel() str#

Get “Impact Energy Model” as a string.

Returns:

The returned value will be one of [‘default’, ‘custom’].

RAPhysics.SetImpactEnergyModel(value: str) None#

Set the value of “Impact Energy Model”.

Parameters:

value – The value to set. Must be one of [‘default’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Impact Energy Model” option.

RAPhysics.GetValidImpactEnergyModelValues() list[str]#

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

Returns:

The returned list is [‘default’, ‘custom’].

RAPhysics.GetName() str#

Get the value of “Name”.

RAPhysics.SetName(value: str) None#

Set the value of “Name”.

Parameters:

value – The value to set.

RAPhysics.GetNormalForceModel() str#

Get “Normal Force Model” as a string.

Returns:

The returned value will be one of [‘linear_hysteresis’, ‘linear_elastic_viscous’, ‘damped_hertzian’, ‘custom’].

RAPhysics.SetNormalForceModel(value: str) None#

Set the value of “Normal Force Model”.

Parameters:

value – The value to set. Must be one of [‘linear_hysteresis’, ‘linear_elastic_viscous’, ‘damped_hertzian’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Normal Force Model” option.

RAPhysics.GetValidNormalForceModelValues() list[str]#

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

Returns:

The returned list is [‘linear_hysteresis’, ‘linear_elastic_viscous’, ‘damped_hertzian’, ‘custom’].

RAPhysics.GetRollingResistanceModel() str#

Get “Rolling Resistance Model” as a string.

Returns:

The returned value will be one of [‘type_1’, ‘type_3’, ‘none’, ‘custom’].

RAPhysics.SetRollingResistanceModel(value: str) None#

Set the value of “Rolling Resistance Model”.

Parameters:

value – The value to set. Must be one of [‘type_1’, ‘type_3’, ‘none’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Rolling Resistance Model” option.

RAPhysics.GetValidRollingResistanceModelValues() list[str]#

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

Returns:

The returned list is [‘type_1’, ‘type_3’, ‘none’, ‘custom’].

RAPhysics.GetExponentLimit() float#

Get the value of “Exponent Limit”.

RAPhysics.SetExponentLimit(value: str | float) None#

Set the value of “Exponent Limit”.

Parameters:

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

RAPhysics.GetVolumeFractionLimit() float#

Get the value of “Volume Fraction Limit”.

RAPhysics.SetVolumeFractionLimit(value: str | float) None#

Set the value of “Volume Fraction Limit”.

Parameters:

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

RAPhysics.GetRestitutionModel() str#

Get “Restitution Model” as a string.

Returns:

The returned value will be one of [‘constant’, ‘velocity_dependent’].

RAPhysics.SetRestitutionModel(value: str) None#

Set the value of “Restitution Model”.

Parameters:

value – The value to set. Must be one of [‘constant’, ‘velocity_dependent’].

Raises:

RockyApiError – If value is not a valid “Restitution Model” option.

RAPhysics.GetValidRestitutionModelValues() list[str]#

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

Returns:

The returned list is [‘constant’, ‘velocity_dependent’].

RAPhysics.GetSearchDistanceMultiplier() float#

Get the value of “Search Distance Multiplier”.

RAPhysics.SetSearchDistanceMultiplier(value: str | float) None#

Set the value of “Search Distance Multiplier”.

Parameters:

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

RAPhysics.GetSphThermalTransferModel() str#

Get “Sph Thermal Transfer Model” as a string.

Returns:

The returned value will be one of [‘cleary’, ‘custom’].

RAPhysics.SetSphThermalTransferModel(value: str) None#

Set the value of “Sph Thermal Transfer Model”.

Parameters:

value – The value to set. Must be one of [‘cleary’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Sph Thermal Transfer Model” option.

RAPhysics.GetValidSphThermalTransferModelValues() list[str]#

Get a list of all possible values for “Sph Thermal Transfer Model”.

Returns:

The returned list is [‘cleary’, ‘custom’].

RAPhysics.GetNumericalSofteningFactor() float#

Get the value of “Numerical Softening Factor”.

RAPhysics.SetNumericalSofteningFactor(value: str | float) None#

Set the value of “Numerical Softening Factor”.

Parameters:

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

RAPhysics.GetTangentialForceModel() str#

Get “Tangential Force Model” as a string.

Returns:

The returned value will be one of [‘elastic_coulomb’, ‘coulomb_limit’, ‘mindlin_deresiewicz’, ‘custom’].

RAPhysics.SetTangentialForceModel(value: str) None#

Set the value of “Tangential Force Model”.

Parameters:

value – The value to set. Must be one of [‘elastic_coulomb’, ‘coulomb_limit’, ‘mindlin_deresiewicz’, ‘custom’].

Raises:

RockyApiError – If value is not a valid “Tangential Force Model” option.

RAPhysics.GetValidTangentialForceModelValues() list[str]#

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

Returns:

The returned list is [‘elastic_coulomb’, ‘coulomb_limit’, ‘mindlin_deresiewicz’, ‘custom’].

RAPhysics.GetThermalCorrectionModel() str#

Get “Thermal Correction Model” as a string.

Returns:

The returned value will be one of [‘none’, ‘morris_et_al_area’, ‘morris_et_al_area_time’].

RAPhysics.SetThermalCorrectionModel(value: str) None#

Set the value of “Thermal Correction Model”.

Parameters:

value – The value to set. Must be one of [‘none’, ‘morris_et_al_area’, ‘morris_et_al_area_time’].

Raises:

RockyApiError – If value is not a valid “Thermal Correction Model” option.

RAPhysics.GetValidThermalCorrectionModelValues() list[str]#

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

Returns:

The returned list is [‘none’, ‘morris_et_al_area’, ‘morris_et_al_area_time’].

RAPhysics.GetUpdateDistanceMultiplier() float#

Get the value of “Update Distance Multiplier”.

RAPhysics.SetUpdateDistanceMultiplier(value: str | float) None#

Set the value of “Update Distance Multiplier”.

Parameters:

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

RAPhysics.GetUseRadlEtAl() bool#

Get the value of “Use Radl Et Al”.

RAPhysics.SetUseRadlEtAl(value: bool) None#

Set the value of “Use Radl Et Al”.

Parameters:

value – The value to set.