Line data Source code
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 : #pragma once 11 : 12 : #include "ThreadedGeneralUserObject.h" 13 : #include "SolutionInvalidInterface.h" 14 : 15 : // Forward Declarations 16 : 17 : // The default ADReal size allows functions of many more variables than 18 : // common in the FluidProperties module. This makes the computations much 19 : // slower than necessary, so use a smaller definition in the FluidProperties 20 : // module, FPADReal, which is suitable for up to five variables. 21 : // This is useful for the cases where we wish to use AD to compute the derivatives 22 : // rather than hand-coding them in derived classes. 23 : typedef DualNumber<Real, DNDerivativeSize<5>> FPADReal; 24 : 25 : class FluidProperties : public ThreadedGeneralUserObject, public SolutionInvalidInterface 26 : { 27 : public: 28 : static InputParameters validParams(); 29 : 30 : FluidProperties(const InputParameters & parameters); 31 : virtual ~FluidProperties(); 32 : 33 2224 : virtual void execute() final {} 34 2224 : virtual void initialize() final {} 35 1754 : virtual void finalize() final {} 36 : 37 470 : virtual void threadJoin(const UserObject &) final {} 38 0 : virtual void subdomainSetup() final {} 39 : 40 : /// Universal gas constant (J/mol/K) 41 : static const Real _R; 42 : 43 : protected: 44 : /// Conversion of temperature from Celsius to Kelvin 45 : const Real _T_c2k; 46 : /// Flag to set unimplemented Jacobian entries to zero 47 : const bool _allow_imperfect_jacobians; 48 : };