Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux-course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux-course
Commits
0bf5e0f6
Commit
0bf5e0f6
authored
1 year ago
by
Stefanie Kiemle
Browse files
Options
Downloads
Patches
Plain Diff
Match solution with exercise
parent
b02a5be5
No related branches found
No related tags found
1 merge request
!187
Match solution with exercise
Pipeline
#30535
waiting for manual action
Stage: trigger pipelines
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exercises/solution/exercise-basic/injection2pniproblem.hh
+14
-2
14 additions, 2 deletions
exercises/solution/exercise-basic/injection2pniproblem.hh
exercises/solution/exercise-basic/params.input
+0
-1
0 additions, 1 deletion
exercises/solution/exercise-basic/params.input
with
14 additions
and
3 deletions
exercises/solution/exercise-basic/injection2pniproblem.hh
+
14
−
2
View file @
0bf5e0f6
...
@@ -140,9 +140,9 @@ public:
...
@@ -140,9 +140,9 @@ public:
NumEqVector
values
(
0.0
);
NumEqVector
values
(
0.0
);
// if we are inside the injection zone set inflow Neumann boundary conditions
// if we are inside the injection zone set inflow Neumann boundary conditions
if
(
time_
<
injectionDuration_
if
(
injectionActive
()
&&
onInjectionBoundary
(
globalPos
))
&&
globalPos
[
1
]
<
15
+
eps_
&&
globalPos
[
1
]
>
7
-
eps_
&&
globalPos
[
0
]
>
0.9
*
this
->
gridGeometry
().
bBoxMax
()[
0
])
{
{
// inject nitrogen. negative values mean injection
// inject nitrogen. negative values mean injection
// units kg/(s*m^2)
// units kg/(s*m^2)
values
[
Indices
::
conti0EqIdx
+
FluidSystem
::
N2Idx
]
=
-
1e-4
;
values
[
Indices
::
conti0EqIdx
+
FluidSystem
::
N2Idx
]
=
-
1e-4
;
...
@@ -193,6 +193,18 @@ public:
...
@@ -193,6 +193,18 @@ public:
//! set the time for the time dependent boundary conditions (called from main)
//! set the time for the time dependent boundary conditions (called from main)
void
setTime
(
Scalar
time
)
void
setTime
(
Scalar
time
)
{
time_
=
time
;
}
{
time_
=
time
;
}
//! Return true if the injection is currently active
bool
injectionActive
()
const
{
return
time_
<
injectionDuration_
;
}
//! Return true if the given position is in the injection boundary region
bool
onInjectionBoundary
(
const
GlobalPosition
&
globalPos
)
const
{
return
globalPos
[
1
]
<
15.
+
eps_
&&
globalPos
[
1
]
>
7.
-
eps_
&&
globalPos
[
0
]
>
this
->
gridGeometry
().
bBoxMax
()[
0
]
-
eps_
;
}
private
:
private
:
static
constexpr
Scalar
eps_
=
1e-6
;
static
constexpr
Scalar
eps_
=
1e-6
;
...
...
This diff is collapsed.
Click to expand it.
exercises/solution/exercise-basic/params.input
+
0
−
1
View file @
0bf5e0f6
...
@@ -3,7 +3,6 @@ DtInitial = 3600 # in seconds
...
@@ -3,7 +3,6 @@ DtInitial = 3600 # in seconds
TEnd = 3.154e9 # in seconds, i.e ten years
TEnd = 3.154e9 # in seconds, i.e ten years
[Grid]
[Grid]
LowerLeft = 0 0
UpperRight = 60 40
UpperRight = 60 40
Cells = 24 16
Cells = 24 16
...
...
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