Modèle de doublet streamline - Physique

VérifiéPrudence

Valide le code et fournit le raisonnement physique pour le modèle de doublet injection-production 2D utilisant les méthodes streamline. Utiliser pour modifier la géométrie streamline, les calculs de transport et déboguer les comportements.

Spar Skills Guide Bot
Data & IAAvancé
04/03/2026
Claude Code
#streamline-simulation#transport-physics#numerical-methods#breakthrough-curves#scientific-computing

Recommandé pour

Synthèse automatique

Fournit des connaissances physiques et des procédures de validation pour un modèle 2-D de doublet injection-production résolu par méthodes de streamlines.

Points forts

  • Couvre explicitement les trois types de transport (hydrodynamique, chimique, thermique) avec leurs méthodes de résolution respectives
  • Inclut des workflows structurés de validation physique et de raisonnement, avec vérification des changements de coordonnées et de l'intégration des courbes de percée
  • Signale des pièges numériques concrets comme le débordement du noyau de Bessel et l'usage de i1e au lieu de i1

Limites

  • Fortement dépendant des fichiers annexes (EQUATIONS.md, SYMBOLS.md, DERIVATIONS.md, SANITY_CHECKS.md) dont le contenu n'est pas inclus ici
  • Suppose une familiarité avec les coordonnées bipolaires, les fonctions de Green et les méthodes de streamlines
  • Ne fournit pas de commandes de test exécutables ni de valeurs de référence chiffrées pour comparer les résultats
Quand l'utiliser

À utiliser lors de la modification de la géométrie des streamlines, des solveurs de transport ou des courbes de percée du modèle de doublet, ou pour expliquer et déboguer son comportement physique.

Quand l'éviter

À éviter pour des projets de simulation hors de ce modèle 2-D de doublet précis ou pour des tâches générales de développement sans composante physique.

Analyse de sécurité

Prudence
Score qualité82/100

The SKILL.md is a domain-knowledge reference for a streamline-based doublet reservoir model. It contains no destructive, exfiltrating, or obfuscated instructions, and the only tool usage implied is reading files and (via Bash) presumably running tests or numerical checks. The residual risk is the blanket Bash grant and unaudited linked documents, which merits 'caution' rather than 'safe'/'risky'.

Points d'attention
  • •Declares Bash in allowed-tools, giving the agent shell execution capability even though the skill content is purely reference/documentation
  • •References companion documents (EQUATIONS.md, SYMBOLS.md, DERIVATIONS.md, SANITY_CHECKS.md) whose contents are not visible in the reviewed bundle and therefore cannot be audited
  • •No explicit commands are given; no network calls, credential access, file deletion, or obfuscation present
Comment cette analyse est faite

Exemples

Review a thermal kernel change
I changed the thermal transport to compute the Bessel Green's kernel differently. Can you check whether my change risks overflow and whether I should be using i1e instead of i1?
Debug breakthrough behavior
The breakthrough curve for the chemical transport looks wrong near beta close to 0 and pi. Walk me through the physics validation steps and tell me what integration boundary issues to check.
Explain streamline geometry
Explain how the take-off angle beta and time-of-flight tau relate along a circular streamline in the bipolar coordinate system, and what I need to verify if I modify the geometry calculation.

name: doublet description: Validates code and provides physics reasoning for the 2-D injection-production doublet model using streamline methods. Use when modifying streamline geometry, transport calculations (hydrodynamic, chemical, thermal), breakthrough curves, or Green's function kernels. Also use when debugging simulation behavior or explaining physics concepts. allowed-tools: Read, Grep, Glob, Bash

Doublet Streamline Model Physics Knowledge

This skill provides physics knowledge for the 2-D doublet (injection-production well pair) model using streamline methods. The model solves advection-reaction-dispersion problems along circular streamlines in a potential flow field.

When This Skill Applies

  • Modifying streamline geometry calculations (bipolar coordinates)
  • Changing transport solvers (hydrodynamic, chemical, thermal)
  • Implementing or modifying breakthrough curve integration
  • Working with Green's function kernels for thermal transport
  • Debugging unexpected breakthrough behavior
  • Planning changes to physics-related code
  • Explaining why the model behaves a certain way

Core Physics Reference

The model tracks transport in a 2-D potential flow field between an injector (+a, 0) and producer (-a, 0):

| Module | Transport Type | Solution Method | |--------|----------------|-----------------| | Hydrodynamic | Pure advection | Time-of-flight along streamlines | | Chemical | Advection + capacity-limited reaction | Logistic traveling wave | | Thermal | Advection + fluid-matrix exchange | Bessel-function Green's kernel |

Key state variables:

| Variable | Symbol | Meaning | Units | |----------|--------|---------|-------| | Take-off angle | β | Angle at which streamline leaves injector | rad | | Time-of-flight | τ(β) | Travel time from injector to producer | s | | Arc position | φ | Angle along circular streamline | rad | | Concentration | C(φ,t) | Solute mass fraction | kg/kg | | Capacity | S(φ,t) | Remaining reaction capacity | kg/kg | | Fluid temperature | Tf(φ,t) | Fluid temperature along streamline | °C | | Matrix temperature | Tm(φ,t) | Rock matrix temperature | °C |

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 transport type

Determine which transport physics is affected:

  • Hydrodynamic: Streamline geometry, time-of-flight, velocity field
  • Chemical: Capacity-limited reaction, logistic traveling wave
  • Thermal: Fluid-matrix exchange, Bessel function kernel

Step 2: Check coordinate system consistency

The model uses multiple coordinate systems:

  • Cartesian (x, y) for plotting
  • Bipolar (ξ, β) for streamline parameterization
  • Polar about streamline center (R, φ) for local calculations

Verify transformations are applied correctly.

Step 3: Verify breakthrough integration

Breakthrough curves integrate over all streamlines:

C_prod(t) = (1/π) ∫_0^π C(β, t) dβ

Check that:

  • Integration weights are correct (trapezoidal or custom)
  • β limits span [0, π] (or arrived streamlines only)
  • Singularities at β → 0, π are handled

Step 4: Check Green's function stability (thermal)

For thermal transport, the Bessel kernel G(τ, t) can overflow:

  • Verify exponent recentering is applied
  • Check that i1e (scaled Bessel I1) is used instead of i1
  • Verify prefix integrals use cumulative_trapezoid

Step 5: Report findings

Summarize:

  • Which transport type is affected
  • Any coordinate transformation issues
  • Any integration boundary issues
  • Any numerical stability 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
  4. Use the derivation steps from DERIVATIONS.md to show connections

For debugging simulation issues:

  1. Identify which transport type shows unexpected behavior
  2. Check if the issue relates to:
    • Breakthrough timing (τ calculation)
    • Front retardation (reaction capacity)
    • Thermal lag (fluid-matrix exchange rates)
  3. Trace through the analytical solution
  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 transport equations
  3. Demonstrate that mass/energy balance is preserved
  4. Identify any new sanity checks needed

Quick Reference: Module Structure

| Module | Purpose | Key Functions | |--------|---------|---------------| | doublet.py | Main model (streamlines, chemical, thermal) | Tf, Ctf, Cxf, Ttf, Txf, breakthrough | | streamlines.py | Bipolar coordinate streamlines | streamline_bipolar, streamtube_width | | diffusion.py | Green's kernel solver with diffusion | solve_kernel_capacity, cxfD, ctDf | | thermal.py | Thermal kernel (alternative impl.) | thermal_kernel_Tf_Tm_xvec_t | | thermal2.py | Optimized thermal solver | G_grid_efficient, run_breakthrough, Tprodf | | notebook_widgets.py | Interactive Jupyter visualizations | visualize_* functions |


Key Physical Constraints

These must always hold:

  1. Streamline geometry: Streamlines are circular arcs through (±a, 0)
  2. Travel time bounds: T(β=0) = 4πna²/(3Q) is minimum arrival time
  3. Velocity singularity: v → ∞ at wells (handled by coordinate transformation)
  4. Conservation: Integrated flux across all streamlines equals Q
  5. Retardation: Chemical front travels at speed v·C_inj/(C_inj + S_0)
  6. Thermal equilibrium: As t → ∞, Tf → Tm → T_inj (behind the front)

Transport Type Classification

| Transport | Governing Equation | Solution Type | |-----------|-------------------|---------------| | Hydrodynamic | ∂C/∂t + v·∇C = 0 | Method of characteristics | | Chemical (no diffusion) | ∂C/∂t + v·∇C = -kCS | Logistic traveling wave | | Chemical (with diffusion) | ∂C/∂t + v·∇C = D∇²C - kCS | Green's function convolution | | Thermal | ∂Tf/∂t + v·∇Tf = -γ(Tf - Tm) | Bessel kernel (Eq. 47) | | Matrix | ∂Tm/∂t = β(Tf - Tm) | Exponential convolution (Eq. 48) |


Dimensionless Groups

| Group | Definition | Physical Meaning | |-------|------------|------------------| | Retardation R | (C_inj + S_0)/C_inj | Front slowdown factor | | Damköhler Da | k·τ | Reaction extent over travel time | | Péclet Pe | v·L/D | Advection vs diffusion | | β·τ | (exchange rate)·(travel time) | Matrix equilibration extent | | γ·τ | (exchange rate)·(travel time) | Fluid cooling extent |

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/doublet-streamline-model-physics-mmbizjnw/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Grep, Glob, Bash

Extrait original : Quick Reference: Module Structure
ModulePurposeKey Functions
doublet.pyMain model (streamlines, chemical, thermal)Tf, Ctf, Cxf, Ttf, Txf, breakthrough
streamlines.pyBipolar coordinate streamlinesstreamline_bipolar, streamtube_width
diffusion.pyGreen's kernel solver with diffusionsolve_kernel_capacity, cxfD, ctDf
thermal.pyThermal kernel (alternative impl.)thermal_kernel_Tf_Tm_xvec_t
thermal2.pyOptimized thermal solverG_grid_efficient, run_breakthrough, Tprodf
notebook_widgets.pyInteractive Jupyter visualizationsvisualize_* functions

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/doublet-streamline-model-physics-mmbizjnw/SKILL.md' && test -s '.skill-downloads/doublet-streamline-model-physics-mmbizjnw/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/doublet' && cp -R '.skill-downloads/doublet-streamline-model-physics-mmbizjnw' '.claude/skills/doublet'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/doublet-streamline-model-physics-mmbizjnw'

openskills read 'doublet-streamline-model-physics-mmbizjnw'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/doublet-streamline-model-physics-mmbizjnw/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires