https://mooseframework.inl.gov
NSFVMixturePhaseInterface.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 "NS.h"
12 
14 
17 {
19  params.addClassDescription("Implements a phase-to-phase volumetric exchange.");
20  params.addRequiredParam<MooseFunctorName>(NS::alpha,
21  "Name of the volumetric exchange coefficient");
22  params.addRequiredParam<MooseFunctorName>("phase_coupled", "The ambient temperature");
23  return params;
24 }
25 
27  : FVElementalKernel(parameters),
28  _alpha(getFunctor<ADReal>(NS::alpha)),
29  _phase_coupled(getFunctor<ADReal>("phase_coupled"))
30 {
31 }
32 
33 ADReal
35 {
36  const auto elem_arg = makeElemArg(_current_elem);
37  const auto state = determineState();
38  return _alpha(elem_arg, state) * (_var(elem_arg, state) - _phase_coupled(elem_arg, state));
39 }
Moose::StateArg determineState() const
DualNumber< Real, DNDerivativeType, true > ADReal
NSFVMixturePhaseInterface(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Elem *const & _current_elem
static InputParameters validParams()
Implements a phase-to-phase volumetric exchange.
static InputParameters validParams()
registerMooseObject("NavierStokesApp", NSFVMixturePhaseInterface)
static const std::string alpha
Definition: NS.h:134
void addClassDescription(const std::string &doc_string)
const Moose::Functor< ADReal > & _phase_coupled
Coupled Phase Functor.
const Moose::Functor< ADReal > & _alpha
Interface voumetric transfer coefficient.
MooseVariableFV< Real > & _var