Extract BlackOilFluidState factory into general-purpose free function; drop TypeTag dependency#3
Draft
Copilot wants to merge 15 commits intowellbore_volume_new_approachfrom
Draft
Conversation
remain going through and debugging it.
so both StandardWell and MultisegmentWell can use it.
since there are only two elements.
to create a FluidState for later usage.
Co-authored-by: GitPaean <6847941+GitPaean@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Expand createFluidState to support rsw and rvw
Expand WellInterface::createFluidState() to support rsw/rvw
Mar 5, 2026
Copilot stopped work on behalf of
GitPaean due to an error
March 5, 2026 12:45
Co-authored-by: GitPaean <6847941+GitPaean@users.noreply.github.com>
Copilot
AI
changed the title
Expand WellInterface::createFluidState() to support rsw/rvw
Set saltConcentration on fluid state in createFluidState()
Mar 5, 2026
… free function Co-authored-by: GitPaean <6847941+GitPaean@users.noreply.github.com>
Copilot
AI
changed the title
Set saltConcentration on fluid state in createFluidState()
Make createFluidState general-purpose; add saltConcentration support
Mar 5, 2026
…arameters Co-authored-by: GitPaean <6847941+GitPaean@users.noreply.github.com>
…template params directly Co-authored-by: GitPaean <6847941+GitPaean@users.noreply.github.com>
Copilot
AI
changed the title
Make createFluidState general-purpose; add saltConcentration support
Extract BlackOilFluidState factory into general-purpose free function; drop TypeTag dependency
Mar 5, 2026
Copilot stopped work on behalf of
GitPaean due to an error
March 5, 2026 14:01
ee45879 to
6fe0f5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
createFluidState()was aWellInterfacemember function tied to well-specific state (pvtRegionIdx(),name()), making it unusable outside the well abstraction. The boolean flags controlling fluid state behaviour were also redundantly extracted fromTypeTagdespite being direct template parameters ofBlackOilFluidState.Changes
New:
opm/simulators/utils/BlackOilFluidStateUtils.hppcreateBlackOilFluidState<FluidSystem, Indices, bool...>()— usable from any context (reservoir, aquifer, etc.)BlackOilFluidState's own template args directly; noTypeTagrequired;blackoilproperties.hh/EnergyModuleType.hppnot neededpvtRegionIdxandnameare explicit parameters;autoreturn type avoids repeating theBlackOilFluidStatespecialisation twicesetTemperatureguarded byenableTemperature(not justenableEnergy) — correct for ConstantTemperature and SequentialImplicitThermal modes tooUpdated:
opm/simulators/wells/WellInterface_impl.hppcreateFluidState()becomes a thin wrapper passing its existingstatic constexprmembers as explicit template arguments:return createBlackOilFluidState<FluidSystem, Indices, energyModuleType != EnergyModules::NoTemperature, has_energy, has_watVapor, has_brine, has_saltPrecip, has_disgas_in_water, Scalar>(fluid_composition, pressure, temperature, saltConcentration, pvtRegionIdx(), name());💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.