Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CF Merger #3: Compositional Flow models #1236

Open
wants to merge 707 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
707 commits
Select commit Hold shift + click to select a range
bf2f146
ENH: Added total energy balance and Fouriers Law for compositional flow.
vlipovac Feb 5, 2024
6b6047e
ENH: Added component mass balance class to compositional flow.
vlipovac Feb 5, 2024
143245d
Merge 'develop' into composite-flow
vlipovac Feb 5, 2024
7b006fe
WIP: Work on solutionstrategy for compositional flow.
vlipovac Feb 6, 2024
451bb79
WIP: Added some methods to SolutionStrategy for compositional flow.
vlipovac Feb 6, 2024
89e7883
MOD: Refactoring compositional mixins and adding Flash mixin.
vlipovac Feb 7, 2024
4f26e49
MOD: Refactoring compositional flow model to include secondary expres…
vlipovac Feb 8, 2024
2305192
MOD: Refactoring mass balances to fractional flow simulation and non-…
vlipovac Feb 8, 2024
5726191
MOD: Refactoring composite package s.t. variables and proparties are …
vlipovac Feb 9, 2024
0422197
FIX: Access to refactored mixture density in compositinal balance equ…
vlipovac Feb 9, 2024
acf3c0c
MOD: Refactoring composite mixins to fit general structure.
vlipovac Feb 29, 2024
1fe84be
MOD: CF model now has a separate mixin dealing with mobility terms.
vlipovac Mar 1, 2024
9570af3
MOD: Access to weights in advective flux and removal of some inconsis…
vlipovac Mar 1, 2024
c74c902
MOD: Re-worked representation of phase properties as instances of Sec…
vlipovac Mar 4, 2024
edaef33
MOD: Adding boundary and initial equilibrium to CF model set-up.
vlipovac Mar 4, 2024
14f5605
MOD: Reworking SecondaryExpression class to account for time index, i…
vlipovac Mar 5, 2024
a6fc3e0
MOD: Enhancing solution strategy on CF framework, renaming some quant…
vlipovac Mar 6, 2024
6e6b95c
MOD: Solution of CF linear system uses Schur complement to eliminate …
vlipovac Mar 7, 2024
7258bae
Merge 'develop' into composite-flow
vlipovac Mar 7, 2024
93f0217
MOD: Adding option to store derivatives in time and iterate sense for…
vlipovac Mar 13, 2024
3d22cbe
FIX: Various fixes in CF framework.
vlipovac Mar 13, 2024
f5872cc
FIX: Time step and iterate indexation in secondary expressions.
vlipovac Mar 14, 2024
a296017
FIX: Data access in secondary operators, definition of primary vars a…
vlipovac Mar 18, 2024
e459e72
BREAKING: Several modifications in CF framework which need to be tested.
vlipovac Mar 19, 2024
83e8ba0
MOD: Changing several aspects of CF framework to accomodate constitut…
vlipovac Mar 21, 2024
498825c
MOD: Splitting some functionality of the CF framework into hierarchic…
vlipovac Mar 21, 2024
3ac5ffc
MOD: Splitting of functionality for CF models with and without LE.
vlipovac Mar 22, 2024
713a7ea
MOD: Fixing BC mixins for CF and CFLE after functionality split.
vlipovac Mar 22, 2024
4de16e2
WIP: Debugging CFLE.
vlipovac Mar 23, 2024
e8f04d6
FIX: non-linear permeability tensor for pressure and interface equati…
vlipovac Mar 23, 2024
4ad0a73
DEV: Reduced system is now an option
OmarDuran Apr 4, 2024
cb89370
Multi phase component flow (#1146)
OmarDuran Apr 7, 2024
48c60d8
WIP: Brine system with constant states in space and time
OmarDuran Apr 7, 2024
e22ab9c
MAINT: Simplifying DriesnerBrineOBL.py
OmarDuran Apr 7, 2024
49f098f
STY: black on geothermal example
OmarDuran Apr 7, 2024
f339ee0
Merge branch 'develop' into composite-flow
OmarDuran Apr 8, 2024
0b11f96
MAINT: Fix inconsistency while discretize nonlinear operators
OmarDuran Apr 8, 2024
78ef8a0
MOD: partial fractions are now constant 1 if only one component in ph…
vlipovac Apr 9, 2024
5322389
MOD: Partial fractions (not extended) are constant 1 if only 1 compon…
vlipovac Apr 9, 2024
2f05b41
MOD: Constitutively eliminated variables include BC update
vlipovac Apr 9, 2024
c19b9f0
BUG: incorrect flux
OmarDuran Apr 9, 2024
41ffa40
BUG: incorrect overall flux
OmarDuran Apr 9, 2024
b933a26
FIX: Access to bc type for advective flux upwinding
vlipovac Apr 9, 2024
a687bb6
FIX: fluid state calculation of density derivative now avoids divisio…
vlipovac Apr 9, 2024
87282b2
MAINT: ongoing work
OmarDuran Apr 9, 2024
9f26a87
Merge branch 'composite-flow' of https://github.com/pmgbergen/porepy …
OmarDuran Apr 9, 2024
f06a4ee
BUG: incorrect outlet boundary fluxes
OmarDuran Apr 9, 2024
987cb31
MAINT: simple setting
OmarDuran Apr 9, 2024
e2d17ba
MIN: Changes in Soereide script
vlipovac Apr 9, 2024
9ba1d15
FIX: Usage of BC operators in upwinding in advective fluxes.
vlipovac Apr 10, 2024
410b43d
BUG: energy residuals are not close to zero with pure diffusion
OmarDuran Apr 10, 2024
a8e8773
MAINT: Units conversion in BOL are implicit
OmarDuran Apr 10, 2024
4eeeaf1
WIP: Falling back to tracer setting
OmarDuran Apr 11, 2024
7fd2db1
WIP: Still nonlinear setting
OmarDuran Apr 11, 2024
c199420
WIP: Tracer setting similar to Driesner
OmarDuran Apr 11, 2024
f866523
MAINT: Correct inlet BCs for transport with fractured media
OmarDuran Apr 12, 2024
3b3f71b
FIX: Model set-up for correlations and tracer
vlipovac Apr 12, 2024
56fd920
WIP: Ongoing work with complex geometry
OmarDuran Apr 12, 2024
48b3a3e
MAINT: Fetching inlet and outlet via sphere membership query
OmarDuran Apr 13, 2024
3b9b196
MAINT: Example Geometries tested on tracer-like setting.
OmarDuran Apr 13, 2024
0f604d2
MAINT: Fix a typo in initial pressure method.
OmarDuran Apr 13, 2024
1608274
MAINT: Isenthalpic flow process on Benchmark2DC3 + DriesnerOBL
OmarDuran Apr 13, 2024
ae9afa1
MAINT: Black
OmarDuran Apr 13, 2024
0438e89
MAINT: isort
OmarDuran Apr 13, 2024
6b4bc38
MAINT: Default setting
OmarDuran Apr 13, 2024
cd62168
MAINT: Simple Petsc support
OmarDuran Apr 14, 2024
149bc94
DEV: Adding a tracer like setting
OmarDuran Apr 15, 2024
2a372e5
MAINT: Variables order agrees with assembled equations.
OmarDuran Apr 15, 2024
a8f1947
WIP: Ongoing work with linear trace
OmarDuran Apr 18, 2024
4460c1c
MAINT: Adding extra dependencies
OmarDuran Apr 18, 2024
c2ed00c
Numba modifications to eliminate import overhead (#1148)
vlipovac Apr 19, 2024
f196984
WIP: Depuration CFLE model
vlipovac Apr 22, 2024
8299698
MAINT: rename to secondary_variables_names
OmarDuran Apr 23, 2024
1ffd8ae
MAINT: set it is an unordered collection
OmarDuran Apr 23, 2024
13da937
FIX: Parsing only value of AD operator functions. MOD: Logging in com…
vlipovac Apr 24, 2024
6dfa769
MIN: Logging in pr eos.
vlipovac Apr 25, 2024
daadc40
MAINt: Incorrect jacobian in linear descriptions
OmarDuran May 2, 2024
15ba363
Merge branch 'develop' into composite_flow_tests
OmarDuran May 3, 2024
4103d92
Merge branch 'develop' into composite-flow
OmarDuran May 3, 2024
c5a1494
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran May 3, 2024
9e50b5d
MAINT: after_nonlinear_convergence has void signature
OmarDuran May 3, 2024
df35043
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran May 3, 2024
ede8f64
Merge branch 'composite-flow' of github.com:pmgbergen/porepy into com…
vlipovac May 7, 2024
3c132ef
TEST: Adding tests for computation of Peng-Robinson EoS.
vlipovac May 9, 2024
f2ee267
TEST: Added Taylor expansion test for PR EOS.
vlipovac May 9, 2024
25dac93
MOD: Changing argument order in PR compressibility factor and optimiz…
vlipovac May 9, 2024
6de21fb
MIN: Removing custom scripts folder from branch
vlipovac May 9, 2024
3d10555
MIN: NO JIT flag in tests for PR EOS.
vlipovac May 10, 2024
208cae9
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran May 10, 2024
a51213e
MAINT: Minor refactor on compositional_flow
OmarDuran May 10, 2024
dbc997f
MIN: Refactor Soereide model
vlipovac May 16, 2024
b8238a4
MOD+FIX: Compiled computation of compressibility factor in PR and NPI…
vlipovac May 27, 2024
b04c264
Merge branch 'develop' into composite-flow
vlipovac May 27, 2024
89b9d47
MIN: assimilate with develop
vlipovac May 27, 2024
ae3429f
MOD: Purging code merged in PR #1 b36ad26
vlipovac May 27, 2024
913d3cb
FIX: Minor fixes in CFLE after merger
vlipovac May 27, 2024
e445eb4
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran May 28, 2024
7b7ca07
FIX: numba pT flash
vlipovac May 28, 2024
7c7bc27
MOD: Refactoring numba computations and PhaseStates.
vlipovac May 30, 2024
9b68f80
FIX: numba ph uniflash
vlipovac May 31, 2024
70c49c3
FIX: I don't know what is fixed, but CFLE works now.
vlipovac Jun 4, 2024
971b702
MIN: fixes in logging
vlipovac Jun 4, 2024
23c16dd
MOD: replacing semismooth min by pp.ad.maximum
vlipovac Jun 5, 2024
9738d8c
MOD: Removing cancelation of Fourier flux.
vlipovac Jun 5, 2024
e8dd588
Composite fix numba (#1177)
vlipovac Jun 5, 2024
c1ac9aa
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran Jun 5, 2024
9a95a9f
BUG: now is parsing derivatives
OmarDuran Jun 5, 2024
9aae417
WIP: Some simulations with TD correlations
OmarDuran Jun 5, 2024
aa975bc
WIP: Improved setting
OmarDuran Jun 6, 2024
8b0a5c7
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran Jun 6, 2024
bf6ca95
Fine simulation set-up.
vlipovac Jun 6, 2024
4ddcae8
MAINT: Add 26 predicates for Taylor expansion
OmarDuran Jun 6, 2024
ebf3fd4
STY: black on geometrical predicates and VTK interpolator
OmarDuran Jun 6, 2024
acd5d16
min changes in CFLE set-up
vlipovac Jun 7, 2024
45e2456
Merge branch 'composite-flow' of github.com:pmgbergen/porepy into com…
vlipovac Jun 7, 2024
33f6c7c
Merge branch 'composite_fix_numba' into composite-flow
vlipovac Jun 7, 2024
679cca1
General face-lift for compositional subpackage
vlipovac Jun 8, 2024
9a66bb4
STY: isort, black, flake8, mypy
vlipovac Jun 8, 2024
5dbed84
Merge branch 'develop' into composite-flow
vlipovac Jun 8, 2024
0af0621
TEST: Adding tests for mixture set-up and mixin.
vlipovac Jun 8, 2024
52ccb85
WIP: Partial setting
OmarDuran Jun 10, 2024
d5cd6fd
Merge branch 'develop' into composite_flow_tests
OmarDuran Jun 14, 2024
910a1d6
Merge branch 'develop' into composite-flow
OmarDuran Jun 14, 2024
53b8e55
Merge branch 'composite-flow' into composite_flow_tests
OmarDuran Jun 14, 2024
b24186a
MAINT: update signature
OmarDuran Jun 14, 2024
937f326
WIP: Ongoing with physical depuration with a tracer like setting
OmarDuran Jun 14, 2024
012252f
WIP: ongoing work on comparing FV with a pure mixed approach
OmarDuran Jun 17, 2024
eb681e7
WIP: Refining flash strategy to domains
vlipovac Jun 17, 2024
0c7c2fd
WIP: incorrect flux
OmarDuran Jun 17, 2024
cfceec2
WIP: Testing set-up for Soereide model
vlipovac Jun 17, 2024
2b5d0bc
Merge branch 'composite-flow' of github.com:pmgbergen/porepy into com…
vlipovac Jun 17, 2024
ca75f46
FIX: Adapt 1-phase linear tracer to new DOF choice (no partial fracti…
vlipovac Jun 17, 2024
5ab13d3
Merge branch 'develop' into composite-flow
OmarDuran Jun 17, 2024
828ea6a
MOD: Clean-up in CF model, switching to 1 mobility discretization.
vlipovac Jun 21, 2024
e7fca30
ENH: Adding option to define fractional flow BC in CF model.
vlipovac Jun 25, 2024
9bf09b2
MOD: naming for fractional flow bc DATA
vlipovac Jun 25, 2024
23b7bb7
MOD: Adding compatibility to use DarcyFluxAd
vlipovac Jun 25, 2024
7bc51a0
FIX: Advective weights in fractional flow BC setting only when called…
vlipovac Jun 25, 2024
0147cf0
FIX: Adding reference porosity required for AdTpfa
vlipovac Jun 25, 2024
b876007
WIP: partial refactor on TDriesner flow
OmarDuran Jun 26, 2024
2a2c4c0
WIP: mayor refactor
OmarDuran Jun 26, 2024
027b973
WIP: Driesner setting is again running
OmarDuran Jun 26, 2024
77a827c
WIP: Tracer like model is operational
OmarDuran Jun 26, 2024
295616d
STY: clean up subfolders and examples with two-components and two-phases
OmarDuran Jun 26, 2024
2df5954
WIP: ongoing work with refactor Driesner flow
OmarDuran Jun 26, 2024
d65bffd
WIP: Ongoing work with a stable simulation with correlations
OmarDuran Jun 26, 2024
dba4687
WIP: internal conversion to Kelvin
OmarDuran Jun 26, 2024
c1fb777
MAINT: deafult setting
OmarDuran Jun 26, 2024
fe7077e
MAINT: remove assertion for global mass conservation
OmarDuran Jun 26, 2024
fb00305
Merge branch 'develop' into composite-flow
vlipovac Jun 26, 2024
a5529dc
Synch surrogate factory with branch develop
vlipovac Jun 26, 2024
2ece758
DOC: minor improvement in documentation for Driesner flow example
OmarDuran Jun 29, 2024
58237b8
MAINT: Removing useless file and minor documentation
OmarDuran Jun 29, 2024
156e319
DOC: minor improvement in documentation for tracer flow example
OmarDuran Jun 29, 2024
095f707
MAINT: rename file to tracer_flow
OmarDuran Jun 29, 2024
72336cd
MAINT: Delet obsolete script
OmarDuran Jul 4, 2024
ba7291c
Add constitutive modeling for pure water single phase flow with dries…
Jul 30, 2024
99a4932
Add geometry for 1D problem
Jul 30, 2024
b9ea82c
MAINT: VTK files with PHZ spec for expanded pressure range
OmarDuran Jul 30, 2024
a29f1d7
MAINT: VTK files with PTZ specs
OmarDuran Jul 30, 2024
b423cd2
Merge branch 'composite-flow' into composite-flow-PTZ-PHZ
OmarDuran Jul 30, 2024
335df87
MAINT: Adding an extra ptz sampler
OmarDuran Jul 30, 2024
70f71f4
WIP: Adding translation to VTKSampler
OmarDuran Jul 30, 2024
5d0eeb7
WIP: Ready to test PTZ sampler
OmarDuran Jul 30, 2024
e992204
Update geothermal_flow.py
OmarDuran Jul 30, 2024
21c7ad1
WIP: working on Isothermal IC specs.
OmarDuran Jul 30, 2024
d2b89e0
WIP: step to correct fields
OmarDuran Jul 30, 2024
91f70dc
WIP: Simulation is almost ok with Fig. 4. P. Weis. 2014
OmarDuran Jul 30, 2024
f377001
MAINT: Minor correction in VTKSampler
OmarDuran Jul 31, 2024
d841bd2
DOC: improving documentation of geothermal_flow.py
OmarDuran Jul 31, 2024
b4e7024
MAINT: user spec fields with constant extension.
OmarDuran Aug 5, 2024
bb0ccef
MAINT: expanded range for vtks
OmarDuran Aug 15, 2024
0d33987
MAINT: Adding mutual exclusion state for VTK sampler
OmarDuran Aug 27, 2024
bb3653f
WIP: Better control on memory for VTKSampler
OmarDuran Aug 28, 2024
ae9faeb
MOD: Adapting compositional subpackage and models to changes in merge…
vlipovac Oct 8, 2024
6c15065
Merge branch 'develop' into composite-flow
vlipovac Oct 8, 2024
c263f6b
MOD: Adapt solutionstrategyCF to recent changes in from develop.
vlipovac Oct 8, 2024
89aa41e
Merge branch 'composite-flow' of github.com:pmgbergen/porepy into com…
vlipovac Oct 8, 2024
5eca010
MOD: Updating examples/geothermal_flow/ to latest changes
vlipovac Oct 9, 2024
7a988ad
STY: mypy for compositional_flow.py
vlipovac Oct 9, 2024
6c16acf
Reducing content according to merging plan.
vlipovac Oct 9, 2024
ccb2bfe
MOD: Remove artifacts
vlipovac Oct 9, 2024
c26347e
DOC: Update documentation in CF model.
vlipovac Oct 9, 2024
fe8f11f
FIX: Tests adapted to CF update.
vlipovac Oct 9, 2024
5707340
MIN: isort black flake8 on compositional/__init__.py
vlipovac Oct 9, 2024
dc5bfa3
MIN: Fix typing of _combine_boundary_operators in MassBalanceEquation
vlipovac Oct 9, 2024
fe0e3cf
STY: Appease mypy
vlipovac Oct 10, 2024
422ba0c
Merge branch 'develop' into cf_merger_3
vlipovac Nov 5, 2024
b864ed7
MIN: Sync with develop
vlipovac Nov 5, 2024
7d7dd60
MIN: Update compositional_flow.py to latest changes in develop
vlipovac Nov 5, 2024
fb4ad0a
MIN: Sync with develop
vlipovac Nov 5, 2024
de3a76c
MIN: Sync with develop
vlipovac Nov 5, 2024
537f186
MIN: Adding checks whether SurrogateFactory is used for phase propert…
vlipovac Nov 5, 2024
b24a201
MOD: Adapting examples/geothermal_flow to recent changes and making t…
vlipovac Nov 5, 2024
84fee82
MIN: Fixing inline doc
vlipovac Nov 7, 2024
c6556aa
Merge branch 'develop' into cf_merger_3
vlipovac Nov 25, 2024
6f4d173
ENH/MOD: Introducing InitialConditionsMixin and refactoring code to b…
vlipovac Nov 27, 2024
c9f0f01
Merge branch 'develop' into cf_merger_3
vlipovac Nov 27, 2024
cfaf9d6
MIN: removing merging artifact
vlipovac Nov 27, 2024
c8b6db7
MOD: Adding functionality of MobilityCF to FluidMobility
vlipovac Nov 27, 2024
46be460
Testing whether mypy for 3.12 will be satisfied.
vlipovac Nov 27, 2024
d987158
MIN: fix in error message.
vlipovac Nov 27, 2024
7319016
FIX: mypy issue.
vlipovac Nov 27, 2024
33f2ee0
MOD: Generalizing the notion of mobility.
vlipovac Nov 28, 2024
9b2c703
MOD: Introducing consistent naming for advection weights in various b…
vlipovac Nov 28, 2024
579c4ed
DOC: improving documentation of new classes.
vlipovac Nov 28, 2024
aab4006
DOC: Improve docs in compositional_flow
vlipovac Nov 28, 2024
60b212a
TUT: Finishing tutorial on tracer flow.
vlipovac Nov 28, 2024
c7ea4f3
MIN: Spellchecking tracer flow tutorial.
vlipovac Nov 28, 2024
63da8c1
Purge files which will not be merged yet.
vlipovac Nov 28, 2024
d65fbc5
MOD: Switching base model BC classes to new intermediate class for BC…
vlipovac Dec 1, 2024
9f05724
Merge branch 'develop' into cf_merger_3
vlipovac Dec 1, 2024
ef0deb8
FIX: tracer tutorial.
vlipovac Dec 2, 2024
53880e5
MOD: Unifying TwoVariable- and basic energy equation.
vlipovac Dec 2, 2024
3070363
MOD: Merging functionality of BC primary vars into base BC mixin.
vlipovac Dec 5, 2024
49d6d41
Merge branch 'develop' into cf_merger_3
vlipovac Dec 5, 2024
9c8c212
MOD: Unifying total mass balance with component mass balance and the …
vlipovac Dec 6, 2024
9dcad9a
TEST: Adding linear tracer test.
vlipovac Dec 8, 2024
1d83579
TEST: Adding test for 3-phase tracer using full CF framework.
vlipovac Dec 9, 2024
f0b49c4
MIN: Clean-up in some docs.
vlipovac Dec 9, 2024
332cc8e
MIN: Clean-up in some docs.
vlipovac Dec 9, 2024
e11e5b6
Merge branch 'develop' into cf_merger_3
keileg Dec 10, 2024
37f752b
MAINT: Minor clean-up of top-level __init__
keileg Dec 13, 2024
207e7f8
DOC: Cleanup docs in compositional_mixins
keileg Dec 13, 2024
ee4f669
DOC: Minor updates to documentations.
keileg Dec 13, 2024
5ca8289
MAINT: documentation and various updates of CF flow
keileg Dec 13, 2024
7e04e30
MAINT: Minor changes related to compositional flow PR
keileg Dec 14, 2024
88b7c99
DOC: Cosmetic changes
IvarStefansson Dec 19, 2024
59b0db7
MIN: Fixing issues introduced by review.
vlipovac Dec 19, 2024
5f808f5
MOD: Changes from review.
vlipovac Dec 19, 2024
bdefd21
MIN: CF module docs.
vlipovac Dec 19, 2024
7fd3eb8
Merge branch 'develop' into cf_merger_3
vlipovac Dec 19, 2024
09f3723
MIN: Spelling in docs.
vlipovac Dec 20, 2024
6443ebf
DOC: Minor changes of documentation
keileg Dec 20, 2024
ef56eb3
MOD: Diffusive total mass balance overrides only flux methods now.
vlipovac Dec 20, 2024
54f9e48
MOD: Removing compound-tracer transport equations from basic CF module.
vlipovac Dec 20, 2024
f356c5d
MOD: Splitting SolutionStrategyCF into parts. Renaming CF classes to …
vlipovac Dec 20, 2024
4b553a3
MOD: Renaming various mobilities with mass terms.
vlipovac Dec 20, 2024
976d760
MOD: Moving inquiries about elimination of ref phase and component to…
vlipovac Dec 20, 2024
833a370
TUT: Tracer tutorial does not duplicate code anymore.
vlipovac Dec 20, 2024
16121cb
TEST: Linear tracer test does not duplicate code anymore.
vlipovac Dec 20, 2024
277810c
Merge branch 'cf_merger_3' of github.com:pmgbergen/porepy into cf_mer…
vlipovac Dec 21, 2024
88cad54
Update src/porepy/models/initial_condition.py
vlipovac Dec 21, 2024
87c8e58
STY: flake8 after GH commit.
vlipovac Dec 21, 2024
b6a0d85
MIN: Adding safe-super ignore for mypy in implementations of actual m…
vlipovac Dec 21, 2024
45b0475
MOD: Initial conditions mixins cover now all variables in base models.
vlipovac Dec 21, 2024
039b9ee
MOD: Renaming partial models in compositional flow module to *Template.
vlipovac Dec 21, 2024
0488ba0
TESTS: Adding exact solution accounting for numerical solution to lin…
vlipovac Jan 21, 2025
2392b26
Merge branch 'develop' into cf_merger_3
vlipovac Jan 21, 2025
1489a27
FIX: Issue introduced by merger with develop
vlipovac Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/porepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@
from porepy import models
from porepy.models.abstract_equations import (
BalanceEquation,
LocalElimination,
VariableMixin,
)
from porepy.models.boundary_condition import BoundaryConditionMixin
from porepy.models.initial_condition import InitialConditionMixin
from porepy.models.geometry import ModelGeometry
from porepy.models.units import Units

Expand All @@ -196,23 +198,26 @@
ReferenceVariableValues,
)
from porepy.compositional.base import Component, Phase, Fluid
from porepy.compositional.compositional_mixins import CompositionalVariables, FluidMixin
from porepy.compositional.compositional_mixins import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments:

  1. While I see the argument for the * import, and appreciate the definition of all in compositional_mixins, this will be the first * import in this top-level file. I am not convinced this is something we want to open up for.
  2. I am worried about the namespace of the top-level pp becoming cluttered. Despite much thinking, we have never managed to design an import system that gives a reasonable reflection of the hierarchy of packages. My instinct is to introduce some subpackage, say cf (compositional flow) and to imports of the type pp.cf.{class/method}. @IvarStefansson: Your opinion will be needed here - can we find a solution for the compositional functionality that does not require that we decide what to do with the whole of porepy?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel I know the impact/usage of this, so I'm not sure my opinion is very well founded. Would an option to include only a subset to top-level and in files using compositional extensively simply import compositional explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted this change to import only the Variables and fluid mixin classes.
Changed the usage of the other function imported by the star-import to
import porepy.compositional as compositional
compositional.function()
throughout porepy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the reason for keeping the variables and fluidmixin is that these will show up in all models, since all models in a sense are compositional? If correct, please add a short comment to this effect, so that I don't get confused about what is so special about these classes whenever I look at this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All models have the fluid mixin, that is correct. But only truly multiphase multicomponent models require the CompositionalVariables. Do you want only the FluidMixin included on the top level?


# "Primary" models
from porepy.models import fluid_mass_balance, momentum_balance
from porepy.models import energy_balance, fluid_mass_balance, momentum_balance

# "Secondary" models inheriting from primary models
from porepy.models import (
poromechanics,
energy_balance,
mass_and_energy_balance,
thermoporomechanics,
compositional_flow,
)

# Full model classes.
from porepy.models.fluid_mass_balance import SinglePhaseFlow
from porepy.models.momentum_balance import MomentumBalance
from porepy.models.poromechanics import Poromechanics
from porepy.models.thermoporomechanics import Thermoporomechanics
from porepy.models.mass_and_energy_balance import MassAndEnergyBalance
from porepy.models.compositional_flow import ModelSetupCF, ModelSetupCFF
vlipovac marked this conversation as resolved.
Show resolved Hide resolved


# Visualization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BoundaryConditionsMassDirWestEast(pp.BoundaryConditionMixin):
def bc_type_darcy_flux(self, sd: pp.Grid) -> pp.BoundaryCondition:
"""Boundary condition type for Darcy flux.

Dirichlet boundary conditions are defined on the north and south boundaries.
Dirichlet boundary conditions are defined on the west and east boundaries.

Parameters:
sd: Subdomain for which to define boundary conditions.
Expand Down
8 changes: 5 additions & 3 deletions src/porepy/compositional/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"EquationOfState",
"Phase",
"Fluid",
"ComponentLike",
"PhaseLike",
]


Expand Down Expand Up @@ -540,7 +542,7 @@ def __init__(

"""

self.fugacity_coefficient_of: dict[ComponentLike, ExtendedDomainFunctionType]
self.fugacity_coefficient_of: dict[Component, ExtendedDomainFunctionType]
"""Fugacitiy coefficients per component in this phase.

Dimensionless, scalar field.
Expand Down Expand Up @@ -579,7 +581,7 @@ def __init__(

"""

self.extended_fraction_of: dict[ComponentLike, DomainFunctionType]
self.extended_fraction_of: dict[Component, DomainFunctionType]
"""Extended molar fractions per component in a phase, used in the unified
phase equilibrium formulation (see :attr:`partial_fraction_of`).

Expand All @@ -591,7 +593,7 @@ def __init__(

"""

self.partial_fraction_of: dict[ComponentLike, DomainFunctionType]
self.partial_fraction_of: dict[Component, DomainFunctionType]
"""Partial (physical) fraction of a component, relative to the phase fraction.

Dimensionless, scalar field bound to the interval ``[0, 1]``.
Expand Down
Loading
Loading