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

consider the liquid phase and change the calculation of the volumtric heat capacity accordingly

parent a875087a
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#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"
...@@ -113,37 +114,45 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -113,37 +114,45 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
MaterialPropertyLib::PropertyType::thermal_conductivity) MaterialPropertyLib::PropertyType::thermal_conductivity)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
auto const density_s =
solid_phase.property(MaterialPropertyLib::PropertyType::density)
.template value<double>(vars, pos, t);
auto const heat_capacity_s = auto const heat_capacity_s =
solid_phase solid_phase
.property( .property(
MaterialPropertyLib::PropertyType::specific_heat_capacity) MaterialPropertyLib::PropertyType::specific_heat_capacity)
.template value<double>(vars, pos, t); .template value<double>(vars, pos, t);
auto const heat_capacity_f = auto const k_f =
liquid_phase liquid_phase
.property( .property(
MaterialPropertyLib::PropertyType::specific_heat_capacity) MaterialPropertyLib::PropertyType::thermal_conductivity)
.template value<double>(vars, pos, t);
auto const density_s =
solid_phase.property(MaterialPropertyLib::PropertyType::density)
.template value<double>(vars, pos, t); .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);
// for now only using the solid phase parameters
/*auto const velocity = auto const heat_capacity_f =
liquid_phase liquid_phase
.property(MaterialPropertyLib::PropertyType::phase_velocity) .property(
.template value<GlobalDimVectorType>(vars, pos, t);*/ MaterialPropertyLib::PropertyType::specific_heat_capacity)
.template value<double>(vars, pos, t);
auto const porosity =
medium.property(MaterialPropertyLib::PropertyType::porosity)
.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)
.value(vars, pos, t); .value(vars, pos, t);
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);
// assemble Conductance matrix // assemble Conductance matrix
local_K.noalias() += local_K.noalias() +=
(dNdx.transpose() * dNdx * k_s + (dNdx.transpose() * dNdx * k_s +
...@@ -151,8 +160,9 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: ...@@ -151,8 +160,9 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>::
w; w;
// assemble Mass matrix // assemble Mass matrix
local_M.noalias() += local_M.noalias() += N.transpose() * N * w *
N.transpose() * N * w * density_s * heat_capacity_s; (density_s * heat_capacity_s * (1 - porosity) +
density_f * heat_capacity_f * porosity);
} }
// debugging // debugging
......
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