MOOSE Newsletter (September 2023)

MOOSE Improvements

Nearest-point layered side integrals for functors

NearestPointLayeredSideIntegralFunctor was added, which extends NearestPointLayeredSideIntegral to accept any functor, not just variables.

Restart system refactoring

The Checkpoint restart system has been significantly refactored to enable restarts between different types of simulations, which translates in MOOSE to different systems. For example, the first simulation may be an eigenvalue calculation that computes a steady-state dominant eigenmode, then the second simulation, restarting from the first, can be a transient simulation that simulates a change in conditions away from this steady state.

JSON reader

The JSONFileReader user object lets a user load a JSON file in their simulation. Other objects can then access data stored in the JSON tree as long as they use the right key, or successive keys, to access it. This is demonstrated by new functionality in the piecewise tabular functions, including PiecewiseConstant and PiecewiseLinear, that can load the X and Y coordinates for the 1D function from vectors stored in a JSON file.

Mesh diagnostics

Mesh diagnostics were introduced in the mesh generation phase using the MeshDiagnosticsGenerator. This was driven by the need to catch errors in externally produced meshes before the simulation. The following diagnostics are implemented, where one can check:

  • the element volumes, to make sure they are all positive and all larger or smaller than user-defined values,

  • the element and the element sides' Jacobians for a 5th order quadrature (negative Jacobians are a common issue with distorted meshes),

  • sideset orientations, notably to make sure that the orientation is consistent with regards to subdomains and does not flip from one element side to another,

  • whether any elements overlap by checking both the element nodes and the element centroids and making sure they are not placed within another element they do not belong in (these two checks are heuristics),

  • whether multiple types of elements are present in the same subdomain (a single element type per subdomain is a limitation of the Exodus output, so it is best to avoid it),

  • side planarity (usage example: non-planar sides are approximated by the ray tracing module, so it may be important to be aware of their existence), and

  • whether there are any non-conformalities, with nodes from one element touching another one but not being part of it. The special case of non-conformalities arising from uniform adaptive mesh refinement is also detected and singled-out.

Mesh Generation new capabilities

Helical extrusion capabilities were added in the AdvancedExtruderGenerator. By specifying a non-zero axial pitch for the rotation, the 2D mesh is rotated during the extrusion. A full rotation, 2 pi radians, is performed over a full axial pitch of extrusion.

A ParsedElementDeletionGenerator object was added to be able to delete elements based on their spatial location, their id or their volume. Those criteria can be combined at leisure using a parsed expression in the "expression" parameter. For example: `expression = 'x > 0.1 | (id=345 & volume > 1)' will delete all elements with a centroid beyond x=1, and the element of id 345 if its volume is above 1.

The Navier Stokes module may now be used standalone to reproduce the laser melt pool simulation shown on the gallery page. The simulation is outlined in detail in 3D laser welding.

The NSPressurePin user object was added to the module. It provides the same functionality as the previous average and point-value constraints on the pressure but as a post-treatment of the pressure field rather than a constraint during the nonlinear solve. This facilitates preconditioning because the lagrange multiplier for the constraint had a zero on the diagonal of the Jacobian.

There is a new option when performing Rhie-Chow interpolations for finite-volume based Navier-Stokes simulations that reduces the nonlinearity of the advection term. The characteristic_speed parameter can be passed to the INSFVMomentumAdvection kernel and its derived classes or to the NavierStokesFV Action when using the NavierStokesFV action syntax in the input. In a lid driven cavity test with a Reynolds number of 200, specifying charateristic_speed resulted in a Newton solve with 8 nonlinear iterations. Using an average velocity interpolation yielded 9 nonlinear iterations. When using the default Rhie-Chow velocity interpolation, the nonlinear solve failed to converge after 50 nonlinear iterations.

Stochastic tools module improvements

The Proper Orthogonal Decomposition (POD)-based dimensionality reduction workflow now supports reduction for AuxVariables as well.

libMesh-level Changes

2023.09.06 Update

  • NetCDF upgrade to 4.9.2, now incorporating NetCDF via a git submodule

  • p-refinement can now be selectively disabled and reenabled on a per-variable-group basis

  • New error indicator for Empirical Interpolation Method (EIM) reduced-basis approximations

  • Elem::quality(ASPECT_RATIO) is now defined for all element types

  • Added option to use absolute instead of relative tolerances in linear solvers

  • Added the capability to "upgrade" a vector's ghosting and/or projection settings in subsequent System::add_vector() calls

  • Added MeshRefinement::allow_unrefined_patches() option

  • Refactored iterator declarations and added more range methods in MeshBase: every filtered iterator that could be previously accessed with a ...begin() and ...end() method now also has a ...range() method suitable for range-based for loops

  • Better PETSc versioning macros for use with pre-release PETSc commits

  • Build system now sets CFLAGS_OPT, etc. environment variables, not just CXXFLAGS and CPPFLAGS versions

  • Many more unit tests for ExodusII I/O and for element refinement APIs

  • Assorted fixes

    • Fixed Exodus I/O of side sets on 2D triangles embedded in 3D space

    • Fixed Nemesis dimension variable output

    • Fixed Nedelec one FE compatibility with Tri7 and Tet14 geometric elements

    • Fixed multiple issues with mesh refinement on meshes with certain types of infinite elements

    • Fixed no-parameters case and improved print statements in EIM code

    • Fixed typos in code comments

    • Minor fixes in vector FE example programs

  • Assorted optimizations

    • an unnecessary pointer-indirection layer has been removed from DiffContext

    • local matrix allocation in DiffContext objects is now optional

    • minor optimizations have been made to Hilbert-curve global indexing calculations

PETSc-level Changes

PETSc updated to 3.19.3: new conda packages

The moose-petsc package has been updated alongside the repository submodule to 3.19.3 - specifically, a pre-release version (3.19.3-884-g08c1f94318e). As a result of this change, moose-mpich required a new pinned dependency, GNU bison version 3.4. Subsequently, all conda packages have been incremented and should be updated.

To update your MOOSE packages, please activate your MOOSE conda environment and perform the command:


mamba update --all

The following package versions and builds outlined in the update prompt should be at least the following:


Package                  Version                     Build
============================================================
moose-dev                2023.09.15                  build_0
moose-libmesh            2023.09.06                  build_2
moose-libmesh-vtk        9.2.6                       build_4
moose-petsc              3.19.3.884.g08c1f94318e     build_0
moose-mpich              4.0.2                       build_11
moose-peacock            2023.09.15                  build_0

Bug Fixes and Minor Enhancements

  • An issue with the conflicting value diagnostic was patched in nearest-node transfers. Turning on the diagnostic, which was a default, could influence results in parallel.

  • Positions, used to create multiapps, can now be created by evaluating Functors, using the FunctorPositions object

  • Combining initial conditions and restart are now flagged as a potential user mistake. To combine them, and let initial conditions override the restarted fields, you will need to pass the allow_initial_conditions_with_restart parameter in the [Problem] block.

  • The moose-language-support plugin has been updated. It now highlights all known block syntaxes in MOOSE and its modules. It also features additional snippets for coding finite volume objects that can be accessed through auto-completion.

  • The UNITY build has been extended to all but a few source files. For fast machines with low core counts, the expected build speed-up of the framework alone is around 25%.

  • The FunctorSmoother functor material has been introduced to smooth out discontinuous or checkerboarding fields. As it acts on a functor, it can handle functions, functor material properties and variables.

  • The mesh generation system will now output all requested meshes using the output parameter, even if the final generator is set. This facilitates debugging of mesh generation.

  • Residual vectors for time and non-time terms are now only of type GHOSTED if an object requests for the full residual to be ghosted. This uses less memory and CPU in other cases.