engine_eval#
Wrappers over the EngineEval gRPC service of CFX.
Classes:
|
Provides functions to interact with the CFX engine. |
|
Wraps the EngineEval gRPC service of CFX. |
- class ansys.cfx.core.services.engine_eval.EngineEval(service: EngineEvalService)#
Bases:
objectProvides functions to interact with the CFX engine.
Methods:
__init__(service)Initialize an instance of the
EngineEvalclass.eval_expression(input)Evaluate a CFX expression.
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
EngineEvalclass.
- eval_expression(input: str) str#
Evaluate a CFX expression.
This function is not available in CFX versions earlier than Release 2026 R1.
- Parameters:
- input
str Input CFX expression represented as a string.
- input
- Returns:
strOutput value in string format.
- Raises:
RuntimeErrorIf a CFX version earlier than 2026 R1 is being used.
- get_engine_version() str#
Get the CFX engine version number.
- Returns:
strCFX engine version number 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:
- ccl
Sequence[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.
- ccl
- Returns:
strOutput as string.
- class ansys.cfx.core.services.engine_eval.EngineEvalService(channel: Channel, metadata: list[tuple[str, str]], cfx_error_state)#
Bases:
objectWraps the EngineEval gRPC service of CFX.
Using the methods from the
EngineEvalclass is recommended.Methods:
__init__(channel, metadata, cfx_error_state)Initialize an instance of the
EngineEvalServiceclass.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
EngineEvalServiceclass.
- 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.