Skip to content

Add weighted JutulDarcy adjoints for PET - #18

Merged
KriFos1 merged 1 commit into
Python-Ensemble-Toolbox:mainfrom
KriFos1:feature/jutuldarcy-adjoint
Nov 27, 2026
Merged

KriFos1 merged 1 commit into
Python-Ensemble-Toolbox:mainfrom
KriFos1:feature/jutuldarcy-adjoint

Conversation

@KriFos1

@KriFos1 KriFos1 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Public API

Adds subsurface.multphaseflow.jutul_darcy.JutulDarcy.run_vjp(state, weights) for PET LowRankGN. Each column of the labelled weights defines one objective. The wrapper simulates the centre once per call, reuses its saved states and adjoint storage across columns, and returns one gradient row per objective and state variable. run_fwd_sim and the standalone adjoints interface retain their signatures and output formats.

Scope

Supports metric producer oil, water and gas surface rates at exact report steps, and direct porosity or permeability fields (mD or natural log of mD). Uses the existing copied-axis and well-index chain rules. The README covers the Mako deck requirements and the distinction between weighted PET requests and standalone per-observation adjoints.

Verification

tests/test_jutul_vjp.py passed locally on the bundled TINY model. Two weighted objectives combining oil and water rates at different wells and report dates matched central directional differences at a perforated cell in log-permeability coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant