www.mooseframework.org
NSMomentumInviscidBC.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "NSIntegratedBC.h"
13 #include "NSPressureDerivs.h"
14 
15 // Forward Declarations
17 
18 template <>
19 InputParameters validParams<NSMomentumInviscidBC>();
20 
60 {
61 public:
62  NSMomentumInviscidBC(const InputParameters & parameters);
63 
64 protected:
65  // Which spatial component of the momentum equations (0,1, or 2) is this
66  // kernel applied in?
67  const unsigned _component;
68 
69  // An object for computing pressure derivatives.
70  // Constructed via a reference to ourself
72 
73  // Declare ourselves friend to the helper class.
74  template <class U>
75  friend class NSPressureDerivs;
76 
77  // These functions can be mix-n-matched by derived classes to implement
78  // any of the following boundary conditions:
79  // .) Fully unspecified (both (rho*u)(u.n) and p computed implicitly, is this valid?)
80  // .) Specified pressure/unspecified (rho*u)(u.n)
81  // .) Unspecified pressure/specified (rho*u)(u.n)
82  // .) Fully specified (both pressure and (rho*u)(u.n) given, this may not be physically
83  // meaningful?)
84 
85  // Depending on the passed-in value, will compute the residual for either a specified
86  // pressure value or the residual at the current value of the pressure.
88 
89  // If the pressure is fixed, the Jacobian of the pressure term is zero, otherwise
90  // we return the Jacobian value for the passed-in variable number.
91  Real pressureQpJacobianHelper(unsigned var_number);
92 
93  // Depending on the passed-in vector, will compute the residual for either a specified
94  // value of (rho*u)(u.n) or the residual at the current value of (rho*u)(u.n).
95  // The passed-in value is the _component'th entry of the (rho*u)(u.n) vector.
96  Real convectiveQpResidualHelper(Real rhou_udotn);
97 
98  // If the value of (rho*u)(u.n) is fixed, the Jacobian of the
99  // convective term is zero, otherwise we return the correct value
100  // based on the passed-in variable number.
101  Real convectiveQpJacobianHelper(unsigned var_number);
102 };
103 
NSPressureDerivs.h
NSPressureDerivs< NSMomentumInviscidBC >
NSMomentumInviscidBC
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
Definition: NSMomentumInviscidBC.h:59
validParams< NSMomentumInviscidBC >
InputParameters validParams< NSMomentumInviscidBC >()
Definition: NSMomentumInviscidBC.C:14
NSMomentumInviscidBC::_pressure_derivs
NSPressureDerivs< NSMomentumInviscidBC > _pressure_derivs
Definition: NSMomentumInviscidBC.h:71
NSIntegratedBC
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
Definition: NSIntegratedBC.h:29
NSMomentumInviscidBC::pressureQpResidualHelper
Real pressureQpResidualHelper(Real pressure)
Definition: NSMomentumInviscidBC.C:33
NSMomentumInviscidBC::convectiveQpResidualHelper
Real convectiveQpResidualHelper(Real rhou_udotn)
Definition: NSMomentumInviscidBC.C:52
NSMomentumInviscidBC::NSMomentumInviscidBC
NSMomentumInviscidBC(const InputParameters &parameters)
Definition: NSMomentumInviscidBC.C:24
NSMomentumInviscidBC::pressureQpJacobianHelper
Real pressureQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidBC.C:45
NSMomentumInviscidBC::_component
const unsigned _component
Definition: NSMomentumInviscidBC.h:67
NSMomentumInviscidBC::convectiveQpJacobianHelper
Real convectiveQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidBC.C:64
NSIntegratedBC.h
NS::pressure
const std::string pressure
Definition: NS.h:25