www.mooseframework.org
RichardsPolyLineSink.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "DiracKernel.h"
13 #include "LinearInterpolation.h"
14 #include "RichardsSumQuantity.h"
15 #include "RichardsVarNames.h"
16 
17 // Forward Declarations
19 
20 template <>
21 InputParameters validParams<RichardsPolyLineSink>();
22 
28 class RichardsPolyLineSink : public DiracKernel
29 {
30 public:
31  RichardsPolyLineSink(const InputParameters & parameters);
32 
33  virtual void addPoints();
34  virtual Real computeQpResidual();
35  virtual Real computeQpJacobian();
36 
43  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
44 
45 protected:
52 
54  LinearInterpolation _sink_func;
55 
57  std::string _point_file;
58 
61 
63  unsigned int _pvar;
64 
66  const MaterialProperty<std::vector<Real>> & _pp;
67 
69  const MaterialProperty<std::vector<std::vector<Real>>> & _dpp_dv;
70 
72  std::vector<Real> _xs;
73 
75  std::vector<Real> _ys;
76 
78  std::vector<Real> _zs;
79 
85  bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
86 };
87 
RichardsPolyLineSink::computeQpResidual
virtual Real computeQpResidual()
Definition: RichardsPolyLineSink.C:127
RichardsPolyLineSink::parseNextLineReals
bool parseNextLineReals(std::ifstream &ifs, std::vector< Real > &myvec)
reads a space-separated line of floats from ifs and puts in myvec
Definition: RichardsPolyLineSink.C:93
RichardsPolyLineSink::_point_file
std::string _point_file
contains rows of the form x y z (space separated)
Definition: RichardsPolyLineSink.h:57
RichardsPolyLineSink::_pvar
unsigned int _pvar
The moose internal variable number of the richards variable of this Dirac Kernel.
Definition: RichardsPolyLineSink.h:63
RichardsPolyLineSink::_pp
const MaterialProperty< std::vector< Real > > & _pp
fluid porepressure (or porepressures in case of multiphase)
Definition: RichardsPolyLineSink.h:66
RichardsVarNames
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
Definition: RichardsVarNames.h:25
RichardsSumQuantity.h
RichardsPolyLineSink::_ys
std::vector< Real > _ys
vector of Dirac Points' y positions
Definition: RichardsPolyLineSink.h:75
RichardsPolyLineSink::RichardsPolyLineSink
RichardsPolyLineSink(const InputParameters &parameters)
Definition: RichardsPolyLineSink.C:49
RichardsVarNames.h
RichardsPolyLineSink::_total_outflow_mass
RichardsSumQuantity & _total_outflow_mass
This is used to hold the total fluid flowing into the sink Hence, it is positive for sinks where flui...
Definition: RichardsPolyLineSink.h:51
RichardsPolyLineSink
Approximates a polyline by a sequence of Dirac Points the mass flux from each Dirac Point is _sink_fu...
Definition: RichardsPolyLineSink.h:28
RichardsPolyLineSink::_zs
std::vector< Real > _zs
vector of Dirac Points' z positions
Definition: RichardsPolyLineSink.h:78
RichardsPolyLineSink::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian Note: at March2014 this is never called since moose do...
Definition: RichardsPolyLineSink.C:144
validParams< RichardsPolyLineSink >
InputParameters validParams< RichardsPolyLineSink >()
Definition: RichardsPolyLineSink.C:18
RichardsPolyLineSink::_xs
std::vector< Real > _xs
vector of Dirac Points' x positions
Definition: RichardsPolyLineSink.h:72
RichardsPolyLineSink::_dpp_dv
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
Definition: RichardsPolyLineSink.h:69
RichardsPolyLineSink::addPoints
virtual void addPoints()
Definition: RichardsPolyLineSink.C:115
RichardsPolyLineSink::_richards_name_UO
const RichardsVarNames & _richards_name_UO
Defines the richards variables in the simulation.
Definition: RichardsPolyLineSink.h:60
RichardsSumQuantity
Sums into _total This is used, for instance, to record the total mass flowing into a borehole.
Definition: RichardsSumQuantity.h:26
RichardsPolyLineSink::computeQpJacobian
virtual Real computeQpJacobian()
Definition: RichardsPolyLineSink.C:136
RichardsPolyLineSink::_sink_func
LinearInterpolation _sink_func
mass flux = _sink_func as a function of porepressure
Definition: RichardsPolyLineSink.h:54