LCOV - code coverage report
Current view: top level - src/bcs - NSEnergyInviscidSpecifiedDensityAndVelocityBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 0 25 0.0 %
Date: 2025-08-14 10:14:56 Functions: 0 5 0.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             : // Navier-Stokes includes
      11             : // This was experimental code and did not really work out, do not use!
      12             : #include "NSEnergyInviscidSpecifiedDensityAndVelocityBC.h"
      13             : #include "NS.h"
      14             : 
      15             : registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedDensityAndVelocityBC);
      16             : 
      17             : InputParameters
      18           0 : NSEnergyInviscidSpecifiedDensityAndVelocityBC::validParams()
      19             : {
      20           0 :   InputParameters params = NSEnergyInviscidBC::validParams();
      21             : 
      22             :   // Coupled variables
      23           0 :   params.addRequiredCoupledVar(NS::pressure, "pressure");
      24             : 
      25             :   // Required parameters
      26           0 :   params.addRequiredParam<Real>("specified_density", "The specified density for this boundary");
      27           0 :   params.addRequiredParam<Real>("specified_u",
      28             :                                 "The x-component of the specified velocity for this boundary");
      29           0 :   params.addRequiredParam<Real>("specified_v",
      30             :                                 "The y-component of the specified velocity for this boundary");
      31           0 :   params.addParam<Real>(
      32             :       "specified_w",
      33           0 :       0.0,
      34             :       "The z-component of the specified velocity for this boundary"); // only required in 3D
      35             : 
      36           0 :   return params;
      37           0 : }
      38             : 
      39           0 : NSEnergyInviscidSpecifiedDensityAndVelocityBC::NSEnergyInviscidSpecifiedDensityAndVelocityBC(
      40           0 :     const InputParameters & parameters)
      41             :   : NSEnergyInviscidBC(parameters),
      42           0 :     _pressure(coupledValue(NS::pressure)),
      43           0 :     _specified_density(getParam<Real>("specified_density")),
      44           0 :     _specified_u(getParam<Real>("specified_u")),
      45           0 :     _specified_v(getParam<Real>("specified_v")),
      46           0 :     _specified_w(getParam<Real>("specified_w"))
      47             : {
      48           0 : }
      49             : 
      50             : Real
      51           0 : NSEnergyInviscidSpecifiedDensityAndVelocityBC::computeQpResidual()
      52             : {
      53           0 :   return qpResidualHelper(_specified_density,
      54             :                           RealVectorValue(_specified_u, _specified_v, _specified_w),
      55           0 :                           _pressure[_qp]);
      56             : }
      57             : 
      58             : Real
      59           0 : NSEnergyInviscidSpecifiedDensityAndVelocityBC::computeQpJacobian()
      60             : {
      61             :   // TODO
      62             :   // return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
      63           0 :   return 0.;
      64             : }
      65             : 
      66             : Real
      67           0 : NSEnergyInviscidSpecifiedDensityAndVelocityBC::computeQpOffDiagJacobian(unsigned /*jvar*/)
      68             : {
      69             :   // TODO
      70             :   // return computeJacobianHelper(mapVarNumber(jvar));
      71           0 :   return 0.;
      72             : }

Generated by: LCOV version 1.14