https://mooseframework.inl.gov
Loading...
Searching...
No Matches
thermal_hydraulics
src
utils
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
10
#include "
FlowModelGasMixUtils.h
"
11
#include "
VaporMixtureFluidProperties.h
"
12
#include "
SinglePhaseFluidProperties.h
"
13
14
namespace
FlowModelGasMixUtils
15
{
16
17
ADReal
18
computeSecondaryMoleFraction
(
const
ADReal
& xi_secondary,
const
VaporMixtureFluidProperties
&
fp
)
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
}
ADReal
DualNumber< Real, DNDerivativeType, true > ADReal
FlowModelGasMixUtils.h
SinglePhaseFluidProperties.h
VaporMixtureFluidProperties.h
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition
SinglePhaseFluidProperties.h:115
SinglePhaseFluidProperties::molarMass
virtual Real molarMass() const
Molar mass [kg/mol].
Definition
SinglePhaseFluidProperties.C:290
VaporMixtureFluidProperties
Base class for fluid properties of vapor mixtures.
Definition
VaporMixtureFluidProperties.h:103
FlowModelGasMixUtils
Definition
FlowModelGasMixUtils.h:19
FlowModelGasMixUtils::computeSecondaryMoleFraction
GenericReal< is_ad > computeSecondaryMoleFraction(const GenericReal< is_ad > &xi_secondary, const VaporMixtureFluidProperties &fp)
Definition
FlowModelGasMixUtils.h:166
fp
Definition
DimensionlessFlowNumbers.h:19
Generated on Fri Aug 21 2026 13:42:02 for https://mooseframework.inl.gov by
1.9.8