From 5b1839a3060de974dbc279efbbf69af2d8116de1 Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Sat, 9 Sep 2023 12:19:36 -0600 Subject: [PATCH] Add definitions for thermal strain sim, refer to pkrull-ansys/pyadditive#76 --- ansys/api/additive/VERSION | 2 +- ansys/api/additive/v0/additive_domain.proto | 36 +++++++++- ...additive_process_window_optimization.proto | 69 ------------------- .../api/additive/v0/additive_simulation.proto | 17 +++++ 4 files changed, 53 insertions(+), 71 deletions(-) delete mode 100644 ansys/api/additive/v0/additive_process_window_optimization.proto diff --git a/ansys/api/additive/VERSION b/ansys/api/additive/VERSION index 589268e..e21e727 100644 --- a/ansys/api/additive/VERSION +++ b/ansys/api/additive/VERSION @@ -1 +1 @@ -1.3.0 \ No newline at end of file +1.4.0 \ No newline at end of file diff --git a/ansys/api/additive/v0/additive_domain.proto b/ansys/api/additive/v0/additive_domain.proto index b957eeb..71505ea 100644 --- a/ansys/api/additive/v0/additive_domain.proto +++ b/ansys/api/additive/v0/additive_domain.proto @@ -216,4 +216,38 @@ message MaterialTuningResult { bytes log = 1; bytes optimized_parameters = 2; bytes characteristic_width_lookup = 10; -} \ No newline at end of file +} + +enum ThermalSolveType { + THERMAL_SOLVE_TYPE_UNSPECIFIED = 0; // default value used in messages + THERMAL_SOLVE_TYPE_SCAN_PATTERN = 1; +} + +message ThermalStrainInput { + oneof FileType { + StlFile stl_file = 1; + BuildFile build_file = 2; + } + ThermalSolveType solve_type = 3; + MachineSettings machine = 10; + AdditiveMaterial material = 11; +} + +message ThermalStrainResult { + string shrinkage_file = 1; // name of zip archive on server + uint32 number_of_deposit_layers = 2; + float layer_thickness = 3; +} + +message VoxelMeshInput { + oneof FileType { + StlFile stl_file = 1; + BuildFile build_file = 2; + } + float voxel_size = 3; +} + +message VoxelMeshResult { + string voxel_file = 1; // name of voxel file on server +} + diff --git a/ansys/api/additive/v0/additive_process_window_optimization.proto b/ansys/api/additive/v0/additive_process_window_optimization.proto deleted file mode 100644 index ced89c2..0000000 --- a/ansys/api/additive/v0/additive_process_window_optimization.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package ansys.api.additive.process; - -option csharp_namespace = "Ansys.Api.Additive.ProcessOptimization"; - -// Additive process window related service definition. -service ProcessWindowOptimizationService { - // Sets laser wattage - rpc RefineLaserPower (LaserPowerRange) returns (ProcessWindowSpecification); - rpc SpecifyLaserPower (LaserPowerValues) returns (ProcessWindowSpecification); - - // Turn on process window optimization - rpc OptimizeProcess(OptimizeProcessWindowSettings) returns (stream OptimizeProcessWindowExecutionHeartbeat); - - // Turn off process window optimization - rpc StopProcessWindowOptimization(StopProcessWindowOptimizationSettings) returns (OptimizeProcessWindowCompletionData); -} - -message ProcessWindowNode { - double laserPower = 1; - double scanSpeed = 2; - double baseplateTemperature = 3; - double layerThickness = 4; -} - -message ProcessWindowSpecification { - LaserPowerRange laserPowerRange = 1; -} - -message LaserPowerRange { - int32 minimumLaserPower = 1; - int32 maximumLaserPower = 2; -} - -message LaserPowerValues { - repeated double laserPower = 1; -} - -message MeltPoolDimensions { - double estimatedMeltPoolReferenceWidth = 1; - double estimatedMeltPoolReferenceDepth = 2; - double estimatedMeltPoolWidth = 3; - double estimatedMeltPoolDepth = 4; -} - -message OptimizeProcessWindowSettings { - int32 maximumSimulationTimeInMinutes = 1; -} - -message OptimizeProcessWindowExecutionHeartbeat { - int32 queuedSimulationCount = 1; - repeated ProcessWindowNodeSimulationResult processWindowNodeSimulationResults = 2; -} - -message ProcessWindowNodeSimulationResult { - ProcessWindowNode processWindowNode = 1; - MeltPoolDimensions meltPoolDimensions = 2; -} - -// Settings for stopping optimization. -message StopProcessWindowOptimizationSettings { - bool forceQuitActiveSimulations = 1; -} - -// Metrics, statistics, and data for completed optimization. -message OptimizeProcessWindowCompletionData { - int32 totalSimulationsCompletedDuringOptimization = 1; -} diff --git a/ansys/api/additive/v0/additive_simulation.proto b/ansys/api/additive/v0/additive_simulation.proto index 41096be..e5aaf58 100644 --- a/ansys/api/additive/v0/additive_simulation.proto +++ b/ansys/api/additive/v0/additive_simulation.proto @@ -11,6 +11,7 @@ service SimulationService { rpc Simulate(SimulationRequest) returns (stream SimulationResponse); rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse); rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); + rpc Mesh(MeshRequest) returns (stream MeshResponse); } message SimulationResponse { @@ -21,6 +22,7 @@ message SimulationResponse { PorosityResult porosity_result = 13; MicrostructureResult microstructure_result = 14; ThermalHistoryResult thermal_history_result = 15; + ThermalStrainResult thermal_strain_result = 16; } } @@ -31,6 +33,7 @@ message SimulationRequest { PorosityInput porosity_input = 11; MicrostructureInput microstructure_input = 12; ThermalHistoryInput thermal_history_input = 13; + ThermalStrainInput thermal_strain_input = 14; } } @@ -63,3 +66,17 @@ message DownloadFileResponse { string content_md5 = 4; // md5 hash of content Progress progress = 10; // download progress } + +message MeshRequest { + string id = 1; + oneof Input { + VoxelMeshInput voxel_mesh_input = 10; + } +} + +message MeshResponse { + string id = 1; + oneof ResponseType { + VoxelMeshResult voxel_mesh_result = 10; + } +} \ No newline at end of file