# DiracKernels System

## Point Source

Point sources (sometimes known as point loads) are typically modeled with Dirac distributions in finite element analysis.

We will employ the following generalized form for the Dirac delta distribution acting at :

where and are continuous functions.

The Dirac delta distribution is thus an

*integral operator*which "samples" the continuous functions and at the point .The special case is frequently used to induce the short-hand (abuse of) notation

A diffusion equation with a point source/sink of strength (which can depend on ) located at can therefore be written as:

Using th definiton above, the weak form for this equation (assuming Dirichlet BCs) is:

Assume the point falls in element . Then:

That is: we get a contribution for each DOF whose associated basis function is nonzero at .

The

`DiracKernel`

class computes these contributions given and .

## Dirac Kernels

A

`DiracKernel`

provides a residual (and optionally a Jacobian) at a set of points in the domain.The structure is very similar to kernels:

`computeQpResidual`

/`computeQpJacobian()`

Parameters

Coupling

Material Properties

etc.

The only difference is that

`DiracKernel`

*must*override the virtual`addPoints()`

function to tell MOOSE the points at which the`DiracKernel`

is active.Inside of

`addPoints()`

there are two different ways to tell MOOSE about the points:`addPoint(Point p)`

: Adds the physical point`p`

that lies inside the domain of the problem.`addPoint(Elem * e, Point p)`

: Adds the physical point`p`

that lies inside the element`e`

.

The second version is

*much*more efficient if you know, a-priori, the element in which the point is located.

## (Some) Values Available to DiracKernels

`_u, _grad_u`

: Value and gradient of variable this DiracKernel is operating on.`_phi, _grad_phi`

: Value () and gradient () of the trial functions at the current Dirac point.`_test, _grad_test`

: Value () and gradient () of the test functions at the current Dirac point.`_q_point`

: XYZ coordinates of the current Dirac Point.`_i, _j`

: Current shape functions for test and trial functions respectively.`_current_elem`

: A pointer to the current element that is being operated on.`_current_point`

: The point where the DiracKernel is currently being asked to compute.

## Example 17

See Example 17

## Further DiracKernel Documentation

- Moose App
- ConstantPointSource
- FunctionDiracSource
- Heat Conduction App
- GapHeatPointSourceMaster
- XFEMApp
- XFEMPressure
- Porous Flow App
- PorousFlowPeacemanBoreholeApproximates a borehole in the mesh using the Peaceman approach, ie using a number of point sinks with given radii whose positions are read from a file
- PorousFlowPolyLineSinkApproximates a polyline sink by using a number of point sinks with given weighting whose positions are read from a file
- PorousFlowSquarePulsePointSourcePoint source (or sink) that adds (removes) fluid at a constant mass flux rate for times between the specified start and end times.
- Contact App
- ContactMaster
- SlaveConstraint

- Moose App
- AddDiracKernelAction