Open IvarStefansson opened 7 months ago
As a first step, we could identify parameters that may be classified as solid, fluid, and solid-fluid:
If we move these into separate files, my rough estimate is that this will take care of perhaps half the file. In addition, functionality relating to multiphase flow etc., that is coming up in the next few months, would enter fluid.py instead of constitutive laws.py (though this is rather a further argument for the refactoring).
For the remaining terms, looking only at class names, I would group these as relating to
So, perhaps a division diffusion, advection, 'stress-related' could work.
Are your "remaining terms" somehow classified as pertaining to discretization?
And do you think it would make sense to put dimension reduction into the Geometry
class?
Are your "remaining terms" somehow classified as pertaining to discretization?
It seems so, yes, but I have no firm opinions on this matter.
And do you think it would make sense to put dimension reduction into the Geometry class?
I had not thought of a geometry class, but yes, that makes sense.
The module porepy/models/constitutive_laws.py currently contains 3.5k lines, motivating a refactoring. I suggest a two-level approach:
LinearElastic
,PoroMechanical
andThermoPoroMechanical
.We should keep #943 in mind when designing the new structure and naming of modules/packages.