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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Seus
LDD-for-two-phase-flow-systems
Commits
20c1855c
Commit
20c1855c
authored
Oct 19, 2018
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
define the whole domain and subdomains 1 and 2
parent
5eb6bfee
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
domain_layered_soil.py
+32
-0
32 additions, 0 deletions
domain_layered_soil.py
with
32 additions
and
0 deletions
domain_layered_soil.py
+
32
−
0
View file @
20c1855c
...
...
@@ -12,6 +12,38 @@ import mshr
set_log_level
(
1
)
domain
=
mshr
.
Rectangle
(
df
.
Point
(
0.0
,
0.0
),
df
.
Point
(
13.0
,
8.0
))
# define vertices of the top most subdomain.
sub_domain1_vertices
=
[
df
.
Point
(
0.0
,
7.0
),
df
.
Point
(
9.0
,
7.0
),
df
.
Point
(
10.5
,
7.5
),
df
.
Point
(
12.0
,
7.0
),
df
.
Point
(
13.0
,
6.5
),
# southern boundary, 12 interface
df
.
Point
(
13.0
,
8.0
),
# eastern boundary, outer boundary
df
.
Point
(
0.0
,
8.0
)
]
# northern boundary, outer on_boundary
sub_domain1
=
mshr
.
Polygon
(
sub_domain1_vertices
)
# set this as subdomain1
domain
.
set_subdomain
(
1
,
sub_domain1
)
# subdomain 2
sub_domain2_vertices
=
[
df
.
Point
(
0.0
,
5.0
),
df
.
Point
(
3.0
,
5.0
)
df
.
Point
(
6.5
,
4.5
),
df
.
Point
(
9.5
,
5.0
),
df
.
Point
(
11.5
,
3.5
),
df
.
Point
(
13.0
,
3
),
# southern boundary, 23 interface
df
.
Point
(
13.0
,
6.5
),
# eastern boundary, outer boundary
sub_domain1_vertices
[
4
],
sub_domain1_vertices
[
3
],
sub_domain1_vertices
[
2
],
sub_domain1_vertices
[
1
],
sub_domain1_vertices
[
0
]
]
# northern boundary, 12 interface
sub_domain2
=
mshr
.
Polygon
(
sub_domain2_vertices
)
# set this as subdomain2
domain
.
set_subdomain
(
2
,
sub_domain2
)
# Save sub domains to file
#file = File("subdomains_layered_soil.xml")
#file << sub_domains
...
...
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