Boundary conditions

General purpose boundary conditions

The UniformDirichletBoundaryCondition boundary condition

The UniformDirichletBoundaryCondition allows imposing a prescribed value on a boundary.

The following snippet sets to zero the first component of the unknowns on the boundary labeled 5:

problem.addBoundaryCondition(
    ctx, std::make_unique<mfem_mgis::UniformDirichletBoundaryCondition>(
             problem.getFiniteElementDiscretizationPointer(), 5, 0)) |
    or_die;

Mechanical boundary conditions

The UniformImposedPressure boundary condition

The UniformImposedPressure boundary condition computes the residual associated with the following variational operator:

\[-\int_{\partial\Omega_{r}} p\,\vec{N}\,\cdot\,\,\vec{u}^{\star}\,\mathrm{d}S\]

where:

  • \(\partial\Omega_{r}\) denotes the boundary in the reference configuration on which the pressure is applied,

  • \(p\) is the imposed pressure,

  • \(\vec{N}\) is normal to the boundary in the reference configuration,

  • \(\vec{u}^{\star}\) is a virtual displacement.

The following snippet imposes a uniform pressure, which evolves linearly with time, on the boundary labeled 3:

problem.addBoundaryCondition(
    ctx,
    std::make_unique<mfem_mgis::UniformImposedPressureBoundaryCondition>(
        problem.getFiniteElementDiscretizationPointer(), 3,
        [](const mfem_mgis::real t) noexcept { return 150e6 * t; })) |
    or_die;

Heat transfer boundary conditions

The UniformHeatSource boundary condition computes the residual associated with the following variational operator:

\[\int_{\Omega_{r}} q\,T^{\star}\,\mathrm{d}V\]

where:

  • \(\Omega_{r}\) denotes the domain of interest in the reference configuration,

  • \(q\) is the heat source,

  • \(T^{\star}\) is a virtual temperature.

The following snippet imposes a uniform heat source, which evolves linearly with time, on the material named fuel:

problem.addBoundaryCondition(
    ctx, std::make_unique<mfem_mgis::UniformHeatSourceBoundaryCondition>(
             problem.getFiniteElementDiscretizationPointer(), "fuel",
             [&q](const auto t) { return q * t; })) |
    or_die;