Value.h File Reference

Contains the interface to the Value class. More...

#include <string>
#include <iostream>
#include <libpf/value/UnitArray.h>
#include <libpf/value/Active.h>

Classes

class  GenericValue< valuetype >
 Model for physical quantities complete with unit of measurement, derivates and persistency. More...
 

Macros

#define ACTIVE
 

Typedefs

typedef GenericValue< GenericActive< double > > Value
 

Functions

template<class valuetype >
GenericValue< valuetype > exp (const GenericValue< valuetype > &)
 exponential More...
 
template<class valuetype >
GenericValue< valuetype > log (const GenericValue< valuetype > &)
 natural logarithm More...
 
template<class valuetype >
GenericValue< valuetype > log10 (const GenericValue< valuetype > &)
 10-base logarithm More...
 
template<class valuetype >
GenericValue< valuetype > sin (const GenericValue< valuetype > &)
 sine More...
 
template<class valuetype >
GenericValue< valuetype > asin (const GenericValue< valuetype > &)
 arc sine More...
 
template<class valuetype >
GenericValue< valuetype > tan (const GenericValue< valuetype > &)
 tangent More...
 
template<class valuetype >
GenericValue< valuetype > atan (const GenericValue< valuetype > &)
 arc tangent More...
 
template<class valuetype >
GenericValue< valuetype > cos (const GenericValue< valuetype > &)
 cosine More...
 
template<class valuetype >
GenericValue< valuetype > acos (const GenericValue< valuetype > &)
 arc cosine More...
 
template<class valuetype >
GenericValue< valuetype > sinh (const GenericValue< valuetype > &)
 hyperbolic sine More...
 
template<class valuetype >
GenericValue< valuetype > cosh (const GenericValue< valuetype > &)
 hyperbolic cosine More...
 
template<class valuetype >
GenericValue< valuetype > sqrt (const GenericValue< valuetype > &)
 square root More...
 
template<class valuetype >
GenericValue< valuetype > curt (const GenericValue< valuetype > &)
 cubic root More...
 
template<class valuetype >
GenericValue< valuetype > pow (const GenericValue< valuetype > &, double)
 power More...
 
template<class valuetype >
GenericValue< valuetype > pow (const GenericValue< valuetype > &, valuetype)
 power More...
 
template<class valuetype >
GenericValue< valuetype > pow (const GenericValue< valuetype > &, const GenericValue< valuetype > &)
 power More...
 
template<class valuetype >
GenericValue< valuetype > fabs (const GenericValue< valuetype > &)
 absolute value More...
 
bool isNan (const Value &x)
 Return true if x is not a number. More...
 
bool isInfinite (const Value &x)
 Return true if x is an infinite number (greater than the maximum representable value) More...
 
template<class valuetype >
GenericValue< valuetype > operator+ (double lhs, const GenericValue< valuetype > &rhs)
 
template<class valuetype >
GenericValue< valuetype > operator- (double lhs, const GenericValue< valuetype > &rhs)
 
template<class valuetype >
GenericValue< valuetype > operator* (double lhs, const GenericValue< valuetype > &rhs)
 
template<class valuetype >
GenericValue< valuetype > operator/ (double lhs, const GenericValue< valuetype > &rhs)
 

Variables

const Value T0
 reference temperature, equals 298.15 K More...
 
const Value P0
 reference pressure, equals 101325.0 Pa More...
 
const double t0
 reference temperature, equals 298.15 More...
 
const double p0
 reference pressure, equals 101325.0 More...
 
const Value Tmin
 minimum allowable temperature, equals 50 K More...
 
const Value Tmax
 maximum allowable temperature, equals 1500 K More...
 
const double tmin
 minimum allowable temperature, equals 50 More...
 
const double tmax
 maximum allowable temperature, equals 1500 More...
 
const double pmin
 minimum allowable pressure, equals 1E-5 More...
 
const double pmax
 maximum allowable pressure, equals 1E10 More...
 
const Value Pmin
 minimum allowable pressure, equals 1E-5 Pa More...
 
const Value Pmax
 maximum allowable pressure, equals 1E10 Pa More...
 
const Value R
 gas constant, equals 8314.4 J/(kmol*K) More...
 
const double r
 gas constant, equals 8314.4 More...
 
const Value Zero
 adimensional 0.0 More...
 
const Value One
 adimensional 1.0 More...
 
const double zero
 0.0 More...
 
const double one
 1.0 More...
 

Detailed Description

Contains the interface to the Value class.

This file is part of LIBPF All rights reserved; do not distribute without permission.

Author
(C) Copyright 2004-2023 Paolo Greppi simevo s.r.l.

Macro Definition Documentation

◆ ACTIVE

#define ACTIVE

Typedef Documentation

◆ Value

Actually supported GenericValue template

Function Documentation

◆ acos()

template<class valuetype >
GenericValue< valuetype > acos ( const GenericValue< valuetype > &  )

arc cosine

◆ asin()

template<class valuetype >
GenericValue< valuetype > asin ( const GenericValue< valuetype > &  )

arc sine

◆ atan()

template<class valuetype >
GenericValue< valuetype > atan ( const GenericValue< valuetype > &  )

arc tangent

◆ cos()

template<class valuetype >
GenericValue< valuetype > cos ( const GenericValue< valuetype > &  )

cosine

◆ cosh()

template<class valuetype >
GenericValue< valuetype > cosh ( const GenericValue< valuetype > &  )

hyperbolic cosine

◆ curt()

template<class valuetype >
GenericValue< valuetype > curt ( const GenericValue< valuetype > &  )

cubic root

◆ exp()

template<class valuetype >
GenericValue< valuetype > exp ( const GenericValue< valuetype > &  )

exponential

◆ fabs()

template<class valuetype >
GenericValue< valuetype > fabs ( const GenericValue< valuetype > &  )

absolute value

◆ isInfinite()

bool isInfinite ( const Value x)

Return true if x is an infinite number (greater than the maximum representable value)

◆ isNan()

bool isNan ( const Value x)

Return true if x is not a number.

◆ log()

template<class valuetype >
GenericValue< valuetype > log ( const GenericValue< valuetype > &  )

natural logarithm

◆ log10()

template<class valuetype >
GenericValue< valuetype > log10 ( const GenericValue< valuetype > &  )

10-base logarithm

◆ operator*()

template<class valuetype >
GenericValue< valuetype > operator* ( double  lhs,
const GenericValue< valuetype > &  rhs 
)

◆ operator+()

template<class valuetype >
GenericValue< valuetype > operator+ ( double  lhs,
const GenericValue< valuetype > &  rhs 
)

◆ operator-()

template<class valuetype >
GenericValue< valuetype > operator- ( double  lhs,
const GenericValue< valuetype > &  rhs 
)

◆ operator/()

template<class valuetype >
GenericValue< valuetype > operator/ ( double  lhs,
const GenericValue< valuetype > &  rhs 
)

◆ pow() [1/3]

template<class valuetype >
GenericValue< valuetype > pow ( const GenericValue< valuetype > &  ,
const GenericValue< valuetype > &   
)

power

◆ pow() [2/3]

template<class valuetype >
GenericValue< valuetype > pow ( const GenericValue< valuetype > &  ,
double   
)

power

◆ pow() [3/3]

template<class valuetype >
GenericValue< valuetype > pow ( const GenericValue< valuetype > &  ,
valuetype   
)

power

◆ sin()

template<class valuetype >
GenericValue< valuetype > sin ( const GenericValue< valuetype > &  )

sine

◆ sinh()

template<class valuetype >
GenericValue< valuetype > sinh ( const GenericValue< valuetype > &  )

hyperbolic sine

◆ sqrt()

template<class valuetype >
GenericValue< valuetype > sqrt ( const GenericValue< valuetype > &  )

square root

◆ tan()

template<class valuetype >
GenericValue< valuetype > tan ( const GenericValue< valuetype > &  )

tangent

Variable Documentation

◆ One

const Value One
extern

adimensional 1.0

◆ one

const double one
extern

1.0

◆ P0

const Value P0
extern

reference pressure, equals 101325.0 Pa

◆ p0

const double p0
extern

reference pressure, equals 101325.0

◆ pmax

const double pmax
extern

maximum allowable pressure, equals 1E10

◆ Pmax

const Value Pmax
extern

maximum allowable pressure, equals 1E10 Pa

◆ pmin

const double pmin
extern

minimum allowable pressure, equals 1E-5

◆ Pmin

const Value Pmin
extern

minimum allowable pressure, equals 1E-5 Pa

◆ R

const Value R
extern

gas constant, equals 8314.4 J/(kmol*K)

◆ r

const double r
extern

gas constant, equals 8314.4

◆ T0

const Value T0
extern

reference temperature, equals 298.15 K

◆ t0

const double t0
extern

reference temperature, equals 298.15

◆ Tmax

const Value Tmax
extern

maximum allowable temperature, equals 1500 K

◆ tmax

const double tmax
extern

maximum allowable temperature, equals 1500

◆ Tmin

const Value Tmin
extern

minimum allowable temperature, equals 50 K

◆ tmin

const double tmin
extern

minimum allowable temperature, equals 50

◆ Zero

const Value Zero
extern

adimensional 0.0

◆ zero

const double zero
extern

0.0