# COMSOL Battery Expert

> Autonomous battery modeling engineer for COMSOL 6.4: picks the right fidelity (ECM, SPM, SPMe, Newman/P2D), computes capacity and OCV checks, delivers Java Shell scripts.

COMSOL Battery Expert is a paid AI agent skill on Agensi by RVLM, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $30 (one-time purchase)
- Creator: [RVLM](https://www.agensi.io/creators/maximiliano-rios-vargas)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/comsol-battery-expert
- Tags: api, prompt-engineering, automation, comsol, battery-design, electrochemistry, simulation, java

## About this skill

Simulating battery performance in COMSOL Multiphysics requires deep domain expertise in electrochemistry and Java API scripting. Manual setup often leads to convergence failures, physical inconsistencies like negative electrolyte concentrations, or misaligned stoichiometry windows that shift voltage curves. This skill acts as a specialized simulation engineer to automate the design and scripting of high-fidelity battery models.

### What it does
- **Automates fidelity selection** choosing between Equivalent Circuit, SPM, SPMe, or P2D models based on your specific research goals.
- **Validates electrochemical physics** by calculating theoretical capacity, stoichiometric windows, and diffusion times before generating code.
- **Generates Java Shell scripts** providing complete, self-contained code ready to paste into the COMSOL Desktop Java Shell.
- **Configures physics couplings** including thermal effects (ohmic, kinetics, and entropic heat) and degradation mechanisms.
- **Standardizes model setup** with properly defined parameters for porosities, particle radii, and OCP function definitions.

### How it works
1. **Define the problem** by describing your battery chemistry, desired fidelity, and the specific behavior you need to analyze.
2. **Review the engineering report** to confirm the calculated validation numbers, stoichiometry mapping, and chosen assumptions.
3. **Execute the script** by copying the generated Java code into your COMSOL Java Shell to build the model geometry, physics, and study nodes.
4. **Iterate and refine** by requesting specific physics additions or parameter sweeps, receiving a full updated script for each change.

### Frameworks & tools
Specifically designed for COMSOL Multiphysics 6.4 with the Battery Design Module. Scripts are delivered in Java for the COMSOL Java Shell environment.

### Why this beats prompting it yourself
Generic AI often generates broken COMSOL API calls or ignores critical electrochemical constraints like electrode balancing. This skill enforces a strict validation chain, ensuring OCP curves and stoichiometry windows are physically consistent before the first mesh element is even created.

### Use cases
- **Rate capability studies** to determine voltage sag and internal resistance under high C-rates.
- **Thermal management design** to calculate reversible and irreversible heat generation during discharge.
- **Electrode optimization** to test how changes in porosity or thickness impact energy density.
- **BMS development** by generating equivalent circuit models for long time-series system simulations.

### Known limitations
Requires a valid COMSOL Battery Design Module license to run the generated scripts. Users must manually verify specific node names against official documentation for niche features.

## Requires

- Java

Scripts are paste-and-run in the COMSOL Desktop Java Shell. OCP curves and diffusion coefficients are labeled with their source or marked ASSUMED - replace them with your cell's measured data for quantitative accuracy.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the COMSOL Battery Expert skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Which version of COMSOL is this skill compatible with?

The skill is specifically optimized for COMSOL Multiphysics 6.4 and uses the Java API to ensure compatibility with the Java Shell, which is often more stable than the COM interface for complex battery physics.

### Does this purchase include a COMSOL license or the software itself?

No, this skill is designed to automate the technical scripting and electrochemical validation process; you must have an active COMSOL license with the Battery Design Module to execute the generated code.

### How does this handle electrochemical validation differently than a standard LLM?

Unlike generic models, this skill performs an 'Engineering Report' phase to validate stoichiometry and electrode balancing before writing code, preventing common physical errors like negative concentrations or non-converging meshes.

### Can I generate both simple equivalent circuit models and complex P2D models?

The skill supports a range of fidelity levels including Equivalent Circuit Models (ECM), Single Particle Models (SPM/SPMe), and full pseudo-two-dimensional (P2D) physics for high-accuracy research.

### What exactly do I get when the agent finishes its task?

You will receive a complete, self-contained Java script that can be pasted directly into the COMSOL Desktop Java Shell to automatically build the geometry, physics interfaces, and study nodes.

### Does the skill support thermal analysis and heat generation parameters?

Yes, the skill is capable of configuring multi-physics couplings, including heat source definitions for ohmic, kinetic, and entropic heat generation to support thermal management studies.

### Which model fidelity will it choose?

It states and justifies the choice (ECM, SPM, SPMe, full Newman/P2D) based on your C-rate and question, and builds the base model first, adding thermal/degradation couplings one at a time.

### Do I need the Battery Design Module?

Yes, for the battery physics interfaces; the skill never claims a feature is available without stating its license requirement.

### Where do the OCP curves come from?

Literature data tables with the source named in the script; if none is available it says so explicitly and uses a labeled approximation rather than inventing data.

### Will the capacity match my cell?

The theoretical capacity comes from stoichiometry (computed in front of you); the practical capacity depends on your electrode loadings and balancing — replace the ASSUMED parameters with your data.

### What if the discharge curve is wrong?

Paste the curve or log back. The validation chain (OCV vs OCP, capacity vs stoichiometry, sag vs resistance, knee time) isolates which parameter or formulation is off, one fix per iteration.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
