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

#include <entropicLbHelpers2D.h>

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

Static Public Member Functions

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

Detailed Description

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

Definition at line 36 of file entropicLbHelpers2D.h.

Member Function Documentation

◆ equilibrium()

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

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

Definition at line 39 of file entropicLbHelpers2D.h.

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

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