Semi implicit Navier Stokes Solver - geomechanics/mpm GitHub Wiki

Overall Structure

The semi-implicit scheme is purposely used to run the Navier-Stokes equation with volumetric incompressibility constraints. This solver solves the velocity and pressure fields following Chorin's projection, where the velocity field is solved explicitly and the pressure field is solved implicitly. In the current implementation, the solver only works with Newtonian and Bingham materials. The main differences of the input settings will be highlighted in the following sections.

Boundary Conditions

The kinematics and traction BCs should be enforced following the velocity constraints and external loading conditions described in the Explicit MPM scheme. Meanwhile, if nodal pressure BC is considered, an additional input object should be added following the convention below:

{

    "mesh":{
        "mesh": "mesh.txt",
        "entity_sets": "entity_sets.json",
        "boundary_conditions":{
            "pressure_constraints": [
                {
                    "nset_id": 1,
                    "pressure": 0.0,
                    "phase_id": 0
                }, 
                {
                    "file": "pressure_constraints_inputs.txt",
                    "phase_id": 0
                }
            ]
        }
    },

}

For pressure constraints:

  • "nset_id" corresponds to defined nodal sets within the entity sets JSON file.
  • "math_function_id" corresponds to IDs for defined "math_functions".
  • "phase_id" corresponds to the phase ID, which should be set as 0 for the Navier-Stokes solver.
  • "pressure" is the magnitude of imposed pressure.
  • Nodal pressure constraints can be input as a .txt file with each row corresponding to an individual constraint.

Particles

The particle type should be set as "particle_type": "P2DFLUID" or "P3DFLUID".

Materials

Newtonian and Bingham materials should include the incompressible flag and set as true, i.e. "incompressible": true.

Analysis

The major difference in the semi-implicit scheme is located at the analysis object defined at the input JSON file. Additional settings of analysis object can be found in the explicit scheme.

{

    "analysis": {
        "type": "MPMSemiImplicitNavierStokes2D",
        "scheme_settings": {
            "beta": 0
        },
        "linear_solver": {
            "assembler_type": "EigenSemiImplicitNavierStokes2D",
            "solver_settings": [
            {
                "dof": "pressure",
                "solver_type": "KrylovPETSC",
                "sub_solver_type": "cg",
                "preconditioner_type": "none",
                "max_iter": 1000,
                "tolerance": 1E-9,
                "abs_tolerance": 1E-9,
                "div_tolerance": 1E-9,
                "verbosity": 0
            }]
        },
	"free_surface_detection": {
		"type": "density",
		"volume_tolerance": 0.25
	},
        "dt": 1.0e-5,
        "nsteps": 1001,
        "uuid": "output-name-000"
    }

}

Type

Supported types:

Analysis Description
MPMSemiImplicitNavierStokes2D semi-implicit Navier-Stokes 2D MPM
MPMSemiImplicitNavierStokes3D semi-implicit Navier-Stokes 3D MPM

Scheme settings

User can also specify the "scheme_settings" option to change the default parameter considered in the simulation.

  • "beta" is the parameter that defines whether a full (0) or incremental (1) projection scheme is used.

Linear Solver

The "linear_solver" option is used to control the type of assembler and linear solver needed to solve the momentum equation implicitly.

  • "assembler_type" should be "EigenSemiImplicitNavierStokes2D" or "EigenSemiImplicitNavierStokes3D" for 2D or 3D simulation.
  • "solver_settings" contains all necessary settings to solve the linear equation Ax=b.
  • "dof" is the name of degrees of freedom. "pressure" must be specified for the semi-implicit MPM scheme.
  • "solver_type" is the name of the linear solver library used. Options available are:
Analysis Description
DirectEigen Direct solver of Eigen Library
IterativeEigen Iterative solver of Eigen Library
KrylovPETSC Iterative solver of PETSc Library
  • "sub_solver_type" is the name of the linear solver within the selected library.
  • "preconditioner_type" is the name of used preconditioner.
  • "max_iter" is the maximum number of iterations for the iterative linear solver.
  • "tolerance" is the relative residual tolerance.
  • "abs_tolerance" is the absolute tolerance.
  • "div_tolerance" is the divergence tolerance.
  • "verbosity" is to control how much information is output in the console. The default value is 0.

Free-surface detection

The "free_surface_detection" option is used to detect nodes, particles, and cells nearby the material's free surface where zero pressure BC should be imposed.

  • "type" can be "density" or "geometry". Only "density" is available for parallel solvers with MPI.
  • "volume_tolerance" defines volume tolerance where all nodes should be considered as free-surface. The default value is 0.25.