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
9cfcafff
Commit
9cfcafff
authored
Apr 4, 2019
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
fix syntax errors
parent
aed6c8e0
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
LDDsimulation/domainPatch.py
+25
-17
25 additions, 17 deletions
LDDsimulation/domainPatch.py
with
25 additions
and
17 deletions
LDDsimulation/domainPatch.py
+
25
−
17
View file @
9cfcafff
...
...
@@ -142,6 +142,10 @@ class DomainPatch(df.SubDomain):
# dictionary holding the dof indices corresponding to an interface of
# given interface. see self._calc_dof_indices_of_interfaces()
self
.
_dof_indices_of_interface
=
dict
()
# dictionary holding for each interface in self.has_interface the dof
# indices that are shared with another interface (possibly none). This info is needed for
# the calculation of the gli terms.
self
.
_interface_has_common_dof_indices
=
dict
()
# List of objects of clas outerBoundary initialised by self._init_markers()
# can be NONE if no outer boundary is present.
self
.
outer_boundary
=
[]
...
...
@@ -175,6 +179,7 @@ class DomainPatch(df.SubDomain):
self
.
_init_markers
()
self
.
_init_measures
()
self
.
_calc_dof_indices_of_interfaces
()
self
.
_calc_interface_has_common_dof_indices
()
# END constructor
...
...
@@ -198,17 +203,13 @@ class DomainPatch(df.SubDomain):
from_func
=
self
.
pressure
if
self
.
isRichards
:
for
ind
in
self
.
has_interface
:
interface
[
ind
].
read_pressure_dofs
(
from_function
=
from_func
[
'
wetting
'
],
#
interface_dofs
=
self
.
_dof_indices_of_interface
[
ind
][
'
wetting
'
],
#
dof_to_vert_map
=
self
.
dof2vertex
[
'
wetting
'
],
#
local_to_parent_vertex_map
=
self
.
parent_mesh_index
,
#
phase
=
'
wetting
'
,
#
subdomain_ind
=
self
.
subdomain_index
)
subdomain_has_phases
=
[
'
wetting
'
]
else
:
subdomain_has_phases
=
[
'
wetting
'
,
'
nonwetting
'
]
for
ind
in
self
.
has_interface
:
for
phase
in
[
'
wetting
'
,
'
nonwetting
'
]
:
interface
[
ind
].
read_pressure_dofs
(
from_function
=
from_func
[
phase
],
#
for
phase
in
subdomain_has_phases
:
self
.
interface
[
ind
].
read_pressure_dofs
(
from_function
=
from_func
[
phase
],
#
interface_dofs
=
self
.
_dof_indices_of_interface
[
ind
][
phase
],
#
dof_to_vert_map
=
self
.
dof2vertex
[
phase
],
#
local_to_parent_vertex_map
=
self
.
parent_mesh_index
,
#
...
...
@@ -248,8 +249,8 @@ class DomainPatch(df.SubDomain):
# we need to have all interfaces in the form
interface_forms
=
[]
for
interface
in
self
.
has_interface
:
interface_forms
.
append
((
dt
*
Lambda
*
pw
*
phi_w
)
*
ds
(
interface
)
form1
=
(
Lw
*
pw
*
phi_w
)
*
dx
interface_forms
.
append
((
dt
*
Lambda
*
pw
*
phi_w
)
*
ds
(
interface
)
)
form1
=
Lw
*
pw
*
phi_w
*
dx
form2
=
dt
/
mu_w
*
df
.
dot
(
kw
(
S
(
pw_prev_iter
))
*
df
.
grad
(
pw
),
df
.
grad
(
v
))
*
dx
form
=
form1
+
form2
+
df
.
sum
(
interface_forms
)
# # assemble rhs
...
...
@@ -358,6 +359,7 @@ class DomainPatch(df.SubDomain):
ds
=
self
.
ds
(
ind
)
# needed for the read_gli_dofs() functions
interface_dofs
=
self
.
_dof_indices_of_interface
[
ind
],
#
if
iteration
==
0
:
n
=
df
.
FacetNormal
(
self
.
mesh
)
pw_prev_iter
=
self
.
pressure_prev_timestep
...
...
@@ -710,6 +712,12 @@ class DomainPatch(df.SubDomain):
'
nonwetting
'
:
self
.
interface
[
ind
].
dofs_on_interface
(
V
[
'
nonwetting
'
],
marker
,
ind
)}
)
def
_calc_interface_has_common_dof_indices
(
self
):
"""
populate dictionary self._interface_has_common_dof_indices
Determin for each interface in self.has_interface the dof indices
"""
# END OF CLASS DomainPatch
...
...
...
...
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