Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
ce8bdf48
Commit
ce8bdf48
authored
Nov 25, 2021
by
Bernd Flemisch
Browse files
[test][co2] use new spatial params
parent
e0a1b470
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/porousmediumflow/co2/problem.hh
View file @
ce8bdf48
...
...
@@ -222,7 +222,7 @@ public:
const
auto
dofIdxGlobal
=
scv
.
dofIndex
();
vtkBoxVolume_
[
dofIdxGlobal
]
+=
scv
.
volume
();
#if ISOTHERMAL
vtkTemperature_
[
dofIdxGlobal
]
=
initialT
emperature
Field_
(
scv
.
dofPosition
());
vtkTemperature_
[
dofIdxGlobal
]
=
this
->
spatialParams
().
t
emperature
AtPos
(
scv
.
dofPosition
());
#endif
}
...
...
@@ -260,17 +260,6 @@ public:
const
std
::
string
&
name
()
const
{
return
name_
;
}
/*!
* \brief Returns the temperature within the domain.
*
* \param globalPos The global position
*
* This problem assumes a geothermal gradient with
* a surface temperature of 10 degrees Celsius.
*/
Scalar
temperatureAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
initialTemperatureField_
(
globalPos
);
}
// \}
/*!
...
...
@@ -397,7 +386,7 @@ private:
PrimaryVariables
values
(
0.0
);
values
.
setState
(
firstPhaseOnly
);
const
Scalar
temp
=
initialT
emperature
Field_
(
globalPos
);
const
Scalar
temp
=
this
->
spatialParams
().
t
emperature
AtPos
(
globalPos
);
const
Scalar
densityW
=
FluidSystem
::
Brine
::
liquidDensity
(
temp
,
1e7
);
const
Scalar
moleFracLiquidCO2
=
0.00
;
...
...
@@ -419,11 +408,6 @@ private:
return
values
;
}
Scalar
initialTemperatureField_
(
const
GlobalPosition
globalPos
)
const
{
return
283.0
+
(
depthBOR_
-
globalPos
[
dimWorld
-
1
])
*
0.03
;
}
Scalar
depthBOR_
;
Scalar
injectionRate_
;
...
...
test/porousmediumflow/co2/spatialparams.hh
View file @
ce8bdf48
...
...
@@ -28,7 +28,7 @@
#define DUMUX_HETEROGENEOUS_SPATIAL_PARAMS_HH
#include <dumux/io/grid/griddata.hh>
#include <dumux/
material/
spatialparams
/fv
.hh>
#include <dumux/
porousmediumflow/fv
spatialparams
mp
.hh>
#include <dumux/material/fluidmatrixinteractions/2p/brookscorey.hh>
#include <dumux/porousmediumflow/co2/model.hh>
...
...
@@ -43,21 +43,23 @@ namespace Dumux {
*/
template
<
class
GridGeometry
,
class
Scalar
>
class
HeterogeneousSpatialParams
:
public
FVSpatialParams
<
GridGeometry
,
Scalar
,
HeterogeneousSpatialParams
<
GridGeometry
,
Scalar
>>
:
public
FV
PorousMedium
SpatialParams
MP
<
GridGeometry
,
Scalar
,
HeterogeneousSpatialParams
<
GridGeometry
,
Scalar
>>
{
using
Grid
=
typename
GridGeometry
::
Grid
;
using
GridView
=
typename
GridGeometry
::
GridView
;
using
FVElementGeometry
=
typename
GridGeometry
::
LocalView
;
using
SubControlVolume
=
typename
FVElementGeometry
::
SubControlVolume
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
ParentType
=
FVSpatialParams
<
GridGeometry
,
Scalar
,
HeterogeneousSpatialParams
<
GridGeometry
,
Scalar
>>
;
using
ParentType
=
FV
PorousMedium
SpatialParams
MP
<
GridGeometry
,
Scalar
,
HeterogeneousSpatialParams
<
GridGeometry
,
Scalar
>>
;
using
GlobalPosition
=
typename
SubControlVolume
::
GlobalPosition
;
using
PcKrSwCurve
=
FluidMatrix
::
BrooksCoreyDefault
<
Scalar
>
;
static
constexpr
int
dimWorld
=
GridView
::
dimensionworld
;
public:
using
PermeabilityType
=
Scalar
;
...
...
@@ -76,6 +78,8 @@ public:
barrierTopPorosity_
=
0.001
;
barrierMiddlePorosity_
=
0.05
;
reservoirPorosity_
=
0.2
;
depthBOR_
=
getParam
<
Scalar
>
(
"Problem.DepthBOR"
);
}
/*!
...
...
@@ -184,6 +188,17 @@ public:
int
wettingPhaseAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
FluidSystem
::
BrineIdx
;
}
/*!
* \brief Returns the temperature within the domain.
*
* \param globalPos The global position
*
* This problem assumes a geothermal gradient with
* a surface temperature of 10 degrees Celsius.
*/
Scalar
temperatureAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
return
283.0
+
(
depthBOR_
-
globalPos
[
dimWorld
-
1
])
*
0.03
;
}
private:
std
::
shared_ptr
<
const
GridData
<
Grid
>>
gridData_
;
...
...
@@ -200,6 +215,8 @@ private:
Scalar
barrierMiddleK_
;
Scalar
reservoirK_
;
Scalar
depthBOR_
;
std
::
vector
<
int
>
paramIdx_
;
const
PcKrSwCurve
pcKrSwCurve_
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment