# Porous Flow

The PorousFlow module is a library of physics for fluid and heat flow in porous media. It is formulated in an extremely general manner, so is capable of solving problems with an arbitrary number of phases and fluid components.

By simply adding pieces of physics together in an input file, the PorousFlow module enables the user to model problems with any combination of fluid, heat and geomechanics.

## Other sources of information

This documentation is based on earlier latex documentation, and we are still in the process of transferring the latex into the online format. You may find the latex documentation and its associated PDF files at `porous_flow/doc/theory`

, `porous_flow/doc/tests`

and in the `porous_flow/test/tests`

directories.

## Theoretical foundation

The equations governing motion of fluid and heat in porous media that are implemented in `Kernels`

in the PorousFlow module.

## Available models

Several different flow models are available in PorousFlow.

General formulations for the following cases are possible:

Specialised formulations for miscible two-phase flow are also provided, that use a persistent set of primary variables and a compositional flash to calculate the partitioning of fluid components amongst fluid phases:

## Material laws

Material laws implemented in PorousFlow.

## Fluid equation of states

PorousFlow uses formulations contained in the Fluid Properties module to calculate fluid properties such as density or viscosity.

## Boundary conditions

Several boundary conditions useful for many simulations are provided.

## Point and line sources and sinks

A number of fluid and/or heat sources/sinks are available for use in PorousFlow.

## Implementation details

Details about numerical issues.

## The Dictator

The `PorousFlowDictator`

is a `UserObject`

that holds information about the nonlinear variables used in the PorousFlow module, as well as the number of fluid phases and fluid components in each simulation.

Other PorousFlow objects, such as `Kernels`

or `Materials`

query the `PorousFlowDictator`

to make sure that only valid fluid components or phases are used.

A `PorousFlowDictator`

must be present in all simulations!

## Examples

We are currently in the process of building a few key examples of PorousFlow.

## Additional MOOSE objects

The PorousFlow module also includes a number of additional MOOSE objects to aid users in extracting calculated values for visualising results.

### AuxKernels

The following `AuxKernels`

can be used to save properties and data to `AuxVariables`

, which can then be used as input for other MOOSE objects, or saved to output files and used to visualise results.

`PorousFlowDarcyVelocityComponent`

: Calculates the Darcy velocity of the fluid`PorousFlowPropertyAux`

: Extracts properties from the model.

### Postprocessors

A number of `Postprocessors`

are available:

`PorousFlowFluidMass`

: Calculates the mass of a fluid component`PorousFlowHeatEnergy`

: Calculates the heat energy