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
8dfe76ae
Commit
8dfe76ae
authored
Aug 16, 2019
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
fix weird git conflict for
parent
8bd6fa40
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
RR-2-patch-test-case/RR-2-patch-test.py
+33
-17
33 additions, 17 deletions
RR-2-patch-test-case/RR-2-patch-test.py
with
33 additions
and
17 deletions
RR-2-patch-test-case/RR-2-patch-test.py
+
33
−
17
View file @
8dfe76ae
...
@@ -7,8 +7,32 @@ import typing as tp
...
@@ -7,8 +7,32 @@ import typing as tp
import
domainPatch
as
dp
import
domainPatch
as
dp
import
LDDsimulation
as
ldd
import
LDDsimulation
as
ldd
import
functools
as
ft
import
functools
as
ft
import
helpers
as
hlp
#import ufl as ufl
#import ufl as ufl
use_case
=
"
RR-two-patch
"
solver_tol
=
1E-6
############ GRID #######################ü
mesh_resolution
=
40
timestep_size
=
0.01
number_of_timesteps
=
15
# decide how many timesteps you want analysed. Analysed means, that we write out
# subsequent errors of the L-iteration within the timestep.
number_of_timesteps_to_analyse
=
10
starttime
=
0
Lw
=
0.25
#/timestep_size
Lnw
=
Lw
l_param_w
=
4
include_gravity
=
False
debugflag
=
False
analyse_condition
=
False
output_string
=
"
./output/new_gravity_term-number_of_timesteps{}_
"
.
format
(
number_of_timesteps
)
##### Domain and Interface ####
##### Domain and Interface ####
# global simulation domain domain
# global simulation domain domain
sub_domain0_vertices
=
[
df
.
Point
(
-
1.0
,
-
1.0
),
#
sub_domain0_vertices
=
[
df
.
Point
(
-
1.0
,
-
1.0
),
#
...
@@ -85,16 +109,6 @@ isRichards = {
...
@@ -85,16 +109,6 @@ isRichards = {
2
:
True
2
:
True
}
}
##################### MESH #####################################################
mesh_resolution
=
20
##################### TIME #####################################################
timestep_size
=
0.01
number_of_timesteps
=
200
# decide how many timesteps you want analysed. Analysed means, that we write out
# subsequent errors of the L-iteration within the timestep.
number_of_timesteps_to_analyse
=
0
starttime
=
0
viscosity
=
{
#
viscosity
=
{
#
# subdom_num : viscosity
# subdom_num : viscosity
...
@@ -118,14 +132,14 @@ porosity = {#
...
@@ -118,14 +132,14 @@ porosity = {#
L
=
{
#
L
=
{
#
# subdom_num : subdomain L for L-scheme
# subdom_num : subdomain L for L-scheme
1
:
{
'
wetting
'
:
0.25
},
#
1
:
{
'
wetting
'
:
Lw
},
#
2
:
{
'
wetting
'
:
0.25
}
2
:
{
'
wetting
'
:
Lw
}
}
}
lambda_param
=
{
#
lambda_param
=
{
#
# subdom_num : lambda parameter for the L-scheme
# subdom_num : lambda parameter for the L-scheme
1
:
{
'
wetting
'
:
4
},
#
1
:
{
'
wetting
'
:
l_param_w
},
#
2
:
{
'
wetting
'
:
4
}
2
:
{
'
wetting
'
:
l_param_w
}
}
}
## relative permeabilty functions on subdomain 1
## relative permeabilty functions on subdomain 1
...
@@ -143,6 +157,7 @@ subdomain1_rel_perm = {
...
@@ -143,6 +157,7 @@ subdomain1_rel_perm = {
def
rel_perm2
(
s
):
def
rel_perm2
(
s
):
# relative permeabilty on subdomain2
# relative permeabilty on subdomain2
return
s
**
3
return
s
**
3
_rel_perm2
=
ft
.
partial
(
rel_perm2
)
_rel_perm2
=
ft
.
partial
(
rel_perm2
)
subdomain2_rel_perm
=
{
subdomain2_rel_perm
=
{
...
@@ -212,7 +227,8 @@ write_to_file = {
...
@@ -212,7 +227,8 @@ write_to_file = {
# initialise LDD simulation class
# initialise LDD simulation class
simulation
=
ldd
.
LDDsimulation
(
tol
=
1E-14
,
debug
=
False
,
LDDsolver_tol
=
1E-9
)
simulation
=
ldd
.
LDDsimulation
(
tol
=
1E-14
,
debug
=
False
,
LDDsolver_tol
=
1E-9
)
simulation
.
set_parameters
(
output_dir
=
"
./output/
"
,
#
simulation
.
set_parameters
(
use_case
=
use_case
,
output_dir
=
output_string
,
#
subdomain_def_points
=
subdomain_def_points
,
#
subdomain_def_points
=
subdomain_def_points
,
#
isRichards
=
isRichards
,
#
isRichards
=
isRichards
,
#
interface_def_points
=
interface_def_points
,
#
interface_def_points
=
interface_def_points
,
#
...
@@ -234,12 +250,12 @@ simulation.set_parameters(output_dir = "./output/",#
...
@@ -234,12 +250,12 @@ simulation.set_parameters(output_dir = "./output/",#
dirichletBC_expression_strings
=
dirichletBC
,
#
dirichletBC_expression_strings
=
dirichletBC
,
#
exact_solution
=
exact_solution
,
#
exact_solution
=
exact_solution
,
#
densities
=
densities
,
#
densities
=
densities
,
#
include_gravity
=
False
,
#
include_gravity
=
include_gravity
,
#
write2file
=
write_to_file
,
#
write2file
=
write_to_file
,
#
)
)
simulation
.
initialise
()
simulation
.
initialise
()
print
(
simulation
.
__dict__
)
print
(
simulation
.
__dict__
)
simulation
.
run
()
simulation
.
run
(
analyse_condition
=
analyse_condition
)
# simulation.LDDsolver(time = 0, debug = True, analyse_timestep = True)
# simulation.LDDsolver(time = 0, debug = True, analyse_timestep = True)
# df.info(parameters, True)
# df.info(parameters, True)
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