https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FluidPropertiesBinaryDiffusionCoefMaterial.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
12#include "THMNames.h"
13
15
18{
20
21 params.addRequiredParam<UserObjectName>("vapor_mixture_fp",
22 "The VaporMixtureFluidProperties object");
24 "Computes the binary diffusion coefficient of a gas mixture from its fluid properties.");
25
26 return params;
27}
28
30 const InputParameters & parameters)
31 : Material(parameters),
32
33 _fp_mix(getUserObject<VaporMixtureFluidProperties>("vapor_mixture_fp")),
34
35 _p(getADMaterialProperty<Real>(THM::PRESSURE)),
36 _T(getADMaterialProperty<Real>(THM::TEMPERATURE)),
37
38 _diff_coef(declareADProperty<Real>(THM::MASS_DIFFUSION_COEFFICIENT))
39{
40 if (_fp_mix.numberOfComponents() != 2)
41 paramError("vapor_mixture_fp", "The gas mixture must have exactly two components.");
42}
43
44void
46{
47 // The primary gas has index 0 and the secondary gas index 1
49}
registerMooseObject("ThermalHydraulicsApp", FluidPropertiesBinaryDiffusionCoefMaterial)
Computes the binary diffusion coefficient of the primary and secondary gases of a binary gas mixture ...
ADMaterialProperty< Real > & _diff_coef
Binary diffusion coefficient.
const VaporMixtureFluidProperties & _fp_mix
Gas mixture fluid properties.
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
void paramError(const std::string &param, Args... args) const
Base class for fluid properties of vapor mixtures.
virtual Real binaryDiffusionCoefficient(Real p, Real T, unsigned int i, unsigned int j) const
Computes the binary diffusion coefficient of a pair of components [m^2/s].
virtual unsigned int numberOfComponents() const =0
Returns the number of components in the mixture.