Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDD-for-two-phase-flow-systems
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Seus
LDD-for-two-phase-flow-systems
Commits
16ea3a3e
Commit
16ea3a3e
authored
5 years ago
by
David
Browse files
Options
Downloads
Patches
Plain Diff
clean up multi-patch with inner patch by helpers and substructuring
parent
1f45e155
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LDDsimulation/domainSubstructuring.py
+163
-0
163 additions, 0 deletions
LDDsimulation/domainSubstructuring.py
Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py
+235
-277
235 additions, 277 deletions
...ain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py
with
398 additions
and
277 deletions
LDDsimulation/domainSubstructuring.py
+
163
−
0
View file @
16ea3a3e
...
...
@@ -529,3 +529,166 @@ class layeredSoilInnerPatch(domainSubstructuring):
5
:
self
.
__subdomain5_outer_boundary_verts
,
6
:
self
.
__subdomain6_outer_boundary_verts
}
class
chessBoardInnerPatch
(
domainSubstructuring
):
"""
layered soil substructuring with inner patch.
"""
def
__init__
(
self
):
"""
Layered soil case with inner patch.
"""
super
().
__init__
()
hlp
.
print_once
(
"
\n
Layered Soil with inner Patch:
\n
"
)
# global domain
self
.
__subdomain0_vertices
=
[
df
.
Point
(
-
1.0
,
-
1.0
),
df
.
Point
(
1.0
,
-
1.0
),
df
.
Point
(
1.0
,
1.0
),
df
.
Point
(
-
1.0
,
1.0
)
]
self
.
__interface_def_points
()
self
.
__adjacent_subdomains
()
self
.
__subdomain_def_points
()
self
.
__outer_boundary_def_points
()
def
__interface_def_points
(
self
):
"""
Set self._interface_def_points.
"""
self
.
__interface23_vertices
=
[
df
.
Point
(
0.0
,
-
0.6
),
df
.
Point
(
0.7
,
0.0
)]
self
.
__interface12_vertices
=
[
self
.
__interface23_vertices
[
1
],
df
.
Point
(
1.0
,
0.0
)]
self
.
__interface13_vertices
=
[
df
.
Point
(
0.0
,
0.0
),
self
.
__interface23_vertices
[
1
]]
self
.
__interface15_vertices
=
[
df
.
Point
(
0.0
,
0.0
),
df
.
Point
(
0.0
,
1.0
)]
self
.
__interface34_vertices
=
[
df
.
Point
(
0.0
,
0.0
),
self
.
__interface23_vertices
[
0
]]
self
.
__interface24_vertices
=
[
self
.
__interface23_vertices
[
0
],
df
.
Point
(
0.0
,
-
1.0
)]
self
.
__interface45_vertices
=
[
df
.
Point
(
-
1.0
,
0.0
),
df
.
Point
(
0.0
,
0.0
)]
# interface_vertices introduces a global numbering of interfaces.
self
.
interface_def_points
=
[
self
.
__interface13_vertices
,
self
.
__interface12_vertices
,
self
.
__interface23_vertices
,
self
.
__interface24_vertices
,
self
.
__interface34_vertices
,
self
.
__interface45_vertices
,
self
.
__interface15_vertices
,
]
def
__adjacent_subdomains
(
self
):
"""
Set self._adjacent_subdomains.
"""
self
.
adjacent_subdomains
=
[
[
1
,
3
],
[
1
,
2
],
[
2
,
3
],
[
2
,
4
],
[
3
,
4
],
[
4
,
5
],
[
1
,
5
]
]
def
__subdomain_def_points
(
self
):
"""
Set self._subdomain_def_points.
"""
# subdomain1.
self
.
__subdomain1_vertices
=
[
self
.
__interface23_vertices
[
0
],
self
.
__interface23_vertices
[
1
],
self
.
__interface12_vertices
[
1
],
self
.
__subdomain0_vertices
[
2
],
df
.
Point
(
0.0
,
1.0
)]
# subdomain2
self
.
__subdomain2_vertices
=
[
self
.
__interface24_vertices
[
1
],
self
.
__subdomain0_vertices
[
1
],
self
.
__interface12_vertices
[
1
],
self
.
__interface23_vertices
[
1
],
self
.
__interface23_vertices
[
0
]]
self
.
__subdomain3_vertices
=
[
self
.
__interface23_vertices
[
0
],
self
.
__interface23_vertices
[
1
],
self
.
__interface13_vertices
[
0
]]
self
.
__subdomain4_vertices
=
[
self
.
__subdomain0_vertices
[
0
],
self
.
__interface24_vertices
[
1
],
self
.
__interface34_vertices
[
1
],
self
.
__interface34_vertices
[
0
],
self
.
__interface45_vertices
[
0
]]
self
.
__subdomain5_vertices
=
[
self
.
__interface45_vertices
[
0
],
self
.
__interface15_vertices
[
0
],
self
.
__interface15_vertices
[
1
],
self
.
__subdomain0_vertices
[
3
]]
self
.
subdomain_def_points
=
[
self
.
__subdomain0_vertices
,
self
.
__subdomain1_vertices
,
self
.
__subdomain2_vertices
,
self
.
__subdomain3_vertices
,
self
.
__subdomain4_vertices
,
self
.
__subdomain5_vertices
,
]
def
__outer_boundary_def_points
(
self
):
"""
Set self._outer_boundary_def_points.
"""
# vertex coordinates of the outer boundaries. If it can not be
# specified as a polygon, use an entry per boundary polygon.
# This information is used for defining the Dirichlet boundary
# conditions. If a domain is completely internal, the
# dictionary entry should be 0: None
self
.
__subdomain1_outer_boundary_verts
=
{
0
:
[
self
.
__interface12_vertices
[
1
],
self
.
__subdomain0_vertices
[
2
],
df
.
Point
(
0.0
,
1.0
)]
}
self
.
__subdomain2_outer_boundary_verts
=
{
0
:
[
self
.
__interface24_vertices
[
1
],
self
.
__subdomain0_vertices
[
1
],
self
.
__interface12_vertices
[
1
]]
}
self
.
__subdomain3_outer_boundary_verts
=
None
self
.
__subdomain4_outer_boundary_verts
=
{
0
:
[
self
.
__interface45_vertices
[
0
],
self
.
__subdomain0_vertices
[
0
],
self
.
__interface24_vertices
[
1
]]
}
self
.
__subdomain5_outer_boundary_verts
=
{
0
:
[
self
.
__interface15_vertices
[
1
],
self
.
__subdomain0_vertices
[
3
],
self
.
__interface45_vertices
[
0
]]
}
# if a subdomain has no outer boundary write None instead, i.e.
# i: None
# if i is the index of the inner subdomain.
self
.
outer_boundary_def_points
=
{
1
:
self
.
__subdomain1_outer_boundary_verts
,
2
:
self
.
__subdomain2_outer_boundary_verts
,
3
:
self
.
__subdomain3_outer_boundary_verts
,
4
:
self
.
__subdomain4_outer_boundary_verts
,
5
:
self
.
__subdomain5_outer_boundary_verts
,
}
This diff is collapsed.
Click to expand it.
Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py
+
235
−
277
View file @
16ea3a3e
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