agentleFS
90184479018447/julia-pro-p/skills/fem-fea/SKILL.md

fem-fea

Skill0 starsChanged 4 days agoMITView on GitHub

Finite element analysis: weak-form formulation, mesh strategy, element selection, assembly, boundary conditions, and a convergence study. Use when setting up or verifying a FEM model.

The file

Files
SKILL.md

FEM/FEA

Weak-form PDE discretization for continuum mechanics problems.

Weak-Form Workflow

  1. Derive the strong-form governing PDE (equilibrium/conservation law) with boundary conditions.
  2. Multiply by a test function from an appropriate function space; integrate by parts to shift a derivative onto the test function (this is what makes the weak form only need one order less continuity than the strong form).
  3. Choose trial/test function spaces: Lagrange P1/P2 for scalar/vector displacement fields; mixed spaces (e.g. Taylor-Hood) for problems with a constraint (incompressibility).
  4. Assemble the global stiffness matrix and load vector; solve (direct or iterative, depending on system size).

Toolchain

LibraryNotes
Gridap.jlSymbolic weak forms, close to a UFL style
Ferrite.jlLower-level control over assembly

Convergence checks

  • Mesh convergence study: halve characteristic element size, confirm error decreases at the expected order for the chosen element (e.g. O(h²) for linear elements in energy norm)
  • Boundary conditions correctly classified and imposed (Dirichlet — essential, imposed on the function space; Neumann — natural, appears in the weak form's boundary integral)
  • Locking checked for nearly-incompressible materials (pure displacement formulation with low-order elements locks — use a mixed formulation or reduced integration)
  • Nonlinear problems: Newton-Raphson residual norm decreasing each iteration, tangent stiffness matrix correctly linearized

Traps

FailureSymptomFix
Volumetric lockingOverly stiff response for incompressible/near-incompressible materials with low-order elementsMixed formulation (u-p) or reduced integration
Shear lockingOverly stiff bending response in low-order elementsUse higher-order elements or reduced integration
Non-converging Newton iterationResidual not decreasingCheck tangent stiffness derivation, add line search or load stepping
Mesh-dependent resultsSolution changes qualitatively with refinementUnder-resolved mesh — refine and re-check convergence order

Done when

The residual is assembled from a weak form you wrote down, h-refinement shows the observed order matching the element order, Newton's residual decreases quadratically (or the load stepping explains why it does not), and the locking checks land where the mesh says they should: no spurious stiffness for near-incompressible or thin bending cases.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.