Line data Source code
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 : 10 : #pragma once 11 : 12 : #include "GeneralUserObject.h" 13 : #include "BlockRestrictable.h" 14 : #include "INSFVPressureVariable.h" 15 : #include "NonADFunctorInterface.h" 16 : 17 : class MooseMesh; 18 : class INSFVPressureVariable; 19 : 20 : /** 21 : * This user-object corrects the pressure 22 : */ 23 : class NSPressurePin : public GeneralUserObject, 24 : public BlockRestrictable, 25 : public NonADFunctorInterface 26 : { 27 : public: 28 : static InputParameters validParams(); 29 : NSPressurePin(const InputParameters & params); 30 : 31 : virtual void initialSetup() override; 32 849 : virtual void initialize() override {} 33 : virtual void execute() override; 34 849 : virtual void finalize() override {} 35 : 36 : protected: 37 : /// LibMesh mesh class for the current simulation mesh 38 : MeshBase & _mesh; 39 : 40 : /// The thread 0 copy of the pressure variable 41 : const MooseVariableFieldBase & _p; 42 : 43 : /// Value of the pressure pin 44 : const PostprocessorValue & _p0; 45 : 46 : /// Pressure pin type 47 : const MooseEnum _pressure_pin_type; 48 : 49 : /// If using point-value pressure pin, the point at which to apply the pin 50 : const Point _pressure_pin_point; 51 : 52 : /// If using average pressure pin, provides the average pressure value 53 : const PostprocessorValue * const _current_pressure_average; 54 : 55 : private: 56 : /// The nonlinear system 57 : SystemBase & _sys; 58 : };