LCOV - code coverage report
Current view: top level - src/materials - PINSFEMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 27 28 96.4 %
Date: 2025-08-14 10:14:56 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 "PINSFEMaterial.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", PINSFEMaterial);
      13             : registerMooseObjectRenamed("NavierStokesApp",
      14             :                            GenericPorousMediumMaterial,
      15             :                            "02/01/2024 00:00",
      16             :                            PINSFEMaterial);
      17             : 
      18             : InputParameters
      19         425 : PINSFEMaterial::validParams()
      20             : {
      21         425 :   InputParameters params = INSFEMaterial::validParams();
      22             : 
      23         425 :   params.addClassDescription("Computes generic material properties related to simulation of fluid "
      24             :                              "flow in a porous medium");
      25         850 :   params.addRequiredParam<Real>("alpha", "Inertia drag coefficient");
      26         850 :   params.addRequiredParam<Real>("beta", "Viscous drag coefficient");
      27         850 :   params.addParam<Real>("pm_htc", 0, "Fluid-to-solid heat transfer coefficient in porous medium");
      28         850 :   params.addParam<Real>("pm_aw", 0, "Fluid-to-solid heat transfer area density in porous medium");
      29             : 
      30         425 :   return params;
      31           0 : }
      32             : 
      33         330 : PINSFEMaterial::PINSFEMaterial(const InputParameters & parameters)
      34             :   : INSFEMaterial(parameters),
      35         330 :     _alpha(getParam<Real>("alpha")),
      36         660 :     _beta(getParam<Real>("beta")),
      37         660 :     _pm_htc_const(getParam<Real>("pm_htc")),
      38         660 :     _pm_aw_const(getParam<Real>("pm_aw")),
      39         330 :     _pm_htc(declareProperty<Real>("pm_heat_transfer_coefficient")),
      40         660 :     _pm_aw(declareProperty<Real>("pm_heat_transfer_area_density"))
      41             : {
      42         330 : }
      43             : 
      44             : void
      45     8839736 : PINSFEMaterial::computeQpProperties()
      46             : {
      47     8839736 :   INSFEMaterial::computeQpProperties();
      48             : 
      49     8839736 :   _inertia_resistance_coeff[_qp](0, 0) = _alpha;
      50     8839736 :   _inertia_resistance_coeff[_qp](1, 1) = _alpha;
      51     8839736 :   _inertia_resistance_coeff[_qp](2, 2) = _alpha;
      52             : 
      53     8839736 :   _viscous_resistance_coeff[_qp](0, 0) = _beta;
      54     8839736 :   _viscous_resistance_coeff[_qp](1, 1) = _beta;
      55     8839736 :   _viscous_resistance_coeff[_qp](2, 2) = _beta;
      56             : 
      57     8839736 :   _pm_htc[_qp] = _pm_htc_const;
      58     8839736 :   _pm_aw[_qp] = _pm_aw_const;
      59     8839736 : }

Generated by: LCOV version 1.14