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:
|
Enumeration of rpvar types mapping Python types to Fluent type strings. |
|
Access to rpvars in a specific session. |
- class ansys.fluent.core.rpvars.RPVarType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
EnumEnumeration of rpvar types mapping Python types to Fluent type strings.
Attributes:
Methods:
from_python_type(python_type)Convert Python type to RPVarType.
- BOOLEAN = 'boolean'#
- CUSTOM = 'none'#
- INTEGER = 'integer'#
- REAL = 'real'#
- STRING = 'string'#
- classmethod from_python_type(python_type)#
Convert Python type to RPVarType.
- Parameters:
- python_type
type Python type to convert.
- python_type
- Returns:
RPVarTypeCorresponding RPVarType enum value.
- Raises:
ValueErrorFor unsupported python types.
- class ansys.fluent.core.rpvars.RPVars(eval_fn)#
Bases:
objectAccess to rpvars in a specific session.
Methods:
__init__(eval_fn)Initialize RPVars.
Returns list with the allowed rpvars names.
create(name, value, var_type)Create a new rpvar.
- __init__(eval_fn)#
Initialize RPVars.
- allowed_values()#
Returns list with the allowed rpvars names.
- Returns:
List[str]List with all allowed rpvars names.
- create(name, value, var_type)#
Create a new rpvar.
- Parameters:
- Raises:
NameErrorIf the rpvar name already exists.
TypeErrorIf the value type doesn’t match the specified var_type.
RuntimeErrorIf ‘make-new-rpvar’ returns #f for a reason other than the variable name already matching an existing entry.