https://mooseframework.inl.gov
TabulatedBicubicFluidProperties.h
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 #pragma once
11 
13 
16 
17 #pragma GCC diagnostic push
18 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
19 
88 {
89 public:
91 
93 
94  virtual void constructInterpolation() override;
95 
96 protected:
104  void reshapeData2D(unsigned int nrow,
105  unsigned int ncol,
106  const std::vector<Real> & vec,
107  std::vector<std::vector<Real>> & mat);
108 
121  void checkNaNs(Real min_1,
122  Real max_1,
123  Real min_2,
124  Real max_2,
125  unsigned int i,
126  Real & variable_1,
127  Real & variable_2,
128  unsigned int & num_nans_1,
129  unsigned int & num_nans_2);
138  void checkOutofBounds(Real min, Real max, Real & variable, unsigned int & num_out_bounds);
139  // If values go out of user defined range or NaNs are produced during
140  // Newton Method inversion, produce warnings to inform the user
141  void outputWarnings(unsigned int num_nans_p,
142  unsigned int num_nans_T,
143  unsigned int num_out_bounds_p,
144  unsigned int num_out_bounds_T,
145  unsigned int convergence_failures,
146  unsigned int number_points,
147  std::string variable_set);
148 };
149 
150 #pragma GCC diagnostic pop
Class for fluid properties read from a tabulation in a file.
void checkNaNs(Real min_1, Real max_1, Real min_2, Real max_2, unsigned int i, Real &variable_1, Real &variable_2, unsigned int &num_nans_1, unsigned int &num_nans_2)
If Newton Method jacobian produces NaNs, set variable to min or max depending on situation.
TabulatedBicubicFluidProperties(const InputParameters &parameters)
auto max(const L &left, const R &right)
Common class for single phase fluid properties.
Class for fluid properties read from a file.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void checkOutofBounds(Real min, Real max, Real &variable, unsigned int &num_out_bounds)
If values go out of user defined range during Newton Method inversion, set variable to min or max dep...
const InputParameters & parameters() const
auto min(const L &left, const R &right)
void reshapeData2D(unsigned int nrow, unsigned int ncol, const std::vector< Real > &vec, std::vector< std::vector< Real >> &mat)
Forms a 2D matrix from a single std::vector.
void outputWarnings(unsigned int num_nans_p, unsigned int num_nans_T, unsigned int num_out_bounds_p, unsigned int num_out_bounds_T, unsigned int convergence_failures, unsigned int number_points, std::string variable_set)