CO2 Geothermal Physics Model

VerifiedCaution

Validates code and provides physics reasoning for the 0-D CO2 lumped-parameter model in geothermal reservoirs. Use when modifying ODE solvers, parameter classes, emissions calculations, or concentration dynamics. Also helpful for debugging simulations, explaining physics concepts, or planning changes to physics-related code.

Sby Skills Guide Bot
DevelopmentAdvanced
6/2/2026
Claude Code
#co2-lumped-parameter-model#geothermal-reservoir#physics-validation#ode-simulation#emissions-modeling

Recommended for

Automated summary

This skill provides physics knowledge and validation workflows for the 0-D CO2 lumped-parameter model used in geothermal reservoir simulation, ensuring correct implementation of ODE solvers, mass balance, and emissions calculations.

Strengths

  • Provides structured workflows for verifying physical consistency in code changes.
  • Includes detailed equation references, dimensional analysis, and sanity checks.
  • Helps debug simulation issues by tracing through analytical solutions.
  • Covers edge cases like pressure reversal and delay effects.

Limitations

  • Specific to the co2lpm package and may not generalize to other reservoir models.
  • Relies on external documentation files (EQUATIONS.md, etc.) that must be maintained.
  • Does not automatically detect errors; requires manual application of validation steps.
When to use it

Use this skill when modifying or debugging physics code in the co2lpm package to ensure changes preserve physical consistency and mass balance.

When not to use it

Do not use this skill for general CO2 modeling outside the 0-D lumped-parameter context, or when the code changes are purely cosmetic and do not affect physics.

Security analysis

Caution
Quality score95/100

The skill lists Bash as an allowed tool, which introduces the capability to run shell commands. While the skill itself does not contain destructive instructions and is intended for scientific computing, the Bash tool could potentially be misused. However, no malicious or obfuscated actions are instructed.

Findings
  • •Allows Bash tool, which could execute arbitrary shell commands, though the skill's purpose is legitimate physics simulation and code validation.
How this analysis is made

Examples

Validate dimensional consistency
Check the dimensional consistency of the concentration ODE (equation E2-E4) in the co2lpm model. Ensure all terms have correct units and coefficients alpha, beta, gamma, delta have appropriate rate units.
Debug pressure reversal
I'm seeing unexpected pressure reversal behavior in the reservoir simulation. Using the co2lpm physics knowledge, trace through the analytical solution to explain why pressure increases when effective upflow rate exceeds the initial characteristic rate (q_eff > q_0c).
Verify mass balance in emissions code
Verify that the emissions partitioning code correctly conserves CO2 mass. Check that the sum of degassed, field, and plant emissions equals the total CO2 mass leaving the reservoir over a time step.

name: co2lpm description: Validates code and provides physics reasoning for the 0-D CO2 lumped-parameter model for geothermal reservoirs. Use when modifying ODE solvers, parameter classes, emissions calculations, or concentration dynamics. Also use when debugging simulation behavior, explaining physics concepts, or planning changes to physics-related code. allowed-tools: Read, Grep, Glob, Bash

CO2 Lumped Parameter Model Physics Knowledge

This skill provides physics knowledge for the 0-D CO2 lumped-parameter model implemented in the co2lpm package.

When This Skill Applies

  • Modifying code that implements concentration evolution equations
  • Changing ODE solver logic or state variable handling
  • Implementing or modifying emissions partitioning (field, plant, degassing)
  • Debugging unexpected simulation behavior
  • Planning changes to physics-related code
  • Explaining why the model behaves a certain way
  • Working with pressure reversal scenarios

Core Physics Reference

The model tracks reservoir CO2 concentration over time during geothermal extraction. Key state variables:

| Variable | Symbol | Meaning | Units | |----------|--------|---------|-------| | Pressure | P(t) | Reservoir pressure (relative to hydrostatic) | Pa | | Concentration | C(t) | CO2 mass fraction in reservoir fluid | kg/kg | | Upflow rate | q_up | Mass rate into reservoir from depth | kg/s | | Outflow rate | q_out | Mass rate leaving reservoir to surface | kg/s |

For detailed equations, see EQUATIONS.md. For symbol definitions and units, see SYMBOLS.md. For derivation logic, see DERIVATIONS.md. For edge cases and sanity checks, see SANITY_CHECKS.md.


Workflow A: Physics Validation

Use this workflow when reviewing or planning code changes.

Step 1: Identify affected equations

Determine which equations from EQUATIONS.md are affected by the change:

  • Pressure evolution: E1 (exponential pressure decline)
  • Concentration ODE: E2-E4 (with and without delay)
  • Emissions: E5-E8 (degassing, field, plant, total)
  • Solubility: E9-E10

Step 2: Check dimensional consistency

Using SYMBOLS.md, verify that:

  • All terms in an equation have matching units
  • ODE coefficients (alpha, beta, gamma, delta) have correct units
  • Source terms have correct rate units (kg/s for mass)

Step 3: Verify mass balance

Changes must preserve:

  • CO2 mass conservation in the reservoir
  • Correct partitioning between dissolved, degassed, and emitted CO2

Step 4: Check sanity conditions

Verify the change doesn't violate sanity checks S1-S5 in SANITY_CHECKS.md.

Step 5: Report findings

Summarize:

  • Which equations are affected
  • Any dimensional inconsistencies found
  • Any mass balance violations
  • Any sanity check concerns
  • Recommendations for correction

Workflow B: Physics Reasoning

Use this workflow when explaining behavior, debugging, or proposing solutions.

For explaining physics concepts:

  1. Identify the relevant equations and parameters
  2. State the physical interpretation
  3. Explain cause-and-effect relationships between variables
  4. Use the derivation steps from DERIVATIONS.md to show how equations connect

For debugging simulation issues:

  1. Identify which state variables are behaving unexpectedly
  2. Check if the issue relates to:
    • Pressure reversal (q_eff > q_0c)
    • Delay effects (tau > 0)
    • Solubility limiting (degas=True)
    • ODE coefficient calculation
  3. Trace through the analytical solution (gamma_exact or Cf_dde)
  4. Check edge cases against SANITY_CHECKS.md

For proposing physics-consistent changes:

  1. Identify which equations are affected
  2. Show how new terms integrate into the ODE system
  3. Demonstrate that mass balance remains satisfied
  4. Identify any new sanity checks needed

Quick Reference: Module Structure

| Module | Purpose | Key Functions/Classes | |--------|---------|----------------------| | model.py | Core LPM class | LumpedParameterModel, StateArrays | | parameters.py | Dataclasses for inputs | ReservoirParams, OperationParams, ChemistryParams | | solvers.py | ODE/DDE solvers | pressure_exp, integrate_ode, dde_solve | | postproc.py | Emissions calculation | emissions() | | utils.py | CO2 solubility | solubility_linear, solubility_slope_vs_T | | scenarios.py | Preset configurations | high_gas(), low_gas(), delay_demo() |


Key Physical Constraints

These must always hold:

  1. Concentration non-negative: C(t) >= 0
  2. Solubility limit: C(t) <= C_s(P) when degas=True
  3. Pressure reversal: Occurs when q_eff > q_0c (extraction exceeds critical rate)
  4. Steady state exists: C_inf = alpha/beta (no delay) or alpha/(beta-gamma) (with delay)
  5. Delay stability: For tau > 0, the characteristic root lambda_1 must have negative real part

Scenario Classification

| Scenario | Key Parameters | Behavior | |----------|---------------|----------| | High-gas (Ohaaki-like) | degas=True, high C0 | Solubility-limited, significant degassing | | Low-gas (Wairakei-like) | degas=False, low C0 | No degassing, concentration dilutes | | Concentrating | fC < critical | CO2 accumulates in reservoir | | Diluting | fC > critical | CO2 decreases in reservoir | | Reversal | fq*q0 > q0c | Outflow reverses direction | | Delay | tau > 0 | Breakthrough lag, DDE dynamics |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/co2-geothermal-physics-model-mm5t8b71' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/co2-geothermal-physics-model-mm5t8b71/download' --output '.skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md.part' && mv '.skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md.part' '.skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash

Original excerpt: Quick Reference: Module Structure
ModulePurposeKey Functions/Classes
model.pyCore LPM classLumpedParameterModel, StateArrays
parameters.pyDataclasses for inputsReservoirParams, OperationParams, ChemistryParams
solvers.pyODE/DDE solverspressure_exp, integrate_ode, dde_solve
postproc.pyEmissions calculationemissions()
utils.pyCO2 solubilitysolubility_linear, solubility_slope_vs_T
scenarios.pyPreset configurationshigh_gas(), low_gas(), delay_demo()

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md' && test -s '.skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/co2lpm' && cp -R '.skill-downloads/co2-geothermal-physics-model-mm5t8b71' '.claude/skills/co2lpm'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/co2-geothermal-physics-model-mm5t8b71'

openskills read 'co2-geothermal-physics-model-mm5t8b71'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/co2-geothermal-physics-model-mm5t8b71/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills