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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
6e094b46
Commit
6e094b46
authored
Apr 13, 2022
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Finished Casson model
parent
47accc55
No related branches found
No related tags found
1 merge request
!118
Cassons
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/notebooks/11_tutorial_Non_Newtonian_Flow.ipynb
+73
-37
73 additions, 37 deletions
doc/notebooks/11_tutorial_Non_Newtonian_Flow.ipynb
lbmpy/creationfunctions.py
+3
-8
3 additions, 8 deletions
lbmpy/creationfunctions.py
with
76 additions
and
45 deletions
doc/notebooks/11_tutorial_Non_Newtonian_Flow.ipynb
+
73
−
37
View file @
6e094b46
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
+
3
−
8
View file @
6e094b46
...
...
@@ -226,11 +226,10 @@ class LBMConfig:
set to Smagorinsky constant to activate turbulence model, ``omega_output_field`` can be set to
write out adapted relaxation rates. If set to `True`, 0.12 is used as default smagorinsky constant.
"""
cassons
:
Union
[
dict
,
bool
]
=
False
cassons
:
CassonsParameters
=
False
"""
Adds the Cassons model according to https://doi.org/10.1007/s10955-005-8415-x
Set either to True, to obtain model with standard parameters or pass a dictionary containing
`yield_stress`, `omega_min` and `omega_max`
The parameters are set with the ``CassonsParameters`` dataclass.
"""
fluctuating
:
dict
=
False
"""
...
...
@@ -656,11 +655,7 @@ def create_lb_collision_rule(lb_method=None, lbm_config=None, lbm_optimisation=N
collision_rule
.
simplification_hints
[
'
split_groups
'
][
0
].
append
(
sp
.
Symbol
(
"
smagorinsky_omega
"
))
elif
lbm_config
.
cassons
:
if
isinstance
(
lbm_config
.
cassons
,
CassonsParameters
):
parameters
=
lbm_config
.
cassons
else
:
parameters
=
CassonsParameters
()
collision_rule
=
add_cassons_model
(
collision_rule
,
parameter
=
parameters
,
collision_rule
=
add_cassons_model
(
collision_rule
,
parameter
=
lbm_config
.
cassons
,
omega_output_field
=
lbm_config
.
omega_output_field
)
if
lbm_config
.
output
:
...
...
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
sign in
to comment