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 : #include "WCNSFVMassTimeDerivative.h" 11 : 12 : #include "NS.h" 13 : 14 : registerMooseObject("NavierStokesApp", WCNSFVMassTimeDerivative); 15 : 16 : InputParameters 17 656 : WCNSFVMassTimeDerivative::validParams() 18 : { 19 656 : InputParameters params = FVFunctorTimeKernel::validParams(); 20 656 : params.addClassDescription("Adds the time derivative term to the weakly-compressible " 21 : "Navier-Stokes continuity equation."); 22 1968 : params.addRequiredParam<MooseFunctorName>(NS::time_deriv(NS::density), 23 : "The time derivative of the density material property"); 24 656 : return params; 25 0 : } 26 : 27 372 : WCNSFVMassTimeDerivative::WCNSFVMassTimeDerivative(const InputParameters & params) 28 744 : : FVFunctorTimeKernel(params), _rho_dot(getFunctor<ADReal>(NS::time_deriv(NS::density))) 29 : { 30 372 : } 31 : 32 : ADReal 33 933618 : WCNSFVMassTimeDerivative::computeQpResidual() 34 : { 35 933618 : return _rho_dot(makeElemArg(_current_elem), determineState()); 36 : }