LCOV - code coverage report
Current view: top level - include/dirackernels - PorousFlowPeacemanBorehole.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-17 17:48:31 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #ifndef POROUSFLOWPEACEMANBOREHOLE_H
       9             : #define POROUSFLOWPEACEMANBOREHOLE_H
      10             : 
      11             : #include "PorousFlowLineSink.h"
      12             : 
      13             : class PorousFlowPeacemanBorehole;
      14             : 
      15             : template <>
      16             : InputParameters validParams<PorousFlowPeacemanBorehole>();
      17             : 
      18             : /**
      19             :  * Approximates a borehole by a sequence of Dirac Points
      20             :  */
      21          18 : class PorousFlowPeacemanBorehole : public PorousFlowLineSink
      22             : {
      23             : public:
      24             :   /**
      25             :    * Creates a new PorousFlowPeacemanBorehole
      26             :    * This reads the file containing the lines of the form
      27             :    * radius x y z
      28             :    * that defines the borehole geometry.
      29             :    * It also calculates segment-lengths and rotation matrices
      30             :    * needed for computing the borehole well constant
      31             :    */
      32             :   PorousFlowPeacemanBorehole(const InputParameters & parameters);
      33             : 
      34             : protected:
      35             :   /**
      36             :    * If positive then the borehole acts as a sink (producion well) for porepressure > borehole
      37             :    * pressure, and does nothing otherwise
      38             :    * If negative then the borehole acts as a source (injection well) for porepressure < borehole
      39             :    * pressure, and does nothing otherwise
      40             :    * The flow rate to/from the borehole is multiplied by |character|, so usually character = +/- 1
      41             :    */
      42             :   Function & _character;
      43             : 
      44             :   /// bottomhole pressure of borehole
      45             :   const Real _p_bot;
      46             : 
      47             :   /// unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point)
      48             :   const RealVectorValue _unit_weight;
      49             : 
      50             :   /// borehole constant
      51             :   const Real _re_constant;
      52             : 
      53             :   /// well constant
      54             :   const Real _well_constant;
      55             : 
      56             :   /// Whether there is a quadpoint permeability material (for error checking)
      57             :   const bool _has_permeability;
      58             : 
      59             :   /// Whether there is a quadpoint thermal conductivity material (for error checking)
      60             :   const bool _has_thermal_conductivity;
      61             : 
      62             :   /// Permeability or conductivity of porous material
      63             :   const MaterialProperty<RealTensorValue> & _perm_or_cond;
      64             : 
      65             :   /// d(Permeability)/d(PorousFlow variable)
      66             :   const MaterialProperty<std::vector<RealTensorValue>> & _dperm_or_cond_dvar;
      67             : 
      68             :   /// rotation matrix used in well_constant calculation
      69             :   std::vector<RealTensorValue> _rot_matrix;
      70             : 
      71             :   /**
      72             :    * Calculates Peaceman's form of the borehole well constant
      73             :    * Z Chen, Y Zhang, Well flow models for various numerical methods, Int J Num Analysis and
      74             :    * Modeling, 3 (2008) 375-388
      75             :    */
      76             :   Real wellConstant(const RealTensorValue & perm,
      77             :                     const RealTensorValue & rot,
      78             :                     const Real & half_len,
      79             :                     const Elem * ele,
      80             :                     const Real & rad) const;
      81             : 
      82             :   Real computeQpBaseOutflow(unsigned current_dirac_ptid) const override;
      83             :   void computeQpBaseOutflowJacobian(unsigned jvar,
      84             :                                     unsigned current_dirac_ptid,
      85             :                                     Real & outflow,
      86             :                                     Real & outflowp) const override;
      87             : };
      88             : 
      89             : #endif // POROUSFLOWPEACEMANBOREHOLE_H

Generated by: LCOV version 1.11