Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : // MOOSE 13 : #include "LinearFVBoundaryCondition.h" 14 : 15 : /** 16 : * Base class for boundary conditions that are valid for advection diffusion problems. 17 : * LinearFVAdvection/Diffusion kernels rely on the implementation of the RHS and matrix 18 : * contribution routines. 19 : */ 20 : class LinearFVAdvectionDiffusionBC : public LinearFVBoundaryCondition 21 : { 22 : public: 23 : /** 24 : * Class constructor. 25 : * @param parameters The InputParameters for the object 26 : */ 27 : LinearFVAdvectionDiffusionBC(const InputParameters & parameters); 28 : 29 : static InputParameters validParams(); 30 : 31 : /** 32 : * Computes the boundary value's contribution to the linear system matrix. Mostly used 33 : * in advection kernels. 34 : */ 35 : virtual Real computeBoundaryValueMatrixContribution() const = 0; 36 : 37 : /** 38 : * Computes the boundary value's contribution to the linear system right hand side. 39 : * Mostly used in advection kernels. 40 : */ 41 : virtual Real computeBoundaryValueRHSContribution() const = 0; 42 : 43 : /** 44 : * Computes the boundary gradient's contribution to the linear system matrix. Mostly used in 45 : * diffusion kernels. 46 : */ 47 : virtual Real computeBoundaryGradientMatrixContribution() const = 0; 48 : 49 : /** 50 : * Computes the boundary gradient's contribution to the linear system right hand side. 51 : * Mostly used in diffusion kernels. 52 : */ 53 : virtual Real computeBoundaryGradientRHSContribution() const = 0; 54 : 55 : /** 56 : * Check if the contributions to the right hand side and matrix already include the material 57 : * property multiplier. For dirichlet boundary conditions this is false, but for flux boundary 58 : * conditions this can be true (like Neumann BC for diffusion problems). 59 : */ 60 128820 : virtual bool includesMaterialPropertyMultiplier() const { return false; } 61 : 62 : /** 63 : * Define if the value of the gradient of the field to compute fluxes at boundaries is 64 : * prescribed by the BC or if it is extrapolated/derived from the BC. For Neumann BC this 65 : # is false as the flux is prescribed, whereas for Dirichlet BC this is true. 66 : */ 67 10472 : virtual bool useBoundaryGradientExtrapolation() const { return false; } 68 : };