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.

DataModelType(value[, names, module, ...])

An enumeration over datamodel types.

DatamodelService(channel, metadata, ...[, ...])

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.

PyCallableStateObject()

Any object which can be called to get its state.

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

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

PyCommandArguments(service, rules, command, ...)

Class representing command arguments in datamodel.

PyCommandArgumentsSubItem(parent, name, ...)

Class representing command argument in datamodel.

PyDictionary(service, rules[, path])

Provides interface for dictionaries.

PyDictionaryCommandArgumentsSubItem(parent, ...)

Class representing dictionary-like command argument in datamodel.

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.

PyNumericalCommandArgumentsSubItem(parent, ...)

Class representing numerical command argument in datamodel.

PyParameter(service, rules[, path])

Object class using StateEngine based DatamodelService as backend.

PyParameterCommandArgumentsSubItem(parent, ...)

Class representing generic parameter-like command argument in datamodel.

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

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

PySimpleMenuGeneric(service, rules[, path])

A simple implementation of PyMenuGeneric applicable only for SINGLETONS.

PySingletonCommandArgumentsSubItem(parent, ...)

Class representing singleton-like command argument in datamodel.

PyStateContainer(service, rules[, path])

Object class using StateEngine based DatamodelService as backend.

PyTextual(service, rules[, path])

Provides interface for textual parameters.

PyTextualCommandArgumentsSubItem(parent, ...)

Class representing textual command argument in datamodel.

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.

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.DataModelType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

An enumeration over datamodel types.

Attributes:

Methods:

get_mode(mode)

Returns the datamodel type.

DICTIONARY = (['Dict'], <class 'ansys.fluent.core.services.datamodel_se.PyDictionaryCommandArgumentsSubItem'>)#
MODELOBJECT = (['ModelObject'], <class 'ansys.fluent.core.services.datamodel_se.PySingletonCommandArgumentsSubItem'>)#
NUMBER = (['Real', 'Int', 'ListReal', 'Real List', 'Integer', 'ListInt'], <class 'ansys.fluent.core.services.datamodel_se.PyNumericalCommandArgumentsSubItem'>)#
PARAMETER = (['Bool', 'Logical', 'Logical List'], <class 'ansys.fluent.core.services.datamodel_se.PyParameterCommandArgumentsSubItem'>)#
TEXT = (['String', 'ListString', 'String List'], <class 'ansys.fluent.core.services.datamodel_se.PyTextualCommandArgumentsSubItem'>)#
static get_mode(mode)#

Returns the datamodel type.

Parameters:
modestr

mode

Returns:
DataModelType

datamodel type

Raises:
InvalidArgument

If an unknown mode is passed.

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

Bases: StreamingService

Pure Python wrapper of DatamodelServiceImpl.

Methods:

__init__(channel, metadata, fluent_error_state)

__init__ method of DatamodelService class.

add_on_affected(rules, path, obj, 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, obj, cb)

Add on changed.

add_on_child_created(rules, path, ...)

Add on child created.

add_on_command_attribute_changed(rules, ...)

Add on command attribute changed.

add_on_command_executed(rules, path, ...)

Add on command executed.

add_on_deleted(rules, path, obj, 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)

Update the dict.

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

__init__ method of DatamodelService class.

add_on_affected(rules, path, obj, cb)#

Add on affected.

add_on_affected_at_type_path(rules, path, child_type, obj, cb)#

Add on affected at type path.

add_on_attribute_changed(rules, path, attribute, obj, cb)#

Add on attribute changed.

add_on_changed(rules, path, obj, cb)#

Add on changed.

add_on_child_created(rules, path, child_type, obj, cb)#

Add on child created.

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

Add on command attribute changed.

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

Add on command executed.

add_on_deleted(rules, path, obj, 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)#

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)

createCommandArguments RPC of DataModel service.

delete_child_objects(request)

getState RPC of DataModel service.

delete_command_arguments(request)

deleteCommandArguments RPC of DataModel service.

delete_object(request)

deleteObject RPC of DataModel service.

execute_command(request)

executeCommand RPC of DataModel service.

execute_query(request)

ExecuteQuery rpc of DataModel service.

fix_state(request)

setState RPC of DataModel service.

get_attribute_value(request)

getAttributeValue RPC of DataModel service.

get_object_names(request)

getState RPC of DataModel service.

get_specs(request)

getSpecs RPC of DataModel service.

get_state(request)

getState RPC of DataModel service.

get_static_info(request)

getStaticInfo RPC of DataModel service.

initialize_datamodel(request)

initDatamodel RPC of DataModel service.

rename(request)

getState RPC of DataModel service.

set_state(request)

setState RPC of DataModel service.

subscribe_events(request)

subscribeEvents RPC of DataModel service.

unsubscribe_events(request)

unsubscribeEvents RPC of DataModel service.

update_dict(request)

updateDict RPC of DataModel service.

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

__init__ method of DatamodelServiceImpl class.

create_command_arguments(request)#

createCommandArguments RPC of DataModel service.

delete_child_objects(request)#

getState RPC of DataModel service.

delete_command_arguments(request)#

deleteCommandArguments RPC of DataModel service.

Raises:
RuntimeError

If command instancing is not supported.

delete_object(request)#

deleteObject RPC of DataModel service.

execute_command(request)#

executeCommand RPC of DataModel service.

execute_query(request)#

ExecuteQuery rpc of DataModel service.

fix_state(request)#

setState RPC of DataModel service.

get_attribute_value(request)#

getAttributeValue RPC of DataModel service.

get_object_names(request)#

getState RPC of DataModel service.

get_specs(request)#

getSpecs RPC of DataModel service.

get_state(request)#

getState RPC of DataModel service.

get_static_info(request)#

getStaticInfo RPC of DataModel service.

initialize_datamodel(request)#

initDatamodel RPC of DataModel service.

rename(request)#

getState RPC of DataModel service.

set_state(request)#

setState RPC of DataModel service.

subscribe_events(request)#

subscribeEvents RPC of DataModel service.

unsubscribe_events(request)#

unsubscribeEvents RPC of DataModel service.

update_dict(request)#

updateDict RPC 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.

__init__(context=None, name=None, allowed_values=None)#
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.

__init__(class_name)#
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: object

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

Methods

__call__()

Execute the command.

help()

Print the command help string.

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.

create_instance()

Create a command instance.

help()

Prints help string.

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

create_instance()#

Create a command instance.

help()#

Prints help string.

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

Bases: PyStateContainer

Class representing command arguments in datamodel.

Methods:

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

__init__ method of PyCommandArguments class.

get_attr(attrib)

Get attribute value of the current object.

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

__init__ method of PyCommandArguments 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.PyCommandArgumentsSubItem(parent, name, service, rules, path, parent_arg)#

Bases: PyCallableStateObject

Class representing command argument in datamodel.

Methods:

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

__init__ method of PyCommandArgumentsSubItem 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.

help()

Get help.

setState(state)

Set state of the command argument.

set_state(state)

Set state of the command argument.

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

__init__ method of PyCommandArgumentsSubItem 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.

help()#

Get help.

setState(state)#

Set state of the command argument.

set_state(state)#

Set state of the command argument.

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)

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)

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)#

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

Raises:
ReadOnlyObjectError

If the object is read-only.

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.

Parameters:
dict_statedict[str, Any]

Incoming dict state

Raises:
ReadOnlyObjectError

If the object is read-only.

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

Bases: PyCommandArgumentsSubItem, PyDictionary

Class representing dictionary-like command argument in datamodel.

Methods:

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

__init__ method of PyDictionaryCommandArgumentsSubItem class.

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

__init__ method of PyDictionaryCommandArgumentsSubItem class.

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(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

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

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

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

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

add_on_command_executed(command, cb)#

Register a callback for when a command is executed.

Parameters:
commandstr

command name

cbCallable

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

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.

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.

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.PyNumericalCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#

Bases: PyCommandArgumentsSubItem, PyNumerical

Class representing numerical command argument in datamodel.

Methods:

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

__init__ method of PyNumericalCommandArgumentsSubItem class.

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

__init__ method of PyNumericalCommandArgumentsSubItem class.

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

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.PyParameterCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#

Bases: PyCommandArgumentsSubItem, PyParameter

Class representing generic parameter-like command argument in datamodel.

Methods:

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

__init__ method of PyParameterCommandArgumentsSubItem class.

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

__init__ method of PyParameterCommandArgumentsSubItem class.

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

Bases: object

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

Methods

__call__()

Execute the query.

help()

Print the query help string.

Methods:

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

__init__ method of PyQuery class.

help()

Prints help string.

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

__init__ method of PyQuery class.

help()#

Prints help string.

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.PySingletonCommandArgumentsSubItem(parent, attr, service, rules, path, arg)#

Bases: PyCommandArgumentsSubItem

Class representing singleton-like command argument in datamodel.

Methods:

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

__init__ method of PySingletonCommandArgumentsSubItem class.

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

__init__ method of PySingletonCommandArgumentsSubItem class.

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.

help()

Print help string.

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.

Attributes:

__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

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

Callback function

Returns:
EventSubscription

EventSubscription instance which can be used to unregister the callback

docstring = None#
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.

help()#

Print help string.

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.

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

Bases: PyCommandArgumentsSubItem, PyTextual

Class representing textual command argument in datamodel.

Methods:

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

__init__ method of PyTextualCommandArgumentsSubItem class.

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

__init__ method of PyTextualCommandArgumentsSubItem class.

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

Bases: RuntimeError

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

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

Bases: RuntimeError

Raised when server fails to subscribe from event.

__init__(request)#
class ansys.fluent.core.services.datamodel_se.SubscriptionList#

Bases: object

Stores subscription objects by tag.

Methods:

__init__()

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__()#
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.

__init__(request)#
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.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.