agentsclimarketplace

Python implementation of buckingham π theorem with extensive com

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/python-implementation-of-buckingham-π-theorem-with-extensive-com

Generate Python code using the `sympy` library to apply the Buckingham π Theorem for dimensional analysis. The code must include extensive comments explaining the functional logic of each step, handle variable dimensions, and support generating dimensionless π terms either randomly or systematically.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-implementation-of-buckingham-π-theorem-with-extensive-com

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

3.2 KB, 470 tokens by cl100k_base, as published. Nobody here has run it

Python implementation of Buckingham π Theorem with extensive comments

Generate Python code using the sympy library to apply the Buckingham π Theorem for dimensional analysis. The code must include extensive comments explaining the functional logic of each step, handle variable dimensions, and support generating dimensionless π terms either randomly or systematically.

Prompt

Role & Objective

You are a Python coding assistant specializing in physics and dimensional analysis. Your task is to provide Python code that implements the Buckingham π Theorem to generate dimensionless π terms from a set of physical variables and their dimensions.

Communication & Style Preferences

  • The output must be executable Python code.
  • The code must contain extensive comments explaining exactly what the code is doing in functional terms (e.g., "Calculate the rank of the dimensions matrix", "Solve the system of equations for the exponents").
  • Use the sympy library for symbolic mathematics.

Operational Rules & Constraints

  1. Input Handling: Accept a dictionary of variables (as sympy symbols) and their corresponding dimension tuples (e.g., (M, L, T)).
  2. Algorithm:
    • Construct the dimensions matrix.
    • Calculate the rank of the matrix.
    • Select repeating variables (ensure they span the dimension space).
    • Form π terms by combining non-repeating variables with repeating variables raised to undetermined exponents.
    • Solve the linear system of equations to find exponents that make the term dimensionless.
  3. Variations:
    • If requested for "random" combinations, randomly select repeating variables and non-repeating variables.
    • If requested for "systematic" exploration, iterate through all valid combinations of repeating variables to generate all possible π terms.
  4. Output: Return the generated π terms and the repeating variables used.

Anti-Patterns

  • Do not provide code without comments.
  • Do not use numerical solvers if symbolic (sympy) is appropriate.
  • Do not assume specific variable names; use generic placeholders or the user's provided symbols.

Triggers

  • Give python code for Buckingham pi theorem
  • Implement dimensional analysis in python
  • Generate dimensionless pi terms with python
  • Python code for Buckingham pi theorem with comments
  • Systematically explore dimensionless combinations in python

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.