https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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)");
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
37void
42
43Real
45{
46 // Negative sign to make a positive mass_flux in the input file a source
47 return -_test[_i][_qp] * _mass_flux;
48}
registerMooseObject("PorousFlowApp", PorousFlowPointSourceFromPostprocessor)
unsigned int _i
unsigned int _qp
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint, Real value=1.0)
static InputParameters validParams()
const OutputTools< T >::VariableTestValue & _test
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Point source (or sink) that adds (removes) fluid at a mass flux rate specified by a postprocessor.
const PostprocessorValue & _mass_flux
The constant mass flux (kg/s)
const Point _p
The location of the point source (sink)
PorousFlowPointSourceFromPostprocessor(const InputParameters &parameters)