Skip to content
Snippets Groups Projects
Commit 0567b0b5 authored by Boyan Meng's avatar Boyan Meng
Browse files

replace the solid phase thermal conductivity with the hydrodynamic...

replace the solid phase thermal conductivity with the hydrodynamic thermodispersion tensor of the porous medium
parent 27604c2f
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <vector> #include <vector>
#include "MaterialLib/MPL/Medium.h" #include "MaterialLib/MPL/Medium.h"
#include "MaterialLib/MPL/Utils/FormEffectiveThermalConductivity.h"
#include "MaterialLib/MPL/Utils/FormEigenTensor.h" #include "MaterialLib/MPL/Utils/FormEigenTensor.h"
#include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "MathLib/LinAlg/Eigen/EigenMapTools.h"
#include "NumLib/Fem/ShapeMatrixPolicy.h" #include "NumLib/Fem/ShapeMatrixPolicy.h"
...@@ -95,6 +94,8 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -95,6 +94,8 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
auto const& solid_phase = medium.phase("Solid"); auto const& solid_phase = medium.phase("Solid");
auto const& liquid_phase = medium.phase("AqueousLiquid"); auto const& liquid_phase = medium.phase("AqueousLiquid");
auto const I = Eigen::Matrix<double, 3, 3>::Identity();
MaterialPropertyLib::VariableArray vars; MaterialPropertyLib::VariableArray vars;
unsigned const n_integration_points = unsigned const n_integration_points =
...@@ -108,12 +109,7 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -108,12 +109,7 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
auto const& dNdx = ip_data.dNdx; auto const& dNdx = ip_data.dNdx;
auto const& w = ip_data.integration_weight; auto const& w = ip_data.integration_weight;
auto const k_s = // for now only using the solid and liquid phase parameters
solid_phase
.property(
MaterialPropertyLib::PropertyType::thermal_conductivity)
.template value<double>(vars, pos, t);
auto const density_s = auto const density_s =
solid_phase.property(MaterialPropertyLib::PropertyType::density) solid_phase.property(MaterialPropertyLib::PropertyType::density)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
...@@ -124,12 +120,6 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -124,12 +120,6 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
MaterialPropertyLib::PropertyType::specific_heat_capacity) MaterialPropertyLib::PropertyType::specific_heat_capacity)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
auto const k_f =
liquid_phase
.property(
MaterialPropertyLib::PropertyType::thermal_conductivity)
.template value<double>(vars, pos, t);
auto const density_f = auto const density_f =
liquid_phase.property(MaterialPropertyLib::PropertyType::density) liquid_phase.property(MaterialPropertyLib::PropertyType::density)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
...@@ -144,8 +134,6 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -144,8 +134,6 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
medium.property(MaterialPropertyLib::PropertyType::porosity) medium.property(MaterialPropertyLib::PropertyType::porosity)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
// for now only using the solid and liquid phase parameters
auto const velocity_arr = auto const velocity_arr =
liquid_phase liquid_phase
.property(MaterialPropertyLib::PropertyType::phase_velocity) .property(MaterialPropertyLib::PropertyType::phase_velocity)
...@@ -153,9 +141,41 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -153,9 +141,41 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
auto velocity = Eigen::Map<Eigen::Matrix<double, 1, 3> const>( auto velocity = Eigen::Map<Eigen::Matrix<double, 1, 3> const>(
std::get<MaterialPropertyLib::Vector>(velocity_arr).data(), 1, 3); std::get<MaterialPropertyLib::Vector>(velocity_arr).data(), 1, 3);
// calculate the hydrodynamic thermodispersion tensor
auto const thermal_conductivity =
MaterialPropertyLib::formEigenTensor<3>(
medium.property(MaterialPropertyLib::PropertyType::thermal_conductivity)
.value(vars, pos, t));
auto thermal_conductivity_dispersivity = thermal_conductivity;
double const velocity_magnitude = velocity.norm();
if (velocity_magnitude >= std::numeric_limits<double>::epsilon())
{
auto const thermal_dispersivity_longitudinal =
medium
.property(MaterialPropertyLib::PropertyType::
thermal_longitudinal_dispersivity)
.template value<double>();
auto const thermal_dispersivity_transversal =
medium
.property(MaterialPropertyLib::PropertyType::
thermal_transversal_dispersivity)
.template value<double>();
auto const thermal_dispersivity =
density_f * heat_capacity_f *
(thermal_dispersivity_transversal * velocity_magnitude * I +
(thermal_dispersivity_longitudinal -
thermal_dispersivity_transversal) /
velocity_magnitude * velocity.transpose() * velocity);
thermal_conductivity_dispersivity += thermal_dispersivity;
}
// assemble Conductance matrix // assemble Conductance matrix
local_K.noalias() += local_K.noalias() +=
(dNdx.transpose() * dNdx * k_s + (dNdx.transpose() * thermal_conductivity_dispersivity * dNdx +
N.transpose() * velocity * dNdx * density_f * heat_capacity_f) * N.transpose() * velocity * dNdx * density_f * heat_capacity_f) *
w; w;
......
...@@ -39,7 +39,6 @@ public: ...@@ -39,7 +39,6 @@ public:
using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType; using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType;
using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices; using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices;
using GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType;
using GlobalDimNodalMatrixType = using GlobalDimNodalMatrixType =
typename ShapeMatricesType::GlobalDimNodalMatrixType; typename ShapeMatricesType::GlobalDimNodalMatrixType;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment