www.mooseframework.org
INSADMomentumTimeDerivative.C
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 
11 #include "INSADObjectTracker.h"
12 #include "FEProblemBase.h"
13 
15 
18 {
20  params.addClassDescription("This class computes the time derivative for the incompressible "
21  "Navier-Stokes momentum equation.");
22  params.addCoupledVar("temperature",
23  "The temperature on which material properties may depend. If properties "
24  "do depend on temperature, this variable must be coupled in in order to "
25  "correctly resize the element matrix");
26  return params;
27 }
28 
30  : ADVectorTimeKernelValue(parameters),
31  _td_strong_residual(getADMaterialProperty<RealVectorValue>("td_strong_residual"))
32 {
33  // Bypass the UserObjectInterface method because it requires a UserObjectName param which we
34  // don't need
35  auto & obj_tracker = const_cast<INSADObjectTracker &>(
36  _fe_problem.getUserObject<INSADObjectTracker>("ins_ad_object_tracker"));
37  for (const auto block_id : blockIDs())
38  obj_tracker.set("has_transient", true, block_id);
39 }
40 
43 {
44  return _td_strong_residual[_qp];
45 }
const ADMaterialProperty< RealVectorValue > & _td_strong_residual
static InputParameters validParams()
INSADMomentumTimeDerivative(const InputParameters &parameters)
T & getUserObject(const std::string &name, unsigned int tid=0) const
static InputParameters validParams()
void set(const std::string &name, const T &value, SubdomainID sub_id)
Set the internal parameter name to value.
virtual ADRealVectorValue precomputeQpResidual() override
virtual const std::set< SubdomainID > & blockIDs() const
FEProblemBase & _fe_problem
This class computes the time derivative for the incompressible Navier-Stokes momentum equation...
void addCoupledVar(const std::string &name, const std::string &doc_string)
registerMooseObject("NavierStokesApp", INSADMomentumTimeDerivative)
void addClassDescription(const std::string &doc_string)
Object for tracking what kernels have been added to an INSAD simulation.