diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a4ece..3bb521f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Unreleased + +## AeroCloud + +### Features + + - Add `boundary_layer_treatment` field to v7 simulations. + + # 1.0.0 - 2026-01-19 ### Features diff --git a/schemas/aerocloud.json b/schemas/aerocloud.json index acc7668..81cc264 100644 --- a/schemas/aerocloud.json +++ b/schemas/aerocloud.json @@ -62,6 +62,14 @@ "title": "BillingPlan", "type": "object" }, + "BoundaryLayerTreatment": { + "enum": [ + "wall_functions", + "resolved_boundary_layer" + ], + "title": "BoundaryLayerTreatment", + "type": "string" + }, "CreateModelV6Params": { "properties": { "files": { @@ -225,6 +233,9 @@ }, "CreateSimulationV7Params": { "properties": { + "boundary_layer_treatment": { + "$ref": "#/components/schemas/BoundaryLayerTreatment" + }, "fluid": { "$ref": "#/components/schemas/Fluid" }, @@ -279,13 +290,13 @@ "type": "number" }, "Date": { - "example": "2025-11-20", + "example": "2026-01-14", "format": "date", "title": "Date", "type": "string" }, "DateTime": { - "example": "2025-11-20T13:18:29.117286Z", + "example": "2026-01-17T12:56:22.936861Z", "format": "date-time", "title": "DateTime", "type": "string" @@ -332,13 +343,13 @@ "type": "number" }, "ID": { - "example": "019aba97-b529-755c-8778-9fd0868ff363", + "example": "019bd630-d147-7ad7-a6b7-44a6e6fc8d3c", "format": "uuid", "title": "ID", "type": "string" }, "IdempotencyKey": { - "example": "019aba97-b530-79e3-b47c-783d35c6721f", + "example": "019bd630-d148-7729-9565-a7edcc1bf645", "title": "IdempotencyKey", "type": "string" }, @@ -923,6 +934,9 @@ }, "SimulationParamsV7": { "properties": { + "boundary_layer_treatment": { + "$ref": "#/components/schemas/BoundaryLayerTreatment" + }, "fluid": { "$ref": "#/components/schemas/Fluid" }, @@ -1222,7 +1236,6 @@ "SimulationStatus": { "enum": [ "progress", - "quality_check", "success", "expired", "draft" diff --git a/src/aerocloud/extra_types.rs b/src/aerocloud/extra_types.rs index 083ceee..4686f89 100644 --- a/src/aerocloud/extra_types.rs +++ b/src/aerocloud/extra_types.rs @@ -1,6 +1,6 @@ use crate::aerocloud::types::{ - FileUnit, Fluid, FluidSpeed, GroundOffset, Quaternion, SimulationQuality, - UpdatePartV7Params, YawAngle, YawAngles, + BoundaryLayerTreatment, FileUnit, Fluid, FluidSpeed, GroundOffset, + Quaternion, SimulationQuality, UpdatePartV7Params, YawAngle, YawAngles, }; use color_eyre::eyre; use std::{borrow::Cow, collections::BTreeMap}; @@ -33,6 +33,9 @@ pub struct CreateSimulationV7ParamsFromJson { #[serde(default)] pub is_ground_moving: bool, + + #[serde(default)] + pub boundary_layer_treatment: Option, } impl CreateSimulationV7ParamsFromJson { diff --git a/src/commands/aerocloud/v6/list_simulations.rs b/src/commands/aerocloud/v6/list_simulations.rs index 2eca2a4..a9e1af8 100644 --- a/src/commands/aerocloud/v6/list_simulations.rs +++ b/src/commands/aerocloud/v6/list_simulations.rs @@ -94,7 +94,6 @@ fn print_human(project: &ProjectV6, items: &[SimulationV6]) { match sim.status { SimulationStatus::Progress => "🚧".into(), SimulationStatus::Success => "✅".into(), - SimulationStatus::QualityCheck => "🔍".into(), SimulationStatus::Expired => "♽".into(), SimulationStatus::Draft => "📝".into(), }, diff --git a/src/commands/aerocloud/v7/batch/simulation_detail.rs b/src/commands/aerocloud/v7/batch/simulation_detail.rs index bc3b553..e2a20bf 100644 --- a/src/commands/aerocloud/v7/batch/simulation_detail.rs +++ b/src/commands/aerocloud/v7/batch/simulation_detail.rs @@ -154,6 +154,15 @@ impl<'a> SimulationDetail<'a> { ), ])); } + + lines.push(Line::default()); + + if let Some(value) = sim.params.boundary_layer_treatment { + lines.push(Line::from(vec![ + Span::styled("Boundary layer treatment: ", STYLE_BOLD), + Span::styled(value.to_string(), STYLE_ACCENT), + ])); + } } fn files_lines(sim: &'a SimulationParams, lines: &mut Vec>) { diff --git a/src/commands/aerocloud/v7/batch/simulation_params.rs b/src/commands/aerocloud/v7/batch/simulation_params.rs index 374de6a..ffe3aa4 100644 --- a/src/commands/aerocloud/v7/batch/simulation_params.rs +++ b/src/commands/aerocloud/v7/batch/simulation_params.rs @@ -266,6 +266,7 @@ impl SimulationParams { project_id: Id, ) -> CreateSimulationV7Params { let CreateSimulationV7ParamsFromJson { + boundary_layer_treatment, fluid, fluid_speed, ground_offset, @@ -278,6 +279,7 @@ impl SimulationParams { } = self.params; CreateSimulationV7Params { + boundary_layer_treatment, fluid, fluid_speed, ground_offset, diff --git a/src/commands/aerocloud/v7/list_simulations.rs b/src/commands/aerocloud/v7/list_simulations.rs index 36aa3b4..f7c66f4 100644 --- a/src/commands/aerocloud/v7/list_simulations.rs +++ b/src/commands/aerocloud/v7/list_simulations.rs @@ -88,6 +88,7 @@ fn print_human(project: &ProjectV7, items: &[SimulationV7]) { "Yaw angle(s)", "Fluid & Speed", "Ground", + "Boundary layer treatment", "Created at", "", ]); @@ -98,7 +99,6 @@ fn print_human(project: &ProjectV7, items: &[SimulationV7]) { match sim.status { SimulationStatus::Progress => "🚧".into(), SimulationStatus::Success => "✅".into(), - SimulationStatus::QualityCheck => "🔍".into(), SimulationStatus::Expired => "♽".into(), SimulationStatus::Draft => "📝".into(), }, @@ -129,6 +129,14 @@ fn print_human(project: &ProjectV7, items: &[SimulationV7]) { } else { NOT_AVAILABLE.into() }, + format!( + "{}", + sim.params + .boundary_layer_treatment + .as_ref() + .map(ToString::to_string) + .unwrap_or_default(), + ), format!("{}", sim.created_at.with_timezone(&Local)), link(&sim.browser_url), ]);