https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", NSFVMixturePhaseInterface)
static InputParameters validParams()
MooseVariableFV< Real > & _var
const Elem *const & _current_elem
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Implements a phase-to-phase volumetric exchange.
NSFVMixturePhaseInterface(const InputParameters &parameters)
const Moose::Functor< ADReal > & _alpha
Interface voumetric transfer coefficient.
static InputParameters validParams()
const Moose::Functor< ADReal > & _phase_coupled
Coupled Phase Functor.
Moose::StateArg determineState() const
static const std::string alpha
Definition NS.h:138