From c3b4e2ab45887a6920d39d471f4a986d7d7457a4 Mon Sep 17 00:00:00 2001 From: TFS_CASLService Date: Wed, 31 Jan 2024 21:01:42 -0500 Subject: [PATCH] sync: add changes from local folder --- ansys/api/discovery/v0/conditions.proto | 67 ++++++++++++++++++++ ansys/api/discovery/v0/discoverymodels.proto | 38 +++++++++++ ansys/api/discovery/v0/simulations.proto | 23 +++++++ 3 files changed, 128 insertions(+) create mode 100644 ansys/api/discovery/v0/conditions.proto create mode 100644 ansys/api/discovery/v0/simulations.proto diff --git a/ansys/api/discovery/v0/conditions.proto b/ansys/api/discovery/v0/conditions.proto new file mode 100644 index 0000000..95742a7 --- /dev/null +++ b/ansys/api/discovery/v0/conditions.proto @@ -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; +} + + diff --git a/ansys/api/discovery/v0/discoverymodels.proto b/ansys/api/discovery/v0/discoverymodels.proto index dbda750..bc32eff 100644 --- a/ansys/api/discovery/v0/discoverymodels.proto +++ b/ansys/api/discovery/v0/discoverymodels.proto @@ -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; diff --git a/ansys/api/discovery/v0/simulations.proto b/ansys/api/discovery/v0/simulations.proto new file mode 100644 index 0000000..9ac0f69 --- /dev/null +++ b/ansys/api/discovery/v0/simulations.proto @@ -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; +} \ No newline at end of file