Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Karsten Rink
ogs
Commits
47bee5f0
Commit
47bee5f0
authored
5 years ago
by
Norbert Grunwald
Committed by
Dmitri Naumov
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[MPL/T] BC; update brooks-corey saturation test.
parent
b8c19f07
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tests/MaterialLib/TestMPLSaturationBrooksCorey.cpp
+11
-25
11 additions, 25 deletions
Tests/MaterialLib/TestMPLSaturationBrooksCorey.cpp
with
11 additions
and
25 deletions
Tests/MaterialLib/TestMPLSaturationBrooksCorey.cpp
+
11
−
25
View file @
47bee5f0
...
@@ -47,38 +47,23 @@ TEST(MaterialPropertyLib, SaturationBrooksCorey)
...
@@ -47,38 +47,23 @@ TEST(MaterialPropertyLib, SaturationBrooksCorey)
MaterialPropertyLib
::
VariableArray
variable_array
;
MaterialPropertyLib
::
VariableArray
variable_array
;
ParameterLib
::
SpatialPosition
const
pos
;
ParameterLib
::
SpatialPosition
const
pos
;
double
const
time
=
std
::
numeric_limits
<
double
>::
quiet_NaN
();
double
const
t
=
std
::
numeric_limits
<
double
>::
quiet_NaN
();
variable_array
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
capillary_pressure
)]
=
0.0
;
auto
s_L
=
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
.
template
value
<
double
>(
variable_array
,
pos
,
time
);
auto
ds_L_dp_cap
=
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
.
template
dValue
<
double
>(
variable_array
,
MaterialPropertyLib
::
Variable
::
capillary_pressure
,
pos
,
time
);
ASSERT_EQ
(
s_L
,
max_saturation
);
ASSERT_EQ
(
ds_L_dp_cap
,
0.
);
for
(
double
p_cap
=
1.0
;
p_cap
<
1.0e10
;
p_cap
*=
1.5
)
for
(
double
p_cap
=
1.0
;
p_cap
<
1.0e10
;
p_cap
*=
1.5
)
{
{
variable_array
[
static_cast
<
int
>
(
variable_array
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
capillary_pressure
)]
=
p_cap
;
MaterialPropertyLib
::
Variable
::
capillary_pressure
)]
=
p_cap
;
s_L
=
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
auto
s_L
=
.
template
value
<
double
>(
variable_array
,
pos
,
time
);
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
ds_L_dp_cap
=
.
template
value
<
double
>(
variable_array
,
pos
,
t
);
auto
ds_L_dp_cap
=
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
medium
->
property
(
MaterialPropertyLib
::
PropertyType
::
saturation
)
.
template
dValue
<
double
>(
.
template
dValue
<
double
>(
variable_array
,
variable_array
,
MaterialPropertyLib
::
Variable
::
capillary_pressure
,
MaterialPropertyLib
::
Variable
::
capillary_pressure
,
pos
,
pos
,
t
ime
);
t
);
const
double
s_eff
=
const
double
s_eff
=
std
::
pow
(
ref_entry_pressure
/
std
::
max
(
p_cap
,
ref_entry_pressure
),
std
::
pow
(
ref_entry_pressure
/
std
::
max
(
p_cap
,
ref_entry_pressure
),
...
@@ -87,11 +72,12 @@ TEST(MaterialPropertyLib, SaturationBrooksCorey)
...
@@ -87,11 +72,12 @@ TEST(MaterialPropertyLib, SaturationBrooksCorey)
s_eff
*
(
max_saturation
-
ref_residual_liquid_saturation
)
+
s_eff
*
(
max_saturation
-
ref_residual_liquid_saturation
)
+
ref_residual_liquid_saturation
;
ref_residual_liquid_saturation
;
const
double
ds_eff_dpc
=
const
double
ds_eff_dpc
=
(
p_cap
<=
ref_entry_pressure
)
?
0.
:
-
ref_lambda
/
p_cap
*
s_ref
;
-
ref_lambda
/
std
::
max
(
p_cap
,
ref_entry_pressure
)
*
s_ref
;
const
double
ds_L_ds_eff
=
1.
/
(
max_saturation
-
ref_residual_liquid_saturation
);
const
double
ds_L_ds_eff
=
const
double
ds_L_dpc
=
ds_L_ds_eff
*
ds_eff_dpc
;
1.
/
(
max_saturation
-
ref_residual_liquid_saturation
);
const
double
ds_L_dpc
=
ds_L_ds_eff
*
ds_eff_dpc
;
ASSERT_NEAR
(
s_L
,
s_ref
,
1.e-10
);
ASSERT_NEAR
(
s_L
,
s_ref
,
1.e-10
);
ASSERT_NEAR
(
ds_L_dp_cap
,
ds_L_dpc
,
1.e-10
);
ASSERT_NEAR
(
ds_L_dp_cap
,
ds_L_dpc
,
1.e-10
);
}
}
}
}
\ No newline at end of file
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