Add agent skill for generating nekRS case files from physics descriptions#699
Draft
mahdikooshkbaghi wants to merge 2 commits into
Draft
Add agent skill for generating nekRS case files from physics descriptions#699mahdikooshkbaghi wants to merge 2 commits into
mahdikooshkbaghi wants to merge 2 commits into
Conversation
Provides an agent skill that generates .udf, .par, and .oudf files from user physics descriptions (Reynolds number, boundary conditions, turbulence models, etc.). Includes reference material for par file options, UDF callback patterns, and boundary condition signatures.
- Fix include paths to match existing examples (short form) - Use kernelInfo.define() for constant BCs instead of usrwrk - Add RANS patterns: minimal, inlet turbulence, with temperature - Use fieldOffsetSum for velocity IC vectors - Add gotchas: stopAt, userSections, CFL defaults, no dead code - Update minimal .par template with CASEDATA section
Author
Skill DemoHere is a demo in case this PR for skills is merged to main. In this demo we:
Here are the files that generated for the following prompt:
Notes:
udf-generator-skill.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Agent Skill that generates nekRS simulation case files (
.par,.udf,.oudf) from natural language physics descriptions. Users describe their simulation setup (Reynolds number, boundary conditions, turbulence model, fluid properties, etc.) and the skill produces ready-to-run case files following established codebase patterns.This is a first version of this skill and it can improve based on feedbacks and edge cases.
What's included
Supported physics categories
How it works
.par,.udf, and.oudffiles underexamples/<caseName>/All generated code follows patterns from existing examples (
periodicHill,ethier,turbPipePeriodic, etc.) and respects project conventions (include paths, IC sizing, compile-time constants viakernelInfo.define()).