Edit me

Here we demonstrate how to use the AI agent for wing aerodynamic design on an HPC system. Please follow the instructions in Overview–>HPC Installation to set up the DAFoam MCP server and Claude Code. Once done, cd into the dafoam_mcp_server and run claude to open the Claude Code interface on the HPC. To exit the claude code interface, you can press ctr+c twice. To interrupt Claude’s response, press esc.

Wing geometry and mesh generation.

  • Geometry generation. To generate the CAD wing geometry mesh, you can ask Claude: “Generate a wing with the NACA0012 at the root and NACA4412 at the tip. The span is 3 m. The root chord is 1 m, and the tip chord is 0.7 m. The root has a twist of 2 degs.”. When asked you need to click “Yes” to allow Claude code to execute the MCP functions. You can also click “Yes, and don’t ask again”. Once Claude generates the mesh, you can click the provided links to view the pngs or the html of the wing geometry. You may see a pop-up window on the bottom right saying “Your application running on port 8002 is available”. You can click “Preview in Editor” to enable interactive visualization of the iges wing geometry in Trame. Or you can manually click “Interactive 3D View” link to open a web browser to view the geometry. In Trame, you can zoom, rotate, pan the view to visualize more details of the wing geometry.

  • Mesh generation. To generate the wing mesh, you can ask Claude: “Generate a mesh for the wing”. Once Claude generates the mesh, you can click the provided link to view the mesh in your browser. To adjust the mesh density, you can change the mesh refinement level, number of boundary layer mesh, and far field mesh size. You can also ask Claude to “View the wing mesh” to visualize the mesh at anytime.

Wing aerodynamic analysis.

  • Run CFD simulations. You can ask Claude: “Submit a job on the HPC to run a CFD simulation with Ma=0.5, Re=1e6, and aoa=1.5 deg. Use 36 cores.”. Claude will submit a job on the HPC using the sbatch myJob.sh command. NOTE: the dafoam_mcp_server provides a template for myJob.sh and you MUST have modified it according to your HPC setup.

  • Ask CFD run status. You can say “Check run status” to see if the CFD finishes.

  • Monitor convergence. If the CFD is running on the HPC, you can ask “View the CFD convergence” and click the provided link to visualize the residual and function convergence history. If the CFD finishes, you can ask Claude to plot the pressure profile or pressure contour on the wing.