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
67 changes: 67 additions & 0 deletions ansys/api/discovery/v0/conditions.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright 2023, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
syntax = "proto3";
package ansys.api.discovery.v0.conditions;

import "ansys/api/dbu/v0/dbumodels.proto";
import "ansys/api/discovery/v0/discoverymodels.proto";
import "google/protobuf/empty.proto";

option csharp_namespace = "Ansys.Api.Discovery.V0.Conditions";

service Conditions
{
//Heat methods
rpc CreateHeat(HeatCreationRequest) returns (Heat);

rpc ChangeHeatLocation(HeatChangeLocationRequest) returns(ConditionChangedResponse);

rpc ChangeTotalHeat(ChangeQuantityRequest) returns(ConditionChangedResponse);

rpc ChangeHeatPerUnitVolume(ChangeQuantityRequest) returns(ConditionChangedResponse);

rpc ChangeHeatPerUnitArea(ChangeQuantityRequest) returns(ConditionChangedResponse);

rpc ChangeHeatSpecification(HeatSpecificationRequest) returns(ConditionChangedResponse);
}

message ChangeLocationRequest{
string object_id = 1;
repeated string locations = 2;
}

message ChangeQuantityRequest{
string object_id = 1;
QuantityType quantity_type = 2;
double quantity_value = 3;
int32 unit = 4;
}

message ConditionChangedResponse {
bool success = 1;
}

//Heat methods

message HeatSpecificationRequest {
string object_id = 1;
HeatSpecification heat_specifcation = 2;
}

message HeatChangeLocationRequest
{
ChangeLocationRequest change_locationrequest = 1;
LocationSpecification location_specification = 2;
}

// Inputs for heat creation
message HeatCreationRequest {
string simulation = 1;
LocationSpecification location_specification = 2;
repeated string locations = 3;
HeatSpecification heat_specifcation = 4;
QuantityType quantity_type = 5;
double quantity_value = 6;
int32 unit = 7;
}


38 changes: 38 additions & 0 deletions ansys/api/discovery/v0/discoverymodels.proto
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,46 @@ message ScriptParameter {
ansys.api.dbu.v0.DimensionType dimension_type = 3;
double dimension_value = 4;
}
//
// SIMULATIONS PROTOS
//
message Simulation {
string id = 1;
string label = 2;
}
//
// CONDITIONS PROTOS
//

// Heat
//

// Defines how heat is specified
enum HeatSpecification {
TOTALHEAT = 0;
HEATPERUNITVOLUMEORAREA = 1;
}

// Defines whether heat is applied to body or face
enum LocationSpecification {
FACELOCATIONS = 0;
BODYLOCATIONS = 1;
}

// Heat definition
message Heat {
string id = 1;
string parentid = 2;
string label = 3;
LocationSpecification location_specification = 4;
repeated string locations = 5;
HeatSpecification heat_specifcation = 6;
QuantityType quantity_type = 7;
double quantity_value = 8;
int32 unit = 9;
string unit_abbreviation = 10;
}

// Represents the quantity type for a physics parameter.
enum QuantityType {
QUANTITY_TYPE_ACCELERATION=0;
Expand Down
23 changes: 23 additions & 0 deletions ansys/api/discovery/v0/simulations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2023, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
syntax = "proto3";
package ansys.api.discovery.v0.simulations;

import "ansys/api/dbu/v0/dbumodels.proto";
import "ansys/api/discovery/v0/discoverymodels.proto";
import "google/protobuf/empty.proto";

option csharp_namespace = "Ansys.Api.Discovery.V0.Simulations";

service Simulations
{
// Creates a new simulation
rpc CreateSimulation(google.protobuf.Empty) returns (Simulation);

// Lists all simulations
rpc GetAll(google.protobuf.Empty) returns(GetAllResponse);
}

message GetAllResponse{
// The simulations in the study.
repeated Simulation simulations = 1;
}