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.
In this repository55 other files it gives its agents.
- advanced-optimizationSkill
- bayesian-inferenceSkill
- bayesian-pinnSkill
- bayesian-ude-workflowSkill
- catalyst-reactionsSkill
- continuum-mechanics-and-rheologySkill
- control-theorySkill
- creating-julia-appSkill
- debugging-toolkitSkill
- differential-equationsSkill
- differentiationSkill
- equation-discoverySkill
- experiment-trackingSkill
- julia-graph-neural-networksSkill
- julia-languageSkill
- julia-ml-and-dlSkill
- julia-model-deploymentSkill
- julia-paper-implementationSkill
- julia-pro-helpSkill
- julia-pro-modeSkill
- julia-reinforcement-learningSkill
- modeling-toolkitSkill
- neural-pdeSkill
- nonlinear-dynamicsSkill
- numerical-methods-implementationSkill
- package-development-workflowSkill
- performance-tuningSkill
- physical-learning-systemsSkill
- playbook-debugSkill
- playbook-model-validateSkill
- playbook-package-releaseSkill
- playbook-paper-implementSkill
- playbook-perfSkill
- playbook-test-specSkill
- principle-both-sidesSkill
- principle-breakingSkill
- principle-file-is-truthSkill
- principle-gateSkill
- principle-limitsSkill
- principle-loud-failureSkill
- principle-one-stepSkill
- principle-proof-listSkill
- principle-rebuttalSkill
- principle-runtime-surfaceSkill
- principle-three-boundsSkill
- principle-three-clocksSkill
- scientific-visualizationSkill
- sciml-and-diffeqSkill
- setup-julia-proSkill
- signal-processingSkill
- simulation-and-hpcSkill
- statistical-physicsSkill
- symbolic-mathSkill
- web-development-juliaSkill
- zarr-cloud-arraysSkill
The file
Files
FEM/FEA
Weak-form PDE discretization for continuum mechanics problems.
Weak-Form Workflow
- Derive the strong-form governing PDE (equilibrium/conservation law) with boundary conditions.
- 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).
- 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).
- Assemble the global stiffness matrix and load vector; solve (direct or iterative, depending on system size).
Toolchain
| Library | Notes |
| Gridap.jl | Symbolic weak forms, close to a UFL style |
| Ferrite.jl | Lower-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
| Failure | Symptom | Fix |
| Volumetric locking | Overly stiff response for incompressible/near-incompressible materials with low-order elements | Mixed formulation (u-p) or reduced integration |
| Shear locking | Overly stiff bending response in low-order elements | Use higher-order elements or reduced integration |
| Non-converging Newton iteration | Residual not decreasing | Check tangent stiffness derivation, add line search or load stepping |
| Mesh-dependent results | Solution changes qualitatively with refinement | Under-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.
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
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.

