rpvars#
Client-side service allowing access and modification of rpvars.
The primary interaction with Fluent should not be through low-level variables like rpvars but instead through the high-level object-based interfaces: solver settings objects and task-based meshing workflow.
Classes:
|
Access to rpvars in a specific session. |
- class ansys.fluent.core.rpvars.RPVars(eval_fn)#
Bases:
object
Access to rpvars in a specific session.
Methods:
__call__
([var, val])Set or get a specific rpvar, or get the full rpvar state.
Returns list with the allowed rpvars names.
- __call__(var=None, val=None)#
Set or get a specific rpvar, or get the full rpvar state.
- Parameters:
- var
str
Name of the rpvar. Set the specified rpvar if val is provided, or else return its value.
- val
Any
Value of the rpvar. Set the specified var to this value if val is specified.
- var
- Returns:
Any
A dict containing the full rpvar state if all arguments are unspecified, the value of the rpvar if only var is specified, or a string with the var name if both arguments are specified.
Examples
>>> import ansys.fluent.core as pyfluent >>> solver = pyfluent.launch_fluent(mode="solver") >>> iter_count = 100 >>> solver.rp_vars("number-of-iterations", iter_count) 'number-of-iterations' >>> solver.rp_vars("number-of-iterations") 100
Getting dictionary with all rpvars available:
>>> solver.rp_vars() {'sg-swirl?': False, 'rp-seg?': True, 'rf-energy?': False, 'rp-inviscid?': False, ... 'number-of-iterations': 100, ...}