RAFluentTwoWayCoupling#

class ansys.rocky.app.ra_fluent_coupling.RAFluentTwoWayCoupling#

Bases: ansys.rocky.app.ra_cfd_coupling.RABaseCFDCoupling

Rocky PrePost Scripting wrapper to manipulate Fluent Two-Way coupling properties.

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

cfd_coupling = study.GetCFDCoupling()
cfd_coupling.SetupFluentTwoWay('fluent.cas')
two_way_process = cfd_coupling.GetCouplingProcess()

Overview#

SetPartIdIfValid

Subclasses should implement this method if it’s a Process with visualization

GetFluentReleases

Get a list of available Fluent releases.

SetupDatFilename

StartFluent

Starts Fluent application

IsFluentRunning

Whether a Rocky-created Fluent process is running.

CloseFluent

Closes a running Fluent application

UpdateFluentInfo

Updates the latest changes from Fluent setup.

SetupStoreFiles

Copies CAS file to Rocky’s project folder and update Fluent info

GetFluentVersion

Get the value of “Version”.

SetFluentVersion

Set the Ansys Fluent version to be used in CFD coupling (deprecated).

GetAvailableCoupledBoundaryNames

Obtain the names of the boundaries available for coupling in the fluent file.

CreateCoupledBoundaries

Create a coupled boundary for each of the coupled boundary name passed by the user.

GetAbsoluteValue

Get the value of “Absolute Value”.

SetAbsoluteValue

Set the value of “Absolute Value”.

GetMaximumIterations

Get the value of “Maximum Iterations”.

SetMaximumIterations

Set the value of “Maximum Iterations”.

GetMappingMethod

Get “Mapping Method” as a string.

SetMappingMethod

Set the value of “Mapping Method”.

GetValidMappingMethodValues

Get a list of all possible values for “Mapping Method”.

GetAveragingMethod

Deprecated: Use GetMappingMethod() instead.

SetAveragingMethod

Deprecated: Use SetMappingMethod() instead.

GetValidAveragingMethodValues

Deprecated: Use GetValidMappingMethodValues() instead.

GetMinimumIterations

Get the value of “Minimum Iterations”.

SetMinimumIterations

Set the value of “Minimum Iterations”.

GetAveragingRadiusType

Get “Averaging Radius Type” as a string.

SetAveragingRadiusType

Set the value of “Averaging Radius Type”.

GetValidAveragingRadiusTypeValues

Get a list of all possible values for “Averaging Radius Type”.

GetSolidsMaximumVolumeFractionTarget

Get the value of “Solids Maximum Volume Fraction Target”.

SetSolidsMaximumVolumeFractionTarget

Set the value of “Solids Maximum Volume Fraction Target”.

GetVolumeFractionTarget

Deprecated: Use GetSolidsMaximumVolumeFractionTarget() instead.

SetVolumeFractionTarget

Deprecated: Use SetSolidsMaximumVolumeFractionTarget() instead.

GetCouplingFilesKept

Get the value of “Coupling Files Kept”.

SetCouplingFilesKept

Set the value of “Coupling Files Kept”.

GetDecompositionFactor

Get the value of “Decomposition Factor”.

SetDecompositionFactor

Set the value of “Decomposition Factor”.

GetDiffusionCoefficient

Get the value of “Diffusion Coefficient”.

SetDiffusionCoefficient

Set the value of “Diffusion Coefficient”.

GetFluentAdditionalArgs

Get the value of “Fluent Additional Args”.

SetFluentAdditionalArgs

Set the value of “Fluent Additional Args”.

GetFluentExecutionMode

Get “Fluent Execution Mode” as a string.

SetFluentExecutionMode

Set the value of “Fluent Execution Mode”.

GetValidFluentExecutionModeValues

Get a list of all possible values for “Fluent Execution Mode”.

GetFluentOutputFrequencyMultiplier

Get the value of “Fluent Output Frequency Multiplier”.

SetFluentOutputFrequencyMultiplier

Set the value of “Fluent Output Frequency Multiplier”.

GetFluentSolverProcesses

Get the value of “Fluent Solver Processes”.

SetFluentSolverProcesses

Set the value of “Fluent Solver Processes”.

GetFractionParticleSize

Get the value of “Fraction Particle Size”.

SetFractionParticleSize

Set the value of “Fraction Particle Size”.

GetMaximumResidualTolerance

Get the value of “Maximum Residual Tolerance”.

SetMaximumResidualTolerance

Set the value of “Maximum Residual Tolerance”.

GetMaximumTimeSteps

Get the value of “Maximum Time Steps”.

SetMaximumTimeSteps

Set the value of “Maximum Time Steps”.

GetMinimumTimeSteps

Get the value of “Minimum Time Steps”.

SetMinimumTimeSteps

Set the value of “Minimum Time Steps”.

GetNumberOfSubsteps

Get the value of “Number of Substeps”.

SetNumberOfSubsteps

Set the value of “Number of Substeps”.

GetNumberOfThreads

Get the value of “Number of Threads”.

SetNumberOfThreads

Set the value of “Number of Threads”.

GetOverwriteCfdUpdateDistance

Get the value of “Overwrite Cfd Update Distance”.

SetOverwriteCfdUpdateDistance

Set the value of “Overwrite Cfd Update Distance”.

GetMaximumVolumeFraction

Get the value of “Maximum Volume Fraction”.

SetMaximumVolumeFraction

Set the value of “Maximum Volume Fraction”.

GetBackDiffusion

Get the value of “Back Diffusion”.

SetBackDiffusion

Set the value of “Back Diffusion”.

EnableBackDiffusion

Set the value of “Back Diffusion” to True.

DisableBackDiffusion

Set the value of “Back Diffusion” to False.

IsBackDiffusionEnabled

Check if the “Back Diffusion” is enabled.

GetUseDatInitialization

Get the value of “Use Dat Initialization”.

SetUseDatInitialization

Set the value of “Use Dat Initialization”.

GetSubstepping

Get the value of “Substepping”.

SetSubstepping

Set the value of “Substepping”.

EnableSubstepping

Set the value of “Substepping” to True.

DisableSubstepping

Set the value of “Substepping” to False.

IsSubsteppingEnabled

Check if the “Substepping” is enabled.

GetUseTurbulentDispersion

Get the value of “Use Turbulent Dispersion”.

SetUseTurbulentDispersion

Set the value of “Use Turbulent Dispersion”.

GetUserCfdUpdateDistance

Get the value of “User Cfd Update Distance”.

SetUserCfdUpdateDistance

Set the value of “User Cfd Update Distance”.

Import detail#

from ansys.rocky.app.ra_fluent_coupling import RAFluentTwoWayCoupling

Property detail#

property RAFluentTwoWayCoupling.fluent_release#
property RAFluentTwoWayCoupling.fluent_phases#
property RAFluentTwoWayCoupling.fluent_rocky_phase#
property RAFluentTwoWayCoupling.fluent_solver_processes#
property RAFluentTwoWayCoupling.use_dat_initialization#
property RAFluentTwoWayCoupling.fluent_output_frequency_multiplier#
property RAFluentTwoWayCoupling.coupling_files_kept#
property RAFluentTwoWayCoupling.fluent_time_step#
property RAFluentTwoWayCoupling.additional_input_variables#
property RAFluentTwoWayCoupling.additional_output_variables#
property RAFluentTwoWayCoupling.disabled_input_variables#
property RAFluentTwoWayCoupling.disabled_output_variables#

Attribute detail#

RAFluentTwoWayCoupling.dat_filename: _typeshed.Incomplete#
RAFluentTwoWayCoupling.cas_filename: _typeshed.Incomplete#

Method detail#

classmethod RAFluentTwoWayCoupling.GetWrappedClass()#
classmethod RAFluentTwoWayCoupling.GetClassName()#
RAFluentTwoWayCoupling.SetPartIdIfValid() None#

Subclasses should implement this method if it’s a Process with visualization

RAFluentTwoWayCoupling.GetFluentReleases()#

Get a list of available Fluent releases.

Return type:

list(unicode)

Returns:

The list of available Fluent releases

RAFluentTwoWayCoupling.SetupDatFilename(dat_filename)#
RAFluentTwoWayCoupling.StartFluent() None#

Starts Fluent application

RAFluentTwoWayCoupling.IsFluentRunning()#

Whether a Rocky-created Fluent process is running.

Returns:

True whether a Fluent application is running false otherwise

RAFluentTwoWayCoupling.CloseFluent() None#

Closes a running Fluent application

RAFluentTwoWayCoupling.UpdateFluentInfo() None#

Updates the latest changes from Fluent setup.

RAFluentTwoWayCoupling.SetupStoreFiles(cas_filename, case_config=None) None#

Copies CAS file to Rocky’s project folder and update Fluent info

RAFluentTwoWayCoupling.GetFluentVersion()#

Get the value of “Version”.

Return type:

str

RAFluentTwoWayCoupling.SetFluentVersion(fluent_version) None#

Set the Ansys Fluent version to be used in CFD coupling (deprecated).

Currently, it’s not possible to change the version of Ansys Fluent used for CFD coupling. This method is being kept for backward compatibility (and also because there’s a chance of this feature to be brought back in future version).

RAFluentTwoWayCoupling.GetAvailableCoupledBoundaryNames() collections.abc.Iterable[str]#

Obtain the names of the boundaries available for coupling in the fluent file.

RAFluentTwoWayCoupling.CreateCoupledBoundaries(coupled_boundary_names: list[str]) None#

Create a coupled boundary for each of the coupled boundary name passed by the user. Check GetAvailableCoupledBoundaryNames to obtain the list of available boundaries.

RAFluentTwoWayCoupling.GetAbsoluteValue(unit: str | None = None) float#

Get the value of “Absolute Value”.

Parameters:

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

RAFluentTwoWayCoupling.SetAbsoluteValue(value: str | float, unit: str | None = None) None#

Set the value of “Absolute Value”.

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

RAFluentTwoWayCoupling.GetMaximumIterations() int#

Get the value of “Maximum Iterations”.

RAFluentTwoWayCoupling.SetMaximumIterations(value: str | int) None#

Set the value of “Maximum Iterations”.

Parameters:

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

RAFluentTwoWayCoupling.GetMappingMethod() str#

Get “Mapping Method” as a string.

Returns:

The returned value will be one of [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

RAFluentTwoWayCoupling.SetMappingMethod(value: str) None#

Set the value of “Mapping Method”.

Parameters:

value – The value to set. Must be one of [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

Raises:

RockyApiError – If value is not a valid “Mapping Method” option.

RAFluentTwoWayCoupling.GetValidMappingMethodValues() list[str]#

Get a list of all possible values for “Mapping Method”.

Returns:

The returned list is [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

RAFluentTwoWayCoupling.GetAveragingMethod() str#

Deprecated: Use GetMappingMethod() instead.

Returns:

The returned value will be one of [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

RAFluentTwoWayCoupling.SetAveragingMethod(value: str)#

Deprecated: Use SetMappingMethod() instead.

Parameters:

value – The value to set. Must be one of [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

Raises:

RockyApiError – If value is not a valid “Averaging Method” option.

RAFluentTwoWayCoupling.GetValidAveragingMethodValues() list[str]#

Deprecated: Use GetValidMappingMethodValues() instead.

Returns:

The returned list is [‘UniformDistribution’, ‘VolumetricDiffusion’, ‘DiffusionSolution’].

RAFluentTwoWayCoupling.GetMinimumIterations() int#

Get the value of “Minimum Iterations”.

RAFluentTwoWayCoupling.SetMinimumIterations(value: str | int) None#

Set the value of “Minimum Iterations”.

Parameters:

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

RAFluentTwoWayCoupling.GetAveragingRadiusType() str#

Get “Averaging Radius Type” as a string.

Returns:

The returned value will be one of [‘FractionMaximumParticleSize’, ‘AbsoluteValue’].

RAFluentTwoWayCoupling.SetAveragingRadiusType(value: str) None#

Set the value of “Averaging Radius Type”.

Parameters:

value – The value to set. Must be one of [‘FractionMaximumParticleSize’, ‘AbsoluteValue’].

Raises:

RockyApiError – If value is not a valid “Averaging Radius Type” option.

RAFluentTwoWayCoupling.GetValidAveragingRadiusTypeValues() list[str]#

Get a list of all possible values for “Averaging Radius Type”.

Returns:

The returned list is [‘FractionMaximumParticleSize’, ‘AbsoluteValue’].

RAFluentTwoWayCoupling.GetSolidsMaximumVolumeFractionTarget() float#

Get the value of “Solids Maximum Volume Fraction Target”.

RAFluentTwoWayCoupling.SetSolidsMaximumVolumeFractionTarget(value: str | float) None#

Set the value of “Solids Maximum Volume Fraction Target”.

Parameters:

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

RAFluentTwoWayCoupling.GetVolumeFractionTarget() float#

Deprecated: Use GetSolidsMaximumVolumeFractionTarget() instead.

RAFluentTwoWayCoupling.SetVolumeFractionTarget(value: float) None#

Deprecated: Use SetSolidsMaximumVolumeFractionTarget() instead.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.GetCouplingFilesKept() int#

Get the value of “Coupling Files Kept”.

RAFluentTwoWayCoupling.SetCouplingFilesKept(value: str | int) None#

Set the value of “Coupling Files Kept”.

Parameters:

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

RAFluentTwoWayCoupling.GetDecompositionFactor() float#

Get the value of “Decomposition Factor”.

RAFluentTwoWayCoupling.SetDecompositionFactor(value: str | float) None#

Set the value of “Decomposition Factor”.

Parameters:

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

RAFluentTwoWayCoupling.GetDiffusionCoefficient(unit: str | None = None) float#

Get the value of “Diffusion Coefficient”.

Parameters:

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

RAFluentTwoWayCoupling.SetDiffusionCoefficient(value: str | float, unit: str | None = None) None#

Set the value of “Diffusion Coefficient”.

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

RAFluentTwoWayCoupling.GetFluentAdditionalArgs() str#

Get the value of “Fluent Additional Args”.

RAFluentTwoWayCoupling.SetFluentAdditionalArgs(value: str) None#

Set the value of “Fluent Additional Args”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.GetFluentExecutionMode() str#

Get “Fluent Execution Mode” as a string.

Returns:

The returned value will be one of [‘serial’, ‘local_parallel’, ‘distributed_parallel’].

RAFluentTwoWayCoupling.SetFluentExecutionMode(value: str) None#

Set the value of “Fluent Execution Mode”.

Parameters:

value – The value to set. Must be one of [‘serial’, ‘local_parallel’, ‘distributed_parallel’].

Raises:

RockyApiError – If value is not a valid “Fluent Execution Mode” option.

RAFluentTwoWayCoupling.GetValidFluentExecutionModeValues() list[str]#

Get a list of all possible values for “Fluent Execution Mode”.

Returns:

The returned list is [‘serial’, ‘local_parallel’, ‘distributed_parallel’].

RAFluentTwoWayCoupling.GetFluentOutputFrequencyMultiplier() int#

Get the value of “Fluent Output Frequency Multiplier”.

RAFluentTwoWayCoupling.SetFluentOutputFrequencyMultiplier(value: str | int) None#

Set the value of “Fluent Output Frequency Multiplier”.

Parameters:

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

RAFluentTwoWayCoupling.GetFluentSolverProcesses() int#

Get the value of “Fluent Solver Processes”.

RAFluentTwoWayCoupling.SetFluentSolverProcesses(value: str | int) None#

Set the value of “Fluent Solver Processes”.

Parameters:

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

RAFluentTwoWayCoupling.GetFractionParticleSize(unit: str | None = None) float#

Get the value of “Fraction Particle Size”.

Parameters:

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

RAFluentTwoWayCoupling.SetFractionParticleSize(value: str | float, unit: str | None = None) None#

Set the value of “Fraction Particle 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 “-“.

RAFluentTwoWayCoupling.GetMaximumResidualTolerance() float#

Get the value of “Maximum Residual Tolerance”.

RAFluentTwoWayCoupling.SetMaximumResidualTolerance(value: str | float) None#

Set the value of “Maximum Residual Tolerance”.

Parameters:

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

RAFluentTwoWayCoupling.GetMaximumTimeSteps() int#

Get the value of “Maximum Time Steps”.

RAFluentTwoWayCoupling.SetMaximumTimeSteps(value: str | int) None#

Set the value of “Maximum Time Steps”.

Parameters:

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

RAFluentTwoWayCoupling.GetMinimumTimeSteps() int#

Get the value of “Minimum Time Steps”.

RAFluentTwoWayCoupling.SetMinimumTimeSteps(value: str | int) None#

Set the value of “Minimum Time Steps”.

Parameters:

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

RAFluentTwoWayCoupling.GetNumberOfSubsteps() int#

Get the value of “Number of Substeps”.

RAFluentTwoWayCoupling.SetNumberOfSubsteps(value: str | int) None#

Set the value of “Number of Substeps”.

Parameters:

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

RAFluentTwoWayCoupling.GetNumberOfThreads() int#

Get the value of “Number of Threads”.

RAFluentTwoWayCoupling.SetNumberOfThreads(value: str | int) None#

Set the value of “Number of Threads”.

Parameters:

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

RAFluentTwoWayCoupling.GetOverwriteCfdUpdateDistance() bool#

Get the value of “Overwrite Cfd Update Distance”.

RAFluentTwoWayCoupling.SetOverwriteCfdUpdateDistance(value: bool) None#

Set the value of “Overwrite Cfd Update Distance”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.GetMaximumVolumeFraction(unit: str | None = None) float#

Get the value of “Maximum Volume Fraction”.

Parameters:

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

RAFluentTwoWayCoupling.SetMaximumVolumeFraction(value: str | float, unit: str | None = None) None#

Set the value of “Maximum Volume Fraction”.

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

RAFluentTwoWayCoupling.GetBackDiffusion() bool#

Get the value of “Back Diffusion”.

RAFluentTwoWayCoupling.SetBackDiffusion(value: bool) None#

Set the value of “Back Diffusion”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.EnableBackDiffusion() None#

Set the value of “Back Diffusion” to True.

RAFluentTwoWayCoupling.DisableBackDiffusion() None#

Set the value of “Back Diffusion” to False.

RAFluentTwoWayCoupling.IsBackDiffusionEnabled() bool#

Check if the “Back Diffusion” is enabled.

RAFluentTwoWayCoupling.GetUseDatInitialization() bool#

Get the value of “Use Dat Initialization”.

RAFluentTwoWayCoupling.SetUseDatInitialization(value: bool) None#

Set the value of “Use Dat Initialization”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.GetSubstepping() bool#

Get the value of “Substepping”.

RAFluentTwoWayCoupling.SetSubstepping(value: bool) None#

Set the value of “Substepping”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.EnableSubstepping() None#

Set the value of “Substepping” to True.

RAFluentTwoWayCoupling.DisableSubstepping() None#

Set the value of “Substepping” to False.

RAFluentTwoWayCoupling.IsSubsteppingEnabled() bool#

Check if the “Substepping” is enabled.

RAFluentTwoWayCoupling.GetUseTurbulentDispersion() bool#

Get the value of “Use Turbulent Dispersion”.

RAFluentTwoWayCoupling.SetUseTurbulentDispersion(value: bool) None#

Set the value of “Use Turbulent Dispersion”.

Parameters:

value – The value to set.

RAFluentTwoWayCoupling.GetUserCfdUpdateDistance(unit: str | None = None) float#

Get the value of “User Cfd Update Distance”.

Parameters:

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

RAFluentTwoWayCoupling.SetUserCfdUpdateDistance(value: str | float, unit: str | None = None) None#

Set the value of “User Cfd Update Distance”.

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