https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FlowModelGasMixUtils.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
13
15{
16
19{
20 mooseAssert(fp.getNumberOfSecondaryVapors() == 1,
21 "This function assumes there is a single secondary fluid.");
22 const SinglePhaseFluidProperties & fp_primary = fp.getPrimaryFluidProperties();
23 const SinglePhaseFluidProperties & fp_secondary = fp.getSecondaryFluidProperties();
24
25 const ADReal xi_primary = 1 - xi_secondary;
26
27 const ADReal moles_primary = xi_primary / fp_primary.molarMass();
28 const ADReal moles_secondary = xi_secondary / fp_secondary.molarMass();
29
30 return moles_secondary / (moles_primary + moles_secondary);
31}
32
33}
DualNumber< Real, DNDerivativeType, true > ADReal
Common class for single phase fluid properties.
virtual Real molarMass() const
Molar mass [kg/mol].
Base class for fluid properties of vapor mixtures.
GenericReal< is_ad > computeSecondaryMoleFraction(const GenericReal< is_ad > &xi_secondary, const VaporMixtureFluidProperties &fp)