Developer Guide

Developing a New Physics Module

Developers have two workflows for creating new physics modules:

  1. Creating a new multi-physics module from existing physics modules.

  2. Creating a new single physics PDE simulation module.

In the first case, construct the new physics module by including existing physics modules by composition. See the Thermal solid mechanics module for an example.

For the second case, starting with an existing physics module and re-writing it as necessary is a good practice. The following steps describe creation of a new physics module:

  1. Create a new class derived from BasePhysics.

  2. In the constructor, create new std::shared_ptrs to FiniteElementStates corresponding to each state variable in your PDE.

  3. Link these states to the state pointer array in the BasePhysics class.

  4. Create methods for defining problem parameters (e.g. material properties and sources).

  5. Create methods for defining boundary conditions. These should be stored as BoundaryConditions and managed in the BasePhysics's BoundaryConditionManager.

  6. Override the virtual completeSetup() method. This should include construction of all of the data structures needed for advancing the timestep of the PDE.

  7. Override the virtual advanceTimestep() method. This should solve the discretized PDE based on the chosen time integration method. This often requires defining mfem::Operators to use MFEM-based nonlinear and time integration methods.

Important Data Structures

Source Code Documentation

Doxygen documentation for the Serac source code is located in the Doxygen directory.