GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Link compositional fluid model to static function implementation

Open dkachuma opened this issue 1 year ago • 3 comments

Finalises the compositional fluid model implementation by linking to static function implementation

  • Changes derivative calculations to use multifluid::DerivativeOffset layout instead of separate variables.
  • Implements fugacity coefficient analytical derivatives in CubicEOSPhaseModel. Adds unit test to numerically test derivatives in testCubicEOS.
  • Adds analytical derivative calculation to NegativeTwoPhaseFlash. This calculates the derivatives of the calculated vapour fraction and also the liquid and vapour compositions. The idea is that the iterative flash is performed without derivatives and once this converges implicit differentiation is used to calculate the analytical derivatives at the converged solution. Unit tests are added to testNegativeTwoPhaseFlash to numerically verify the derivatives.
  • Links the static calculation functions for negative two-phase flash to the fluid model
  • Adds a utility for the cubic eos model to convert non-dimensional volume shift parameters to their dimensional form.
  • Links the compositional density static calculation functions to the compositional fluid model object.
  • Adds unit test for compositional density.
  • Adds an option to PVTDriver to output the mass density of each phase.
  • Implements the LBC viscosity calculation. Taken from #1726
  • Adds unit tests for the LBC viscosity model.
  • Adds a PVT driver test for compositional two phase models.
  • Adds a constantPhaseViscosity xml entry for the PVTPackage CompositionalMultiphaseFluid. This allows the user to change the constant viscosity value for each phase.

Tasks still outstanding (to be done in follow up PRs)

  • xml schema changes. Need to allow the user the capability to change some parameters including
    • Flash parameters such as tolerances and iteration limits
    • Flag to select the mixing rule for LBC viscosity
    • Value of viscosity for each phase for the constant viscosity model
  • More unit tests for phase appearance/disappearance
  • Extend BlasLapackLA::solveLinearSystem to GPU.

dkachuma avatar Dec 08 '23 15:12 dkachuma