Skip to content
Snippets Groups Projects
Commit a9f3a026 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixed in derivative operator

parent 9c3d7f23
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment