https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GapFluxModelConductionBase.C
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
11#include "libmesh/utility.h"
12
15{
17 params.addParam<Real>("gap_conductivity", 1.0, "Gap conductivity value");
18 params.addRangeCheckedParam<Real>(
19 "min_gap", 1e-6, "min_gap>0", "A minimum gap (denominator) size");
20 params.addRangeCheckedParam<unsigned int>(
21 "min_gap_order",
22 0,
23 "min_gap_order<=1",
24 "Order of the Taylor expansion below min_gap for GapFluxModelConductionBase");
25 params.addParamNamesToGroup("gap_conductivity min_gap min_gap_order", "Gap conductive flux");
26 return params;
27}
28
30 : GapFluxModelBase(parameters),
31 _gap_conductivity(getParam<Real>("gap_conductivity")),
32 _min_gap(getParam<Real>("min_gap")),
33 _min_gap_order(getParam<unsigned int>("min_gap_order"))
34{
35}
36
39 const ADReal & primary_T,
40 const ADReal & gap_conductivity_multiplier) const
41{
42 const auto gap_conductivity = _gap_conductivity * gap_conductivity_multiplier;
43
44 return (primary_T - secondary_T) * gap_conductivity * gapAttenuation();
45}
46
49{
50
51 mooseAssert(_min_gap > 0, "min_gap must be larger than zero.");
52
54 {
55 return 1.0 / _adjusted_length;
56 }
57 else
58 switch (_min_gap_order)
59 {
60 case 0:
61 return 1.0 / _min_gap;
62
63 case 1:
64 return 1.0 / _min_gap - (_adjusted_length - _min_gap) / (_min_gap * _min_gap);
65
66 default:
68 "Invalid Taylor expansion order for gap attenuation in GapFluxModelConductionBase");
69 }
70}
DualNumber< Real, DNDerivativeType, true > ADReal
void ErrorVector unsigned int
Base class for gap flux models used by ModularGapConductanceConstraint.
static InputParameters validParams()
static InputParameters validParams()
GapFluxModelConductionBase(const InputParameters &parameters)
const Real _gap_conductivity
Gap conductivity constant.
ADReal computeConductionFlux(const ADReal &secondary_T, const ADReal &primary_T, const ADReal &conductivity_multiplier) const
computes the conduction flux based on the input secondary and primary temperatures as well a gap cond...
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void mooseError(Args &&... args) const