matlab-solve-pde

Build and solve finite element models for thermal, structural, and electromagnetic problems in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-solve-pde
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-solve-pde
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/math-and-optimization/matlab-solve-pde
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-solve-pde

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Setting up finite element analysis with MATLAB PDE Toolbox involves many error-prone details: correct AnalysisType naming, BC versus load assignment, NaN conventions for time-dependent functions, and result field naming. This Skill guides AI agents through the complete femodel workflow so FEA code runs correctly on the first attempt.

Core Features & Use Cases

  • Geometry Creation: Build 3-D geometry from primitives (multicuboid, multicylinder, multisphere), boolean operations, STL/STEP import, or 2-D decsg with extrusion.
  • Model Setup and Solving: Configure femodel for all AnalysisTypes (thermal, structural, electromagnetic; steady, transient, modal, frequency) with materials, boundary conditions, loads, damping, and initial conditions.
  • Post-Processing: Extract von Mises stress, heat flux, reaction forces, and EM fields; interpolate results; visualize with pdeplot3D and pdeviz.
  • Use Case: Ask your agent to simulate heat transfer through a hollow pipe with convection on the outer surface, then reuse the same model for a thermal-stress structural analysis.

Quick Start

Use the matlab-solve-pde skill to build a finite element model of a steel bracket, apply a fixed constraint and tip load, solve for static displacement, and plot the von Mises stress.

Frequently Asked Questions about matlab-solve-pde

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a finite element thermal analysis in MATLAB?

Create geometry with fegeometry, build a model with femodel(AnalysisType="thermalSteady"), assign materialProperties, set temperatures with faceBC and convection with faceLoad, then call generateMesh and solve. Extract results via result.Temperature and evaluateHeatFlux.

What is the difference between faceBC and faceLoad in PDE Toolbox?

faceBC applies prescribed Dirichlet values like fixed Temperature or Constraint, while faceLoad applies Neumann conditions like Heat flux, ConvectionCoefficient, or Pressure. Applying convection on faceBC is a common error since convection is a load, not a boundary condition.

Which MATLAB release supports the femodel workflow for FEA?

The femodel workflow requires MATLAB R2025a or later with the Partial Differential Equation Toolbox installed. It replaces the legacy createpde workflow for thermal, structural, and electromagnetic analyses.

Why does my time-dependent load return zero in a transient PDE solve?

The solver probes load functions with NaN in state fields to detect time dependence. Functions with conditional logic must explicitly return NaN of the correct size when state.time is NaN, otherwise the solver treats the load as a constant.

Can I reuse one femodel for static, modal, and transient structural analysis?

Yes, change model.AnalysisType on the existing model instead of creating a second femodel. Geometry, materials, and mesh carry over, and modal results can feed a transient solve via solve(model, tlist, ModalResults=Rm).

When should I not use the femodel FEA workflow?

Avoid it for general-equation PDE problems, which use the legacy createpde(N) workflow, and for system-level simulation, which belongs in Simulink or Simscape. Structural analysis is also limited to linear elasticity with no plasticity.