OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
olb::interaction::CarnahanStarling Struct Reference

#include <interactionPotential.h>

+ Collaboration diagram for olb::interaction::CarnahanStarling:

Classes

struct  A
 
struct  B
 
struct  G
 
struct  T
 

Public Types

using parameters = meta::list<G,A,B,T>
 

Public Member Functions

template<typename V , typename PARAMETERS >
compute (V rho, PARAMETERS &params) any_platform
 

Detailed Description

Definition at line 94 of file interactionPotential.h.

Member Typedef Documentation

◆ parameters

Definition at line 100 of file interactionPotential.h.

Member Function Documentation

◆ compute()

template<typename V , typename PARAMETERS >
V olb::interaction::CarnahanStarling::compute ( V rho,
PARAMETERS & params )
inline

Definition at line 103 of file interactionPotential.h.

103 {
104 V c = params.template get<B>() * rho / V{4};
105 V p = rho
106 * (V(0.18727 / 0.4963) * params.template get<A>() / params.template get<B>())
107 * params.template get<T>()
108 * ((V{1} +c+c*c-c*c*c) / (V{1}-c) / (V{1}-c) / (V{1}-c))
109 - params.template get<A>() * rho*rho;
110 return util::sqrt(V{6}*(p-rho/V{3})/ params.template get<G>());
111 };
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:

The documentation for this struct was generated from the following file: