LCOV - code coverage report
Current view: top level - src/fvkernels - PCNSFVDensityTimeDerivative.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #33416 (b10b36) with base 9fbd27 Lines: 13 14 92.9 %
Date: 2026-07-23 16:18:21 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "PCNSFVDensityTimeDerivative.h"
      11             : #include "NS.h"
      12             : 
      13             : registerMooseObject("NavierStokesApp", PCNSFVDensityTimeDerivative);
      14             : 
      15             : InputParameters
      16          17 : PCNSFVDensityTimeDerivative::validParams()
      17             : {
      18          17 :   InputParameters params = FVQpTimeKernel::validParams();
      19          17 :   params.addClassDescription("A time derivative kernel for which the form is eps * ddt(rho*var).");
      20          17 :   params.addParam<MaterialPropertyName>(NS::porosity, NS::porosity, "The porosity");
      21          17 :   params.addRequiredCoupledVar(NS::density, "The density variable.");
      22          17 :   return params;
      23           0 : }
      24             : 
      25           9 : PCNSFVDensityTimeDerivative::PCNSFVDensityTimeDerivative(const InputParameters & parameters)
      26             :   : FVQpTimeKernel(parameters),
      27          18 :     _eps(getMaterialProperty<Real>(NS::porosity)),
      28           9 :     _rho_dot(adCoupledDot(NS::density)),
      29          18 :     _rho(adCoupledValue(NS::density))
      30             : {
      31           9 : }
      32             : 
      33             : ADReal
      34       10000 : PCNSFVDensityTimeDerivative::computeQpResidual()
      35             : {
      36       30000 :   return _eps[_qp] * (_u[_qp] * _rho_dot[_qp] + _u_dot[_qp] * _rho[_qp]);
      37             : }

Generated by: LCOV version 1.14