Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lattice-boltzmann
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orestis.malaspin
lattice-boltzmann
Commits
0042d4e6
Verified
Commit
0042d4e6
authored
1 year ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
updates
parent
88a190a9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lattice-boltzmann.com/content/1-dimensionless-lbm.md
+1
-1
1 addition, 1 deletion
lattice-boltzmann.com/content/1-dimensionless-lbm.md
sage/hermite.sage
+20
-8
20 additions, 8 deletions
sage/hermite.sage
with
21 additions
and
9 deletions
lattice-boltzmann.com/content/1-dimensionless-lbm.md
+
1
−
1
View file @
0042d4e6
...
...
@@ -113,7 +113,7 @@ $$
\p
artial_t^
\a
st f^
\a
st+
\b
m{
\x
i}^
\a
st
\c
dot
\b
m{
\n
abla}^
\a
st f^
\a
st=-
\f
rac{1}{
\m
athrm{Kn}}
\l
eft(f^
\a
st-{f^{eq}}^
\a
st
\r
ight),
\e
nd{equation}
$$
where the space, time, and microscopic velocity is omitted and where
where the space, time, and microscopic velocity
dependence
is omitted and where
$$
\m
athrm{Kn}=
\f
rac{
\t
au
\x
i_0}{L},
$$
...
...
This diff is collapsed.
Click to expand it.
sage/hermite.sage
+
20
−
8
View file @
0042d4e6
xi = var('xi')
u = var('u')
theta = var('theta')
xi0 = var('xi0')
n = var('n')
assume(theta > 0)
h0 = 1
h1 = xi
h2 = xi^2 - 1
h3 = xi^3 - 3*xi
h4 = xi^4 - 6*xi^2 + 3
h5 = xi^5 - 10*xi^3 + 15*xi
def hn(n):
return (-1)^n * xi0^n * exp(xi^2/(2 * xi0^2))*diff(exp(-xi^2/(2 * xi0^2)), xi, n)
w = 1/sqrt(2*pi) * exp(-xi^2/2)
print("Hermite polynomials")
h0 = hn(0)
print(h0)
h1 = hn(1)
print(h1)
h2 = hn(2).full_simplify()
print(h2)
h3 = hn(3).full_simplify()
print(h3)
h4 = hn(4).full_simplify()
print(h4)
h5 = hn(5).full_simplify()
print(h5)
w = 1/sqrt(2*pi) * exp(-xi^2/(2*xi0^2))
print("Coefficients")
n0 = integrate(w * h0, xi, -infinity, infinity)
...
...
@@ -27,7 +39,7 @@ n5 = integrate(w * h5 * h5, xi, -infinity, infinity)
print(n5.canonicalize_radical())
bol = 1 / (sqrt(2 * pi *
theta
)) * exp(-(xi - u)^2/(2 *
theta
))
bol = 1 / (sqrt(2 * pi *
xi0^2
)) * exp(-(xi - u)^2/(2 *
xi0^2
))
res = integrate(bol, xi, -infinity, infinity)
print("Moments of Boltzmann")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment