OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::CarnahanStarling< T, S > Class Template Reference

#include <interactionPotential.h>

+ Inheritance diagram for olb::CarnahanStarling< T, S >:
+ Collaboration diagram for olb::CarnahanStarling< T, S >:

Public Member Functions

 CarnahanStarling (T G, T a=1., T b=4., T tr=.7)
 
bool operator() (T psi[], const S rho[]) override
 has to be implemented for 'every' derived class
 
bool operator() (T psi[], const S rho[], const S t[])
 
- Public Member Functions inherited from olb::AnalyticalF< 1, T, S >
AnalyticalF< D, T, S > & operator- (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator+ (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator* (AnalyticalF< D, T, S > &rhs)
 
AnalyticalF< D, T, S > & operator/ (AnalyticalF< D, T, S > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, S >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], S input0)
 
bool operator() (T output[], S input0, S input1)
 
bool operator() (T output[], S input0, S input1, S input2)
 
bool operator() (T output[], S input0, S input1, S input2, S input3)
 

Additional Inherited Members

- Public Types inherited from olb::AnalyticalF< 1, T, S >
using identity_functor_type
 
- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 
- Public Attributes inherited from olb::GenericF< T, S >
std::shared_ptr< GenericF< T, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Static Public Attributes inherited from olb::AnalyticalF< 1, T, S >
static constexpr unsigned dim
 
- Protected Member Functions inherited from olb::AnalyticalF< 1, T, S >
 AnalyticalF (int n)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, typename S>
class olb::CarnahanStarling< T, S >

Definition at line 266 of file interactionPotential.h.

Constructor & Destructor Documentation

◆ CarnahanStarling()

template<typename T , typename S >
olb::CarnahanStarling< T, S >::CarnahanStarling ( T G,
T a = 1.,
T b = 4.,
T tr = .7 )

Definition at line 101 of file interactionPotential.hh.

101 : AnalyticalF<1,T,S>(1), _G(G), _a(a), _b(b)
102{
103 _R = 1.;
104 //a=0.4963*tc*tc*R*R/pc;
105 //b=0.18727*R*tc/pc;
106 T tc = 0.18727/0.4963*_a/_b/_R;
107 //T pc = 0.18727*_R*tc/_b;
108 //T rhoc = pc/0.35930763/_R/tc;
109 _t = tc*tr;
110 //Zc=0.35930763 Tc=0.094333065 pc=0.0044164383 rhoc=0.13029921
111 this->getName() = "CarnahanStarling";
112}
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::GenericF< T, S >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()() [1/2]

template<typename T , typename S >
bool olb::CarnahanStarling< T, S >::operator() ( T output[],
const S input[] )
overridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, S >.

Definition at line 115 of file interactionPotential.hh.

116{
117 T c = _b*rho[0]/4.;
118 T p = rho[0]*_R*_t*((1.+c+c*c-c*c*c)/(1.-c)/(1.-c)/(1.-c))-_a*rho[0]*rho[0];
119 psi[0] = util::sqrt(6.*(p-rho[0]/3.)/_G);
120 return true;
121}
platform_constant int c[Q][D]
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References olb::util::sqrt().

+ Here is the call graph for this function:

◆ operator()() [2/2]

template<typename T , typename S >
bool olb::CarnahanStarling< T, S >::operator() ( T psi[],
const S rho[],
const S t[] )

Definition at line 125 of file interactionPotential.hh.

126{
127 _t = t[0];
128 T c = _b*rho[0]/4.;
129 T p = rho[0]*_R*_t*((1.+c+c*c-c*c*c)/(1.-c)/(1.-c)/(1.-c))-_a*rho[0]*rho[0];
130 psi[0] = util::sqrt(6.*(p-rho[0]/3.)/_G);
131 return true;
132}
platform_constant Fraction t[Q]

References olb::util::sqrt().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: