Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions protos/ansys/api/fluent/v0/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ message DataReadEvent {
message InitializedEvent {
}

/**
* Event during solution progress.
*/
message ProgressEvent {
string message = 1; // Progress Message.
sint32 percentComplete = 2; // Percent completed.
}

message BeginStreamingResponse {
oneof as {
CaseReadEvent casereadevent = 2;
Expand All @@ -69,5 +77,6 @@ message BeginStreamingResponse {
TimestepEndedEvent timestependedevent = 10;
CalculationsStartedEvent calculationsstartedevent = 11;
CalculationsEndedEvent calculationsendedevent = 12;
ProgressEvent progressevent = 20;
}
}
99 changes: 99 additions & 0 deletions protos/ansys/api/fluent/v0/monitor.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
//
// Copyright 1987-2022 ANSYS, Inc. All Rights Reserved.
//

syntax = "proto3";

package grpcRemoting;

service Monitor {
/* Get monitors info i.e. monitors name and their properties e.g. x-label, y-label, title etc*/
rpc GetMonitors(GetMonitorsRequest) returns (GetMonitorsResponse) {}
/* Begin monitors data streaming i.e. monitors x-values and corresponding y-values.*/
rpc BeginStreaming(StreamingRequest) returns (stream StreamingResponse) {}
}

/**
* Monitor type.
*/
enum MonitorType {
Residual = 0; // Solver residuals.
Solution = 1; // Solution monitors.
}

/**
* X-axis type.
*/
enum XAxisType {
Unset = 0; // Axis unset.
Iteration = 1; // Iteration axis.
Time = 2; // Time axis.
}

/**
* Unit data.
*/
message UnitData {
string name = 1; // Unit name
string unit = 2; // Unit e.g. Fahrenheit
double factor = 3; // Unit factor e.g. for Fahrenheit it will be 0.5555556.
double offset = 4; // Unit offset e.g. for Fahrenheit it will be 459.67.
}

/**
* Monitor set definition provided by GetMonitors.
*/
message MonitorSet {
string name = 1; // Monitor set name.
string title = 2; // Monitor set title.
string xlabel = 3; // Monitor set xlabel.
string ylabel = 4; // Monitor set ylabel.
sint64 frequency = 5; // Monitor set frequency.
MonitorType type = 6; // Monitor set type.
UnitData unitinfo = 7; // Monitor set unit info.
XAxisType axis = 8; // X-axis type.
repeated string monitors = 9; // Monitor set monitors.
}

/**
* X axis data i.e. axis type and index provided by monitors streaming.
*/
message XAxisData {
XAxisType xaxistype = 1; // X-axis type.
sint64 xaxisindex = 2; // X-axis index.
}

/**
* Y axis data i.e. monitor name and value provided by monitors streaming.
*/
message MonitorData {
string name = 1;
double value = 2;
}

/**
* GetMonitors Request.
*/
message GetMonitorsRequest {
}

/**
* GetMonitors Response.
*/
message GetMonitorsResponse {
repeated MonitorSet monitorset = 1;
}

/**
* Streaming Request.
*/
message StreamingRequest {
}

/**
* Streaming Response.
*/
message StreamingResponse {
XAxisData xaxisdata = 1;
repeated MonitorData yaxisvalues = 2;
}
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Setup file for ansys-fluent-solver."""
import os
import shutil
import sys

from setuptools import find_namespace_packages, setup

Expand All @@ -21,14 +22,17 @@
)
shutil.copy2(_README_FILE, _DOCS_FILE)


install_requires = [
"ansys-platform-instancemanagement~=1.0",
"grpcio>=1.30.0",
"numpy>=1.21.5",
"protobuf==3.20.1",
"appdirs>=1.4.0",
"pandas>=1.4.1" if sys.version_info.minor > 7 else "pandas==1.3.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is equivalent to pandas>=1.3.5.

]


packages = []
for package in find_namespace_packages(where="src", include="ansys*"):
if package.startswith("ansys.api"):
Expand Down
68 changes: 63 additions & 5 deletions src/ansys/api/fluent/v0/events_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading