Skip to content

Commit

Permalink
Address Guillaume's comments. (idaholab#29531)
Browse files Browse the repository at this point in the history
  • Loading branch information
grmnptr authored and freiler committed Dec 19, 2024
1 parent 0e011bc commit ee8d454
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#pragma once

#include "FunctorMaterial.h"
#include "Function.h"

class SinglePhaseFluidProperties;
class Function;

/**e
* Computes fluid properties in (P, T) formulation using functor material properties
* Converts temperature to enthalpy or enthalpy to temperature using
* functor material properties. The derivatives are discarded, so can't
* be used with AD.
*/
class LinearFVEnthalpyFunctorMaterial : public FunctorMaterial
{
Expand All @@ -25,12 +25,16 @@ class LinearFVEnthalpyFunctorMaterial : public FunctorMaterial
LinearFVEnthalpyFunctorMaterial(const InputParameters & parameters);

protected:
/// variables
/// Variables, treated as functors, needs to be AD because
/// Materials inherit from ADFunctorInterface
const Moose::Functor<ADReal> & _pressure;
const Moose::Functor<ADReal> & _T_fluid;
const Moose::Functor<ADReal> & _h;

/// The fluid properties that containt the h from Tconversion routines
const SinglePhaseFluidProperties * _fluid;

/// Pointers to the the conversion functors (in case the fluid property is not provided)
const Moose::Functor<Real> * _h_from_p_T_functor;
const Moose::Functor<Real> * _T_from_p_h_functor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ LinearFVEnthalpyFunctorMaterial::LinearFVEnthalpyFunctorMaterial(const InputPara
// Check parameters
if (!( (_fluid && !_h_from_p_T_functor && !_T_from_p_h_functor) ||
(!_fluid && _h_from_p_T_functor && _T_from_p_h_functor)))
{
mooseError(false,
"For `LinearFVEnthalpyFunctorMaterial` , an unsupported combination of input parameters was given. Current"
"supported combinations are either i) fp and no _h_from_p_T_functor and _T_from_p_h_functor, or ii) "
"no fp and _h_from_p_T_functor and _T_from_p_h_functor.");
}
{
mooseError("An unsupported combination of input parameters was given. Current"
"supported combinations are either i) `fp` and neither `h_from_p_T_functor` nor `T_from_p_h_functor`, or ii) "
"no `fp` and `h_from_p_T_functor` and `T_from_p_h_functor`.");
}

//
// Set material properties functors
Expand Down

0 comments on commit ee8d454

Please sign in to comment.