22 "Source and sink of interfacial area for two-phase flow mixture model.");
23 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
24 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
25 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
27 params.
addParam<MooseFunctorName>(
"L", 1.0,
"The characteristic dissipation length.");
30 "Dispersed phase density.");
33 "k_c", 0.0,
"Mass exchange coefficients from continous to dispersed phases.");
34 params.
addParam<MooseFunctorName>(
"fd", 0.0,
"Fraction dispersed phase.");
35 params.
addParam<
Real>(
"fd_max", 1.0,
"Maximum dispersed phase fraction.");
37 params.
addParam<MooseFunctorName>(
"sigma", 1.0,
"Surface tension between phases.");
38 params.
addParam<MooseFunctorName>(
"particle_diameter", 1.0,
"Maximum particle diameter.");
42 "Void fraction at which the interface area density mass transfer model is " 43 "activated. Below this fraction, spherical bubbles are assumed.");
45 params.
set<
unsigned short>(
"ghost_layers") = 2;
52 _dim(_subproblem.
mesh().dimension()),
53 _u_var(getFunctor<
ADReal>(
"u")),
54 _v_var(params.isParamValid(
"v") ? &(getFunctor<
ADReal>(
"v")) : nullptr),
55 _w_var(params.isParamValid(
"w") ? &(getFunctor<
ADReal>(
"w")) : nullptr),
56 _characheristic_length(getFunctor<
ADReal>(
"L")),
60 _mass_exchange_coefficient(getFunctor<
ADReal>(
"k_c")),
61 _f_d(getFunctor<
ADReal>(
"fd")),
62 _f_d_max(getParam<
Real>(
"fd_max")),
63 _sigma(getFunctor<
ADReal>(
"sigma")),
64 _particle_diameter(getFunctor<
ADReal>(
"particle_diameter")),
65 _cutoff_fraction(getParam<
Real>(
"cutoff_fraction"))
68 paramError(
"v",
"In two or more dimensions, the v velocity must be supplied!");
71 paramError(
"w",
"In three or more dimensions, the w velocity must be supplied!");
84 const auto u =
_u_var(elem_arg, state);
85 const auto rho_d =
_rho_d(elem_arg, state);
86 const auto rho_d_grad =
_rho_d.gradient(elem_arg, state);
87 const auto xi =
_var(elem_arg, state);
89 const auto f_d =
_f_d(elem_arg, state);
94 const auto f_d_o_xi_old =
98 ADReal material_time_derivative_rho_d = u * rho_d_grad(0);
101 material_time_derivative_rho_d += (*_v_var)(elem_arg, state) * rho_d_grad(1);
104 material_time_derivative_rho_d += (*_w_var)(elem_arg, state) * rho_d_grad(2);
108 material_time_derivative_rho_d +=
110 const auto bubble_compressibility = material_time_derivative_rho_d * xi / 3.0;
126 velocity(1) = (*_v_var)(elem_arg, state);
128 velocity(2) = (*_w_var)(elem_arg, state);
132 const Real pressure_grad_norm =
139 const auto interaction_prefactor =
140 Utility::pow<2>(f_d_o_xi) * u_eps / (
std::pow(
db, 11. / 3.) / complement_fd);
143 const auto f_c = interaction_prefactor *
_gamma_c * Utility::pow<2>(f_d);
144 const auto exp_c = std::exp(-
_Kc *
std::pow(
db, 5. / 6.) * std::sqrt(rho_l /
sigma) * u_eps);
145 const auto s_rc = f_c * exp_c;
148 const auto f_b = interaction_prefactor *
_gamma_b * f_d * (1. - f_d);
151 const auto s_rb = f_b * exp_b;
153 return -bubble_added_mass + bubble_compressibility + s_rc - s_rb;
static constexpr Real _Kc
static constexpr Real TOLERANCE
static InputParameters validParams()
bool isZero(const T &value, const Real tolerance=TOLERANCE *TOLERANCE *TOLERANCE)
const Moose::Functor< ADReal > & _rho_d
Dispersed Phase Density.
Moose::StateArg determineState() const
WCNSFV2PInterfaceAreaSourceSink(const InputParameters ¶meters)
static const std::string density
const Real _cutoff_fraction
Cutoff fraction at which the full mass transfer model is activated.
ADReal computeQpResidual() override
const Moose::Functor< ADReal > & _particle_diameter
Particle Diameter.
const Moose::Functor< ADReal > & _characheristic_length
Characterisitc Length.
const Moose::Functor< ADReal > & _rho_mixture
Mixture Density.
DualNumber< Real, DNDerivativeType, true > ADReal
static constexpr Real _gamma_b
Computes source the sink terms for the interface area in the mixture model of two-phase flows...
const Moose::Functor< ADReal > & _mass_exchange_coefficient
Interface Mass Exchange Coeefficient.
const Moose::Functor< ADReal > & _pressure
Pressure field.
const unsigned int _dim
The dimension of the domain.
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const GeochemicalDatabaseReader db("database/moose_testdb.json", true, true, false)
const Elem *const & _current_elem
const Moose::Functor< ADReal > * _v_var
y-velocity
const Moose::Functor< ADReal > * _w_var
z-velocity
const Moose::Functor< ADReal > & _sigma
Surface Tension.
static InputParameters validParams()
virtual bool isTransient() const=0
registerMooseObject("NavierStokesApp", WCNSFV2PInterfaceAreaSourceSink)
void paramError(const std::string ¶m, Args... args) const
const Real _f_d_max
Maximum Void Fraction.
static constexpr Real _gamma_c
Internal closure coefficients.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static constexpr Real _Kb
static const std::string pressure
const Moose::Functor< ADReal > & _u_var
x-velocity
static const std::string velocity
ADReal computeSpeed(const ADRealVectorValue &velocity)
Compute the speed (velocity norm) given the supplied velocity.
MooseUnits pow(const MooseUnits &, int)
const Moose::Functor< ADReal > & _f_d
Void Fraction.
static constexpr Real _shape_factor
MooseVariableFV< Real > & _var