https://mooseframework.inl.gov
Loading...
Searching...
No Matches
IdealGasMixtureFluidProperties.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#include "NewtonInversion.h"
14
15#include "libmesh/utility.h"
16
17#include <limits>
18
20
24#define define_mass_specific_prop_from_p_T(prop) \
25 Real IdealGasMixtureFluidProperties::prop##_from_p_T( \
26 Real p, Real T, const std::vector<Real> & x_secondary) const \
27 { \
28 const auto x = secondaryToAllMassFractions(x_secondary); \
29 mooseAssert(x.size() == _n_components, "Size mismatch"); \
30 \
31 Real z = 0; \
32 for (const auto i : make_range(_n_components)) \
33 z += x[i] * _component_fps[i]->prop##_from_p_T(p, T); \
34 \
35 return z; \
36 } \
37 ADReal IdealGasMixtureFluidProperties::prop##_from_p_T( \
38 const ADReal & p, const ADReal & T, const std::vector<ADReal> & x_secondary) const \
39 { \
40 const auto x = secondaryToAllMassFractions(x_secondary); \
41 mooseAssert(x.size() == _n_components, "Size mismatch"); \
42 \
43 ADReal z = 0; \
44 for (const auto i : make_range(_n_components)) \
45 z += x[i] * _component_fps[i]->prop##_from_p_T(p, T); \
46 \
47 return z; \
48 }
49
50// clang-format off
55
56#undef define_mass_specific_prop_from_p_T
57
59// clang-format on
60{
62 params += NaNInterface::validParams();
63
64 params.addClassDescription("Class for fluid properties of an ideal gas mixture");
65
66 params.addRequiredParam<std::vector<UserObjectName>>(
67 "component_fluid_properties",
68 "Name of component fluid properties user objects. The first entry should be the primary "
69 "component.");
70
71 MooseEnum transport_mixing_rule("mole_fraction_average wilke", "mole_fraction_average");
72 transport_mixing_rule.addDocumentation("mole_fraction_average",
73 "Uses the average weighted by molar fraction");
74 transport_mixing_rule.addDocumentation("wilke",
75 "Uses the rule of Wilke for the viscosity and that of "
76 "Mason and Saxena for the thermal conductivity");
77 params.addParam<MooseEnum>(
78 "transport_mixing_rule",
79 transport_mixing_rule,
80 "Rule that combines the viscosities and thermal conductivities of the components");
81
82 return params;
83}
84
86 : VaporMixtureFluidProperties(parameters),
87 NaNInterface(this),
88 _component_fp_names(getParam<std::vector<UserObjectName>>("component_fluid_properties")),
89 _n_components(_component_fp_names.size()),
90 _n_secondary_components(_n_components - 1),
91 _constant_specific_heats(true),
92 _T_newton_start(std::numeric_limits<Real>::max()),
93 _transport_mixing_rule(
94 getParam<MooseEnum>("transport_mixing_rule").getEnum<TransportMixingRule>())
95{
96 if (_n_components == 0)
97 mooseError("There must be at least one entry in 'component_fluid_properties'.");
98
99 // With components whose specific heats depend on temperature, Newton's method starts at the
100 // lowest of their start temperatures (see IdealGasMixtureInterface)
103 for (const auto i : make_range(_n_components))
104 {
105 const auto & single_phase_fp =
106 getUserObjectByName<SinglePhaseFluidProperties>(_component_fp_names[i]);
107 const auto ideal_gas_fp = dynamic_cast<const IdealGasMixtureInterface *>(&single_phase_fp);
108 if (!ideal_gas_fp)
109 mooseError("Each entry in 'component_fluid_properties' must be an ideal gas that implements "
110 "IdealGasMixtureInterface, such as 'IdealGasFluidProperties' or "
111 "'NASA7IdealGasFluidProperties'.");
112 if (!ideal_gas_fp->hasConstantSpecificHeats())
113 {
115 _T_newton_start = std::min(_T_newton_start, ideal_gas_fp->newtonStartTemperature());
116 }
117 _lennard_jones[i] = ideal_gas_fp->lennardJonesParameters();
118 _component_fps[i] = &single_phase_fp;
119 }
120
122 {
123 _wilke_molar_mass_factor.assign(_n_components, std::vector<Real>(_n_components));
124 _wilke_normalization.assign(_n_components, std::vector<Real>(_n_components));
125 for (const auto i : make_range(_n_components))
126 for (const auto j : make_range(_n_components))
127 {
128 const Real M_i = _component_fps[i]->molarMass();
129 const Real M_j = _component_fps[j]->molarMass();
130 _wilke_molar_mass_factor[i][j] = std::pow(M_j / M_i, 0.25);
131 _wilke_normalization[i][j] = 1 / std::sqrt(8 * (1 + M_i / M_j));
132 }
133 }
134}
135
141
144{
145 mooseAssert(i < getNumberOfSecondaryVapors(), "Requested secondary index too high.");
146 return *_component_fps[i + 1];
147}
148
149template <typename CppType>
150std::vector<CppType>
152 const std::vector<CppType> & x_secondary) const
153{
154 mooseAssert(x_secondary.size() == _n_secondary_components, "Size mismatch");
155
156 CppType sum = 0;
157 for (const auto i : make_range(_n_secondary_components))
158 sum += x_secondary[i];
159
160 const CppType x_primary = 1.0 - sum;
161
162 std::vector<CppType> x;
163 x.push_back(x_primary);
164 x.insert(x.end(), x_secondary.begin(), x_secondary.end());
165
166 return x;
167}
168
169std::vector<ADReal>
171 const std::vector<ADReal> & x_secondary) const
172{
173 return secondaryToAllMassFractions_templ(x_secondary);
174}
175
176std::vector<Real>
178 const std::vector<Real> & x_secondary) const
179{
180 return secondaryToAllMassFractions_templ(x_secondary);
181}
182
183template <typename CppType>
184CppType
186{
187 mooseAssert(x.size() == _n_components, "Size mismatch");
188
189 CppType sum = 0;
190 for (const auto i : make_range(_n_components))
191 sum += x[i] / _component_fps[i]->molarMass();
192
193 return 1.0 / sum;
194}
195
196ADReal
197IdealGasMixtureFluidProperties::mixtureMolarMass(const std::vector<ADReal> & x) const
198{
200}
201
202Real
204{
206}
207
208template <typename CppType>
209CppType
211 const CppType & T,
212 const std::vector<CppType> & x) const
213{
214 mooseAssert(x.size() == _n_components, "Size mismatch");
215
216 CppType cp_mix = 0, cv_mix = 0;
217 for (const auto i : make_range(_n_components))
218 {
219 cp_mix += x[i] * _component_fps[i]->cp_from_p_T(p, T);
220 cv_mix += x[i] * _component_fps[i]->cv_from_p_T(p, T);
221 }
222
223 return cp_mix / cv_mix;
224}
225
226ADReal
228 const ADReal & T,
229 const std::vector<ADReal> & x) const
230{
232}
233
234Real
236 Real T,
237 const std::vector<Real> & x) const
238{
240}
241
242template <typename CppType>
243CppType
245{
246 mooseDoOnce(mooseDeprecated("mixtureSpecificHeatRatio(x) is deprecated; use "
247 "mixtureSpecificHeatRatio(p, T, x) instead."));
249 mooseError("mixtureSpecificHeatRatio(x) requires components with constant specific heats; use "
250 "mixtureSpecificHeatRatio(p, T, x) instead.");
251
252 // The specific heats are constant, so any pressure and temperature give the same ratio
253 return mixtureSpecificHeatRatio_templ(CppType(0), CppType(0), x);
254}
255
256ADReal
258{
260}
261
262Real
264{
266}
267
268template <typename CppType>
269std::vector<CppType>
271 const std::vector<CppType> & x) const
272{
273 mooseAssert(x.size() == _n_components, "Size mismatch");
274
275 const auto M = mixtureMolarMass(x);
276 std::vector<CppType> psi(_n_components);
277 for (const auto i : make_range(_n_components))
278 psi[i] = x[i] * M / _component_fps[i]->molarMass();
279
280 return psi;
281}
282
283std::vector<ADReal>
288
289std::vector<Real>
294
295template <typename CppType>
296CppType
297IdealGasMixtureFluidProperties::s_from_p_T_templ(const CppType & p,
298 const CppType & T,
299 const std::vector<CppType> & x_secondary) const
300{
301 const auto x = secondaryToAllMassFractions(x_secondary);
302 const auto psi = molarFractionsFromMassFractions(x);
303 mooseAssert(x.size() == _n_components, "Size mismatch");
304
305 // Gibbs-Dalton: each component contributes its entropy at its partial pressure
306 // Components with a zero molar fraction contribute nothing
307 CppType s = 0;
308 for (const auto i : make_range(_n_components))
309 if (psi[i] > 0)
310 s += x[i] * _component_fps[i]->s_from_p_T(psi[i] * p, T);
311
312 return s;
313}
314
315ADReal
316IdealGasMixtureFluidProperties::s_from_p_T(const ADReal & p,
317 const ADReal & T,
318 const std::vector<ADReal> & x_secondary) const
319{
320 return s_from_p_T_templ(p, T, x_secondary);
321}
322
323Real
324IdealGasMixtureFluidProperties::s_from_p_T(Real p,
325 Real T,
326 const std::vector<Real> & x_secondary) const
327{
328 return s_from_p_T_templ(p, T, x_secondary);
329}
330
331ADReal
332IdealGasMixtureFluidProperties::rho_from_p_T(const ADReal & p,
333 const ADReal & T,
334 const std::vector<ADReal> & x_secondary) const
335{
336 return 1.0 / v_from_p_T(p, T, x_secondary);
337}
338
339Real
340IdealGasMixtureFluidProperties::rho_from_p_T(Real p,
341 Real T,
342 const std::vector<Real> & x_secondary) const
343{
344 return 1.0 / v_from_p_T(p, T, x_secondary);
345}
346
347template <typename CppType>
348CppType
349IdealGasMixtureFluidProperties::e_from_p_rho_templ(const CppType & p,
350 const CppType & rho,
351 const std::vector<CppType> & x_secondary) const
352{
353 const auto x = secondaryToAllMassFractions(x_secondary);
354 const auto T = p * mixtureMolarMass(x) / (_R * rho);
355 return e_from_p_T(p, T, x_secondary);
356}
357
358ADReal
359IdealGasMixtureFluidProperties::e_from_p_rho(const ADReal & p,
360 const ADReal & rho,
361 const std::vector<ADReal> & x_secondary) const
362{
363 return e_from_p_rho_templ(p, rho, x_secondary);
364}
365
366Real
367IdealGasMixtureFluidProperties::e_from_p_rho(Real p,
368 Real rho,
369 const std::vector<Real> & x_secondary) const
370{
371 return e_from_p_rho_templ(p, rho, x_secondary);
372}
373
374template <typename CppType>
375CppType
376IdealGasMixtureFluidProperties::p_from_v_e_templ(const CppType & v,
377 const CppType & e,
378 const std::vector<CppType> & x_secondary) const
379{
380 const auto x = secondaryToAllMassFractions(x_secondary);
381 const auto M = mixtureMolarMass(x);
382
383 return _R * T_from_v_e(v, e, x_secondary) / (M * v);
384}
385
386ADReal
387IdealGasMixtureFluidProperties::p_from_v_e(const ADReal & v,
388 const ADReal & e,
389 const std::vector<ADReal> & x_secondary) const
390{
391 return p_from_v_e_templ(v, e, x_secondary);
392}
393
394Real
395IdealGasMixtureFluidProperties::p_from_v_e(Real v,
396 Real e,
397 const std::vector<Real> & x_secondary) const
398{
399 return p_from_v_e_templ(v, e, x_secondary);
400}
401
402template <typename CppType>
403CppType
404IdealGasMixtureFluidProperties::T_from_v_e_templ(const CppType & /*v*/,
405 const CppType & e,
406 const std::vector<CppType> & x_secondary) const
407{
408 const auto x = secondaryToAllMassFractions(x_secondary);
409 mooseAssert(x.size() == _n_components, "Size mismatch");
410
411 // The internal energy and specific heats of an ideal gas do not depend on pressure, so the
412 // components are evaluated at zero pressure
414 {
415 // The internal energy of each component is linear in temperature, e_k(T) = e_k(0) + cv_k T, so
416 // the temperature follows explicitly
417 CppType e0_sum = 0;
418 CppType cv_sum = 0;
419 for (const auto i : make_range(_n_components))
420 {
421 e0_sum += x[i] * _component_fps[i]->e_from_p_T(0.0, 0.0);
422 cv_sum += x[i] * _component_fps[i]->cv_from_p_T(0.0, 0.0);
423 }
424 return (e - e0_sum) / cv_sum;
425 }
426
427 // Mixture internal energy and isochoric specific heat at a temperature
428 const auto e_cv_from_T = [this, &x](const CppType & T, CppType & e_T, CppType & cv_T)
429 {
430 const CppType p = 0;
431 e_T = 0;
432 cv_T = 0;
433 for (const auto i : make_range(_n_components))
434 {
435 e_T += x[i] * _component_fps[i]->e_from_p_T(p, T);
436 cv_T += x[i] * _component_fps[i]->cv_from_p_T(p, T);
437 }
438 };
439
440 const Real T0 = _T_newton_start;
441
442 // The internal energy can be close to zero, where the convergence test of NewtonSolve, which is
443 // relative to the target value, would demand accuracy below roundoff. Solve e(T) + shift =
444 // e + shift instead, with the shift cv T - e(T) at T0. Both sides are then close to cv T, and the
445 // convergence test bounds the relative error in temperature.
446 CppType e0, cv0;
447 e_cv_from_T(CppType(T0), e0, cv0);
448 const Real shift = MetaPhysicL::raw_value(cv0) * T0 - MetaPhysicL::raw_value(e0);
449
450 const auto shifted_e = [&e_cv_from_T, shift](const CppType & /*e*/,
451 const CppType & T,
452 CppType & e_T,
453 CppType & de_T_de,
454 CppType & de_T_dT)
455 {
456 e_cv_from_T(T, e_T, de_T_dT);
457 e_T += shift;
458 de_T_de = 0;
459 };
460
461 // Relative tolerance of the Newton iteration, the default of the corresponding parameter of
462 // SinglePhaseFluidProperties. Newton's method applies one more update after it converges, so the
463 // temperature is accurate to roundoff.
464 const Real tolerance = 1e-8;
465 const CppType target = e + shift;
467 e, target, T0, tolerance, shifted_e, name() + "::T_from_v_e")
468 .first;
469}
470
471ADReal
472IdealGasMixtureFluidProperties::T_from_v_e(const ADReal & v,
473 const ADReal & e,
474 const std::vector<ADReal> & x_secondary) const
475{
476 return T_from_v_e_templ(v, e, x_secondary);
477}
478
479Real
480IdealGasMixtureFluidProperties::T_from_v_e(Real v,
481 Real e,
482 const std::vector<Real> & x_secondary) const
483{
484 return T_from_v_e_templ(v, e, x_secondary);
485}
486
487template <typename CppType>
488CppType
489IdealGasMixtureFluidProperties::c_from_p_T_templ(const CppType & p,
490 const CppType & T,
491 const std::vector<CppType> & x_secondary) const
492{
493 using std::sqrt;
494
495 const auto x = secondaryToAllMassFractions(x_secondary);
496 const auto M = mixtureMolarMass(x);
497 const auto gamma = mixtureSpecificHeatRatio(p, T, x);
498
499 return sqrt(gamma * _R * T / M);
500}
501
502ADReal
503IdealGasMixtureFluidProperties::c_from_p_T(const ADReal & p,
504 const ADReal & T,
505 const std::vector<ADReal> & x_secondary) const
506{
507 return c_from_p_T_templ(p, T, x_secondary);
508}
509
510Real
511IdealGasMixtureFluidProperties::c_from_p_T(Real p,
512 Real T,
513 const std::vector<Real> & x_secondary) const
514{
515 return c_from_p_T_templ(p, T, x_secondary);
516}
517
518template <typename CppType>
519CppType
521 const std::vector<CppType> & y,
522 const std::vector<CppType> & mu) const
523{
524 mooseAssert(psi.size() == _n_components && y.size() == _n_components, "Size mismatch");
525
526 CppType y_mix = 0;
528 {
529 for (const auto i : make_range(_n_components))
530 y_mix += psi[i] * y[i];
531 return y_mix;
532 }
533
534 // y_mix = sum_i psi_i y_i / (sum_j psi_j phi_ij), with the interaction factor of Wilke
535 // phi_ij = [1 + (mu_i / mu_j)^(1/2) (M_j / M_i)^(1/4)]^2 / [8 (1 + M_i / M_j)]^(1/2)
536 // (Poling et al., 2001). The rule of Mason and Saxena for the thermal conductivity has the same
537 // factors when its ratio of translational thermal conductivities is written with viscosities,
538 // mu_i M_j / (mu_j M_i), and its empirical constant is one.
539 using std::sqrt;
540 mooseAssert(mu.size() == _n_components, "Size mismatch");
541 for (const auto i : make_range(_n_components))
542 {
543 CppType denominator = 0;
544 for (const auto j : make_range(_n_components))
545 {
546 const CppType phi_ij =
547 Utility::pow<2>(1 + sqrt(mu[i] / mu[j]) * _wilke_molar_mass_factor[i][j]) *
549 denominator += psi[j] * phi_ij;
550 }
551 y_mix += psi[i] * y[i] / denominator;
552 }
553 return y_mix;
554}
555
556template <typename CppType>
557CppType
558IdealGasMixtureFluidProperties::mu_from_p_T_templ(const CppType & p,
559 const CppType & T,
560 const std::vector<CppType> & x_secondary) const
561{
563 std::vector<CppType> mu(_n_components);
564 for (const auto i : make_range(_n_components))
565 mu[i] = _component_fps[i]->mu_from_p_T(p, T);
566 return mixTransportProperty(psi, mu, mu);
567}
568
569ADReal
570IdealGasMixtureFluidProperties::mu_from_p_T(const ADReal & p,
571 const ADReal & T,
572 const std::vector<ADReal> & x_secondary) const
573{
574 return mu_from_p_T_templ(p, T, x_secondary);
575}
576
577Real
578IdealGasMixtureFluidProperties::mu_from_p_T(Real p,
579 Real T,
580 const std::vector<Real> & x_secondary) const
581{
582 return mu_from_p_T_templ(p, T, x_secondary);
583}
584
585template <typename CppType>
586CppType
587IdealGasMixtureFluidProperties::k_from_p_T_templ(const CppType & p,
588 const CppType & T,
589 const std::vector<CppType> & x_secondary) const
590{
592 std::vector<CppType> k(_n_components);
593 for (const auto i : make_range(_n_components))
594 k[i] = _component_fps[i]->k_from_p_T(p, T);
595
596 // The rule of Mason and Saxena needs the viscosities of the components
597 std::vector<CppType> mu;
599 {
600 mu.resize(_n_components);
601 for (const auto i : make_range(_n_components))
602 mu[i] = _component_fps[i]->mu_from_p_T(p, T);
603 }
604 return mixTransportProperty(psi, k, mu);
605}
606
607ADReal
608IdealGasMixtureFluidProperties::k_from_p_T(const ADReal & p,
609 const ADReal & T,
610 const std::vector<ADReal> & x_secondary) const
611{
612 return k_from_p_T_templ(p, T, x_secondary);
613}
614
615Real
616IdealGasMixtureFluidProperties::k_from_p_T(Real p,
617 Real T,
618 const std::vector<Real> & x_secondary) const
619{
620 return k_from_p_T_templ(p, T, x_secondary);
621}
622
623template <typename CppType>
624CppType
626 const CppType & T,
627 const unsigned int i,
628 const unsigned int j) const
629{
630 mooseAssert(i < _n_components && j < _n_components, "Component index too high");
631 if (!_lennard_jones[i] || !_lennard_jones[j])
632 mooseError("Binary diffusion coefficients require components with Lennard-Jones parameters, "
633 "such as 'NASA7IdealGasFluidProperties'.");
635 T,
636 _component_fps[i]->molarMass(),
637 _component_fps[j]->molarMass(),
638 *_lennard_jones[i],
639 *_lennard_jones[j]);
640}
641
642Real
644 Real T,
645 unsigned int i,
646 unsigned int j) const
647{
648 return binaryDiffusionCoefficient_templ(p, T, i, j);
649}
650
651ADReal
653 const ADReal & T,
654 unsigned int i,
655 unsigned int j) const
656{
657 return binaryDiffusionCoefficient_templ(p, T, i, j);
658}
DualNumber< Real, DNDerivativeType, true > ADReal
const std::vector< double > y
const std::vector< double > x
const double M
const double mu
const Real p
const double rho
const double T
const double v
define_mass_specific_prop_from_p_T(v)
registerMooseObject("FluidPropertiesApp", IdealGasMixtureFluidProperties)
static const Real _R
Universal gas constant (J/mol/K)
Class for fluid properties of an ideal gas mixture.
std::vector< ADReal > secondaryToAllMassFractions(const std::vector< ADReal > &x_secondary) const
std::vector< CppType > molarFractionsFromMassFractions_templ(const std::vector< CppType > &x) const
Computes molar fractions.
CppType mixtureMolarMass_templ(const std::vector< CppType > &x) const
Computes the mixture molar mass.
CppType mixtureSpecificHeatRatio_templ(const CppType &p, const CppType &T, const std::vector< CppType > &x) const
Computes the mixture specific heat ratio.
virtual const SinglePhaseFluidProperties & getPrimaryFluidProperties() const override
Gets the primary component single-phase fluid properties.
ADReal mixtureMolarMass(const std::vector< ADReal > &x) const
IdealGasMixtureFluidProperties(const InputParameters &parameters)
std::vector< const GasTransportUtils::LennardJonesParameters * > _lennard_jones
Lennard-Jones parameters of the components, or nullptr for components without them.
const TransportMixingRule _transport_mixing_rule
Rule that combines the viscosities and thermal conductivities of the components.
std::vector< CppType > secondaryToAllMassFractions_templ(const std::vector< CppType > &x_secondary) const
Computes all mass fractions.
std::vector< const SinglePhaseFluidProperties * > _component_fps
Component fluid properties objects.
CppType mixTransportProperty(const std::vector< CppType > &psi, const std::vector< CppType > &y, const std::vector< CppType > &mu) const
Combines a transport property of the components with the transport mixing rule.
const unsigned int _n_secondary_components
Number of secondary components.
CppType binaryDiffusionCoefficient_templ(const CppType &p, const CppType &T, unsigned int i, unsigned int j) const
Implements binaryDiffusionCoefficient for Real and AD arguments.
virtual Real binaryDiffusionCoefficient(Real p, Real T, unsigned int i, unsigned int j) const override
Computes the Chapman-Enskog binary diffusion coefficient of a pair of components, which must both hav...
bool _constant_specific_heats
Whether all components have constant specific heats, so that the internal energy is linear in tempera...
std::vector< std::vector< Real > > _wilke_molar_mass_factor
std::vector< std::vector< Real > > _wilke_normalization
TransportMixingRule
Rules that combine the viscosities and thermal conductivities of the components.
Real _T_newton_start
Temperature at which Newton's method starts to compute the temperature from the internal energy when ...
std::vector< ADReal > molarFractionsFromMassFractions(const std::vector< ADReal > &x) const
const std::vector< UserObjectName > _component_fp_names
Names of component fluid properties.
ADReal mixtureSpecificHeatRatio(const ADReal &p, const ADReal &T, const std::vector< ADReal > &x) const
static InputParameters validParams()
virtual const SinglePhaseFluidProperties & getSecondaryFluidProperties(unsigned int i=0) const override
Gets a secondary component single-phase fluid properties.
const unsigned int _n_components
Number of components.
CppType constantSpecificHeatRatio(const std::vector< CppType > &x) const
Implements the deprecated mixtureSpecificHeatRatio(x)
Interface of the fluid properties of ideal gases that can be components of IdealGasMixtureFluidProper...
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseDeprecated(Args &&... args) const
const std::string & name() const
void mooseError(Args &&... args) const
Interface class for producing errors, warnings, or just quiet NaNs.
static InputParameters validParams()
Common class for single phase fluid properties.
Base class for fluid properties of vapor mixtures.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
std::pair< T, T > NewtonSolve(const T &x, const T &y, const Real z_initial_guess, const Real tolerance, const Functor &y_from_x_z, const std::string &caller_name, const unsigned int max_its=100, const bool verbose=false)
NewtonSolve does a 1D Newton Solve to solve the equation y = f(x, z) for variable z.
CppType binaryDiffusionCoefficient(const CppType &p, const CppType &T, const Real molar_mass_i, const Real molar_mass_j, const LennardJonesParameters &lj_i, const LennardJonesParameters &lj_j)
Chapman-Enskog binary diffusion coefficient of a dilute gas pair [m^2/s], with the Lorentz-Berthelot ...
auto raw_value(const Eigen::Map< T > &in)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)