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
98350acd
Commit
98350acd
authored
7 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
Extended scaling tutorial & more documentation cleanup
parent
44dd53d7
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
creationfunctions.py
+2
-2
2 additions, 2 deletions
creationfunctions.py
cumulants.py
+3
-3
3 additions, 3 deletions
cumulants.py
forcemodels.py
+1
-1
1 addition, 1 deletion
forcemodels.py
geometry.py
+7
-0
7 additions, 0 deletions
geometry.py
maxwellian_equilibrium.py
+1
-1
1 addition, 1 deletion
maxwellian_equilibrium.py
with
14 additions
and
7 deletions
creationfunctions.py
+
2
−
2
View file @
98350acd
...
@@ -11,7 +11,7 @@ General:
...
@@ -11,7 +11,7 @@ General:
- ``stencil=
'
D2Q9
'
``: stencil name e.g.
'
D2Q9
'
,
'
D3Q19
'
. See :func:`pystencils.stencils.get_stencil` for details
- ``stencil=
'
D2Q9
'
``: stencil name e.g.
'
D2Q9
'
,
'
D3Q19
'
. See :func:`pystencils.stencils.get_stencil` for details
- ``method=
'
srt
'
``: name of lattice Boltzmann method. This determines the selection and relaxation pattern of
- ``method=
'
srt
'
``: name of lattice Boltzmann method. This determines the selection and relaxation pattern of
moments/cumulants, i.e. which moment/cumulant basis is chosen, and which of the basis vectors are relaxed together
moments/cumulants, i.e. which moment/cumulant basis is chosen, and which of the basis vectors are relaxed together
- ``srt``: single relaxation time (:func:`lbmpy.methods.create_srt`)
- ``srt``: single relaxation time (:func:`lbmpy.methods.create_srt`)
- ``trt``: two relaxation time, first relaxation rate is for even moments and determines the viscosity (as in SRT),
- ``trt``: two relaxation time, first relaxation rate is for even moments and determines the viscosity (as in SRT),
the second relaxation rate is used for relaxing odd moments, and controls the bulk viscosity.
the second relaxation rate is used for relaxing odd moments, and controls the bulk viscosity.
...
@@ -66,7 +66,7 @@ Entropic methods:
...
@@ -66,7 +66,7 @@ Entropic methods:
LES methods:
LES methods:
- ``smagorinsky=False``: set to Smagorinsky constant to activate turbulence model,
`
omega_output_field
`
can be set to
- ``smagorinsky=False``: set to Smagorinsky constant to activate turbulence model,
'
omega_output_field
'
can be set to
write out adapted relaxation rates
write out adapted relaxation rates
...
...
This diff is collapsed.
Click to expand it.
cumulants.py
+
3
−
3
View file @
98350acd
...
@@ -146,10 +146,10 @@ def cumulants_from_pdfs(stencil, cumulant_indices=None, pdf_symbols=None):
...
@@ -146,10 +146,10 @@ def cumulants_from_pdfs(stencil, cumulant_indices=None, pdf_symbols=None):
"""
Transformation of pdfs (or other discrete function on a stencil) to cumulant space.
"""
Transformation of pdfs (or other discrete function on a stencil) to cumulant space.
Args:
Args:
stencil:
stencil:
stencil object
cumulant_indices: sequence of cumulant indices, could be tuples or polynomial representation
cumulant_indices: sequence of cumulant indices, could be tuples or polynomial representation
if left to default and a full stencil was passed,
if left to default and a full stencil was passed,
the full set i.e. `moments_up_to_component_order
(2)`
is used
the full set i.e. `moments_up_to_component_order
` with
'
order=2
'
is used
pdf_symbols: symbolic values for pdf values, if not passed they default to :math:`f_0, f_1, ...`
pdf_symbols: symbolic values for pdf values, if not passed they default to :math:`f_0, f_1, ...`
Returns:
Returns:
...
...
This diff is collapsed.
Click to expand it.
forcemodels.py
+
1
−
1
View file @
98350acd
...
@@ -4,7 +4,7 @@ r"""
...
@@ -4,7 +4,7 @@ r"""
Get started:
Get started:
-----------
-----------
-
This module offers different models to introduce a body force in the lattice Boltzmann scheme.
This module offers different models to introduce a body force in the lattice Boltzmann scheme.
If you don
'
t know which model to choose, use :class:`lbmpy.forcemodels.Guo`.
If you don
'
t know which model to choose, use :class:`lbmpy.forcemodels.Guo`.
...
...
This diff is collapsed.
Click to expand it.
geometry.py
+
7
−
0
View file @
98350acd
...
@@ -26,6 +26,13 @@ def add_box_boundary(boundary_handling, boundary=NoSlip(), replace=True):
...
@@ -26,6 +26,13 @@ def add_box_boundary(boundary_handling, boundary=NoSlip(), replace=True):
return
flag
return
flag
def
add_sphere
(
boundary_handling
,
midpoint
,
radius
,
boundary
=
NoSlip
(),
replace
=
True
):
"""
Sets boundary in spherical region.
"""
def
set_sphere
(
x
,
y
):
return
(
x
-
midpoint
[
0
])
**
2
+
(
y
-
midpoint
[
1
])
**
2
<
radius
**
2
return
boundary_handling
.
set_boundary
(
boundary
,
mask_callback
=
set_sphere
,
replace
=
replace
)
def
add_pipe_inflow_boundary
(
boundary_handling
,
u_max
,
slice_obj
,
flow_direction
=
0
,
diameter
=
None
):
def
add_pipe_inflow_boundary
(
boundary_handling
,
u_max
,
slice_obj
,
flow_direction
=
0
,
diameter
=
None
):
"""
Adds velocity inflow UBB boundary for pipe flow.
"""
Adds velocity inflow UBB boundary for pipe flow.
...
...
This diff is collapsed.
Click to expand it.
maxwellian_equilibrium.py
+
1
−
1
View file @
98350acd
...
@@ -57,7 +57,7 @@ def discrete_maxwellian_equilibrium(stencil, rho=sp.Symbol("rho"), u=tuple(sp.sy
...
@@ -57,7 +57,7 @@ def discrete_maxwellian_equilibrium(stencil, rho=sp.Symbol("rho"), u=tuple(sp.sy
:param stencil: tuple of directions
:param stencil: tuple of directions
:param rho: sympy symbol for the density
:param rho: sympy symbol for the density
:param u: symbols for macroscopic velocity, only the first
`
dim
`
entries are used
:param u: symbols for macroscopic velocity, only the first
'
dim
'
entries are used
:param order: highest order of velocity terms (for hydrodynamics order 2 is sufficient)
:param order: highest order of velocity terms (for hydrodynamics order 2 is sufficient)
:param c_s_sq: square of speed of sound
:param c_s_sq: square of speed of sound
:param compressible: compressibility
:param compressible: compressibility
...
...
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