OpenLB 1.7
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
olb::entropicLbHelpers< T, descriptors::D3Q19<> > Struct Template Reference

#include <entropicLbHelpers3D.h>

+ Collaboration diagram for olb::entropicLbHelpers< T, descriptors::D3Q19<> >:

Static Public Member Functions

static T equilibrium (int iPop, T rho, const T u[3])
 Computation of equilibrium distribution with an expansion with respect to a small velocity u.
 

Detailed Description

template<typename T>
struct olb::entropicLbHelpers< T, descriptors::D3Q19<> >

Definition at line 36 of file entropicLbHelpers3D.h.

Member Function Documentation

◆ equilibrium()

template<typename T >
static T olb::entropicLbHelpers< T, descriptors::D3Q19<> >::equilibrium ( int iPop,
T rho,
const T u[3] )
inlinestatic

Computation of equilibrium distribution with an expansion with respect to a small velocity u.

Definition at line 39 of file entropicLbHelpers3D.h.

40 {
41 typedef descriptors::D3Q19<> L;
42
43 T c_u = descriptors::c<L>(iPop,0)*u[0] + descriptors::c<L>(iPop,1)*u[1] + descriptors::c<L>(iPop,2)*u[2];;
44 T c_u2 = c_u*c_u;
45 T c_u3 = c_u2*c_u;
46 T c_u4 = c_u3*c_u;
47 T c_u5 = c_u4*c_u;
48 T c_u6 = c_u5*c_u;
49 T c_u7 = c_u6*c_u;
50
51 T uSqr = u[0]*u[0] + u[1]*u[1] + u[2]*u[2];
52 T uSqr2 = uSqr*uSqr;
53 T uSqr3 = uSqr2*uSqr;
54
55 T powUx = u[0]*u[0]*u[0]*u[0]*u[0]; // u_x^5
56 T powUy = u[1]*u[1]*u[1]*u[1]*u[1]; // u_y^5
57 T powUz = u[2]*u[2]*u[2]*u[2]*u[2]; // u_z^5
58
59 T C = descriptors::c<L>(iPop,0) * powUx + descriptors::c<L>(iPop,1) * powUy
60 + descriptors::c<L>(iPop,2) * powUz;
61
62 powUx *= u[0]; // u_x^6
63 powUy *= u[1]; // u_y^6
64 powUz *= u[2]; // u_z^6
65
66 T E = powUx + powUy + powUz;
67
68 powUx *= u[0]; // u_x^7
69 powUy *= u[1]; // u_y^7
70 powUz *= u[2]; // u_z^7
71
72 T F = descriptors::c<L>(iPop,0) * powUx + descriptors::c<L>(iPop,1) * powUy + descriptors::c<L>(iPop,2) * powUz;
73
74 return descriptors::t<T,L>(iPop) * rho *
75 ((T)1
76 + c_u*(C*(T)81/(T)20 + uSqr2*(T)27/(T)8 - uSqr*(T)9/(T)2
77 - E*(T)81/(T)24 - uSqr3*(T)81/(T)48 + (T)3)
78
79 + c_u2*(uSqr2*(T)81/(T)16 - uSqr*(T)27/(T)4
80 + C*(T)243/(T)40 + (T)9/(T)2)
81
82 + c_u3*(uSqr2*(T)243/(T)48 - uSqr*(T)81/(T)12 + (T)27/(T)6)
83
84 - c_u4*uSqr*(T)243/(T)48
85 + c_u4*(T)81/(T)24
86
87 - c_u5*uSqr*(T)729/(T)240
88 + c_u5*(T)243/(T)120
89
90 + c_u6*(T)729/(T)720
91
92 + c_u7*(T)2187/(T)5040
93
94 - C*uSqr*(T)81/(T)40
95
96 + C*(T)27/(T)20 - uSqr3*(T)27/(T)48 - E*(T)27/(T)24
97 - F*(T)81/(T)56 - uSqr*(T)3/(T)2 + uSqr2*(T)9/(T)8
98 )
99 - descriptors::t<T,L>(iPop);
100 }

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