{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cold-Started Alpha Sweep\n",
    "\n",
    "This notebook demonstrates how to perform an angle of attack (alpha) sweep using the Flow360 Python API. The process involves creating a project, defining simulation parameters, launching a series of cases with varying alpha values, and waiting for all of them to complete.\n",
    "\n",
    "**Note:** The settings in this example are by no means a validation setup; they are crafted to showcase the capabilities of Flow360 and we have intentionally reduced node count and example FC cost. For rigorous validation, modify the settings as needed."
   ],
   "id": "a94961e7"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Setup and Imports\n",
    "\n",
    "The following cell imports the necessary libraries and modules. `flow360` is the main package for interacting with the Flow360 platform, and `EVTOL` provides the example geometry used in this notebook.\n"
   ],
   "id": "a1ceab36"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "import flow360 as fl\n",
    "from flow360.examples import EVTOL"
   ],
   "execution_count": 1,
   "outputs": [],
   "id": "8963fd17"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Project Creation\n",
    "\n",
    "A Flow360 `Project` is a container for simulations and their associated assets, such as geometries and meshes. A project can be initiated either from an existing volume mesh or from a CAD geometry file. When starting from a geometry, meshing parameters must be defined to instruct the platform on how to generate the volume mesh.\n"
   ],
   "id": "9a939d59"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "EVTOL.get_files()\n",
    "\n",
    "project = fl.Project.from_geometry(EVTOL.geometry, name=\"Cold-Started Alpha Sweep\")\n",
    "\n",
    "geometry = project.geometry\n",
    "geometry.group_faces_by_tag(\"faceName\")"
   ],
   "execution_count": 2,
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:04:13] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Geometry successfully submitted:                                                                  \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Geometry                                                                               \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = sweep_evtol_from_geometry                                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = geo-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">b66e23df-1030-4070-89e7-3d2e9b86e46d</span>                                               \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = uploaded                                                                               \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:04:13]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Geometry successfully submitted:                                                                  \n",
       "\u001b[2;36m           \u001b[0m        type   = Geometry                                                                               \n",
       "\u001b[2;36m           \u001b[0m        name   = sweep_evtol_from_geometry                                                              \n",
       "\u001b[2;36m           \u001b[0m        id     = geo-\u001b[93mb66e23df-1030-4070-89e7-3d2e9b86e46d\u001b[0m                                               \n",
       "\u001b[2;36m           \u001b[0m        status = uploaded                                                                               \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Waiting for geometry to be processed.                                                             \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m          \u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Waiting for geometry to be processed.                                                             \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:06:07] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Regrouping face entities under `faceName` tag <span style=\"font-weight: bold\">(</span>previous `_color`<span style=\"font-weight: bold\">)</span>.                                \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:06:07]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Regrouping face entities under `faceName` tag \u001b[1m(\u001b[0mprevious `_color`\u001b[1m)\u001b[0m.                                \n"
      ]
     },
     "metadata": {}
    }
   ],
   "id": "15b1576a"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. Meshing parameters\n",
    "\n",
    "We define some simple meshing parameters to achieve appropriate resolution for this example. The use of `AngleBasedRefinement` will allow us to better model the flow at the leading edge."
   ],
   "id": "771faa53"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "with fl.SI_unit_system:\n",
    "    meshing_params = fl.MeshingParams(\n",
    "        defaults=fl.MeshingDefaults(\n",
    "            boundary_layer_first_layer_thickness=1e-5, surface_max_edge_length=1\n",
    "        ),\n",
    "        volume_zones=[fl.AutomatedFarfield()],\n",
    "        refinements=[\n",
    "            fl.SurfaceEdgeRefinement(\n",
    "                name=\"leading_edges\",\n",
    "                edges=[geometry[\"leadingEdge\"]],\n",
    "                method=fl.AngleBasedRefinement(value=2 * fl.u.deg),\n",
    "            )\n",
    "        ],\n",
    "    )"
   ],
   "execution_count": 3,
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m          \u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    }
   ],
   "id": "3442bfbf"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4. Boundary Conditions\n",
    "\n",
    "Boundary conditions define the physical behavior at the boundaries of the computational domain. We need to apply appropriate `Wall` and `Freestream` conditions to different surfaces of the geometry.\n",
    "\n",
    "Surface selection can be done using exact names or with wildcards, for example:\n",
    "- geometry[\"*\"] will select all geometry boundaries\n",
    "- geometry[\"*pylon\"] will select all geometry boundaries that end with `pylon`"
   ],
   "id": "09e801b5"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "models = [\n",
    "    fl.Wall(surfaces=[geometry[\"*\"]]),\n",
    "    fl.Freestream(surfaces=fl.AutomatedFarfield().farfield),\n",
    "]"
   ],
   "execution_count": 4,
   "outputs": [],
   "id": "f291cb44"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5. Simulation Parameters\n",
    "\n",
    "The `SimulationParams` object encapsulates all settings for a simulation run. This includes meshing parameters, reference geometry, operating conditions, time-stepping scheme, physical models, and output specifications."
   ],
   "id": "37c99350"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "with fl.SI_unit_system:\n",
    "    params = fl.SimulationParams(\n",
    "        meshing=meshing_params,\n",
    "        reference_geometry=fl.ReferenceGeometry(moment_center=(0, 0, 0), moment_length=1, area=1),\n",
    "        operating_condition=fl.AerospaceCondition(velocity_magnitude=100, alpha=0 * fl.u.deg),\n",
    "        time_stepping=fl.Steady(max_steps=5000, CFL=fl.AdaptiveCFL()),\n",
    "        models=[\n",
    "            *models,\n",
    "            fl.Fluid(\n",
    "                navier_stokes_solver=fl.NavierStokesSolver(),\n",
    "                turbulence_model_solver=fl.SpalartAllmaras(),\n",
    "            ),\n",
    "        ],\n",
    "        outputs=[\n",
    "            fl.VolumeOutput(\n",
    "                output_format=[\"tecplot\"],\n",
    "                output_fields=[\n",
    "                    \"Mach\",\n",
    "                    \"Cp\",\n",
    "                    \"mut\",\n",
    "                    \"mutRatio\",\n",
    "                    \"primitiveVars\",\n",
    "                    \"qcriterion\",\n",
    "                ],\n",
    "            ),\n",
    "            fl.SurfaceOutput(\n",
    "                surfaces=[\n",
    "                    geometry[\"fuselage\"],\n",
    "                    geometry[\"*pylon\"],\n",
    "                    geometry[\"*wing\"],\n",
    "                    geometry[\"*tail\"],\n",
    "                ],\n",
    "                output_fields=[\n",
    "                    \"Cp\",\n",
    "                    \"yPlus\",\n",
    "                    \"Cf\",\n",
    "                    \"CfVec\",\n",
    "                    \"primitiveVars\",\n",
    "                    \"wallDistance\",\n",
    "                ],\n",
    "                output_format=[\"tecplot\"],\n",
    "            ),\n",
    "        ],\n",
    "    )"
   ],
   "execution_count": 5,
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m          \u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    }
   ],
   "id": "dbddb634"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6. Executing an Alpha Sweep\n",
    "\n",
    "A sweep is performed by iterating through a list of alpha values. In each iteration, the `operating_condition` in `SimulationParams` is updated with a new alpha, and new `Case` is run using `project.run_case()`. The returned `Case` objects are collected in a list. The cases will be running in parallel on the cloud. We then wait for all cases to complete before proceeding.\n",
    "\n",
    "To not recreate the entire `SimulationParams` every time, we can modify existing one's alpha angle by doing `params.operating_condition.alpha = alpha_angle`.\n"
   ],
   "id": "068fa8cb"
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "case_list = []\n",
    "\n",
    "alphas = [-10, -5, 0, 5, 10, 12, 14] * fl.u.deg\n",
    "\n",
    "for alpha_angle in alphas:\n",
    "    params.operating_condition.alpha = alpha_angle\n",
    "\n",
    "    case = project.run_case(params=params, name=f\"alpha_{alpha_angle.value}_case\")\n",
    "\n",
    "    print(f\"The case ID is: {case.id} with {alpha_angle=} \")\n",
    "    case_list.append(case)\n",
    "\n",
    "print(\"Waiting for cases to complete...\")\n",
    "for case in case_list:\n",
    "    case.wait()\n",
    "print(\"All cases completed.\")"
   ],
   "execution_count": 6,
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:25] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:25]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:29] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_-10_case                                                                         \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">420f149b-69b1-41f1-a8b5-20ee88f153d2</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:29]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_-10_case                                                                         \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93m420f149b-69b1-41f1-a8b5-20ee88f153d2\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-420f149b-69b1-41f1-a8b5-20ee88f153d2 with alpha_angle=unyt_quantity(-10, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m          \u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:31] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_-5_case                                                                          \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">d9f7acb8-7c1a-44b1-8672-b0bbef43859a</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:31]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_-5_case                                                                          \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93md9f7acb8-7c1a-44b1-8672-b0bbef43859a\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-d9f7acb8-7c1a-44b1-8672-b0bbef43859a with alpha_angle=unyt_quantity(-5, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:32] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:32]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:34] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_0_case                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">3cc6f5d3-d7fe-4b9e-a639-0560111ca309</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:34]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_0_case                                                                           \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93m3cc6f5d3-d7fe-4b9e-a639-0560111ca309\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-3cc6f5d3-d7fe-4b9e-a639-0560111ca309 with alpha_angle=unyt_quantity(0, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:35] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:35]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:37] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_5_case                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">aac5be66-37ae-452d-ac30-0f7f69d301f5</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:37]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_5_case                                                                           \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93maac5be66-37ae-452d-ac30-0f7f69d301f5\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-aac5be66-37ae-452d-ac30-0f7f69d301f5 with alpha_angle=unyt_quantity(5, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:38] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:38]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:40] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_10_case                                                                          \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">dca4c09b-fce6-4e7e-a653-106efec6512d</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:40]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_10_case                                                                          \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93mdca4c09b-fce6-4e7e-a653-106efec6512d\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-dca4c09b-fce6-4e7e-a653-106efec6512d with alpha_angle=unyt_quantity(10, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:41] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:41]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:43] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_12_case                                                                          \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">e55b6e47-3a45-42f8-854c-0b0d629c250a</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:43]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_12_case                                                                          \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93me55b6e47-3a45-42f8-854c-0b0d629c250a\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-e55b6e47-3a45-42f8-854c-0b0d629c250a with alpha_angle=unyt_quantity(12, 'degree') \n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: using: SI unit system for unit inference.                                                         \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m          \u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: using: SI unit system for unit inference.                                                         \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[12:26:46] </span><span style=\"color: #008080; text-decoration-color: #008080\">INFO</span>: Successfully submitted:                                                                           \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        type   = Case                                                                                   \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        name   = alpha_14_case                                                                          \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        id     = case-<span style=\"color: #ffff00; text-decoration-color: #ffff00\">fa4f47df-9363-4e34-ac66-178c41a0c30b</span>                                              \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>        status = pending                                                                                \n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">           </span>                                                                                                        \n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[12:26:46]\u001b[0m\u001b[2;36m \u001b[0m\u001b[36mINFO\u001b[0m: Successfully submitted:                                                                           \n",
       "\u001b[2;36m           \u001b[0m        type   = Case                                                                                   \n",
       "\u001b[2;36m           \u001b[0m        name   = alpha_14_case                                                                          \n",
       "\u001b[2;36m           \u001b[0m        id     = case-\u001b[93mfa4f47df-9363-4e34-ac66-178c41a0c30b\u001b[0m                                              \n",
       "\u001b[2;36m           \u001b[0m        status = pending                                                                                \n",
       "\u001b[2;36m           \u001b[0m                                                                                                        \n"
      ]
     },
     "metadata": {}
    },
    {
     "output_type": "stream",
     "text": [
      "The case ID is: case-fa4f47df-9363-4e34-ac66-178c41a0c30b with alpha_angle=unyt_quantity(14, 'degree') \n",
      "Waiting for cases to complete...\n"
     ],
     "name": "stdout"
    },
    {
     "output_type": "stream",
     "text": [
      "All cases completed.\n"
     ],
     "name": "stdout"
    }
   ],
   "id": "d545556e"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "flow360-m20sMBMn-py3.11",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
