Skip to content
Snippets Groups Projects
Commit 5ede00b0 authored by Max Jaeschke's avatar Max Jaeschke Committed by Dmitri Naumov
Browse files

HeatTransportBHE Add optional mass lumping

parent 8baabb1b
No related branches found
No related tags found
No related merge requests found
The default setting is false.
If set, mass lumping is applied to the BHE connected soil elements.
With mass lumping, the non-physical oscillation of temperatures in the direct vicinity of the BHE can be improved.
......@@ -176,6 +176,10 @@ std::unique_ptr<Process> createHeatTransportBHEProcess(
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__use_server_communication}
config.getConfigParameter<bool>("use_server_communication", false);
auto const mass_lumping =
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__mass_lumping}
config.getConfigParameter<bool>("mass_lumping", false);
auto const using_algebraic_bc =
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__use_algebraic_bc}
config.getConfigParameter<bool>("use_algebraic_bc", false);
......@@ -331,7 +335,7 @@ std::unique_ptr<Process> createHeatTransportBHEProcess(
HeatTransportBHEProcessData process_data(
std::move(media_map), std::move(bhes), py_object, using_tespy,
using_server_communication,
using_server_communication, mass_lumping,
{using_algebraic_bc, weighting_factor, is_linear});
SecondaryVariableCollection secondary_variables;
......
......@@ -41,12 +41,14 @@ struct HeatTransportBHEProcessData final
nullptr,
const bool use_tespy = false,
const bool use_server_communication = false,
const bool mass_lumping = false,
AlgebraicBCSetting algebraicBCSetting = {false, 100.0, false})
: media_map(media_map_),
_vec_BHE_property(std::move(vec_BHEs_)),
py_bc_object(py_bc_object_),
_use_tespy(use_tespy),
_use_server_communication(use_server_communication),
_mass_lumping(mass_lumping),
_algebraic_BC_Setting(algebraicBCSetting)
{
}
......@@ -64,6 +66,8 @@ struct HeatTransportBHEProcessData final
const bool _use_server_communication;
const bool _mass_lumping;
AlgebraicBCSetting const _algebraic_BC_Setting;
};
} // namespace ProcessLib::HeatTransportBHE
......@@ -183,7 +183,10 @@ void HeatTransportBHELocalAssemblerSoil<ShapeFunction>::assemble(
(density_s * heat_capacity_s * (1 - porosity) +
density_f * heat_capacity_f * porosity);
}
if (_process_data._mass_lumping)
{
local_M = local_M.colwise().sum().eval().asDiagonal();
}
// debugging
// std::string sep = "\n----------------------------------------\n";
// Eigen::IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]");
......
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