MOOSE Newsletter (November 2024)

MOOSE Improvements

Default support for multiple solver systems in the Steady and Transient executioners

The Steady and Transient executioner, as well as any Executioner relying on a FEProblemSolve solve object can now solve multiple solver systems, e.g. nonlinear or linear systems. A variable can be placed in a solver system using the solver_sys parameter of the Variable.

The solve of multiple systems can be iterated using the "multi_system_fixed_point" parameter. A Convergence object must then be specified to the Executioner to assess the convergence of the multi-system fixed point iteration.

This support was also extended to the Physics system, in which the Physics equations can be set to be solved in their own solver system

Interface for finding data files

Parameters with the string-derived type DataFileName will now search the application's data folder, as well as the local simulation folder, for the files mentioned in the parameter. They will then return the absolute path to those files. This is intended to simplify the inclusion of data in an application, data which can be referred to in the input files.

New ChainControl system for handling complex/chained Control logic

The new ChainControl system was added to MOOSE. It uses ChainControlData which can be of arbitrary types, and which can be operated on by each ChainControl object. This enables creating limiters, PID controllers, etc., and chaining these operations to control parameters in the input file. This will replace the ControlLogic system in the thermal-hydraulics module after a transition period.

Removing default inclusion of the entire libMesh namespace

The entirety of the libMesh namespace is no longer introduced by the Moose.h header. This was removed in order to prevent conflict between namespaces of external libraries that could be used by MOOSE-based applications. A reduced number of libMesh namespace objects are still included through the libMeshReducedNamespace.h. This list will be adjusted, mostly further reduced, over time.

In order to continue to use libMesh namespace objects, we recommend:

  • prefacing objects with the namespace name, for example libMesh::ValueValue for a VectorValue

  • in source files, you may add using namespace libMesh; in order not to require such prefixes. This is standard practice.

  • in header files, doing so is not generally recommended, and the use of prefixes should be preferred

MOOSE Modules Changes

Execution of MultiApps within the SIMPLE algorithm for solving the Navier Stokes equation

The SIMPLE executioner was reworked to use a SolveObject, SIMPLESolve, to perform the execution. This allowed nesting the solution algorithm inside the fixed-point iteration loop with MultiApps. This enables converging multi-physics problems. The SIMPLE executioner is currently limited to steady state simulations.

Re-implementation of the finite volume face flux limiters

A new implementation of the finite volume face flux limiters was performed. This new implementation presents the expected second order convergence across additional limiters, and adds the Venkatakrishnan limiter. It was demonstrated on the classical scalar-advection dispersion case and showed reduced numerical dispersion.

Implementation of the Navier Stokes energy conservation equation using the linear finite volume discretization

Kernels and boundary conditions were added to the Navier Stokes module to discretize the energy conservation equation using the linear finite volume discretization. The SIMPLE executioner, now relying on the SIMPLESolve class, can then solve the energy conservation equation after each pressure-velocity coupling iteration. Only steady state simulations are currently supported.

2024.11.20 Update

  • Added MeshBase::elem_orders(), MeshBase::max_nodal_order(), etc. APIs. This will soon allow middleware code to do additional sanity checking of user variable order choices, or to automatically choose an isoparametric variable order when appropriate.

  • Added triangularization and tetrahedralization support to meshtool app.

  • Added the ability to condense out "element-internal" degrees of freedom when building algebraic systems. This gives smaller algebraic systems to solve, without "bubble function" coefficients in continuous FEM methods or internal degrees of freedom in HDG methods.

  • Added NonManifoldGhostingFunctor class, which can be used to give reliable distributed-mesh connectivity on meshes where multiple edge elements meet at the same point and/or multiple face elements meet along the same edge.

  • Added SidesToElemMap class, for caching that "reverse connectivity" in classes like the NonManifoldGhostingFunctor that use it.

  • Generalized MeshFunction::find_element() allowing evaluation of a MeshFunction on algebraically-ghosted elements when a GHOSTED vector is in use.

  • Added SimplexRefiner class, which currently supports refinement of simplicial (edge, triangle, and/or tetrahedral) meshes via edge bisection.

  • Exit with error when asked to evaluate L2_HIERARCHIC bases of polynomial degree p=0. Previously this case was returning an incomplete basis that would deliver suboptimal convergence.

  • Use more accurate projections when decimating solutions on H_DIV finite elements for visualization output.

  • Optimizations to SparseMatrix::read_matlab()

  • Added --with-xdr-libdir option to configure, making it possible to build libMesh with XDR support using more types of third-party library installations.

  • Better configure --help entries for NetCDF options

  • configure now autodetects the Fortran compiler from PETSc where possible

  • Fixes for make check NetCDF tests when combining older NetCDF with newer HDF5

  • Support for distributed-and-unprepared meshes in all_tri()

  • Compatibility fixes for PETSc 3.23

  • Support for adding a prefix when querying a PetscNonlinearSolver::snes() that might have yet to be initialized

  • Added NumericVector::set_type(), deprecated older type() setter that returned a writeable reference. This will eventually make more flexible changes to vector type possible.

  • Fixes for libMesh-based error reporting without a LibMeshInit object active. This corrected a regression in the error handling of the libMesh fparser-parse utility.

  • Fixes in Reduced Basis EIM code

PETSc-level Changes

PETSc has been updated to 3.22.1. Changes in this release include:

  • Add MatCopyHashToXAIJ() which allows assembling an XAIJ matrix in hash table form into another XAIJ matrix. Additionally added MatResetHash() which allows resetting an XAIJ matrix to use a hash table. Both of these developments will be leveraged in libMesh and MOOSE for simulations in which the sparsity pattern changes dynamically, rendering an initial preallocation invalid. By using a hash table in these cases as opposed to a preallocation, we can avoid new nonzero allocations which can sometimes slow simulations down by orders of magnitude

  • Add PetscCtxDestroyFn as the prototype for all context destroy functions. It is PetscErrorCode ()(void **). Previously some context destructor setters took PetscErrorCode ()(void *). But these would not work directly with PETSc objects as contexts and having two different context destructor models added unneeded complexity to the library. This change is not backward compatible

  • Deprecate PetscContainerSetUserDestroy() with PetscContainerSetCtxDestroy(), updating will require a small change in calling code

  • Deprecate PetscContainerCtxDestroyDefault with PetscCtxDestroyDefault()

  • Add PetscIntViewNumColumns(), PetscScalarViewNumColumns(), and PetscRealViewNumColumns()

  • Update --download-pastix to use CMake build, with additional dependency on LAPACKE and CBLAS, can use for ex. MKL with --with-blaslapack-dir=${MKLROOT}, or Netlib LAPACK with --download-netlib-lapack --with-netlib-lapack-c-bindings

  • Add option --with-library-name-suffix=<suffix>

  • Add PetscCIntCast()

  • Add PetscObjectHasFunction() to query for the presence of a composed method

  • Add ISGetCompressOutput() and ISSetCompressOutput()

  • Deprecate DMGetSection() and DMSetSection() for existing DMGetLocalSection() and DMSetLocalSection()

  • Add DMSwarmSortRestorePointsPerCell()

  • Change DMSwarmVectorGetField() and add DMSwarmVectorDefineFields() to handle multiple fields

  • Add DMSwarmGetCoordinateField() and DMSwarmSetCoordinateField()

  • Add DMSwarmComputeMoments()

  • Add DMSwarmPushCellDM() and DMSwarmPopCellDM()

  • Add DMPlexTransformGetMatchStrata() and DMPlexTransformSetMatchStrata()

  • Deprecate DMPlexSetGlobalToNaturalSF() and DMPlexGetGlobalToNaturalSF() for existing DMSetNaturalSF() and DMGetNaturalSF()

  • Add -dm_plex_box_label_bd to setup isoperiodicity when using -dm_plex_box_label_bd

Bug Fixes and Minor Enhancements

  • Periodic boundary conditions are now more verbose. They will now output intermediate setup data in their "auto_direction" mode, and will error with a helpful error message if used using conflicting parameters, or with a non-existing primary or secondary boundary.

  • All Sampler vectorpostprocessors (VPPs) will now correctly detect and throw an error when used with vector and array variables, which they currently do not support. New Sampler VPPs could be created to support them.

  • ProjectionAux can now handle 1D elements in a multi-dimensional mesh - for example, when using 1D thermal hydraulic channels in a multi-dimensional loop.

  • A NumTimeSteps postprocessor was added to count the number of time steps elapsed in a simulation.

  • Lower-D elements created using the "build_all_side_lowerd_mesh" parameter are now separated in multiple blocks depending on the full-dimensional block they are located next to. However, block-restriction of certain kernels to only part of the lower-D blocks is not supported.

  • Several mesh diagnostics were added to detect whether a mesh is fully englobed by sidesets, by which we mean that all external sides are part of a sideset, whether a mesh is fully englobed by nodesets, and whether there are any overlapping element edges in a mesh.

  • The dynamic pressure can now be used in lieu of the total pressure in the nonlinear finite volume discretization of the Navier Stokes equations for weakly compressible flow.