https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctorIsotropicDragCoefficients.h
Go to the documentation of this file.
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#pragma once
11
13#include "NS.h"
14
22template <typename Derived>
24{
25public:
27
29
30protected:
33
36};
37
38template <typename Derived>
41{
43 params.addParam<Real>("Darcy_multiplier", 1, "A multiplier to adjust Darcy coefficients");
44 params.addParam<Real>(
45 "Forchheimer_multiplier", 1, "A multiplier to adjust Forchheimer coefficients");
46 return params;
47}
48
49template <typename Derived>
51 const InputParameters & parameters)
52 : FunctorDragCoefficients(parameters),
53 _darcy_mult(getParam<Real>("Darcy_multiplier")),
54 _forchheimer_mult(getParam<Real>("Forchheimer_multiplier"))
55{
56 addFunctorProperty<ADRealVectorValue>(
57 NS::cL,
58 [this](const auto & r, const auto & t) -> ADRealVectorValue
59 {
60 RealVectorValue multipliers(1.0, 1.0, 1.0);
61 return multipliers * static_cast<Derived *>(this)->computeDarcyPrefactor(r, t) *
62 static_cast<Derived *>(this)->computeDarcyCoefficient(r, t) * _darcy_mult;
63 });
64
65 addFunctorProperty<ADRealVectorValue>(
66 NS::cQ,
67 [this](const auto & r, const auto & t) -> ADRealVectorValue
68 {
69 RealVectorValue multipliers(1.0, 1.0, 1.0);
70 return multipliers * static_cast<Derived *>(this)->computeForchheimerPrefactor(r, t) *
71 static_cast<Derived *>(this)->computeForchheimerCoefficient(r, t) *
73 });
74}
Abstract base class material providing the drag coefficients for linear and quadratic friction models...
static InputParameters validParams()
Abstract base class to compute isotropic drag coefficients, where and are independent of direction.
Real _forchheimer_mult
a multiplier for adjusting Forchheimer coefficients
FunctorIsotropicDragCoefficients(const InputParameters &parameters)
Real _darcy_mult
a multiplier for adjusting Darcy coefficients
const InputParameters & parameters() const
static const std::string cL
Definition NS.h:115
static const std::string cQ
Definition NS.h:116