https://mooseframework.inl.gov
Functions | Variables
EquilibriumConstantFitTest.C File Reference

Go to the source code of this file.

Functions

 TEST (EquilibriumConstantFitTest, constructor)
 
 TEST (EquilibriumConstantFitTest, sample)
 

Variables

const double tol = 1.0e-6
 
const std::vector< double > x = {273.15, 298.15, 333.15, 373.15, 423.15, 473.15, 523.15, 573.15}
 
const std::vector< double > y
 

Function Documentation

◆ TEST() [1/2]

TEST ( EquilibriumConstantFitTest  ,
constructor   
)

Definition at line 21 of file EquilibriumConstantFitTest.C.

22 {
23  EquilibriumConstantFit logk(x, y);
24  EXPECT_EQ(logk.getSampleSize(), x.size());
25 }
const std::vector< double > y
const std::vector< double > x
Fit the equilibrium constant values read from a databse at specified temperature values with a Maier-...

◆ TEST() [2/2]

TEST ( EquilibriumConstantFitTest  ,
sample   
)

Definition at line 27 of file EquilibriumConstantFitTest.C.

28 {
29  EquilibriumConstantFit logk(x, y);
30  logk.generate();
31 
32  // Compare with values calculated using scipy.optimize.curve_fit
33  EXPECT_NEAR(logk.sample(x[1]), 13.991103115875013, tol);
34  EXPECT_NEAR(logk.sample(x[2]), 13.028890219017683, tol);
35  EXPECT_NEAR(logk.sample(x[3]), 12.259284844918287, tol);
36  EXPECT_NEAR(logk.sample(x[4]), 11.627599702911748, tol);
37  EXPECT_NEAR(logk.sample(x[5]), 11.278660590504469, tol);
38 }
const double tol
const std::vector< double > y
const std::vector< double > x
Fit the equilibrium constant values read from a databse at specified temperature values with a Maier-...

Variable Documentation

◆ tol

const double tol = 1.0e-6

◆ x

const std::vector<double> x = {273.15, 298.15, 333.15, 373.15, 423.15, 473.15, 523.15, 573.15}

Definition at line 17 of file EquilibriumConstantFitTest.C.

Referenced by MaterialVectorGradAuxKernelAction::act(), MatVecRealGradAuxKernelAction::act(), MultiAuxVariablesAction::act(), INSFVVelocityVariable::adGradSln(), PolycrystalVoronoi::buildSearchTree(), calculate(), FiniteStrainCPSlipRateRes::calcUpdate(), Uniform::cdf(), FDistribution::cdf(), Gamma::cdf(), Logistic::cdf(), Lognormal::cdf(), Beta::cdf(), Normal::cdf(), StudentT::cdf(), Weibull::cdf(), JohnsonSB::cdf(), KernelDensity1D::cdf(), TruncatedNormal::cdf(), RayTracingAngularQuadrature::chebyshev(), SelfShadowSideUserObject::check2DIllumination(), SelfShadowSideUserObject::check3DIllumination(), MultiPlasticityDebugger::checkSolution(), PolynomialQuadrature::Legendre::compute(), StochasticTools::BiasCorrectedAccelerated< std::vector< InType >, std::vector< OutType > >::compute(), StochasticTools::BiasCorrectedAccelerated< InType, OutType >::compute(), PolynomialQuadrature::Hermite::compute(), ClosePackIC::computeCircleCenters(), ExponentialCovariance::computeCovarianceMatrix(), MaternHalfIntCovariance::computeCovarianceMatrix(), SquaredExponentialCovariance::computeCovarianceMatrix(), LMC::computeCovarianceMatrix(), PolynomialChaos::computeDerivative(), PolynomialQuadrature::Legendre::computeDerivative(), PolynomialQuadrature::Hermite::computeDerivative(), LMC::computedKdhyper(), SquaredExponentialCovariance::computedKdhyper(), ExponentialCovariance::computedKdhyper(), MaternHalfIntCovariance::computedKdhyper(), SquaredExponentialCovariance::computedKdlf(), ExponentialCovariance::computedKdlf(), MaternHalfIntCovariance::computedKdlf(), MorrisReporterContext< DataType >::computeElementaryEffects(), ADComputeIncrementalShellStrain::computeGMatrix(), PolynomialChaos::computePartialDerivative(), SmoothTransitionTestMaterial::computeQpProperties(), FunctionPathEllipsoidHeatSource::computeQpProperties(), ADSmoothTransitionTestMaterial::computeQpProperties(), GrandPotentialSinteringMaterial::computeQpProperties(), InclusionProperties::computeQpProperties(), GaussContForcing::computeQpResidual(), ADInertialForceShell::computeShellInertialForces(), AdaptiveMonteCarloUtils::computeSTD(), SalehaniIrani3DCTraction::computeTraction(), SalehaniIrani3DCTraction::computeTractionDerivatives(), SurrogateModelScalarAux::computeValue(), SurrogateModelAuxKernelTempl< ComputeValueType >::computeValue(), LAROMANCEStressUpdateBaseTempl< is_ad >::convertValue(), OptUtils::copyPetscMatrixIntoReporter(), OptUtils::copyPetscVectorIntoReporter(), OptUtils::copyReporterIntoPetscMatrix(), OptUtils::copyReporterIntoPetscVector(), EFAPoint::cross(), PorousFlowCubic::cubic(), PolygonMeshGeneratorBase::cutOffPolyDeform(), CaloricallyImperfectGas::cv_from_v_e(), PorousFlowRogersStallybrassClements::d2EffectiveSaturation(), PorousFlowBroadbridgeWhite::d2EffectiveSaturation(), RichardsSeffRSC::d2seff(), RichardsSeff1BWsmall::d2seff(), SolidMechanicsPlasticWeakPlaneShear::d2smooth(), SolidMechanicsPlasticTensile::d2smooth(), SolidMechanicsPlasticMohrCoulomb::d2smooth(), PorousFlowCubic::dcubic(), PorousFlowRogersStallybrassClements::dEffectiveSaturation(), PorousFlowBroadbridgeWhite::dEffectiveSaturation(), RichardsDensityVDW::densityVDW(), SolidMechanicsHardeningCubic::derivative(), SolidMechanicsHardeningCutExponential::derivative(), SolidMechanicsHardeningGaussian::derivative(), CubicTransition::derivative(), WeightedTransition::derivative(), SmoothTransitionTestMaterial::df2dx(), ADSmoothTransitionTestMaterial::df2dx(), PorousFlowHalfCubicSink::dmultiplier_dvar(), RichardsSeffRSC::dseff(), RichardsSeff1BWsmall::dseff(), SolidMechanicsPlasticWeakPlaneShear::dsmooth(), SolidMechanicsPlasticTensile::dsmooth(), SolidMechanicsPlasticMohrCoulomb::dsmooth(), CaloricallyImperfectGas::e_from_p_T(), BrineFluidProperties::e_from_p_T_X(), CaloricallyImperfectGas::e_from_T_v(), PorousFlowRogersStallybrassClements::effectiveSaturation(), PorousFlowBroadbridgeWhite::effectiveSaturation(), ElementLoopUserObject::ElementLoopUserObject(), NearestPointSurrogate::evaluate(), PolynomialRegressionSurrogate::evaluate(), PolynomialChaos::evaluate(), LibtorchANNSurrogate::evaluate(), GaussianProcessSurrogate::evaluate(), SurrogateModel::evaluate(), Legendre::evaluateOrthonormal(), Legendre::evaluateStandard(), GFunction::execute(), ExponentialCovariance::ExponentialFunction(), f(), SmoothTransitionTestMaterial::f1(), ADSmoothTransitionTestMaterial::f1(), SmoothTransitionTestMaterial::f2(), ADSmoothTransitionTestMaterial::f2(), MorrisReporterContext< DataType >::finalize(), NearestPointSurrogate::findNearestPoint(), formFunction(), formFunctionIW(), FormInitialSolution(), FourierNoise::FourierNoise(), PolygonMeshGeneratorBase::fourPointIntercept(), PorousFlowBrineCO2::funcABHighTemp(), TruncatedGaussian::function(), Gaussian::function(), ExtremeValue::function(), CaloricallyImperfectGas::gamma_from_p_T(), CaloricallyImperfectGas::gamma_from_v_e(), RayTracingAngularQuadrature::gaussLegendre(), PiecewiseFunction::getFunctionIndex(), LevelSetOlssonPlane::gradient(), MeshCut2DUserObjectBase::growFront(), CrackMeshCut3DUserObject::growFront(), BrineFluidProperties::h_from_p_T_X(), PolynomialQuadrature::hermite(), RankTwoScalarTools::hoopStress(), Beta::incompleteBeta(), Beta::incompleteBetaInv(), Gamma::incompleteGamma(), Gamma::incompleteGammaInv(), SolutionRasterizer::initialSetup(), C1ICBase::interfaceDerivative(), C1ICBase::interfaceValue(), PolynomialQuadrature::legendre(), MaternHalfIntCovariance::maternHalfIntFunction(), IdealGasMixtureFluidProperties::mixtureMolarMass(), IdealGasMixtureFluidProperties::mixtureMolarMass_templ(), IdealGasMixtureFluidProperties::mixtureSpecificHeatRatio(), IdealGasMixtureFluidProperties::mixtureSpecificHeatRatio_templ(), IdealGasMixtureFluidProperties::molarFractionsFromMassFractions(), IdealGasMixtureFluidProperties::molarFractionsFromMassFractions_templ(), PorousFlowHalfCubicSink::multiplier(), FluidPropertiesUtils::NewtonSolve(), PolygonMeshGeneratorBase::nodeCoordRotate(), LAROMANCEStressUpdateBaseTempl< is_ad >::normalizeInput(), OptimizeSolve::objectiveAndGradientFunctionWrapper(), OptimizeSolve::objectiveFunctionWrapper(), CaloricallyImperfectGas::p_from_v_e(), Uniform::pdf(), Beta::pdf(), FDistribution::pdf(), KernelDensity1D::pdf(), Gamma::pdf(), Logistic::pdf(), Normal::pdf(), StudentT::pdf(), Weibull::pdf(), Lognormal::pdf(), TruncatedNormal::pdf(), JohnsonSB::pdf(), PeripheralTriangleMeshGenerator::PeripheralTriangleMeshGenerator(), InterWrapper1PhaseProblem::petscSnesSolver(), SubChannel1PhaseProblem::petscSnesSolver(), InterWrapper1PhaseProblem::populateDenseFromVector(), SubChannel1PhaseProblem::populateDenseFromVector(), InterWrapper1PhaseProblem::populateSolutionChan(), SubChannel1PhaseProblem::populateSolutionChan(), InterWrapper1PhaseProblem::populateSolutionGap(), SubChannel1PhaseProblem::populateSolutionGap(), InterWrapper1PhaseProblem::populateVectorFromDense(), SubChannel1PhaseProblem::populateVectorFromDense(), InterWrapper1PhaseProblem::populateVectorFromHandle(), SubChannel1PhaseProblem::populateVectorFromHandle(), VaporMixtureFluidProperties::primaryMassFraction(), StudentT::quantile(), Normal::quantile(), PorousFlowFluidStateFlash::rachfordRice(), PorousFlowFluidStateFlash::rachfordRiceDeriv(), RayTracingAngularQuadratureErrorTest::RayTracingAngularQuadratureErrorTest(), EBSDReader::readFile(), CrackMeshCut3DUserObject::refineBoundary(), CrackMeshCut3DUserObject::refineFront(), relativeEq(), SolidMechanicsPlasticTensileMulti::returnEdge(), SolidMechanicsPlasticMohrCoulombMulti::returnEdge000101(), SolidMechanicsPlasticMohrCoulombMulti::returnEdge010100(), SolidMechanicsPlasticTensileMulti::returnTip(), SolidMechanicsPlasticMohrCoulombMulti::returnTip(), CaloricallyImperfectGas::rho_from_p_s(), HelmholtzFluidProperties::rho_from_p_T(), CO2FluidProperties::rho_from_p_T(), BrineFluidProperties::rho_from_p_T_X(), IdealGasMixtureFluidProperties::secondaryToAllMassFractions_templ(), RichardsSeffRSC::seff(), RichardsSeff1BWsmall::seff(), OptimizationReporterBase::setInitialCondition(), CaloricallyImperfectGas::setupLookupTables(), LAROMANCEStressUpdateBaseTempl< is_ad >::sigmoid(), SolidMechanicsPlasticWeakPlaneShear::smooth(), SolidMechanicsPlasticTensile::smooth(), SolidMechanicsPlasticMohrCoulomb::smooth(), PorousFlowBrineCO2::solveEquilibriumMoleFractionHighTemp(), SquaredExponentialCovariance::SquaredExponentialFunction(), CaloricallyImperfectGas::T_from_e(), CaloricallyImperfectGas::T_from_h(), CaloricallyImperfectGas::T_from_v_e(), TEST(), TEST_F(), triRodPositionsRef(), OptimizationReporterBase::updateParameters(), FCTFdisplacementIC::value(), RhoVaporMixtureFromPressureTemperatureIC::value(), LevelSetOlssonPlane::value(), CosineHumpFunction::value(), LevelSetOlssonBubble::value(), CubicTransition::value(), ADWeightedTransition::value(), CosineTransitionFunction::value(), SolidMechanicsHardeningCubic::value(), ADCubicTransition::value(), CubicTransitionFunction::value(), SolidMechanicsHardeningGaussian::value(), WeightedTransition::value(), SolidMechanicsHardeningCutExponential::value(), CrossIC::value(), ViewFactorRayStudy::ViewFactorRayStudy(), ADWeightedTransition::weight(), WeightedTransition::weight(), IdealRealGasMixtureFluidProperties::xs_prim_from_p_T(), SinglePhaseFluidProperties::xyDerivatives(), and CaloricallyImperfectGas::Z_from_T().

◆ y

const std::vector<double> y
Initial value:
= {
14.9398, 13.9951, 13.0272, 12.2551, 11.6308, 11.2836, 11.1675, 11.3002}

Definition at line 18 of file EquilibriumConstantFitTest.C.

Referenced by PolycrystalVoronoi::buildSearchTree(), Weibull::cdf(), SelfShadowSideUserObject::check2DIllumination(), SelfShadowSideUserObject::check3DIllumination(), ClosePackIC::computeCircleCenters(), MorrisReporterContext< DataType >::computeElementaryEffects(), ADShaftConnectedPump1PhaseUserObject::computeFluxesAndResiduals(), ADComputeIncrementalShellStrain::computeGMatrix(), FunctionPathEllipsoidHeatSource::computeQpProperties(), GBAnisotropyBase::computeQpProperties(), InclusionProperties::computeQpProperties(), GaussContForcing::computeQpResidual(), HeatStructureCylindricalBase::computeRadialBoundaryArea(), ADInertialForceShell::computeShellInertialForces(), AdaptiveMonteCarloUtils::computeSTD(), EFAPoint::cross(), PolygonMeshGeneratorBase::cutOffPolyDeform(), RichardsDensityVDW::d2density(), RichardsDensityVDW::ddensity(), RichardsDensityVDW::densityVDW(), NearestPointSurrogate::evaluate(), PolynomialRegressionSurrogate::evaluate(), GaussianProcessSurrogate::evaluate(), SurrogateModel::evaluate(), GFunction::execute(), MorrisReporterContext< DataType >::finalize(), FormInitialSolution(), FourierNoise::FourierNoise(), PolygonMeshGeneratorBase::fourPointIntercept(), PorousFlowBrineCO2::funcABHighTemp(), g_function(), GBAnisotropy::GBAnisotropy(), GBWidthAnisotropy::GBWidthAnisotropy(), RankTwoScalarTools::hoopStress(), SolutionRasterizer::initialSetup(), FluidPropertiesUtils::NewtonSolve(), PolygonMeshGeneratorBase::nodeCoordRotate(), FDistribution::pdf(), Weibull::pdf(), PeripheralTriangleMeshGenerator::PeripheralTriangleMeshGenerator(), Uniform::quantile(), Normal::quantile(), RayTracingAngularQuadratureErrorTest::RayTracingAngularQuadratureErrorTest(), EBSDReader::readFile(), relativeEq(), PorousFlowBrineCO2::solveEquilibriumMoleFractionHighTemp(), TEST(), TEST_F(), ElementOptimizationFunctionInnerProduct::threadJoin(), SideOptimizationFunctionInnerProduct::threadJoin(), FunctionElementLoopIntegralUserObject::threadJoin(), MeshCut2DNucleationBase::threadJoin(), SpecificImpulse1Phase::threadJoin(), ADSpecificImpulse1Phase::threadJoin(), ADHeatTransferFromHeatStructure3D1PhaseUserObject::threadJoin(), ComputeGrainCenterUserObject::threadJoin(), MaterialTimeStepPostprocessor::threadJoin(), DiscreteNucleationInserter::threadJoin(), DiscreteNucleationMap::threadJoin(), CFLTimeStepSizeTempl< is_ad >::threadJoin(), NormalBoundaryDisplacement::threadJoin(), MomentumFluxIntegral::threadJoin(), MassFluxIntegral::threadJoin(), EnergyFluxIntegral::threadJoin(), HomogenizedThermalConductivity::threadJoin(), LevelSetVolume::threadJoin(), ReflectionCoefficient::threadJoin(), MaterialTensorAverageTempl< is_ad >::threadJoin(), AsymptoticExpansionHomogenizationElasticConstants::threadJoin(), WeightedVariableAverage::threadJoin(), PressureDrop::threadJoin(), MassFluxWeightedFlowRate::threadJoin(), JIntegral::threadJoin(), GrainTextureVectorPostprocessor::threadJoin(), HLLCUserObject::threadJoin(), XFEMMaterialStateMarkerBase::threadJoin(), CrackFrontNonlocalMaterialBase::threadJoin(), ComputeGrainForceAndTorque::threadJoin(), ViewFactorBase::threadJoin(), InteractionIntegralTempl< is_ad >::threadJoin(), HeatFluxFromHeatStructureBaseUserObject::threadJoin(), SelfShadowSideUserObject::threadJoin(), ComputeExternalGrainForceAndTorque::threadJoin(), CriticalTimeStep::threadJoin(), LayeredFlowAreaChange::threadJoin(), ConservedNoiseBase::threadJoin(), ConservedMaskedNoiseBase::threadJoin(), TorqueReaction::threadJoin(), HomogenizationConstraint::threadJoin(), GrayLambertSurfaceRadiationBase::threadJoin(), GeometricCutUserObject::threadJoin(), UnobstructedPlanarViewFactor::threadJoinViewFactor(), RayTracingViewFactor::threadJoinViewFactor(), triRodPositionsRef(), FCTFdisplacementIC::value(), CrossIC::value(), and SinglePhaseFluidProperties::xyDerivatives().