datamodel_se#

Wrappers over StateEngine based datamodel gRPC service of Fluent.

Classes:

Attribute(value[, names, module, qualname, ...])

Contains the standard names of data model attributes associated with the data model service.

DatamodelService(channel, metadata, version, ...)

Pure Python wrapper of DatamodelServiceImpl.

DatamodelServiceImpl(channel, metadata, ...)

Wraps the StateEngine-based datamodel gRPC service of Fluent.

EventSubscription(service, path, request_dict)

EventSubscription class for any datamodel event.

PyAction(service, rules, name[, path])

Base class for command/query objects using Datamodel Service.

PyArguments(service, rules, command, path, id)

Class representing command arguments in datamodel.

PyArgumentsDictionarySubItem(parent, attr, ...)

Class representing dictionary-like command argument in datamodel.

PyArgumentsNumericalSubItem(parent, attr, ...)

Class representing numerical command argument in datamodel.

PyArgumentsParameterSubItem(parent, attr, ...)

Class representing generic parameter-like command argument in datamodel.

PyArgumentsSingletonSubItem(parent, attr, ...)

Class representing singleton-like command argument in datamodel.

PyArgumentsSubItem(parent, name, service, ...)

Class representing command argument in datamodel.

PyArgumentsTextualSubItem(parent, attr, ...)

Class representing textual command argument in datamodel.

PyCallableStateObject()

Any object which can be called to get its state.

PyCommand(service, rules, command[, path])

Enables commanding Fluent’s data model through a simple Python interface.

PyDictionary(service, rules[, path])

Provides interface for dictionaries.

PyMenu(service, rules[, path])

Object class using StateEngine based DatamodelService as backend.

PyMenuGeneric(service, rules[, path])

Generic PyMenu class for when generated API code is not available.

PyNamedObjectContainer(service, rules[, path])

Container class using the StateEngine-based DatamodelService as the backend.

PyNamedObjectContainerGeneric(service, rules)

Generic PyNamedObjectContainer class for when generated API code is not available.

PyNumerical(service, rules[, path])

Provides interface for numerical parameters.

PyParameter(service, rules[, path])

Object class using StateEngine based DatamodelService as backend.

PyQuery(service, rules, name[, path])

Enables querying Fluent’s data model through a simple Python interface.

PySimpleMenuGeneric(service, rules[, path])

A simple implementation of PyMenuGeneric applicable only for SINGLETONS.

PyStateContainer(service, rules[, path])

Object class using StateEngine based DatamodelService as backend.

PyTextual(service, rules[, path])

Provides interface for textual parameters.

SubscriptionList()

Stores subscription objects by tag.

Exceptions:

DisallowedFilePurpose([context, name, ...])

Is raised when the specified file purpose is not in the allowed values.

InvalidNamedObject(class_name)

Raised when the object is not a named object.

ReadOnlyObjectError(obj_name)

Raised on an attempt to mutate a read-only object.

SubscribeEventError(request)

Raised when server fails to subscribe from event.

UnsubscribeEventError(request)

Raised when server fails to unsubscribe from event.

Functions:

convert_path_to_se_path(path)

Convert a path structure to a StateEngine path.

convert_se_path_to_path(se_path)

Convert a StateEngine path to a path structure.

false_if_none(val)

Returns false if 'val' is false or None, else returns true.

true_if_none(val)

Returns true if 'val' is true or None, else returns false.

class ansys.fluent.core.services.datamodel_se.Attribute(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

Contains the standard names of data model attributes associated with the data model service.

Attributes:

ALLOWED_VALUES: str = 'allowedValues'#
ARGUMENTS: str = 'arguments'#
DEFAULT: str = 'default'#
DEPRECATED_VERSION: str = 'deprecatedVersion'#
DISPLAY_TEXT: str = 'displayText'#
ECHO_MODE: str = 'echoMode'#
ERROR_STATUS: str = 'errorStatus'#
EXCLUDED_VALUES: str = 'excludedValues'#
EXPOSURE_LEVEL: str = 'exposureLevel'#
FORCE_DEFAULT: str = 'forceDefault'#
INTERNAL_NAMES: str = '__ids__'#
IS_ACTIVE: str = 'isActive'#
IS_READ_ONLY: str = 'isReadOnly'#
IS_TREE_NODE: str = 'isTreeNode'#
MAX: str = 'max'#
MAX_LENGTH: str = 'maxLength'#
MEMBERS: str = 'members'#
MIGRATION: str = 'migration'#
MIN: str = 'min'#
MIN_LENGTH: str = 'minLength'#
NAME: str = '_name_'#
NAMES: str = '__names__'#
PATHS: str = '__paths__'#
REFERENCE_PATH: str = 'referencePath'#
ROOT_ID: str = '__root__'#
SHOW_AT_PARENT_NODE: str = 'showAtParentNode'#
TOOL_TIP: str = 'toolTip'#
USER_ERROR_STATUS: str = 'userErrorStatus'#
WIDGET_TYPE: str = 'widgetType'#
class ansys.fluent.core.services.datamodel_se.DatamodelService(channel, metadata, version, fluent_error_state, file_transfer_service=None)#

Bases: StreamingService

Pure Python wrapper of DatamodelServiceImpl.

Methods:

__init__(channel, metadata, version, ...[, ...])

__init__ method of DatamodelService class.

add_on_affected(rules, path, cb)

Add on affected.

add_on_affected_at_type_path(rules, path, ...)

Add on affected at type path.

add_on_attribute_changed(rules, path, ...)

Add on attribute changed.

add_on_changed(rules, path, cb)

Add on changed.

add_on_child_created(rules, path, child_type, cb)

Add on child created.

add_on_command_attribute_changed(rules, ...)

Add on command attribute changed.

add_on_command_executed(rules, path, cb)

Add on command executed.

add_on_command_executed_old(rules, path, ...)

Add on command executed.

add_on_deleted(rules, path, cb)

Add on deleted.

create_command_arguments(rules, path, command)

Create command arguments.

delete_all_child_objects(rules, path, obj_type)

Delete all child objects.

delete_child_objects(rules, path, obj_type, ...)

Delete child objects.

delete_command_arguments(rules, path, ...)

Delete command arguments.

delete_object(rules, path)

Delete an object.

execute_command(rules, path, command, args)

Execute the command.

execute_query(rules, path, query, args)

Execute the query.

fix_state(rules, path)

Fix state.

get_attribute_value(rules, path, attribute)

Get attribute value.

get_object_names(rules, path)

Get object names.

get_specs(rules, path)

Get specifications.

get_state(rules, path)

Get state.

get_static_info(rules)

Get static info.

rename(rules, path, new_name)

Rename an object.

set_state(rules, path, state)

Set state.

subscribe_events(request_dict)

Subscribe events.

unsubscribe_all_events()

Unsubscribe all subscribed events.

unsubscribe_events(tags)

Unsubscribe events.

update_dict(rules, path, dict_state[, recursive])

Update the dict.

__init__(channel, metadata, version, fluent_error_state, file_transfer_service=None)#

__init__ method of DatamodelService class.

add_on_affected(rules, path, cb)#

Add on affected.

add_on_affected_at_type_path(rules, path, child_type, cb)#

Add on affected at type path.

add_on_attribute_changed(rules, path, attribute, cb)#

Add on attribute changed.

add_on_changed(rules, path, cb)#

Add on changed.

add_on_child_created(rules, path, child_type, cb)#

Add on child created.

add_on_command_attribute_changed(rules, path, command, attribute, cb)#

Add on command attribute changed.

add_on_command_executed(rules, path, cb)#

Add on command executed.

add_on_command_executed_old(rules, path, command, obj, cb)#

Add on command executed.

add_on_deleted(rules, path, cb)#

Add on deleted.

create_command_arguments(rules, path, command)#

Create command arguments.

delete_all_child_objects(rules, path, obj_type)#

Delete all child objects.

delete_child_objects(rules, path, obj_type, child_names)#

Delete child objects.

delete_command_arguments(rules, path, command, commandid)#

Delete command arguments.

delete_object(rules, path)#

Delete an object.

execute_command(rules, path, command, args)#

Execute the command.

execute_query(rules, path, query, args)#

Execute the query.

fix_state(rules, path)#

Fix state.

get_attribute_value(rules, path, attribute)#

Get attribute value.

get_object_names(rules, path)#

Get object names.

get_specs(rules, path)#

Get specifications.

get_state(rules, path)#

Get state.

get_static_info(rules)#

Get static info.

rename(rules, path, new_name)#

Rename an object.

set_state(rules, path, state)#

Set state.

subscribe_events(request_dict)#

Subscribe events.

unsubscribe_all_events()#

Unsubscribe all subscribed events.

unsubscribe_events(tags)#

Unsubscribe events.

update_dict(rules, path, dict_state, recursive=False)#

Update the dict.

class ansys.fluent.core.services.datamodel_se.DatamodelServiceImpl(channel, metadata, fluent_error_state, file_transfer_service=None)#

Bases: object

Wraps the StateEngine-based datamodel gRPC service of Fluent.

Methods:

__init__(channel, metadata, fluent_error_state)

__init__ method of DatamodelServiceImpl class.

create_command_arguments(request)

RPC createCommandArguments of DataModel service.

delete_child_objects(request)

RPC deleteChildObjects of DataModel service.

delete_command_arguments(request)

RPC deleteCommandArguments of DataModel service.

delete_object(request)

RPC deleteObject of DataModel service.

execute_command(request)

RPC executeCommand of DataModel service.

execute_query(request)

RPC executeQuery of DataModel service.

fix_state(request)

RPC fixState of DataModel service.

get_attribute_value(request)

RPC getAttributeValue of DataModel service.

get_object_names(request)

RPC getObjectNames of DataModel service.

get_specs(request)

RPC getSpecs of DataModel service.

get_state(request)

RPC getState of DataModel service.

get_static_info(request)

RPC getStaticInfo of DataModel service.

initialize_datamodel(request)

RPC initDatamodel of DataModel service.

rename(request)

RPC rename of DataModel service.

set_state(request)

RPC setState of DataModel service.

subscribe_events(request)

RPC subscribeEvents of DataModel service.

unsubscribe_events(request)

RPC unsubscribeEvents of DataModel service.

update_dict(request)

RPC updateDict of DataModel service.

__init__(channel, metadata, fluent_error_state, file_transfer_service=None)#

__init__ method of DatamodelServiceImpl class.

create_command_arguments(request)#

RPC createCommandArguments of DataModel service.

delete_child_objects(request)#

RPC deleteChildObjects of DataModel service.

delete_command_arguments(request)#

RPC deleteCommandArguments of DataModel service.

Raises:
RuntimeError

If command instancing is not supported.

delete_object(request)#

RPC deleteObject of DataModel service.

execute_command(request)#

RPC executeCommand of DataModel service.

execute_query(request)#

RPC executeQuery of DataModel service.

fix_state(request)#

RPC fixState of DataModel service.

get_attribute_value(request)#

RPC getAttributeValue of DataModel service.

get_object_names(request)#

RPC getObjectNames of DataModel service.

get_specs(request)#

RPC getSpecs of DataModel service.

get_state(request)#

RPC getState of DataModel service.

get_static_info(request)#

RPC getStaticInfo of DataModel service.

initialize_datamodel(request)#

RPC initDatamodel of DataModel service.

rename(request)#

RPC rename of DataModel service.

set_state(request)#

RPC setState of DataModel service.

subscribe_events(request)#

RPC subscribeEvents of DataModel service.

unsubscribe_events(request)#

RPC unsubscribeEvents of DataModel service.

update_dict(request)#

RPC updateDict of DataModel service.

exception ansys.fluent.core.services.datamodel_se.DisallowedFilePurpose(context=None, name=None, allowed_values=None)#

Bases: ValueError

Is raised when the specified file purpose is not in the allowed values.

Methods:

__init__([context, name, allowed_values])

Initialize DisallowedFilePurpose.

__init__(context=None, name=None, allowed_values=None)#

Initialize DisallowedFilePurpose.

class ansys.fluent.core.services.datamodel_se.EventSubscription(service, path, request_dict)#

Bases: object

EventSubscription class for any datamodel event.

Methods:

__init__(service, path, request_dict)

Subscribe to a datamodel event.

unsubscribe()

Unsubscribe the datamodel event.

__init__(service, path, request_dict)#

Subscribe to a datamodel event.

Raises:
SubscribeEventError

If server fails to subscribe from event.

unsubscribe()#

Unsubscribe the datamodel event.

Raises:
UnsubscribeEventError

If server fails to unsubscribe from event.

exception ansys.fluent.core.services.datamodel_se.InvalidNamedObject(class_name)#

Bases: RuntimeError

Raised when the object is not a named object.

Methods:

__init__(class_name)

Initialize InvalidNamedObject.

__init__(class_name)#

Initialize InvalidNamedObject.

class ansys.fluent.core.services.datamodel_se.PyAction(service, rules, name, path=None)#

Bases: object

Base class for command/query objects using Datamodel Service.

Methods:

__init__(service, rules, name[, path])

__init__ method of PyAction class.

create_instance()

Create an operation instance.

__init__(service, rules, name, path=None)#

__init__ method of PyAction class.

create_instance()#

Create an operation instance.

class ansys.fluent.core.services.datamodel_se.PyArguments(service, rules, command, path, id)#

Bases: PyStateContainer

Class representing command arguments in datamodel.

Methods:

__init__(service, rules, command, path, id)

__init__ method of PyArguments class.

get_attr(attrib)

Get attribute value of the current object.

__init__(service, rules, command, path, id)#

__init__ method of PyArguments class.

get_attr(attrib)#

Get attribute value of the current object.

Parameters:
attribstr

Name of the attribute.

Returns:
Any

Value of the attribute.

class ansys.fluent.core.services.datamodel_se.PyArgumentsDictionarySubItem(parent, attr, service, rules, path)#

Bases: PyArgumentsSubItem, PyDictionary

Class representing dictionary-like command argument in datamodel.

Methods:

__init__(parent, attr, service, rules, path)

__init__ method of PyArgumentsDictionarySubItem class.

__init__(parent, attr, service, rules, path)#

__init__ method of PyArgumentsDictionarySubItem class.

class ansys.fluent.core.services.datamodel_se.PyArgumentsNumericalSubItem(parent, attr, service, rules, path)#

Bases: PyArgumentsSubItem, PyNumerical

Class representing numerical command argument in datamodel.

Methods:

__init__(parent, attr, service, rules, path)

__init__ method of PyArgumentsNumericalSubItem class.

__init__(parent, attr, service, rules, path)#

__init__ method of PyArgumentsNumericalSubItem class.

class ansys.fluent.core.services.datamodel_se.PyArgumentsParameterSubItem(parent, attr, service, rules, path)#

Bases: PyArgumentsSubItem, PyParameter

Class representing generic parameter-like command argument in datamodel.

Methods:

__init__(parent, attr, service, rules, path)

__init__ method of PyArgumentsParameterSubItem class.

__init__(parent, attr, service, rules, path)#

__init__ method of PyArgumentsParameterSubItem class.

class ansys.fluent.core.services.datamodel_se.PyArgumentsSingletonSubItem(parent, attr, service, rules, path)#

Bases: PyArgumentsSubItem

Class representing singleton-like command argument in datamodel.

Methods:

__init__(parent, attr, service, rules, path)

__init__ method of PyArgumentsSingletonSubItem class.

__init__(parent, attr, service, rules, path)#

__init__ method of PyArgumentsSingletonSubItem class.

class ansys.fluent.core.services.datamodel_se.PyArgumentsSubItem(parent, name, service, rules, path)#

Bases: PyCallableStateObject

Class representing command argument in datamodel.

Methods:

__init__(parent, name, service, rules, path)

__init__ method of PyArgumentsSubItem class.

getAttribValue(attrib)

Get attribute value of the command argument.

getState()

Get state of the command argument.

get_attr(attrib)

Get attribute value of the command argument.

get_state()

Get state of the command argument.

setState(state)

Set state of the command argument.

set_state(state)

Set state of the command argument.

__init__(parent, name, service, rules, path)#

__init__ method of PyArgumentsSubItem class.

getAttribValue(attrib)#

Get attribute value of the command argument.

Parameters:
attribstr

attribute name

Returns:
Any

attribute value

getState()#

Get state of the command argument.

get_attr(attrib)#

Get attribute value of the command argument.

Parameters:
attribstr

attribute name

Returns:
Any

attribute value

get_state()#

Get state of the command argument.

setState(state)#

Set state of the command argument.

set_state(state)#

Set state of the command argument.

class ansys.fluent.core.services.datamodel_se.PyArgumentsTextualSubItem(parent, attr, service, rules, path)#

Bases: PyArgumentsSubItem, PyTextual

Class representing textual command argument in datamodel.

Methods:

__init__(parent, attr, service, rules, path)

__init__ method of PyArgumentsTextualSubItem class.

__init__(parent, attr, service, rules, path)#

__init__ method of PyArgumentsTextualSubItem class.

class ansys.fluent.core.services.datamodel_se.PyCallableStateObject#

Bases: object

Any object which can be called to get its state.

Methods

__call__()

Get the state of the current object.

class ansys.fluent.core.services.datamodel_se.PyCommand(service, rules, command, path=None)#

Bases: PyAction

Enables commanding Fluent’s data model through a simple Python interface.

Methods:

__init__(service, rules, command[, path])

__init__ method of PyCommand class.

after_execute(value)

Executes after command execution.

before_execute(value)

Executes before command execution.

__init__(service, rules, command, path=None)#

__init__ method of PyCommand class.

after_execute(value)#

Executes after command execution.

before_execute(value)#

Executes before command execution.

class ansys.fluent.core.services.datamodel_se.PyDictionary(service, rules, path=None)#

Bases: PyParameter

Provides interface for dictionaries.

Methods

update_dict(dict_state)

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics

updateDict(dict_state)

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics (same as update_dict(dict_state))]

Methods:

updateDict(dict_state[, recursive])

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python).

update_dict(dict_state[, recursive])

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python).

updateDict(dict_state, recursive=False)#

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics.

Parameters:
dict_statedict[str, Any]

Incoming dict state

recursive: bool

Flag to update the nested dictionary structure.

Raises:
ReadOnlyObjectError

If the object is read-only.

update_dict(dict_state, recursive=False)#

Update the state of the current object if the current object is a Dict in the data model, else throws RuntimeError (currently not showing up in Python). Update is executed according to dict.update semantics.

Parameters:
dict_statedict[str, Any]

Incoming dict state

recursive: bool

Flag to update the nested dictionary structure.

Raises:
ReadOnlyObjectError

If the object is read-only.

class ansys.fluent.core.services.datamodel_se.PyMenu(service, rules, path=None)#

Bases: PyStateContainer

Object class using StateEngine based DatamodelService as backend. Use this class instead of directly calling DatamodelService’s method.

Methods

__setattr__(name, value)

Set state of the child object

rename(new_name)

name()

create_command_arguments(command)

Methods:

__init__(service, rules[, path])

__init__ method of PyMenu class.

add_on_affected(cb)

Register a callback for when the object is affected.

add_on_affected_at_type_path(child_type, cb)

Register a callback for when the object is affected at child type.

add_on_changed(cb)

Register a callback for when the object is modified.

add_on_child_created(child_type, cb)

Register a callback for when a child object is created.

add_on_command_executed(cb)

Register a callback for when a command is executed.

add_on_command_executed_old(command, cb)

Register a callback for when a command is executed.

add_on_deleted(cb)

Register a callback for when the object is deleted.

create_command_arguments(command)

Create command arguments.

deleteAllChildObjects(obj_type)

Delete all the named objects in the container.

deleteChildObjects(obj_type, child_names)

Delete the named objects in 'child_names' from the container..

delete_all_child_objects(obj_type)

Delete all the named objects in the container.

delete_child()

Delete child object.

delete_child_objects(obj_type, child_names)

Delete the named objects in 'child_names' from the container..

name()

Get the name of the named object.

rename(new_name)

Rename the named object.

__init__(service, rules, path=None)#

__init__ method of PyMenu class.

add_on_affected(cb)#

Register a callback for when the object is affected.

Parameters:
cbCallable[[PyMenuT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_affected_at_type_path(child_type, cb)#

Register a callback for when the object is affected at child type.

Parameters:
child_typestr

child type

cbCallable[[PyMenuT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_changed(cb)#

Register a callback for when the object is modified.

Parameters:
cbCallable[[PyMenuT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_child_created(child_type, cb)#

Register a callback for when a child object is created.

Parameters:
child_typestr

Type of the child object

cbCallable[[PyMenuT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_command_executed(cb)#

Register a callback for when a command is executed.

Parameters:
cbCallable[[PyMenuT, str, ValueT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_command_executed_old(command, cb)#

Register a callback for when a command is executed.

Parameters:
commandstr

Command name

cbCallable[[PyMenuT, str, ValueT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_deleted(cb)#

Register a callback for when the object is deleted.

Parameters:
cbCallable[[], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

create_command_arguments(command)#

Create command arguments.

Parameters:
commandstr

Command name

Returns:
str

Command ID

deleteAllChildObjects(obj_type)#

Delete all the named objects in the container.

Parameters:
obj_type: str

Type of the named object container.

deleteChildObjects(obj_type, child_names)#

Delete the named objects in ‘child_names’ from the container..

Parameters:
obj_type: str

Type of the named object container.

child_namesList[str]

List of named objects.

delete_all_child_objects(obj_type)#

Delete all the named objects in the container.

Parameters:
obj_type: str

Type of the named object container.

delete_child()#

Delete child object.

delete_child_objects(obj_type, child_names)#

Delete the named objects in ‘child_names’ from the container..

Parameters:
obj_type: str

Type of the named object container.

child_namesList[str]

List of named objects.

name()#

Get the name of the named object.

Returns:
str

name

Raises:
InvalidNamedObject

If the object is not a named object.

rename(new_name)#

Rename the named object.

Parameters:
new_namestr

New name for the object.

class ansys.fluent.core.services.datamodel_se.PyMenuGeneric(service, rules, path=None)#

Bases: PyMenu

Generic PyMenu class for when generated API code is not available.

Attributes:

attrs = ('service', 'rules', 'path', '_cached_attrs')#
class ansys.fluent.core.services.datamodel_se.PyNamedObjectContainer(service, rules, path=None)#

Bases: object

Container class using the StateEngine-based DatamodelService as the backend. Use this class instead of directly calling the DatamodelService’s method.

Methods

__len__()

Return a count of the child objects.

__iter__()

Return the next child object.

__getitem__(key)

Return the child object by key.

__setitem__(key, value)

Set the state of the child object by name.

__delitem__(key)

Delete the child object by name.

Methods:

__init__(service, rules[, path])

__init__ method of PyNamedObjectContainer class.

get(key)

Return the child object by key.

getChildObjectDisplayNames()

Displays the name of objects within a container.

getState()

Returns state of the container.

get_object_names()

Displays the name of objects within a container.

get_state()

Returns state of the container.

__init__(service, rules, path=None)#

__init__ method of PyNamedObjectContainer class.

get(key)#

Return the child object by key.

Parameters:
keystr

Name of the child object.

Returns:
PyMenu

Child object.

getChildObjectDisplayNames()#

Displays the name of objects within a container.

getState()#

Returns state of the container.

get_object_names()#

Displays the name of objects within a container.

get_state()#

Returns state of the container.

class ansys.fluent.core.services.datamodel_se.PyNamedObjectContainerGeneric(service, rules, path=None)#

Bases: PyNamedObjectContainer

Generic PyNamedObjectContainer class for when generated API code is not available.

class ansys.fluent.core.services.datamodel_se.PyNumerical(service, rules, path=None)#

Bases: PyParameter

Provides interface for numerical parameters.

Methods:

max()

Maximum value of the numerical parameter.

min()

Minimum value of the numerical parameter.

max()#

Maximum value of the numerical parameter.

min()#

Minimum value of the numerical parameter.

class ansys.fluent.core.services.datamodel_se.PyParameter(service, rules, path=None)#

Bases: PyStateContainer

Object class using StateEngine based DatamodelService as backend.

Use this class instead of directly calling DatamodelService’s method.

Methods:

add_on_changed(cb)

Register a callback for when the object is modified.

default_value()

Get default value of the parameter.

add_on_changed(cb)#

Register a callback for when the object is modified.

Parameters:
cbCallable[[PyMenuT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

default_value()#

Get default value of the parameter.

class ansys.fluent.core.services.datamodel_se.PyQuery(service, rules, name, path=None)#

Bases: PyAction

Enables querying Fluent’s data model through a simple Python interface.

class ansys.fluent.core.services.datamodel_se.PySimpleMenuGeneric(service, rules, path=None)#

Bases: PyMenu, PyDictionary

A simple implementation of PyMenuGeneric applicable only for SINGLETONS.

This is required for the stand-alone datamodel server to avoid the usage of ‘service.get_specs’

Attributes:

attrs = ('service', 'rules', 'path')#
class ansys.fluent.core.services.datamodel_se.PyStateContainer(service, rules, path=None)#

Bases: PyCallableStateObject

Object class using StateEngine based DatamodelService as backend. Use this class instead of directly calling DatamodelService’s method.

Methods

get_attr(attrib)

Get the attribute value of the current object.

getAttribValue(attrib)

Get the attribute value of the current object. (This method is the same as the get_attr(attrib) method.)

get_state()

Get the state of the current object.

getState()

Deprecated camel case alias of get_state.

set_state()

Set the state of the current object.

setState()

Deprecated camel case alias of set_state.

__call__()

Set the state of the current object if state is provided else get its state.

Methods:

__init__(service, rules[, path])

__init__ method of PyStateContainer class.

add_on_attribute_changed(attribute, cb)

Register a callback for when an attribute is changed.

add_on_command_attribute_changed(command, ...)

Register a callback for when an attribute is changed.

fixState()

Fix state.

fix_state()

Fix state.

getAttribValue(attrib)

Get attribute value of the current object.

getState()

Get state.

get_attr(attrib)

Get attribute value of the current object.

get_remote_state()

Get state of the current object.

get_state()

Get state.

is_active()

Returns true if the object is active.

is_read_only()

Checks whether the object is read only.

setState([state])

Set state of the current object.

set_state([state])

Set state of the current object.

__init__(service, rules, path=None)#

__init__ method of PyStateContainer class.

add_on_attribute_changed(attribute, cb)#

Register a callback for when an attribute is changed.

Parameters:
attributestr

attribute name

cbCallable[[ValueT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_command_attribute_changed(command, attribute, cb)#

Register a callback for when an attribute is changed.

Parameters:
commandstr

command name

attributestr

attribute name

cbCallable[[ValueT], None]

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

fixState()#

Fix state.

fix_state()#

Fix state.

getAttribValue(attrib)#

Get attribute value of the current object.

Parameters:
attribstr

Name of the attribute.

Returns:
Any

Value of the attribute.

getState()#

Get state.

get_attr(attrib)#

Get attribute value of the current object.

Parameters:
attribstr

Name of the attribute.

Returns:
Any

Value of the attribute.

get_remote_state()#

Get state of the current object.

get_state()#

Get state.

is_active()#

Returns true if the object is active.

is_read_only()#

Checks whether the object is read only.

setState(state=None, **kwargs)#

Set state of the current object.

Parameters:
stateAny, optional

state

kwargsAny

Keyword arguments.

Raises:
ReadOnlyObjectError

If the object is read-only.

set_state(state=None, **kwargs)#

Set state of the current object.

Parameters:
stateAny, optional

state

kwargsAny

Keyword arguments.

Raises:
ReadOnlyObjectError

If the object is read-only.

class ansys.fluent.core.services.datamodel_se.PyTextual(service, rules, path=None)#

Bases: PyParameter

Provides interface for textual parameters.

Methods:

allowed_values()

Get allowed values.

allowed_values()#

Get allowed values.

exception ansys.fluent.core.services.datamodel_se.ReadOnlyObjectError(obj_name)#

Bases: RuntimeError

Raised on an attempt to mutate a read-only object.

Methods:

__init__(obj_name)

Initialize ReadOnlyObjectError.

__init__(obj_name)#

Initialize ReadOnlyObjectError.

exception ansys.fluent.core.services.datamodel_se.SubscribeEventError(request)#

Bases: RuntimeError

Raised when server fails to subscribe from event.

Methods:

__init__(request)

Initialize SubscribeEventError.

__init__(request)#

Initialize SubscribeEventError.

class ansys.fluent.core.services.datamodel_se.SubscriptionList#

Bases: object

Stores subscription objects by tag.

Methods:

__init__()

Initialize SubscriptionList.

add(tag, subscription)

Add a subscription object.

remove(tag)

Remove a subscription object.

unsubscribe_all()

Unsubscribe all subscription objects.

unsubscribe_while_deleting(rules, path, ...)

Unsubscribe corresponding subscription objects while the datamodel object is being deleted.

__init__()#

Initialize SubscriptionList.

add(tag, subscription)#

Add a subscription object.

Parameters:
tagstr

Subscription tag.

subscriptionEventSubscription

Subscription object.

remove(tag)#

Remove a subscription object.

Parameters:
tagstr

Subscription tag.

unsubscribe_all()#

Unsubscribe all subscription objects.

unsubscribe_while_deleting(rules, path, deletion_stage)#

Unsubscribe corresponding subscription objects while the datamodel object is being deleted.

Parameters:
rulesstr

Datamodel object rules.

pathstr

Datamodel object path.

deletion_stage{“before”, “after”}

All subscription objects except those of on-deleted type are unsubscribed before the datamodel object is deleted. On-deleted subscription objects are unsubscribed after the datamodel object is deleted.

exception ansys.fluent.core.services.datamodel_se.UnsubscribeEventError(request)#

Bases: RuntimeError

Raised when server fails to unsubscribe from event.

Methods:

__init__(request)

Initialize UnsubscribeEventError.

__init__(request)#

Initialize UnsubscribeEventError.

ansys.fluent.core.services.datamodel_se.convert_path_to_se_path(path)#

Convert a path structure to a StateEngine path.

Parameters:
pathPath

Path structure.

Returns:
str

stateengine path

ansys.fluent.core.services.datamodel_se.convert_se_path_to_path(se_path)#

Convert a StateEngine path to a path structure.

Parameters:
se_pathstr

StateEngine path.

Returns:
Path

path structure

ansys.fluent.core.services.datamodel_se.false_if_none(val)#

Returns false if ‘val’ is false or None, else returns true.

ansys.fluent.core.services.datamodel_se.true_if_none(val)#

Returns true if ‘val’ is true or None, else returns false.