https://mooseframework.inl.gov
PorousFlowPointSourceFromPostprocessor.C
Go to the documentation of this file.
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 
11 
13 
16 {
18  params.addRequiredParam<PostprocessorName>(
19  "mass_flux",
20  "The postprocessor name holding the mass flux at this point in kg/s (positive is flux in, "
21  "negative is flux out)");
22  params.addRequiredParam<Point>("point", "The x,y,z coordinates of the point source (or sink)");
23  params.addClassDescription(
24  "Point source (or sink) that adds (or removes) fluid at a mass flux rate "
25  "specified by a postprocessor.");
26  return params;
27 }
28 
30  const InputParameters & parameters)
31  : DiracKernel(parameters),
32  _mass_flux(getPostprocessorValue("mass_flux")),
33  _p(getParam<Point>("point"))
34 {
35 }
36 
37 void
39 {
40  addPoint(_p, 0);
41 }
42 
43 Real
45 {
46  // Negative sign to make a positive mass_flux in the input file a source
47  return -_test[_i][_qp] * _mass_flux;
48 }
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint)
const OutputTools< T >::VariableTestValue & _test
registerMooseObject("PorousFlowApp", PorousFlowPointSourceFromPostprocessor)
void addRequiredParam(const std::string &name, const std::string &doc_string)
Point source (or sink) that adds (removes) fluid at a mass flux rate specified by a postprocessor...
PorousFlowPointSourceFromPostprocessor(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _qp
const Point _p
The location of the point source (sink)
void addClassDescription(const std::string &doc_string)
const PostprocessorValue & _mass_flux
The constant mass flux (kg/s)
unsigned int _i
static InputParameters validParams()