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 "Kernel.h" 13 : 14 : // Forward Declarations 15 : 16 : /** 17 : * This class computes the "split" momentum equation residual. In the 18 : * split method, this is a time-independent vector equation for "a", 19 : * an intermediate "acceleration" vector. The pressure is not coupled 20 : * directly to momentum in the split method. Note: this equation is 21 : * divided through by the density, so "nu" appears rather than "mu", for 22 : * instance. 23 : * 24 : * Do not use, USE INSChorinPredictor and related classes instead. 25 : */ 26 : class INSSplitMomentum : public Kernel 27 : { 28 : public: 29 : static InputParameters validParams(); 30 : 31 : INSSplitMomentum(const InputParameters & parameters); 32 : 33 0 : virtual ~INSSplitMomentum() {} 34 : 35 : protected: 36 : virtual Real computeQpResidual(); 37 : virtual Real computeQpJacobian(); 38 : virtual Real computeQpOffDiagJacobian(unsigned jvar); 39 : 40 : // Coupled variables 41 : const VariableValue & _u_vel; 42 : const VariableValue & _v_vel; 43 : const VariableValue & _w_vel; 44 : 45 : // Acceleration vector components 46 : const VariableValue & _a1; 47 : const VariableValue & _a2; 48 : const VariableValue & _a3; 49 : 50 : // Gradients 51 : const VariableGradient & _grad_u_vel; 52 : const VariableGradient & _grad_v_vel; 53 : const VariableGradient & _grad_w_vel; 54 : 55 : // Variable numberings 56 : unsigned _u_vel_var_number; 57 : unsigned _v_vel_var_number; 58 : unsigned _w_vel_var_number; 59 : 60 : unsigned _a1_var_number; 61 : unsigned _a2_var_number; 62 : unsigned _a3_var_number; 63 : 64 : // Parameters 65 : RealVectorValue _gravity; 66 : unsigned _component; 67 : 68 : // Material properties 69 : const MaterialProperty<Real> & _mu; 70 : const MaterialProperty<Real> & _rho; 71 : };