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
fe215c94
Commit
fe215c94
authored
3 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
debug output
parent
254f3b27
No related branches found
No related tags found
1 merge request
!106
Draft: Wall law
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/boundaries/wall_models.py
+8
-2
8 additions, 2 deletions
lbmpy/boundaries/wall_models.py
with
8 additions
and
2 deletions
lbmpy/boundaries/wall_models.py
+
8
−
2
View file @
fe215c94
...
...
@@ -19,10 +19,11 @@ class WallFunctionBounce(LbBoundary):
name: optional name of the boundary.
"""
def
__init__
(
self
,
stencil
,
normal_direction
,
omega
,
name
=
None
):
def
__init__
(
self
,
stencil
,
normal_direction
,
omega
,
vel_debug
,
name
=
None
):
"""
Set an optional name here, to mark boundaries, for example for force evaluations
"""
self
.
stencil
=
stencil
self
.
omega
=
omega
self
.
vel_debug
=
vel_debug
if
len
(
normal_direction
)
-
normal_direction
.
count
(
0
)
!=
1
:
raise
ValueError
(
"
Only normal directions for straight walls are supported for example (0, 1, 0) for
"
...
...
@@ -68,6 +69,7 @@ class WallFunctionBounce(LbBoundary):
pdf_center_vector
=
sp
.
Matrix
([
0
]
*
stencil
.
Q
)
for
i
in
range
(
stencil
.
Q
):
m
=
sp
.
IndexedBase
(
mirrored_stencil_symbol
,
shape
=
(
1
,))[
i
]
pdf_center_vector
[
i
]
=
f_in
[
normal_direction
](
i
)
eq_equations
=
cqc
.
equilibrium_input_equations_from_pdfs
(
pdf_center_vector
)
...
...
@@ -94,6 +96,10 @@ class WallFunctionBounce(LbBoundary):
shear_stress
=
Assignment
(
tau_w
,
u_t
[
newton_steps
]
**
2
*
rho
)
result
=
eq_equations
.
all_assignments
# result.append(Assignment(f_in(1), f_out(1)))
result
.
append
(
Assignment
(
self
.
vel_debug
[
0
,
0
,
0
](
0
),
u
[
0
]))
result
.
append
(
Assignment
(
self
.
vel_debug
[
0
,
0
,
0
](
1
),
u
[
1
]))
result
.
append
(
Assignment
(
self
.
vel_debug
[
0
,
0
,
0
](
2
),
u
[
2
]))
result
.
append
(
u_mag
)
result
.
append
(
init_guess
)
result
.
extend
(
newton_assignmets
)
...
...
@@ -105,6 +111,6 @@ class WallFunctionBounce(LbBoundary):
neighbor_offset
=
NeighbourOffsetArrays
.
neighbour_offset
(
dir_symbol
,
lb_method
.
stencil
)
drag
=
neighbor_offset
[
0
]
*
factor
*
tau_w_x
+
neighbor_offset
[
2
]
*
factor
*
tau_w_z
result
.
append
(
Assignment
(
f_in
(
inv_dir
[
dir_symbol
]),
f_in
[
normal_direction
](
mirrored_direction
)
*
drag
))
result
.
append
(
Assignment
(
f_in
(
inv_dir
[
dir_symbol
]),
f_in
[
normal_direction
](
mirrored_direction
)
-
drag
))
return
result
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