engine_eval#

Wrappers over the EngineEval gRPC service of CFX.

Classes:

EngineEval(service)

Provides functions to interact with the CFX engine.

EngineEvalService(channel, metadata, ...)

Wraps the EngineEval gRPC service of CFX.

class ansys.cfx.core.services.engine_eval.EngineEval(service: EngineEvalService)#

Bases: object

Provides functions to interact with the CFX engine.

Methods:

__init__(service)

Initialize an instance of the EngineEval class.

eval_expression(input)

Evaluate a CFX expression.

get_engine_version()

Get the CFX engine version number.

info_query(query[, args])

Query engine information in string format.

process_ccl(ccl[, wait, silent])

Execute CCL commands and settings.

__init__(service: EngineEvalService) None#

Initialize an instance of the EngineEval class.

eval_expression(input: str) str#

Evaluate a CFX expression.

This function is not available in CFX versions earlier than Release 2026 R1.

Parameters:
inputstr

Input CFX expression represented as a string.

Returns:
str

Output value in string format.

Raises:
RuntimeError

If a CFX version earlier than 2026 R1 is being used.

get_engine_version() str#

Get the CFX engine version number.

Returns:
str

CFX engine version number in string format.

info_query(query: str, args: str = None) str#

Query engine information in string format.

Parameters:
querystr

Input query in string format.

argsstr

Input query arguments in string format.

Returns:
str

Output query value in string format.

process_ccl(ccl: Sequence[str], wait: bool = True, silent: bool = True) str#

Execute CCL commands and settings. The CCL is in the form of a sequence of strings.

Parameters:
cclSequence[str]

Sequence of CCL strings. Each one must be a complete CCL fragment that can be submitted to the engine on its own. Newline characters can be included in the strings.

waitbool, default: True

Whether to wait until execution completes.

silentbool, default: True

Whether to execute silently.

Returns:
str

Output as string.

class ansys.cfx.core.services.engine_eval.EngineEvalService(channel: Channel, metadata: list[tuple[str, str]], cfx_error_state)#

Bases: object

Wraps the EngineEval gRPC service of CFX.

Using the methods from the EngineEval class is recommended.

Methods:

__init__(channel, metadata, cfx_error_state)

Initialize an instance of the EngineEvalService class.

eval_expression(request)

EngineEval RPC of EngineEval service.

info_query(request)

InfoQuery RPC of EngineEval service.

process_ccl(request)

Exec RPC of EngineEval service.

__init__(channel: Channel, metadata: list[tuple[str, str]], cfx_error_state) None#

Initialize an instance of the EngineEvalService class.

eval_expression(request: ExpressionEvalRequest) ExpressionEvalResponse#

EngineEval RPC of EngineEval service.

info_query(request: InfoQueryRequest) InfoQueryResponse#

InfoQuery RPC of EngineEval service.

process_ccl(request: ProcessCCLRequest) ProcessCCLResponse#

Exec RPC of EngineEval service.