8#ifndef INCOMPRESSIBLEFLUID_H_
9#define INCOMPRESSIBLEFLUID_H_
49#if !defined(NO_FMTLIB) && FMT_VERSION >= 90000
51 return fmt::underlying(type);
222 this->density = std::move(
density);
234 this->p_sat = std::move(
p_sat);
237 this->T_freeze = std::move(
T_freeze);
268 double rho(
double T,
double p,
double x);
270 double c(
double T,
double p,
double x);
271 double cp(
double T,
double p,
double x) {
272 throw ValueError(
format(
"%s (%d): Please use the c-function instead.", __FILE__, __LINE__));
274 double cv(
double T,
double p,
double x) {
275 throw ValueError(
format(
"%s (%d): Please use the c-function instead.", __FILE__, __LINE__));
278 double s(
double T,
double p,
double x) {
279 throw ValueError(
format(
"%s (%d): The internal calculations have changed, use the backend to calculate entropy from the partial derivatives.",
280 __FILE__, __LINE__));
283 double u(
double T,
double p,
double x) {
285 format(
"%s (%d): The internal calculations have changed, use the backend to calculate internal energy from enthalpy.", __FILE__, __LINE__));
288 double h(
double T,
double p,
double x) {
290 format(
"%s (%d): The internal calculations have changed, use the backend to calculate enthalpy from the partial derivatives.", __FILE__,
294 double visc(
double T,
double p,
double x);
296 double cond(
double T,
double p,
double x);
298 double psat(
double T,
double x);
300 double Tfreeze(
double p,
double x);
343 double T_rho(
double Dmass,
double p,
double x);
345 double T_c(
double Cmass,
double p,
double x);
347 double T_s(
double Smass,
double p,
double x) {
348 throw NotImplementedError(
format(
"%s (%d): T from entropy is not implemented in the fluid, use the backend.", __FILE__, __LINE__));
351 double T_u(
double Umass,
double p,
double x) {
352 throw NotImplementedError(
format(
"%s (%d): T from internal energy is not implemented in the fluid, use the backend.", __FILE__, __LINE__));
355 double T_h(
double Hmass,
double p,
double x) {
356 throw NotImplementedError(
format(
"%s (%d): T from enthalpy is not implemented in the fluid, use the backend.", __FILE__, __LINE__));
384 double h_u(
double T,
double p,
double x) {
385 return u(
T, p, x) + p /
rho(
T, p, x);
392 double u_h(
double T,
double p,
double x) {
393 return h(
T, p, x) - p /
rho(
T, p, x);
406 bool checkT(
double T,
double p,
double x);
415 bool checkP(
double T,
double p,
double x);