Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
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
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
a9f3a026
Commit
a9f3a026
authored
7 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed in derivative operator
parent
9c3d7f23
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
chapman_enskog/chapman_enskog.py
+9
-3
9 additions, 3 deletions
chapman_enskog/chapman_enskog.py
with
9 additions
and
3 deletions
chapman_enskog/chapman_enskog.py
+
9
−
3
View file @
a9f3a026
...
...
@@ -103,10 +103,9 @@ class CeMoment(sp.Symbol):
return
self
.
name
,
self
.
momentTuple
,
self
.
superscript
def
_latex
(
self
,
printer
,
*
args
):
coordNames
=
[
'
x
'
,
'
y
'
,
'
z
'
]
coordStr
=
[]
for
i
,
comp
in
enumerate
(
self
.
momentTuple
):
coordStr
+=
[
coordNames
[
i
]
]
*
comp
coordStr
+=
[
str
(
i
)
]
*
comp
coordStr
=
""
.
join
(
coordStr
)
result
=
"
{%s_{%s}
"
%
(
self
.
name
,
coordStr
)
if
self
.
superscript
>=
0
:
...
...
@@ -384,7 +383,14 @@ def getTaylorExpandedLbEquation(pdfSymbolName="f", pdfsAfterCollisionOperator="\
def
useChapmanEnskogAnsatz
(
equation
,
timeDerivativeOrders
=
(
1
,
3
),
spatialDerivativeOrders
=
(
1
,
2
),
pdfs
=
([
'
f
'
,
0
,
3
],
[
'
\Omega f
'
,
1
,
3
]),
**
kwargs
):
"""
Uses a Chapman Enskog Ansatz to expand given equation.
:param equation: equation to expand
:param timeDerivativeOrders: tuple describing range for time derivative to expand
:param spatialDerivativeOrders: tuple describing range for spatial derivatives to expand
:param pdfs: symbols to expand: sequence of triples (symbolName, startOrder, endOrder)
:return: tuple mapping epsilon order to equation
"""
t
,
eps
=
sp
.
symbols
(
"
t epsilon
"
)
# expand time derivatives
...
...
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