Skip to content

Releases: phorgue/porousMultiphaseFoam

v2406.2 : PMF v2406 with OpenFOAM-2406

22 Oct 08:20
Compare
Choose a tag to compare

Compatibility

v2406.1: fix dependencies for windows build

04 Jul 08:42
Compare
Choose a tag to compare

BUG FIXES

  • Missing lPMFtoolsGIS for PMFnumericalMethods windows compilation

v2406: Starting class-based dev for solvers/libraries + new dispersion model

24 Jun 09:06
Compare
Choose a tag to compare

Libraries

  • dualAlphaDispersion

    • new dispersion model with two sets of parameters used for saturated
      (alphaL_sat/alphaT_sat) and unsaturated areas (alphaL_unsat/alphaT_unsat).
      Transition between values are computed using theta thresholds
      (thetaThreshold_unsat and thetaThreshold_sat)
  • numericalMethods/timestepManager

    • new classes have been designed to handle multi-time stepping techniques
      using c++Objects instead of #include. All the solvers use this new feature.
      As a result, multiple files have been removed, such as all the setDeltaT.H.
  • toolGis

    • Similary to timestepManager, outputEventFile class coupled with new class
      outputFields allows to use c++ object to handle eventWrite + mass balance
      computation. As a result, multiple files have been removed such as eventWrite.H
      and readEvent.H.

    • Minor change for eventInfiltration keyword :
      eventFileInfiltration => infiltrationEventFile

  • keywords

    • new library/class has been created to ensure compatibility with API. PMF
      keywords are liste in etc/keywords.yaml file

Solvers

  • groundwaterFoam

    • Transient simulations use directly the OpenFOAM fvMatrix residuals to
      evaluate Picard convergence. Relaxation factor can be used for transient.

    • Two modes are available for time-stepping :

      • truncation: based on truncation error (using truncationError value)
      • nIterPicard: based on the number of Picard iteration requires at each
        timestep (using nIterPicard)

Bug fix

  • eventInfiltration compute velocity along gravity-axis (instead of patch
    normal) to avoid lateral infiltration for non-planar patch. Negative values in
    infiltration.dat still mean inflow (and positive value exfiltration)

  • fix missing updateForcing fo GWTfoam

  • fix CmassBalance computation for porousScalarTransportFoam

  • fix parallel efficiency with CSV file outputs

  • fix h relaxation based on openfoam residual

Minor fixes and compatibility

13 Oct 13:35
Compare
Choose a tag to compare

Compatibility

  • fix partial compatibility for Clang and v2212

Minor changes

  • rename libraries to PMFXXXX.so

  • fix keyword for output event in groundwaterTransportFoam

  • remove non-working mapFieldsFrom2D folder

v2303: Dual porosity model + readthedocs

23 Mar 15:22
Compare
Choose a tag to compare

PMF documentation is now available on readthedocs.

Bug fix

  • parallel issue for source-injection/fixed points

  • parallel issue in time derivative computation (used for timesteps management)

General

  • All solvers display current version of PMF.

  • Global reorganization of libraries for dual porosity developements.

  • To handle scalar transport in simple/dual porosity models, CEqn.H has been
    moved in porousMediumTransportModel classes (and removed from solver). The
    transport equation is solved as for example:

    pmTransportModel->solveTransport(Utheta, phi, theta);

Libraries

  • porousMediumModel

    • new class for handling porosity (eps) and permeability (K)
  • twophasePorousMediumModel

    • new asbtract class for handling simple/dual porosity model (flow only)
  • simplePorosity

    • porousMedium class for one porosity model (one Saturation, kr, pc...)
  • dualPorosity

    • porousMedium class for dual porosity model (with Fracture and Matrix)
  • porousMediumTransportModel

    • new class for handling simple/dual porosity model (transport)
  • simplePorosityTransport

    • porousMedium class for scalar transport in one porosity model
  • dualPorosityTransport

    • porousMedium class for scalar transport in dual porosity model
      (with Fracture and Matrix)
  • relativePermeability/capillarity:

    • Smin/Smax are common to all kr/pc model and included in general abstract. As
      a consequence, values are now read in the model dictionary (and not from the
      global transportProperties dict). For example, the thetamin value for
      Van Genuchten model is read in VanGenuchtenCoeffs

Solvers

  • steadyGroundwaterFoam/groundwaterFoam

    • solvers have been merged. Steady simulations can be done using -steady
      option, i.e. :
      groundwaterFoam -steady

    • Picard residuals can be written in residuals.csv file by adding option in
      controlDict (works for steady run) :
      writeResiduals true;

  • steadyGroundwater2DFoam/groundwater2DFoam

    • solvers have been merge. Steady simulations can be done using -steady
      option, i.e. :
      groundwater2DFoam -steady
  • groundwaterFoam (steady mode)

    • residual field and max values can be written during the run with the
      controlDict option:

    writeResiduals yes;

Tutorials

  • 1Dinfiltration_dualPorosity (for flow and flow+transport)

    validation case for dual porosity model using METIS results

Minor changes

  • new kr(volfield) function added to relativePermeability classes to compute
    relative permeability from a given saturation

  • new S(volfield) function added to capillaryModel classes to compute saturation
    from a given pressure head field

Bug Fix + tools folder + Compatibility OpenFOAM 9

28 Jul 13:41
Compare
Choose a tag to compare

General

  • Compatibility is ensured for OpenFOAM v6 v7 v8 and from v1906 to v2106.

  • MNT (Modèle Numérique de Terrain) has been replaced by DEM (Digital
    Elevation Model) for file name, field name, comments...

Tools

  • new folder containing external tools (python/bash scripts) for the toolbox

  • pmf_csvToEvent

    • python script to convert csv file extracted from simulations into event
      file. It can be used to recover 1D column unsaturated fluxes for example to
      inject in 2D watershed model. For usage, execute:

    python pmf_csvToEvent.py --help

Tutorials

  • Global

    • scripts are now compatible with python 3.

Bug fixes

  • Time-step management when (eventTimeTracking=false) has been fixed

Newton Algorithm for unsaturated (groundwater) solvers

09 Apr 06:36
Compare
Choose a tag to compare

Compilation

  • Toolbox now accepts parallel compilation, run :

    ./Allwmake -jX

    with X the number of processors

Solvers

  • Global

    • output event value are not explictly computed but constructed by
      interpolation to avoid time step instabilities. Time interpolated fields are
      also used for CSV outputs.
  • groundwaterFoam/groundwaterTransportFoam

    • pressure head equation can be solved using Newton algorithm to handle
      strong non linearities. Convergence is faster than Picard's algorithm and can
      handle complex cases where Picard does not converge, for example flow close
      to the saturated point.
    • pressure head equation is first solved using Picard formulation until the
      Picard tolerance is reached (specified in system/fvSolution) and then equation
      is solver using Newton method until the Newton tolerance.
    • the equations residual is now signed and under-relaxation occurs only when
      residual increases without changing sign.
    • timestep is managed using time scheme for truncation error. Only the Euler
      timescheme is currently handled for the pressure head equation but 2nd order
      schemes can be used for C equation (see tutorials).
  • stationaryGroundwaterFoam

    • convergence and time control is now based on hEqn residual.
    • additional under-relaxation has been added (based on residual decrease)
      to improve convergence rate.
    • seepage option is now independant from fixedPotentialList and is activated
      in transportProperties as:
      seepage yes;
  • groundwater2DFoam/groundwater2DTransportFoam

    • add waterSourceEventFile options to 2D solvers to force localized volumetric
      in 2D solvers (same usage as groundwaterFoam/groundwaterTransportFoam)

Utilities

  • setBoundaryHeadPressure

    • add uniform potential option for 2D solvers (potential field)
  • setFieldsFromXY

    • user can specify the number of points for interpolation (default = 3):
      1 => use closest point value
      0 => use number of neighbour faces for each cell

Libraries

  • numericalMethods

    • new Jacobian Matrix class for handling FD Newton algorithm (finite
      difference method, for debugging only)

Bug fixes

  • solved ambiguous calls for compatibility with CLANG and OSX
  • fix dimensions in ToddNo.H
  • fix interpolation functions for event value computation
  • 3rd time derivative computed on potential (instead of hwater) to avoid
    instabilities when hwater tends to 0
  • fix retard coefficient for unsaturated (depends on saturation flow)
  • fix flow/balance computation in 2D solvers
  • handle correctly dry cells for stationaryGroundwater2DFoam solver
  • fix deltat reduction for Picard loop groundwaterTransportFoam
  • fix C flux computation in CSV (groundwaterTransportFoam)
  • add FatalError when timestep is fixed and Picard/Newton does not converge

Multi-species transport and timestep management

05 Dec 08:13
Compare
Choose a tag to compare

Solvers

  • Global:

    • patchEvent are now automatically read by solvers inside fields file
    • keyword "eventTimeTracking" is used to constraint the solver to
      explicitly compute solution at event time (source/patch events)
  • groundwaterFoam

    • The non-convergence of the Picard's algorithm now forces the solver to
      recompute the time iteration reducing the time step
    • add specific storage term (Ss) to the Richards' formulation
    • adding by default the mass-conservative terms to head pressure equation
      (mixed-formulation). The old head-pressure formulation can be now obtained
      adding "massConservative false;" in transportProperties
  • groundwater2DFoam

    • solver adapted to handle uniform or non-uniform infiltration event (also
      accept non-conformal mesh event => consider as uniform infiltration)
    • time-stepping is now based on the truncation error (see the notes for
      porousScalarTransportFoam)
  • porousScalarTransportFoam

    • support for multiple transported species in a single case. Species are
      listed in a "species" wordList in the transportProperties dictionary.
      Each species can have its own porousTransport parameters and dispersion
      model. These are found in sub-dictionaries of transportProperties, each
      named the same as a species. The change is backward compatible (the absence
      of a list of species is taken to mean a single species with name "C", and
      species without their own sub-dictionaries have their properties read
      directly from transportProperties). This support has also been extended to
      all transport solvers in the toolbox
    • epsTotal now defaults to 1
    • eps can now be passed either as a scalar or as a field
    • time-stepping is based on the truncation error related ot the time scheme
      used (Euler, backward or CrankNicolson) and specified by the "truncationError"
      keyword in system/controlDict. The relative numerical error is computed using
      dC3/dt3 or dC2/dt2 (depending on the time-scheme) and maintained below the
      user-defined value
  • porousScalarTransport2DFoam

    • support for multiple transported species in a single case (see the notes
      for porousScalarTransportFoam)
    • epsTotal now defaults to 1
    • eps can now be passed either as a scalar or as a field
    • time-stepping is now based on the truncation error (see the notes for
      porousScalarTransportFoam)
  • groundwaterTransportFoam

    • The non-convergence of the Picard's algorithm now forces the solver to
      recompute the time iteration reducing the time step
    • CSV output fixed
    • add specific storage term (Ss) to the Richards' formulation
    • adding by default the mass-conservative terms to head pressure equation
      (mixed-formulation). The old head-pressure formulation can be now obtained
      adding "massConservative false;" in transportProperties
    • support for multiple transported species in a single case (see the notes
      for porousScalarTransportFoam)
    • epsTotal now defaults to 1
    • eps can now be passed either as a scalar or as a field
    • time-stepping is now based on the truncation error for the species
      (see the notes for porousScalarTransportFoam)
  • groundwaterTransport2DFoam

    • new solver coupling 2D water modeling (groundwater2DFoam) with 2D scalar
      transport (porousScalarTransport2DFoam)
    • support for multiple transported species in a single case (see the notes
      for porousScalarTransportFoam)
    • epsTotal now defaults to 1
    • time-stepping is now based on the truncation error for the species and
      hwater variations (see the notes for porousScalarTransportFoam)

Libraries

  • toolsGIS

    • uniformInfiltrationEventFile replaced by infiltrationEventFile
      infiltration for groundwater2DFoam can be uniform or non-uniform (value
      specified at each time for each cell in event file)
  • eventFile

    • now accepts two successive identical dates with different values for
      imposing step variation.
  • eventFlux

    • now accept zero flux field (phi=0)
    • FatalError is handle if fixed flux > 0 and phi = 0
    • new static function through wich solvers can designate a list to be
      populated with non-owning pointers to patchEventFiles associated with
      instances of this BC. This scheme replaces the previous method which used an
      IODictionary to communicate with solvers. If no list is passed, any
      eventFlux condition with an event file will trigger a fatal error.
  • eventInfiltration

    • new static function through wich solvers can designate a list to be
      populated with non-owning pointers to patchEventFiles associated with
      instances of this BC. This scheme replaces the previous method which used an
      IODictionary to communicate with solvers. If no list is passed, any
      eventInfiltration condition with an event file will trigger a fatal error.
  • porousModels

    • relativePermeabilityModel/capillarityModel has new function Se() which
      return effective saturation.
  • multiscalarMixture

    • new class developed to support multiple species in transport solvers.
      Objects of this class can read the properties for all species in a case,
      and also contain their concentration fields. They also do most of the work
      required to support species source events ("eventFileTracerSource" entries);
      however, time tracking cannot be handled internally by this class and
      therefore solvers that support this type of events have to, on construction,
      refer to a list that will be populated with non-owning pointers to any event
      files that are found (otherwise the solver will be deemed incompatible with
      this type of events and the presence of any "eventFileTracerSource" entry
      will raise a fatal error).

Tutorials

  • fix event keywords in several tutorials

  • cleaning configuration files removing useless keywords/dictionaries

  • new 1D_eventFlux test case for time scheme efficiency comparison (Euler,
    backward, CrankNicolson)

Event file generalization + seepage/forcing term for 2D solvers

11 Jul 15:10
Compare
Choose a tag to compare

Solvers

  • Global :

    • Event file can be specified in transportProperties to force the solver
      to compute solution at given date time.
      eventFileSource for volumetric/mass event :
      eventFilePatch for infiltration/fixed flux event on BC
      eventFileOutput to specify write times

    • solvers with injection/extraction terms are now conservative using Euler
      or backward time-scheme (Crank-Nicholson still not supported)

    • All injection terms in event should be negative (as for boundaries) and
      extraction terms should be positive (as for outlet boundary fluxes)

  • groundwater2DFoam

    • solver accepts dry cells (display WARNING when adding water)
  • groundwaterFoam

    • seepage function is available (generates seepageTerm field)
    • potentialMNT field is modified if < z0
  • impesFoam/anisoImpesFoam

    • generalization of the "event" use wellbore dictionary/function is obsolete
  • porousScalarTransportFoam

    • water content (theta) can be given instead of saturation (Sphase) to allow
      the direct use of pre-computed stationaryGroundwaterFoam computations
    • timestep is now controlled by porous- Courant number
  • porousScalarTransport2DFoam

    • retard coefficient fixed
    • seepage outlet handled (requires seepageTerm field)
    • fatal error added when hwater field is negative
    • solver requires for initialization hwater or potential/z0
  • stationaryGroundwater2DFoam

    • seepage function is available (generates seepageTerm field)
    • potentialMNT field is modified if < z0

Libraries

  • porousBoundaryConditions

    • eventInfiltration
      new BC to impose event variable velocity in impesFoam, anisoImpesFoam
      and groundwaterFoam. Patch event file is directly given in the BC
      dictionary using the keyword "eventFile" (as for fixedFlux).

    • eventFlux
      replace old fixedFlux BC for porousScalarTransportFoam

  • porousModels

    • alphaDispersion model fixed
  • toolsGIS

    • event files generalized to all solvers
    • value at given time is interpolated using given event values
    • event values before first event time and after last event time is equal to 0
    • keyword event differenciation :
      • source event for injection/extraction terms in the domains
      • patch event for tracer injection (porousScalarTransportFoam)
      • infiltration event for uniform infiltration (groundwater2DFoam)
      • output event to specify write times

Hydrology module release

23 Jan 16:23
Compare
Choose a tag to compare

Wiki

Solvers

  • groundwater2DFoam

    • water bilan added (with stationary option to stop run)
    • dhmax is relative to the max of hwater field
    • potentialEqn is solved instead of hwater equation (identical to stationary)
  • porousScalarTransportFoam

    • mass balance added for C tracer for each non-wall patch and injection
      wellbores. Results are displayed in terminal and CSV file (see tutorials)
  • porousScalarTransport2DFoam

    • passive scalar transport for pre-calulated 2D flux field with
      groundwater2DFoam
  • stationaryGroundwater2DFoam

    • "stationary" version of groundwater2DFoam
    • fixedPotentialList added in transportProperties (optional)
    • forcing potential mode is added with two possible modes :
      • fixedValue : use values given in fixedPotentialList
      • fixedMNT : use bilinear interpolated value using fileMNT given
  • stationaryGroundwaterFoam

    • "stationary" version of groundwaterFoam (Richards's equation)

Tutorials

  • groundwater2DFoam

    • updated to be similar to the stationary case
  • stationaryGroundwater2DFoam

    • new tutorial relative to the new solver (use forcingPotential option)
  • stationaryGroundwaterFoam

    • new tutorial relative to the new solver
  • porousScalarTransportFoam

    • new tutorial case to validate the new BC fixedFlux

Libraries

  • toolsGIS

    • new library containing classes for GIS manipulation
    • first class is MNT file used to read xyz file and performed
      bilinear interpolation.
    • second class is eventFile to specify spatiallized time-varying source term
      for groundwater(2D)Foam and porousScalar(2D)Foam solvers
  • porousBoundaryConditions

    • new boundary condition "fixedFlux" to impose a user-defined fixed flux
      for a given specie C. Dispersion is set to 0 along this boundary to respect
      mass conservation and ensure that fixed flux is correctly computed.
      "event table" can be given in BC for time-dependent fixed flux.

Utilities

  • setFieldsFromMNT

    • new utility to initialize fields using MNTfile class with bilinear
      interpolation
  • setFieldsFromXY

    • new option to add offset to interpolated value (also in setFieldsFromMNT)