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
761e6680
Commit
761e6680
authored
5 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL/HT] Pass pos and time to property calculations.
parent
ce14635c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ProcessLib/HT/HTFEM.h
+17
-17
17 additions, 17 deletions
ProcessLib/HT/HTFEM.h
ProcessLib/HT/MonolithicHTFEM.h
+13
-13
13 additions, 13 deletions
ProcessLib/HT/MonolithicHTFEM.h
ProcessLib/HT/StaggeredHTFEM-impl.h
+17
-17
17 additions, 17 deletions
ProcessLib/HT/StaggeredHTFEM-impl.h
with
47 additions
and
47 deletions
ProcessLib/HT/HTFEM.h
+
17
−
17
View file @
761e6680
...
...
@@ -94,7 +94,7 @@ public:
/// Computes the flux in the point \c pnt_local_coords that is given in
/// local coordinates using the values from \c local_x.
Eigen
::
Vector3d
getFlux
(
MathLib
::
Point3d
const
&
pnt_local_coords
,
double
const
/*t*/
,
double
const
t
,
std
::
vector
<
double
>
const
&
local_x
)
const
override
{
// eval dNdx and invJ at given point
...
...
@@ -134,11 +134,11 @@ public:
auto
const
K
=
MaterialPropertyLib
::
formEigenTensor
<
GlobalDim
>
(
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
permeability
)
.
value
(
vars
));
.
value
(
vars
,
pos
,
t
));
auto
const
mu
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
GlobalDimMatrixType
const
K_over_mu
=
K
/
mu
;
auto
const
p_nodal_values
=
Eigen
::
Map
<
const
NodalVectorType
>
(
...
...
@@ -151,7 +151,7 @@ public:
auto
const
rho_w
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
b
=
this
->
_process_data
.
specific_body_force
;
q
+=
K_over_mu
*
rho_w
*
b
;
}
...
...
@@ -173,10 +173,9 @@ protected:
_ip_data
;
double
getHeatEnergyCoefficient
(
MaterialPropertyLib
::
VariableArray
const
&
vars
,
const
double
porosity
,
const
double
fluid_density
,
const
double
specific_heat_capacity_fluid
)
MaterialPropertyLib
::
VariableArray
const
&
vars
,
const
double
porosity
,
const
double
fluid_density
,
const
double
specific_heat_capacity_fluid
,
ParameterLib
::
SpatialPosition
const
&
pos
,
double
const
t
)
{
auto
const
&
medium
=
*
_process_data
.
media_map
->
getMedium
(
this
->
_element
.
getID
());
...
...
@@ -186,11 +185,11 @@ protected:
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
specific_heat_capacity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
solid_density
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
return
solid_density
*
specific_heat_capacity_solid
*
(
1
-
porosity
)
+
fluid_density
*
specific_heat_capacity_fluid
*
porosity
;
...
...
@@ -199,7 +198,8 @@ protected:
GlobalDimMatrixType
getThermalConductivityDispersivity
(
MaterialPropertyLib
::
VariableArray
const
&
vars
,
const
double
porosity
,
const
double
fluid_density
,
const
double
specific_heat_capacity_fluid
,
const
GlobalDimVectorType
&
velocity
,
const
GlobalDimMatrixType
&
I
)
const
GlobalDimVectorType
&
velocity
,
const
GlobalDimMatrixType
&
I
,
ParameterLib
::
SpatialPosition
const
&
pos
,
double
const
t
)
{
auto
const
&
medium
=
*
_process_data
.
media_map
->
getMedium
(
_element
.
getID
());
...
...
@@ -210,13 +210,13 @@ protected:
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
thermal_conductivity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
thermal_conductivity_fluid
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
thermal_conductivity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
double
const
thermal_conductivity
=
thermal_conductivity_solid
*
(
1
-
porosity
)
+
...
...
@@ -250,7 +250,7 @@ protected:
}
std
::
vector
<
double
>
const
&
getIntPtDarcyVelocityLocal
(
const
double
/*t*/
,
std
::
vector
<
double
>
const
&
local_p
,
const
double
t
,
std
::
vector
<
double
>
const
&
local_p
,
std
::
vector
<
double
>
const
&
local_T
,
std
::
vector
<
double
>&
cache
)
const
{
auto
const
n_integration_points
=
...
...
@@ -295,12 +295,12 @@ protected:
auto
const
K
=
MaterialPropertyLib
::
formEigenTensor
<
GlobalDim
>
(
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
permeability
)
.
value
(
vars
));
.
value
(
vars
,
pos
,
t
));
auto
const
mu
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
GlobalDimMatrixType
const
K_over_mu
=
K
/
mu
;
cache_mat
.
col
(
ip
).
noalias
()
=
-
K_over_mu
*
dNdx
*
p_nodal_values
;
...
...
@@ -310,7 +310,7 @@ protected:
auto
const
rho_w
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
b
=
_process_data
.
specific_body_force
;
// here it is assumed that the vector b is directed 'downwards'
cache_mat
.
col
(
ip
).
noalias
()
+=
K_over_mu
*
rho_w
*
b
;
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/HT/MonolithicHTFEM.h
+
13
−
13
View file @
761e6680
...
...
@@ -66,7 +66,7 @@ public:
{
}
void
assemble
(
double
const
/*t*/
,
std
::
vector
<
double
>
const
&
local_x
,
void
assemble
(
double
const
t
,
std
::
vector
<
double
>
const
&
local_x
,
std
::
vector
<
double
>&
local_M_data
,
std
::
vector
<
double
>&
local_K_data
,
std
::
vector
<
double
>&
local_b_data
)
override
...
...
@@ -123,7 +123,7 @@ public:
// constant storage model
auto
const
specific_storage
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
storage
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
&
ip_data
=
this
->
_ip_data
[
ip
];
auto
const
&
N
=
ip_data
.
N
;
...
...
@@ -138,14 +138,14 @@ public:
auto
const
porosity
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
porosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
intrinsic_permeability
=
MaterialPropertyLib
::
formEigenTensor
<
GlobalDim
>
(
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
permeability
)
.
value
(
vars
));
.
value
(
vars
,
pos
,
t
));
vars
[
static_cast
<
int
>
(
MaterialPropertyLib
::
Variable
::
temperature
)]
=
T_int_pt
;
...
...
@@ -155,19 +155,19 @@ public:
auto
const
specific_heat_capacity_fluid
=
liquid_phase
.
property
(
MaterialPropertyLib
::
specific_heat_capacity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
// Use the fluid density model to compute the density
auto
const
fluid_density
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
// Use the viscosity model to compute the viscosity
auto
const
viscosity
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
GlobalDimMatrixType
K_over_mu
=
intrinsic_permeability
/
viscosity
;
GlobalDimVectorType
const
velocity
=
...
...
@@ -180,18 +180,18 @@ public:
GlobalDimMatrixType
const
thermal_conductivity_dispersivity
=
this
->
getThermalConductivityDispersivity
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
,
velocity
,
I
);
velocity
,
I
,
pos
,
t
);
KTT
.
noalias
()
+=
(
dNdx
.
transpose
()
*
thermal_conductivity_dispersivity
*
dNdx
+
N
.
transpose
()
*
velocity
.
transpose
()
*
dNdx
*
fluid_density
*
specific_heat_capacity_fluid
)
*
w
;
Kpp
.
noalias
()
+=
w
*
dNdx
.
transpose
()
*
K_over_mu
*
dNdx
;
MTT
.
noalias
()
+=
w
*
this
->
getHeatEnergyCoefficient
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
)
*
N
.
transpose
()
*
N
;
MTT
.
noalias
()
+=
w
*
this
->
getHeatEnergyCoefficient
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
,
pos
,
t
)
*
N
.
transpose
()
*
N
;
Mpp
.
noalias
()
+=
w
*
N
.
transpose
()
*
specific_storage
*
N
;
if
(
process_data
.
has_gravity
)
{
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/HT/StaggeredHTFEM-impl.h
+
17
−
17
View file @
761e6680
...
...
@@ -105,10 +105,10 @@ void StaggeredHTFEM<ShapeFunction, IntegrationMethod, GlobalDim>::
auto
const
porosity
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
porosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
fluid_density
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
const
double
dfluid_density_dp
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
...
...
@@ -118,19 +118,19 @@ void StaggeredHTFEM<ShapeFunction, IntegrationMethod, GlobalDim>::
// Use the viscosity model to compute the viscosity
auto
const
viscosity
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
// \todo the argument to getValue() has to be changed for non
// constant storage model
auto
const
specific_storage
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
storage
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
intrinsic_permeability
=
MaterialPropertyLib
::
formEigenTensor
<
GlobalDim
>
(
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
permeability
)
.
value
(
vars
));
.
value
(
vars
,
pos
,
t
));
GlobalDimMatrixType
const
K_over_mu
=
intrinsic_permeability
/
viscosity
;
...
...
@@ -178,7 +178,7 @@ void StaggeredHTFEM<ShapeFunction, IntegrationMethod, GlobalDim>::
template
<
typename
ShapeFunction
,
typename
IntegrationMethod
,
unsigned
GlobalDim
>
void
StaggeredHTFEM
<
ShapeFunction
,
IntegrationMethod
,
GlobalDim
>::
assembleHeatTransportEquation
(
double
const
/*t*/
,
assembleHeatTransportEquation
(
double
const
t
,
std
::
vector
<
double
>&
local_M_data
,
std
::
vector
<
double
>&
local_K_data
,
std
::
vector
<
double
>&
/*local_b_data*/
,
...
...
@@ -241,33 +241,33 @@ void StaggeredHTFEM<ShapeFunction, IntegrationMethod, GlobalDim>::
auto
const
porosity
=
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
porosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
// Use the fluid density model to compute the density
auto
const
fluid_density
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
density
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
specific_heat_capacity_fluid
=
liquid_phase
.
property
(
MaterialPropertyLib
::
specific_heat_capacity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
// Assemble mass matrix
local_M
.
noalias
()
+=
w
*
this
->
getHeatEnergyCoefficient
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
)
*
N
.
transpose
()
*
N
;
local_M
.
noalias
()
+=
w
*
this
->
getHeatEnergyCoefficient
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
,
pos
,
t
)
*
N
.
transpose
()
*
N
;
// Assemble Laplace matrix
auto
const
viscosity
=
liquid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
viscosity
)
.
template
value
<
double
>(
vars
);
.
template
value
<
double
>(
vars
,
pos
,
t
);
auto
const
intrinsic_permeability
=
MaterialPropertyLib
::
formEigenTensor
<
GlobalDim
>
(
solid_phase
.
property
(
MaterialPropertyLib
::
PropertyType
::
permeability
)
.
value
(
vars
));
.
value
(
vars
,
pos
,
t
));
GlobalDimMatrixType
const
K_over_mu
=
intrinsic_permeability
/
viscosity
;
...
...
@@ -280,7 +280,7 @@ void StaggeredHTFEM<ShapeFunction, IntegrationMethod, GlobalDim>::
GlobalDimMatrixType
const
thermal_conductivity_dispersivity
=
this
->
getThermalConductivityDispersivity
(
vars
,
porosity
,
fluid_density
,
specific_heat_capacity_fluid
,
velocity
,
I
);
velocity
,
I
,
pos
,
t
);
local_K
.
noalias
()
+=
w
*
(
dNdx
.
transpose
()
*
thermal_conductivity_dispersivity
*
dNdx
+
...
...
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