Skip to content

Commit

Permalink
Merge branch 'bhe_weighting_factor' into 'master'
Browse files Browse the repository at this point in the history
weighting factor used in HEAT_TRANSPORT_BHE process

See merge request ogs/ogs!5179
  • Loading branch information
Dmitry Yu. Naumov committed Jan 31, 2025
2 parents 87bba7d + 76dea08 commit 3c34ffb
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This value is the weighting factor used to impose an algebraic boundary condition in the **HeatTransportBHE** process. The default value is 100. This value is only effective, when the option **\<use_algebraic_bc\>** is set to true. This value is multiplied with the max value of the column wise inner product and then imposed in the additional rows at the end of the linear equation system, so that the unknown temperatures at the top and bottom of the BHE are imposed with certain desired values.
This value is the weighting factor used to impose an algebraic boundary condition in the **HeatTransportBHE** process. If not specified, then the default value of 1000 will be applied. This value is only effective, when the option **\<use_algebraic_bc\>** is set to true. This value is imposed as positive and negative pairs of entries in the additional rows at the end of the linear equation system, so that the unknown temperatures at the top and bottom of the BHE are enforced to be the same, or being some certain desired values that satisfy a given thermal load.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ std::unique_ptr<Process> createHeatTransportBHEProcess(

auto const weighting_factor =
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__weighting_factor}
config.getConfigParameter<float>("weighting_factor", 100.0);
config.getConfigParameter<float>("weighting_factor", 1000.0);

auto const is_linear =
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__linear}
Expand Down
5 changes: 1 addition & 4 deletions ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,7 @@ void HeatTransportBHEProcess::algebraicBcConcreteProcess(

// apply weighting factor based on the max value from column wise inner
// product and scale it with user defined value
const double w_val =
_process_data._algebraic_BC_Setting._weighting_factor *
(Eigen::RowVectorXd::Ones(K_normal.rows()) * K_normal.cwiseAbs())
.maxCoeff();
const double w_val = _process_data._algebraic_BC_Setting._weighting_factor;

M_normal.conservativeResize(
M_normal.rows() + n_BHE_bottom_pairs + n_BHE_top_pairs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<use_algebraic_bc>true</use_algebraic_bc>
</add>
<add sel="/*/processes/process">
<weighting_factor>100</weighting_factor>
<weighting_factor>1000</weighting_factor>
</add>
<add sel="/*/processes/process">
<linear>true</linear>
Expand Down

0 comments on commit 3c34ffb

Please sign in to comment.