Skip to content

Resolve "Set water content as initial condition"

Lukas Riedel requested to merge 148-set-water-content-as-initial-condition into master

What does this MR do?

Add the option to insert water content values as initial condition for the Richards model. The option is activated via richards.initial.quantity = waterContent.

For computing the actual initial condition in terms of the matric head h_m, some additional parameterization functions and a new grid function adapter has been added. Previouly, saturation and water content \theta_w have been computed from the matric head, but not vice versa. The InitialConditionFactory of the Richards model now additionally requires the FlowParameters information.

Changes:

  • Update MualemVanGenuchten and FlowParameters with required methods for computing h_m(\theta_w).
  • Add WaterContentInitialCondition and MatricHeadAdapter.
  • Pass FlowParameters to RichardsInitialConditionFactory.
  • Update the test-initial-condition unit test and make it employ Google Test.
  • Added docs on new initial condition quantity and updated default config file parameters.

Is there something that needs to be double checked?

I had some trouble with the unit test. The Dune::GridView seems to be updated/changed when it is passed to a new thread. Apparently, this is what Google Test does when creating a fixture and passing it to a test case. Therefore, I have to re-build the grid view in every test although it is already built in the test fixture, see f2ada9f3. @sospinar, do you have any knowledge of Dune::GridView not being thread safe?

Can this MR be accepted?

  • Implemented water content as initial condition
  • Added/Updated tests:
    • test-initial-condition
  • Added/Updated documentation
  • Pipeline passing
  • Squash option set
  • Delete branch option set
  • Added entry to CHANGELOG.md

Assignee: If the Squash option is set, check/update the commit message right before merging!

Related issues

Closes #148 (closed)

Edited by Lukas Riedel

Merge request reports