diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 6c4950e92020aed7acce5db681f66b2aac712317..d214974d3f142273449deaf60706d42d615a0fda 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -53,6 +53,9 @@ #ifdef OGS_BUILD_PROCESS_HEATCONDUCTION #include "ProcessLib/HeatConduction/CreateHeatConductionProcess.h" #endif +#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE +#include "ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.h" +#endif #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS #include "ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.h" #endif @@ -371,6 +374,24 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, } else #endif +#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE + if (type == "HEAT_TRANSPORT_BHE") + { + if (_mesh_vec[0]->getDimension() != 3) + { + OGS_FATAL( + "HEAT_TRANSPORT_BHE can only work with a 3-dimentional " + "mesh! "); + } + + process = + ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess( + *_mesh_vec[0], std::move(jacobian_assembler), + _process_variables, _parameters, integration_order, + process_config, _curves); + } + else +#endif #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS if (type == "HYDRO_MECHANICS") { @@ -455,17 +476,17 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, { case 2: process = - ProcessLib::PhaseField::createPhaseFieldProcess< - 2>(*_mesh_vec[0], std::move(jacobian_assembler), - _process_variables, _parameters, - integration_order, process_config); + ProcessLib::PhaseField::createPhaseFieldProcess<2>( + *_mesh_vec[0], std::move(jacobian_assembler), + _process_variables, _parameters, integration_order, + process_config); break; case 3: process = - ProcessLib::PhaseField::createPhaseFieldProcess< - 3>(*_mesh_vec[0], std::move(jacobian_assembler), - _process_variables, _parameters, - integration_order, process_config); + ProcessLib::PhaseField::createPhaseFieldProcess<3>( + *_mesh_vec[0], std::move(jacobian_assembler), + _process_variables, _parameters, integration_order, + process_config); break; } } diff --git a/CMakeLists.txt b/CMakeLists.txt index b7287fa978964c837fbdae946c768143d58c3da5..456c89de82e6053f7d3b94cba1b9d8cda8faa644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,7 @@ set(ProcessesList GroundwaterFlow HT HeatConduction + HeatTransportBHE HydroMechanics LiquidFlow LIE diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/i_borehole.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/i_borehole.md new file mode 100644 index 0000000000000000000000000000000000000000..76a4a28dcc8c8b8c1bdf6028594d2cbda5e6e529 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/i_borehole.md @@ -0,0 +1 @@ +It represents the well used to install pipes for heat transport. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_diameter.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_diameter.md new file mode 100644 index 0000000000000000000000000000000000000000..36222fa25a1bea25655411257a888f5a0d59ea70 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_diameter.md @@ -0,0 +1 @@ +It is the borehole diameter. One of the most important geometric parameters of borehole and needs to be specified here. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_length.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_length.md new file mode 100644 index 0000000000000000000000000000000000000000..e35fd8e8ba8dc3feef3bb74da6c42124b6652b8f --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/borehole/t_length.md @@ -0,0 +1 @@ +It is the borehole length. It is another one of the most important geometric parameters of borehole and should be provided. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/c_FixedPowerConstantFlow.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/c_FixedPowerConstantFlow.md new file mode 100644 index 0000000000000000000000000000000000000000..94b7c8f2841303873eddf4a2b986c9e380004c6f --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/c_FixedPowerConstantFlow.md @@ -0,0 +1 @@ +It means the borehole heat exchanger has a fixed heat load and the flow rate in the pipes is constant. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_flow_rate.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_flow_rate.md new file mode 100644 index 0000000000000000000000000000000000000000..cf9547dd4dfba2857d1e6d191f24dedb1c02bf6e --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_flow_rate.md @@ -0,0 +1 @@ +It is the flow rate for the FixedPowerConstantFlow condition. Here it needs to be specified while using FixedPowerConstantFlow as BHE boundary condition with the unit of m3/s. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_power.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_power.md new file mode 100644 index 0000000000000000000000000000000000000000..ad0863a20652fcbcfeefce7a5f90677f3f8aab3f --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerConstantFlow/t_power.md @@ -0,0 +1 @@ +It is the fixed power for the FixedPowerConstantFlow condition. It should be provided and its unit is W. Positve value means extracting energy from the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/c_FixedPowerFlowCurve.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/c_FixedPowerFlowCurve.md new file mode 100644 index 0000000000000000000000000000000000000000..37b197cc4360a7ff5698ebff15f290a6c40f32b5 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/c_FixedPowerFlowCurve.md @@ -0,0 +1 @@ +It represents that the BHE has the fixed power and the flow rate in pipes is various with time given as a curve. It is kind of another BHE boundary condition to calculate the temperature difference between inlet and outlet fluid. With this BHE boundary condition, the flow rate of circulating fluid is various and inflow temperature is calculated by the heat load, flow rate at particular time and the outflow temperature got from the previous time step. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_flow_rate_curve.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_flow_rate_curve.md new file mode 100644 index 0000000000000000000000000000000000000000..3f01c4f9618207a4e14d9ab825af0e9d5ccc659a --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_flow_rate_curve.md @@ -0,0 +1 @@ +It is the flow rate curve. Here the flow rate in the pipes is not a constant, the flow rate curve should be presented and set as input data. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_power.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_power.md new file mode 100644 index 0000000000000000000000000000000000000000..65984c37169a0bc9068f0b2fec30ea3dab5a7500 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/FixedPowerFlowCurve/t_power.md @@ -0,0 +1 @@ +It is the fixed power on the BHE in the FixedPowerFlowCurve condition. It needs to be provided and the unit is W. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/c_TemperatureCurveConstantFlow.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/c_TemperatureCurveConstantFlow.md new file mode 100644 index 0000000000000000000000000000000000000000..70ae6c296f44306a333488a8af58606e214460c2 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/c_TemperatureCurveConstantFlow.md @@ -0,0 +1 @@ +This is another type of controlling temperature difference with specific inflow temperature curve and constant flow rate. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_flow_rate.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_flow_rate.md new file mode 100644 index 0000000000000000000000000000000000000000..d3cb617865fb70741d64ac6b7d19c9a51ed447ff --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_flow_rate.md @@ -0,0 +1 @@ +It is the flow rate in the BHE pipes. Flow rate needs to be offered by using m3/s as its unit. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_temperature_curve.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_temperature_curve.md new file mode 100644 index 0000000000000000000000000000000000000000..6481161a9fe5244714df0fd27158028ca0f1f8af --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/TemperatureCurveConstantFlow/t_temperature_curve.md @@ -0,0 +1 @@ +It means the inflow temperature curve varying with time. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/i_flow_and_temperature_control.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/i_flow_and_temperature_control.md new file mode 100644 index 0000000000000000000000000000000000000000..0337031561eea505ab9b46151dc6f720dd557def --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/i_flow_and_temperature_control.md @@ -0,0 +1 @@ +It means the way of controlling flow and temperature in the BHE. In the BHE, the inflow temperature at this time step will be calculated by the heat load on the BHE, flow rate of circulating fluid and previous outflow temperature. Thus, There is a need to specify the way of getting the heat load and flow rate values. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/t_type.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/t_type.md new file mode 100644 index 0000000000000000000000000000000000000000..aed6ec79139bac17f5e874ba43e0787c2c162025 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/flow_and_temperature_control/t_type.md @@ -0,0 +1 @@ +The type of controlling flow rate and heat load on the BHE. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/i_grout.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/i_grout.md new file mode 100644 index 0000000000000000000000000000000000000000..ecedd7a9eb59a0eb5a05a158e23dcb50e57c0df5 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/i_grout.md @@ -0,0 +1 @@ +It is the grout in the borehole. Grout is usually used to keep the pipes in the place. It is like a bridge of exchanging heat energy between soil and pipe. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_density.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_density.md new file mode 100644 index 0000000000000000000000000000000000000000..132ee9c07001c40a04e9c5bddea476fd9aac09ee --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_density.md @@ -0,0 +1 @@ +It is the density of the grout. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_heat_capacity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_heat_capacity.md new file mode 100644 index 0000000000000000000000000000000000000000..ea459fc1ddd98f5cc98ec6e2ef02c09247a93b99 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_heat_capacity.md @@ -0,0 +1 @@ +Here means specific heat capacity of the grout. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_porosity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_porosity.md new file mode 100644 index 0000000000000000000000000000000000000000..b2d288da88ae24214b9e99e02c9063d9b95b110a --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_porosity.md @@ -0,0 +1 @@ +Porosity of the grout. We always would like to have a kind of grout with low porosity because the efficiency of the heat conduction will be higher. In grout, there is an assume that no heat advection exists. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_thermal_conductivity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_thermal_conductivity.md new file mode 100644 index 0000000000000000000000000000000000000000..9575704f425155418a90eff594f8ad03fe685d3e --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/grout/t_thermal_conductivity.md @@ -0,0 +1 @@ +It is the heat conductivity of the grout. In order to have a better performance of heat transporting between soil and pipes, grout materials with high heat conductivity will be preferred. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/i_borehole_heat_exchanger.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/i_borehole_heat_exchanger.md new file mode 100644 index 0000000000000000000000000000000000000000..b41f5696ef4fa2d7aa449a7e0f02b92d854d874f --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/i_borehole_heat_exchanger.md @@ -0,0 +1 @@ +It represents the single borehole heat exchanger. In the model, multi BHEs are able to be simulated. Thus, parameters belong to the same BHE should be classified. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/i_pipes.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/i_pipes.md new file mode 100644 index 0000000000000000000000000000000000000000..bf25245ba1123cfe63f947e0259b4248ce5c9aa0 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/i_pipes.md @@ -0,0 +1 @@ +It means the pipes installed in the borehole. In the borehole heat exchanger, there are inlet and outlet pipes installed in the borehole to transfer heat. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/i_inlet.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/i_inlet.md new file mode 100644 index 0000000000000000000000000000000000000000..62de84e5339131ef15e9779d76b7c435fa11fb2c --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/i_inlet.md @@ -0,0 +1 @@ +It represents the inlet pipe of the borehole heat exchanger. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_radius.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_radius.md new file mode 100644 index 0000000000000000000000000000000000000000..6b81a97376fca2436c175007465ef50346e8c6af --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_radius.md @@ -0,0 +1 @@ +The radius of the inlet pipe. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thermal_conductivity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thermal_conductivity.md new file mode 100644 index 0000000000000000000000000000000000000000..3fbc4f201c595715ad51ecdd74b01ad84283225b --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thermal_conductivity.md @@ -0,0 +1 @@ +Heat conductivity of the inlet pipe. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thickness.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thickness.md new file mode 100644 index 0000000000000000000000000000000000000000..bb5a43e90afe8735f576d5b66ce4f77f78c984d1 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/inlet/t_wall_thickness.md @@ -0,0 +1 @@ +The thickness of the inlet pipe wall. There is also a need to point out the thickness of outlet pipe. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_distance_between_pipes.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_distance_between_pipes.md new file mode 100644 index 0000000000000000000000000000000000000000..34119986e1aba7a25e283e10da5411743b6fe2f0 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_distance_between_pipes.md @@ -0,0 +1 @@ +It is the distance between inlet and oulet pipes. In 1U-type borehole heat exchanger, there is distance between inlet and oulet pipes except at the bottom of the borehole heat exchanger. Such distance will affect the heat exchagne between inlet and outlet pipes. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_longitudinal_dispersion_length.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_longitudinal_dispersion_length.md new file mode 100644 index 0000000000000000000000000000000000000000..e5525e156ce08b6249abc61d973307ea286bfe99 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_longitudinal_dispersion_length.md @@ -0,0 +1 @@ +Longitudinal thermal dispersivity of the circulating fluid in the pipes. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_outlet.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_outlet.md new file mode 100644 index 0000000000000000000000000000000000000000..2ffe31676e4819c350aa1f0c1c49b993f1ae66b5 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/pipes/t_outlet.md @@ -0,0 +1 @@ +It represents the properties of the outlet pipe, including the radius, wall thickness and thermal conductivity of the outlet pipe wall. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/i_refrigerant.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/i_refrigerant.md new file mode 100644 index 0000000000000000000000000000000000000000..3fddb43a8e3adab29dfd0e486bcc0923069db4b7 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/i_refrigerant.md @@ -0,0 +1 @@ +It is the circulating fluid in pipes. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_density.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_density.md new file mode 100644 index 0000000000000000000000000000000000000000..32976b7706d855f9b72c0ae582fe329c883ad3bd --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_density.md @@ -0,0 +1 @@ +The density of the refrigerant. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_reference_temperature.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_reference_temperature.md new file mode 100644 index 0000000000000000000000000000000000000000..99dc88cec80efa1c7798e00bc006281df8376933 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_reference_temperature.md @@ -0,0 +1 @@ +It is the reference temperature of parameters selecting. The properties of the refrigerant can be changed with temperature, it important to point out its reference temperature. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_specific_heat_capacity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_specific_heat_capacity.md new file mode 100644 index 0000000000000000000000000000000000000000..9f6bbc9472d6487936e7ea7538c6c1b1cd793e76 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_specific_heat_capacity.md @@ -0,0 +1 @@ +It is the specific heat capacity of the circulating fluid. Sometimes, the antifreeze will be mixed with water as the circulating fluid in pipes. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_thermal_conductivity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_thermal_conductivity.md new file mode 100644 index 0000000000000000000000000000000000000000..c9b73a1e59b3450a13ddbc9ddd445d0b3d9cec92 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_thermal_conductivity.md @@ -0,0 +1 @@ +Thermal conductivity of the refrigerant. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_viscosity.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_viscosity.md new file mode 100644 index 0000000000000000000000000000000000000000..14e1d56827c2e88b76ee3eb9d41b9f526e618ac2 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/refrigerant/t_viscosity.md @@ -0,0 +1 @@ +Viscosity of the refrigerant. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/t_type.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/t_type.md new file mode 100644 index 0000000000000000000000000000000000000000..885d6f518e0418f8d4326c17cb519d9b1a338db4 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/borehole_heat_exchanger/t_type.md @@ -0,0 +1 @@ +It means the type of the borehole heat exchanger. The type of BHE should be specified, 1U, 2U, CXA or CXC. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/i_borehole_heat_exchangers.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/i_borehole_heat_exchangers.md new file mode 100644 index 0000000000000000000000000000000000000000..ff94950ffe09f0be28c6b5325638b32816c79f5a --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/borehole_heat_exchangers/i_borehole_heat_exchangers.md @@ -0,0 +1 @@ +They represent the borehole heat exchangers. There can be many borehole heat exchangers. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/c_HEAT_TRANSPORT_BHE.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/c_HEAT_TRANSPORT_BHE.md new file mode 100644 index 0000000000000000000000000000000000000000..e81cc0cc07526b5535c7910a56d4e07f42842900 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/c_HEAT_TRANSPORT_BHE.md @@ -0,0 +1 @@ +It means the process name is the HEAT_TRANSPORT_BHE. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/i_process_variables.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/i_process_variables.md new file mode 100644 index 0000000000000000000000000000000000000000..200a3e1d4041a65dc025f7d964104346e61ddd99 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/i_process_variables.md @@ -0,0 +1 @@ +They stand for the process variables. Here there are two process variables including temperature soil and temperature BHE. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/t_process_variable.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/t_process_variable.md new file mode 100644 index 0000000000000000000000000000000000000000..a14de1bd1e54e6c6e654e3df3b628ae61b3d54b1 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/process_variables/t_process_variable.md @@ -0,0 +1 @@ +It means every single process variable. Every process variable related to the process needs to be specified here. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_fluid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_fluid.md new file mode 100644 index 0000000000000000000000000000000000000000..d9e0f740b1c8cdba79018165a3aacbea21a1d27b --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_fluid.md @@ -0,0 +1 @@ +The density of fluid in the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_gas.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_gas.md new file mode 100644 index 0000000000000000000000000000000000000000..049dca7132fd11582f08079d7f4f41762b35e1b5 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_gas.md @@ -0,0 +1 @@ +The density of the gas in the soil if there is gas existing. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_solid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_solid.md new file mode 100644 index 0000000000000000000000000000000000000000..0dfd234eaa84921c945b8a1752345722044be4dc --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_density_solid.md @@ -0,0 +1 @@ +The density of the solid in the soil. Different strata have different solid density. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_fluid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_fluid.md new file mode 100644 index 0000000000000000000000000000000000000000..6fb64092c5d0ea9fe625aecbaaf97f01cf4bdaf2 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_fluid.md @@ -0,0 +1 @@ +Heat capacity of the fluid in the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_gas.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_gas.md new file mode 100644 index 0000000000000000000000000000000000000000..6350cbcc409ef6c09755ff22a92e639164486852 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_gas.md @@ -0,0 +1 @@ +Heat capacity of the gas in the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_solid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_solid.md new file mode 100644 index 0000000000000000000000000000000000000000..530fa8386de5e696d2ce9364a1e724f84314afd3 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_heat_capacity_solid.md @@ -0,0 +1 @@ +Heat capacity of the solid in the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_fluid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_fluid.md new file mode 100644 index 0000000000000000000000000000000000000000..aa96daec3acd3a4f949bc909df05396e1f9713d1 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_fluid.md @@ -0,0 +1 @@ +Thermal conductivity of the fluid in the soil, such as groundwater flowing in the subsurface will affect the temperature distribution. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_gas.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_gas.md new file mode 100644 index 0000000000000000000000000000000000000000..1b087b0b461462010126e086d1cd04363e29a8a3 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_gas.md @@ -0,0 +1 @@ +Thermal conductivity of the gas in the soil. diff --git a/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_solid.md b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_solid.md new file mode 100644 index 0000000000000000000000000000000000000000..d1ccf4ed8d8cf9b62ce2ff91e022805900d63db4 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/HEAT_TRANSPORT_BHE/t_thermal_conductivity_solid.md @@ -0,0 +1 @@ +Thermal conductivity of the solid in the soil. diff --git a/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5e7ef9c58201322319bd9facba831035eec36980 --- /dev/null +++ b/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.cpp @@ -0,0 +1,57 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "BHEBottomDirichletBoundaryCondition.h" +#include "BaseLib/Error.h" + +namespace ProcessLib +{ +void BHEBottomDirichletBoundaryCondition::getEssentialBCValues( + const double /*t*/, GlobalVector const& x, + NumLib::IndexValueVector<GlobalIndexType>& bc_values) const +{ + bc_values.ids.resize(1); + bc_values.values.resize(1); + + bc_values.ids[0] = _in_out_global_indices.second; + // here, the outflow temperature is always + // the same as the inflow temperature + // get the inflow temperature from here. + bc_values.values[0] = x[_in_out_global_indices.first]; +} + +std::unique_ptr<BHEBottomDirichletBoundaryCondition> +createBHEBottomDirichletBoundaryCondition( + std::pair<GlobalIndexType, GlobalIndexType>&& in_out_global_indices) +{ + DBUG("Constructing BHEBottomDirichletBoundaryCondition."); + + // In case of partitioned mesh the boundary could be empty, i.e. there is no + // boundary condition. +#ifdef USE_PETSC + // For this special boundary condition the boundary condition is not empty + // if the global indices are non-negative. + if (in_out_global_indices.first < 0 && in_out_global_indices.second < 0) + { + return nullptr; + } + // If only one of the global indices (in or out) is negative the + // implementation is not valid. + if (in_out_global_indices.first < 0 || in_out_global_indices.second < 0) + { + OGS_FATAL( + "The partition cuts the BHE into two independent parts. This " + "behaviour is not implemented."); + } +#endif // USE_PETSC + + return std::make_unique<BHEBottomDirichletBoundaryCondition>( + std::move(in_out_global_indices)); +} +} // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.h b/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.h new file mode 100644 index 0000000000000000000000000000000000000000..df3e2b28039613de150871f7028b29530305d2f0 --- /dev/null +++ b/ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.h @@ -0,0 +1,37 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "BoundaryCondition.h" +#include "NumLib/IndexValueVector.h" + +namespace ProcessLib +{ +class BHEBottomDirichletBoundaryCondition final : public BoundaryCondition +{ +public: + BHEBottomDirichletBoundaryCondition( + std::pair<GlobalIndexType, GlobalIndexType>&& in_out_global_indices) + : _in_out_global_indices(std::move(in_out_global_indices)) + { + } + + void getEssentialBCValues( + const double t, GlobalVector const& x, + NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override; + +private: + std::pair<GlobalIndexType, GlobalIndexType> const _in_out_global_indices; +}; + +std::unique_ptr<BHEBottomDirichletBoundaryCondition> +createBHEBottomDirichletBoundaryCondition( + std::pair<GlobalIndexType, GlobalIndexType>&& in_out_global_indices); +} // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/BHEInflowDirichletBoundaryCondition.h b/ProcessLib/BoundaryCondition/BHEInflowDirichletBoundaryCondition.h new file mode 100644 index 0000000000000000000000000000000000000000..87d22fc3471cd06e2383aee328ac9251f85a9c41 --- /dev/null +++ b/ProcessLib/BoundaryCondition/BHEInflowDirichletBoundaryCondition.h @@ -0,0 +1,77 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "BoundaryCondition.h" +#include "NumLib/IndexValueVector.h" +#include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" + +namespace ProcessLib +{ +template <typename BHEType> +class BHEInflowDirichletBoundaryCondition final : public BoundaryCondition +{ +public: + BHEInflowDirichletBoundaryCondition( + std::pair<GlobalIndexType, GlobalIndexType>&& in_out_global_indices, + BHEType& bhe) + : _in_out_global_indices(std::move(in_out_global_indices)), _bhe(bhe) + { + } + + void getEssentialBCValues( + const double t, GlobalVector const& x, + NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override + { + bc_values.ids.resize(1); + bc_values.values.resize(1); + + bc_values.ids[0] = _in_out_global_indices.first; + // here call the corresponding BHE functions + auto const T_out = x[_in_out_global_indices.second]; + bc_values.values[0] = _bhe.updateFlowRateAndTemperature(T_out, t); + } + +private: + std::pair<GlobalIndexType, GlobalIndexType> const _in_out_global_indices; + BHEType& _bhe; +}; + +template <typename BHEType> +std::unique_ptr<BHEInflowDirichletBoundaryCondition<BHEType>> +createBHEInflowDirichletBoundaryCondition( + std::pair<GlobalIndexType, GlobalIndexType>&& in_out_global_indices, + BHEType& bhe) +{ + DBUG("Constructing BHEInflowDirichletBoundaryCondition."); + + // In case of partitioned mesh the boundary could be empty, i.e. there is no + // boundary condition. +#ifdef USE_PETSC + // For this special boundary condition the boundary condition is not empty + // if the global indices are non-negative. + if (in_out_global_indices.first < 0 && in_out_global_indices.second < 0) + { + return nullptr; + } + // If only one of the global indices (in or out) is negative the + // implementation is not valid. + if (in_out_global_indices.first < 0 || in_out_global_indices.second < 0) + { + OGS_FATAL( + "The partition cuts the BHE into two independent parts. This " + "behaviour is not implemented."); + } +#endif // USE_PETSC + + return std::make_unique<BHEInflowDirichletBoundaryCondition<BHEType>>( + std::move(in_out_global_indices), bhe); +} +} // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h index 3f4af9810ebe01ae24fa564999af34619e7e183e..e9a7fbaa51ac2eb704b9b8c0c84e9feef837c167 100644 --- a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h +++ b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h @@ -46,6 +46,11 @@ public: NumLib::LocalToGlobalIndexMap const& dof_table, unsigned const integration_order, Process const& process); + void addBoundaryCondition(std::unique_ptr<BoundaryCondition>&& bc) + { + _boundary_conditions.push_back(std::move(bc)); + } + void preTimestep(const double t, GlobalVector const& x) { for (auto const& bc_ptr : _boundary_conditions) diff --git a/ProcessLib/HeatTransportBHE/BHE/BHECommon.h b/ProcessLib/HeatTransportBHE/BHE/BHECommon.h new file mode 100644 index 0000000000000000000000000000000000000000..188f0a9a0677ccc8f730322668e4a92f47880e5b --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/BHECommon.h @@ -0,0 +1,48 @@ +/** + * \file + * + * 2014/06/04 HS inital implementation + * borehole heat exchanger abstract class + * + * 1) Diersch_2011_CG + * Two very important references to understand this class implementations are: + * Diersch, H-JG, D. Bauer, W. Heidemann, Wolfram Rühaak, and Peter Schätzl. + * Finite element modeling of borehole heat exchanger systems: + * Part 1. Fundamentals, Computers & Geosciences, + * Volume 37, Issue 8, August 2011, Pages 1122-1135, ISSN 0098-3004, + * http://dx.doi.org/10.1016/j.cageo.2010.08.003. + * + * 2) FEFLOW_2014_Springer + * FEFLOW: Finite Element Modeling of Flow, Mass and Heat Transport in Porous + * and Fractured Media Diersch, Hans-Joerg, 2014, XXXV, 996 p, Springer. + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#pragma once + +#include "BoreholeGeometry.h" +#include "FlowAndTemperatureControl.h" +#include "GroutParameters.h" +#include "RefrigerantProperties.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct BHECommon +{ + BoreholeGeometry const borehole_geometry; + RefrigerantProperties const refrigerant; + GroutParameters const grout; + FlowAndTemperatureControl const flowAndTemperatureControl; +}; +} // end of namespace BHE +} // end of namespace HeatTransportBHE +} // end of namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/BHETypes.h b/ProcessLib/HeatTransportBHE/BHE/BHETypes.h new file mode 100644 index 0000000000000000000000000000000000000000..4c6a45a6ffb7d9ed762cf35342cbd3822848e2a9 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/BHETypes.h @@ -0,0 +1,26 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <boost/variant.hpp> +#include "BHE_1U.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +using BHETypes = boost::variant<BHE_1U>; +} // end of namespace BHE +} // end of namespace HeatTransportBHE +} // end of namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp new file mode 100644 index 0000000000000000000000000000000000000000..76603585b82f06e9cfabcffc2d8c3802d9134011 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.cpp @@ -0,0 +1,258 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "BHE_1U.h" + +#include <boost/math/constants/constants.hpp> +#include "FlowAndTemperatureControl.h" +#include "Physics.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +BHE_1U::BHE_1U(BoreholeGeometry const& borehole, + RefrigerantProperties const& refrigerant, + GroutParameters const& grout, + FlowAndTemperatureControl const& flowAndTemperatureControl, + PipeConfiguration1U const& pipes) + : BHECommon{borehole, refrigerant, grout, flowAndTemperatureControl}, + _pipes(pipes) +{ + // Initialize thermal resistances. + auto values = apply_visitor( + [&](auto const& control) { + return control(refrigerant.reference_temperature, + 0. /* initial time */); + }, + flowAndTemperatureControl); + updateHeatTransferCoefficients(values.flow_rate); +} + +std::array<double, BHE_1U::number_of_unknowns> BHE_1U::pipeHeatCapacities() + const +{ + double const& rho_r = refrigerant.density; + double const& specific_heat_capacity = refrigerant.specific_heat_capacity; + double const& rho_g = grout.rho_g; + double const& porosity_g = grout.porosity_g; + double const& heat_cap_g = grout.heat_cap_g; + + return {{/*i1*/ rho_r * specific_heat_capacity, + /*o1*/ rho_r * specific_heat_capacity, + /*g1*/ (1.0 - porosity_g) * rho_g * heat_cap_g, + /*g2*/ (1.0 - porosity_g) * rho_g * heat_cap_g}}; +} + +std::array<double, BHE_1U::number_of_unknowns> BHE_1U::pipeHeatConductions() + const +{ + double const& lambda_r = refrigerant.thermal_conductivity; + double const& rho_r = refrigerant.density; + double const& Cp_r = refrigerant.specific_heat_capacity; + double const& alpha_L = _pipes.longitudinal_dispersion_length; + double const& porosity_g = grout.porosity_g; + double const& lambda_g = grout.lambda_g; + + double const velocity_norm = std::abs(_flow_velocity) * std::sqrt(2); + + // Here we calculate the laplace coefficients in the governing + // equations of BHE. These governing equations can be found in + // 1) Diersch (2013) FEFLOW book on page 952, M.120-122, or + // 2) Diersch (2011) Comp & Geosci 37:1122-1135, Eq. 19-22. + return {{// pipe i1, Eq. 19 + (lambda_r + rho_r * Cp_r * alpha_L * velocity_norm), + // pipe o1, Eq. 20 + (lambda_r + rho_r * Cp_r * alpha_L * velocity_norm), + // pipe g1, Eq. 21 + (1.0 - porosity_g) * lambda_g, + // pipe g2, Eq. 22 + (1.0 - porosity_g) * lambda_g}}; +} + +std::array<Eigen::Vector3d, BHE_1U::number_of_unknowns> +BHE_1U::pipeAdvectionVectors() const +{ + double const& rho_r = refrigerant.density; + double const& Cp_r = refrigerant.specific_heat_capacity; + + return {{// pipe i1, Eq. 19 + {0, 0, -rho_r * Cp_r * _flow_velocity}, + // pipe o1, Eq. 20 + {0, 0, rho_r * Cp_r * _flow_velocity}, + // grout g1, Eq. 21 + {0, 0, 0}, + // grout g2, Eq. 22 + {0, 0, 0}}}; +} + +double compute_R_gs(double const chi, double const R_g) +{ + return (1 - chi) * R_g; +} + +double compute_R_gg(double const chi, double const R_gs, double const R_ar, + double const R_g) +{ + double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) / + (2.0 * R_gs - R_ar + 2.0 * chi * R_g); + if (!std::isfinite(R_gg)) + { + OGS_FATAL( + "Error!!! Grout Thermal Resistance is an infinite number! The " + "simulation will be stopped!"); + } + + return R_gg; +} + +/// Thermal resistances due to grout-soil exchange. +/// +/// Check if constraints regarding negative thermal resistances are violated +/// apply correction procedure. +/// Section (1.5.5) in FEFLOW White Papers Vol V. +std::pair<double, double> thermalResistancesGroutSoil(double chi, + double const R_ar, + double const R_g) +{ + double R_gs = compute_R_gs(chi, R_g); + double R_gg = + compute_R_gg(chi, R_gs, R_ar, R_g); // Resulting thermal resistances. + + auto constraint = [&]() { + return 1.0 / ((1.0 / R_gg) + (1.0 / (2.0 * R_gs))); + }; + + int count = 0; + while (constraint() < 0.0) + { + if (count == 0) + { + chi *= 0.66; + R_gs = compute_R_gs(chi, R_g); + R_gg = compute_R_gg(chi, R_gs, R_ar, R_g); + } + if (count == 1) + { + chi *= 0.5; + R_gs = compute_R_gs(chi, R_g); + R_gg = compute_R_gg(chi, R_gs, R_ar, R_g); + } + if (count == 2) + { + chi = 0.0; + R_gs = compute_R_gs(chi, R_g); + R_gg = compute_R_gg(chi, R_gs, R_ar, R_g); + break; + } + DBUG( + "Warning! Correction procedure was applied due to negative thermal " + "resistance! Correction step #%d.\n", + count); + count++; + } + return {R_gg, R_gs}; +} + +constexpr std::pair<int, int> BHE_1U::inflow_outflow_bc_component_ids[]; + +void BHE_1U::updateHeatTransferCoefficients(double const flow_rate) + +{ + _flow_velocity = flow_rate / _pipes.inlet.area(); + + double const Re = reynoldsNumber(std::abs(_flow_velocity), + _pipes.inlet.diameter, + refrigerant.dynamic_viscosity, + refrigerant.density); + double const Pr = prandtlNumber(refrigerant.dynamic_viscosity, + refrigerant.specific_heat_capacity, + refrigerant.thermal_conductivity); + + double const Nu = + nusseltNumber(Re, Pr, _pipes.inlet.diameter, borehole_geometry.length); + + _thermal_resistances = calcThermalResistances(Nu); +} + +/// Nu is the Nusselt number. +std::array<double, BHE_1U::number_of_unknowns> BHE_1U::calcThermalResistances( + double const Nu) +{ + static constexpr double pi = boost::math::constants::pi<double>(); + + double const& lambda_r = refrigerant.thermal_conductivity; + double const& lambda_g = grout.lambda_g; + double const& lambda_p = _pipes.inlet.wall_thermal_conductivity; + + // thermal resistances due to advective flow of refrigerant in the _pipes + // Eq. 36 in Diersch_2011_CG + double const R_adv_i1 = 1.0 / (Nu * lambda_r * pi); + double const R_adv_o1 = 1.0 / (Nu * lambda_r * pi); + + // thermal resistance due to thermal conductivity of the pipe wall material + // Eq. 49 + double const R_con_a = + std::log(_pipes.outlet.diameter / _pipes.inlet.diameter) / + (2.0 * pi * lambda_p); + + // the average outer diameter of the _pipes + double const& d0 = _pipes.outlet.diameter; + double const& D = borehole_geometry.diameter; + // Eq. 51 + double const chi = std::log(std::sqrt(D * D + 2 * d0 * d0) / 2 / d0) / + std::log(D / std::sqrt(2) / d0); + // Eq. 52 + // thermal resistances of the grout + double const R_g = + std::acosh((D * D + d0 * d0 - _pipes.distance * _pipes.distance) / + (2 * D * d0)) / + (2 * pi * lambda_g) * (1.601 - 0.888 * _pipes.distance / D); + // thermal resistance due to the grout transition. + double const R_con_b = chi * R_g; + // Eq. 29 and 30 + double const R_fig = R_adv_i1 + R_con_a + R_con_b; + double const R_fog = R_adv_o1 + R_con_a + R_con_b; + + // thermal resistance due to inter-grout exchange + double const R_ar = + std::acosh((2.0 * _pipes.distance * _pipes.distance - d0 * d0) / d0 / + d0) / + (2.0 * pi * lambda_g); + + double R_gg, R_gs; + std::tie(R_gg, R_gs) = thermalResistancesGroutSoil(chi, R_ar, R_g); + + return {R_fig, R_fog, R_gg, R_gs}; + + // keep the following lines------------------------------------------------ + // when debugging the code, printing the R and phi values are needed-------- + // std::cout << "Rfig =" << R_fig << " Rfog =" << R_fog << " Rgg =" << + // R_gg << " Rgs =" << R_gs << "\n"; double phi_fig = 1.0 / (R_fig * + // S_i); double phi_fog = 1.0 / (R_fog * S_o); double phi_gg = 1.0 / (R_gg + // * S_g1); double phi_gs = 1.0 / (R_gs * S_gs); std::cout << "phi_fig =" + // << phi_fig << " phi_fog =" << phi_fog << " phi_gg =" << phi_gg << " + // phi_gs =" << phi_gs << "\n"; + // ------------------------------------------------------------------------- +} + +double BHE_1U::updateFlowRateAndTemperature(double const T_out, + double const current_time) +{ + auto values = apply_visitor( + [&](auto const& control) { return control(T_out, current_time); }, + flowAndTemperatureControl); + updateHeatTransferCoefficients(values.flow_rate); + return values.temperature; +} +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/BHE_1U.h b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.h new file mode 100644 index 0000000000000000000000000000000000000000..0063864dce70d4ae2547c45321ea5f5d21ad8c8f --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/BHE_1U.h @@ -0,0 +1,167 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <Eigen/Eigen> + +#include "BaseLib/Error.h" + +#include "BHECommon.h" +#include "FlowAndTemperatureControl.h" +#include "PipeConfiguration1U.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +/** + * The BHE_1U class is the realization of 1U type of Borehole Heate Exchanger. + * In this class, the pipe heat capacity, pipe heat conductiion, pie advection + * vectors are intialized according to the geometry of 1U type of BHE. + * For 1U type of BHE, 4 primary unknowns are assigned on the 1D BHE elements. + * They are the temperature in inflow pipe T_in, temperature in outflow pipe + * T_out temperature of the two grout zones sorrounding the inflow and outflow + * pipe T_g1 and T_g2. These primary varaibles are solved according to heat + * convection and conduction equations on the pipes and also in the grout zones. + * The interaction of the 1U type of BHE and the sorrounding soil is regulated + * through the thermal resistance values, which are calculated specifically + * during the initialization of the class. + */ +class BHE_1U final : public BHECommon +{ +public: + BHE_1U(BoreholeGeometry const& borehole, + RefrigerantProperties const& refrigerant, + GroutParameters const& grout, + FlowAndTemperatureControl const& flowAndTemperatureControl, + PipeConfiguration1U const& pipes); + + static constexpr int number_of_unknowns = 4; + + std::array<double, number_of_unknowns> pipeHeatCapacities() const; + + std::array<double, number_of_unknowns> pipeHeatConductions() const; + + std::array<Eigen::Vector3d, number_of_unknowns> pipeAdvectionVectors() + const; + + template <int NPoints, + typename SingleUnknownMatrixType, + typename RMatrixType, + typename RPiSMatrixType, + typename RSMatrixType> + void assembleRMatrices( + int const idx_bhe_unknowns, + Eigen::MatrixBase<SingleUnknownMatrixType> const& matBHE_loc_R, + Eigen::MatrixBase<RMatrixType>& R_matrix, + Eigen::MatrixBase<RPiSMatrixType>& R_pi_s_matrix, + Eigen::MatrixBase<RSMatrixType>& R_s_matrix) const + { + switch (idx_bhe_unknowns) + { + case 0: // PHI_fig + R_matrix.block(0, 2 * NPoints, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + R_matrix.block(2 * NPoints, 0, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + + R_matrix.block(0, 0, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_i1 + R_matrix.block(2 * NPoints, 2 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_ig + return; + case 1: // PHI_fog + R_matrix.block(NPoints, 3 * NPoints, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + R_matrix.block(3 * NPoints, NPoints, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + + R_matrix.block(NPoints, NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_o1 + R_matrix.block(3 * NPoints, 3 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_og + return; + case 2: // PHI_gg + R_matrix.block(2 * NPoints, 3 * NPoints, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + R_matrix.block(3 * NPoints, 2 * NPoints, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + + R_matrix.block(2 * NPoints, 2 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_ig // notice we only have + // 1 PHI_gg term here. + R_matrix.block(3 * NPoints, 3 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_og // see Diersch 2013 FEFLOW + // book page 954 Table M.2 + return; + case 3: // PHI_gs + R_s_matrix.template block<NPoints, NPoints>(0, 0).noalias() += + 1.0 * matBHE_loc_R; + + R_pi_s_matrix.block(2 * NPoints, 0, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + R_pi_s_matrix.block(3 * NPoints, 0, NPoints, NPoints) += + -1.0 * matBHE_loc_R; + R_matrix.block(2 * NPoints, 2 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_ig + R_matrix.block(3 * NPoints, 3 * NPoints, NPoints, NPoints) += + 1.0 * matBHE_loc_R; // K_og + return; + default: + OGS_FATAL( + "Error!!! In the function BHE_1U::assembleRMatrices, " + "the index of bhe unknowns is out of range! "); + } + } + + /// Return the inflow temperature for the boundary condition. + double updateFlowRateAndTemperature(double T_out, double current_time); + + double thermalResistance(int const unknown_index) const + { + return _thermal_resistances[unknown_index]; + } + + static constexpr std::pair<int, int> inflow_outflow_bc_component_ids[] = { + {0, 1}}; + +private: + // Placing it here before using it in the cross_section_areas. + PipeConfiguration1U const _pipes; + +public: + std::array<double, number_of_unknowns> const cross_section_areas = { + {_pipes.inlet.area(), _pipes.inlet.area(), + borehole_geometry.area() / 2 - _pipes.outlet.area(), + borehole_geometry.area() / 2 - _pipes.outlet.area()}}; + +private: + void updateHeatTransferCoefficients(double const flow_rate); + + std::array<double, number_of_unknowns> calcThermalResistances( + double const Nu); + +private: + /// PHI_fig, PHI_fog, PHI_gg, PHI_gs; + /// Here we store the thermal resistances needed for computation of the heat + /// exchange coefficients in the governing equations of BHE. + /// These governing equations can be found in + /// 1) Diersch (2013) FEFLOW book on page 958, M.3, or + /// 2) Diersch (2011) Comp & Geosci 37:1122-1135, Eq. 90-97. + std::array<double, number_of_unknowns> _thermal_resistances; + + /// Flow velocity inside the pipes. Depends on the flow_rate. + double _flow_velocity; +}; +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.h b/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.h new file mode 100644 index 0000000000000000000000000000000000000000..520aec45472a1b478872fb745e25b95785f1827d --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/BoreholeGeometry.h @@ -0,0 +1,44 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <boost/math/constants/constants.hpp> + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct BoreholeGeometry +{ + /** + * length/depth of the BHE + * unit is m + */ + double const length; + + /** + * diameter of the BHE + * unit is m + */ + double const diameter; + + double area() const + { + constexpr double pi = boost::math::constants::pi<double>(); + return pi * diameter * diameter / 4; + } +}; +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1abf6edf13e9f7c6d158f3d2da6fbe6bd455b31 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.cpp @@ -0,0 +1,104 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "CreateBHE1U.h" +#include "BaseLib/ConfigTree.h" +#include "CreateFlowAndTemperatureControl.h" +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +BHE::BHE_1U createBHE1U( + BaseLib::ConfigTree const& config, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves) +{ + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole} + auto const& borehole_config = config.getConfigSubtree("borehole"); + const double borehole_length = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole__length} + borehole_config.getConfigParameter<double>("length"); + const double borehole_diameter = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole__diameter} + borehole_config.getConfigParameter<double>("diameter"); + BoreholeGeometry const borehole{borehole_length, borehole_diameter}; + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes} + auto const& pipes_config = config.getConfigSubtree("pipes"); + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet} + Pipe const inlet_pipe = createPipe(pipes_config.getConfigSubtree("inlet")); + Pipe const outlet_pipe = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__outlet} + createPipe(pipes_config.getConfigSubtree("outlet")); + const double pipe_distance = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__distance_between_pipes} + pipes_config.getConfigParameter<double>("distance_between_pipes"); + const double pipe_longitudinal_dispersion_length = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__longitudinal_dispersion_length} + pipes_config.getConfigParameter<double>( + "longitudinal_dispersion_length"); + PipeConfiguration1U const pipes{inlet_pipe, outlet_pipe, pipe_distance, + pipe_longitudinal_dispersion_length}; + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout} + auto const& grout_config = config.getConfigSubtree("grout"); + const double grout_density = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__density} + grout_config.getConfigParameter<double>("density"); + const double grout_porosity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__porosity} + grout_config.getConfigParameter<double>("porosity"); + const double grout_heat_capacity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__heat_capacity} + grout_config.getConfigParameter<double>("heat_capacity"); + const double grout_thermal_conductivity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__thermal_conductivity} + grout_config.getConfigParameter<double>("thermal_conductivity"); + GroutParameters const grout{grout_density, grout_porosity, + grout_heat_capacity, + grout_thermal_conductivity}; + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant} + auto const& refrigerant_config = config.getConfigSubtree("refrigerant"); + double const refrigerant_density = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__density} + refrigerant_config.getConfigParameter<double>("density"); + double const refrigerant_viscosity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__viscosity} + refrigerant_config.getConfigParameter<double>("viscosity"); + double const refrigerant_heat_capacity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__specific_heat_capacity} + refrigerant_config.getConfigParameter<double>("specific_heat_capacity"); + double const refrigerant_thermal_conductivity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__thermal_conductivity} + refrigerant_config.getConfigParameter<double>("thermal_conductivity"); + double const refrigerant_reference_temperature = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__reference_temperature} + refrigerant_config.getConfigParameter<double>("reference_temperature"); + RefrigerantProperties const refrigerant{ + refrigerant_viscosity, refrigerant_density, + refrigerant_thermal_conductivity, refrigerant_heat_capacity, + refrigerant_reference_temperature}; + + auto const flowAndTemperatureControl = createFlowAndTemperatureControl( + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control} + config.getConfigSubtree("flow_and_temperature_control"), + curves, + refrigerant); + + return {borehole, refrigerant, grout, flowAndTemperatureControl, pipes}; +} +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.h b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.h new file mode 100644 index 0000000000000000000000000000000000000000..18dd0a28bcf76bc2b8463c07fd946e79ab7bc756 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/CreateBHE1U.h @@ -0,0 +1,31 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "BHE_1U.h" + +namespace BaseLib +{ +class ConfigTree; +} +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +BHE::BHE_1U createBHE1U( + BaseLib::ConfigTree const& bhe_conf, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves); +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.h b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.h new file mode 100644 index 0000000000000000000000000000000000000000..6e3875af1b26a10a186b03d572218a00c6991f27 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.h @@ -0,0 +1,88 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "RefrigerantProperties.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +FlowAndTemperatureControl createFlowAndTemperatureControl( + BaseLib::ConfigTree const& config, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves, + RefrigerantProperties const& refrigerant) +{ + auto find_curve_or_error = [&](std::string const& name, + std::string const& error_message) + -> MathLib::PiecewiseLinearInterpolation const& { + auto const it = curves.find(name); + if (it == curves.end()) + { + ERR(error_message.c_str()); + OGS_FATAL( + "Curve with name '%s' could not be found in the curves list.", + name.c_str()); + } + return *it->second; + }; + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__type} + auto const type = config.getConfigParameter<std::string>("type"); + if (type == "TemperatureCurveConstantFlow") + { + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveConstantFlow__flow_rate} + double const flow_rate = config.getConfigParameter<double>("flow_rate"); + + auto const& temperature_curve = find_curve_or_error( + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveConstantFlow__temperature_curve} + config.getConfigParameter<std::string>("temperature_curve"), + "Required temperature curve not found."); + + return TemperatureCurveConstantFlow{flow_rate, temperature_curve}; + } + if (type == "FixedPowerConstantFlow") + { + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerConstantFlow__power} + double const power = config.getConfigParameter<double>("power"); + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerConstantFlow__flow_rate} + double const flow_rate = config.getConfigParameter<double>("flow_rate"); + return FixedPowerConstantFlow{flow_rate, power, + refrigerant.specific_heat_capacity, + refrigerant.density}; + } + + if (type == "FixedPowerFlowCurve") + { + auto const& flow_rate_curve = find_curve_or_error( + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerFlowCurve__flow_rate_curve} + config.getConfigParameter<std::string>("flow_rate_curve"), + "Required flow rate curve not found."); + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerFlowCurve__power} + double const power = config.getConfigParameter<double>("power"); + + return FixedPowerFlowCurve{flow_rate_curve, power, + refrigerant.specific_heat_capacity, + refrigerant.density}; + } + OGS_FATAL("FlowAndTemperatureControl type '%s' is not implemented.", + type.c_str()); +} +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/FlowAndTemperatureControl.h b/ProcessLib/HeatTransportBHE/BHE/FlowAndTemperatureControl.h new file mode 100644 index 0000000000000000000000000000000000000000..9897b4d13ca10072860035f83cfb87cd7083cbb0 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/FlowAndTemperatureControl.h @@ -0,0 +1,73 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <boost/variant.hpp> +#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct FlowAndTemperature +{ + double const flow_rate; + double const temperature; +}; + +struct TemperatureCurveConstantFlow +{ + FlowAndTemperature operator()(double const /*T_out*/, + double const time) const + { + return {flow_rate, temperature_curve.getValue(time)}; + } + double flow_rate; + MathLib::PiecewiseLinearInterpolation const& temperature_curve; +}; + +struct FixedPowerConstantFlow +{ + FlowAndTemperature operator()(double const T_out, + double const /*time*/) const + { + return {flow_rate, power / flow_rate / heat_capacity / density + T_out}; + } + double flow_rate; + double power; // Value is expected to be in Watt. + double heat_capacity; + double density; +}; + +struct FixedPowerFlowCurve +{ + FlowAndTemperature operator()(double const T_out, double const time) const + { + double const flow_rate = flow_curve.getValue(time); + return {flow_rate, power / flow_rate / heat_capacity / density + T_out}; + } + MathLib::PiecewiseLinearInterpolation const& flow_curve; + + double power; // Value is expected to be in Watt. + double heat_capacity; + double density; +}; + +using FlowAndTemperatureControl = boost::variant<TemperatureCurveConstantFlow, + FixedPowerConstantFlow, + FixedPowerFlowCurve>; + +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/GroutParameters.h b/ProcessLib/HeatTransportBHE/BHE/GroutParameters.h new file mode 100644 index 0000000000000000000000000000000000000000..c1355838f4065c9acf112bcb3fdba2dffb96641f --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/GroutParameters.h @@ -0,0 +1,48 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct GroutParameters +{ + /** + * density of the grout + * unit is kg m-3 + */ + double const rho_g; + + /** + * porosity of the grout + * unit is [-] + */ + double const porosity_g; + + /** + * specific heat capacity of the grout + * unit is m^2 sec^-2 K^-1 + */ + double const heat_cap_g; + + /** + * thermal conductivity of the grout + * unit is kg m sec^-3 K^-1 + */ + double const lambda_g; +}; +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/MeshUtils.cpp b/ProcessLib/HeatTransportBHE/BHE/MeshUtils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1243f4bed72d6228b60fa2d7572c376f09304d73 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/MeshUtils.cpp @@ -0,0 +1,109 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#include "MeshUtils.h" + +#include "BaseLib/Algorithm.h" +#include "MeshLib/Elements/Element.h" +#include "MeshLib/Mesh.h" +#include "MeshLib/MeshSearch/NodeSearch.h" +#include "MeshLib/Node.h" + +namespace +{ +std::vector<MeshLib::Element*> extractOneDimensionalElements( + std::vector<MeshLib::Element*> const& elements) +{ + std::vector<MeshLib::Element*> one_dimensional_elements; + + copy_if(begin(elements), end(elements), + back_inserter(one_dimensional_elements), + [](MeshLib::Element* e) { return e->getDimension() == 1; }); + + return one_dimensional_elements; +} + +std::vector<int> getUniqueMaterialIds( + std::vector<int> const& material_ids, + std::vector<MeshLib::Element*> const& elements) +{ + std::set<int> unique_material_ids; + std::transform(begin(elements), end(elements), + inserter(unique_material_ids, end(unique_material_ids)), + [&material_ids](MeshLib::Element const* const e) { + return material_ids[e->getID()]; + }); + return {begin(unique_material_ids), end(unique_material_ids)}; +} +} // namespace + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +BHEMeshData getBHEDataInMesh(MeshLib::Mesh const& mesh) +{ + std::vector<MeshLib::Element*> const all_bhe_elements = + extractOneDimensionalElements(mesh.getElements()); + + // finally counting two types of elements + // They are (i) soil, and (ii) BHE type of elements + DBUG("-> found total %d soil elements and %d BHE elements", + mesh.getNumberOfElements() - all_bhe_elements.size(), + all_bhe_elements.size()); + + // get BHE material IDs + auto const* const opt_material_ids = MeshLib::materialIDs(mesh); + if (opt_material_ids == nullptr) + { + OGS_FATAL("Not able to get material IDs! "); + } + auto const& material_ids = *opt_material_ids; + + auto const& bhe_material_ids = + getUniqueMaterialIds(material_ids, all_bhe_elements); + DBUG("-> found %d BHE material groups", bhe_material_ids.size()); + + // create a vector of BHE elements for each group + std::vector<std::vector<MeshLib::Element*>> bhe_elements; + bhe_elements.resize(bhe_material_ids.size()); + for (unsigned bhe_id = 0; bhe_id < bhe_material_ids.size(); bhe_id++) + { + const auto bhe_mat_id = bhe_material_ids[bhe_id]; + std::vector<MeshLib::Element*>& vec_elements = bhe_elements[bhe_id]; + copy_if(begin(all_bhe_elements), end(all_bhe_elements), + back_inserter(vec_elements), [&](MeshLib::Element* e) { + return material_ids[e->getID()] == bhe_mat_id; + }); + DBUG("-> found %d elements on the BHE_%d", vec_elements.size(), bhe_id); + } + + // get a vector of BHE nodes + std::vector<std::vector<MeshLib::Node*>> bhe_nodes; + bhe_nodes.resize(bhe_material_ids.size()); + for (unsigned bhe_id = 0; bhe_id < bhe_material_ids.size(); bhe_id++) + { + std::vector<MeshLib::Node*>& vec_nodes = bhe_nodes[bhe_id]; + for (MeshLib::Element* e : bhe_elements[bhe_id]) + { + for (unsigned i = 0; i < e->getNumberOfNodes(); i++) + { + vec_nodes.push_back(const_cast<MeshLib::Node*>(e->getNode(i))); + } + } + BaseLib::makeVectorUnique( + vec_nodes, [](MeshLib::Node* node1, MeshLib::Node* node2) { + return node1->getID() < node2->getID(); + }); + DBUG("-> found %d nodes on the BHE_%d", vec_nodes.size(), bhe_id); + } + + return {bhe_material_ids, bhe_elements, bhe_nodes}; +} +} // end of namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/MeshUtils.h b/ProcessLib/HeatTransportBHE/BHE/MeshUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..5b5a7978cf321fc0d776ccb98c77b12232aa2ec4 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/MeshUtils.h @@ -0,0 +1,51 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#pragma once + +#include <vector> + +namespace MeshLib +{ +class Element; +class Mesh; +class Node; +} // namespace MeshLib + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +/* TODO (naumov) Just an idea +struct BheMeshSubset +{ + int material_id; + std::vector<MeshLib::Element*> elements; + std::vector<MeshLib::Node*> nodes; +}; +*/ + +struct BHEMeshData +{ + std::vector<int> BHE_mat_IDs; + std::vector<std::vector<MeshLib::Element*>> BHE_elements; + std::vector<std::vector<MeshLib::Node*>> BHE_nodes; + + // TODO (naumov) Just an idea: std::vector<BheMeshSubset> mesh_subsets; +}; + +/** + * get data about fracture and matrix elements/nodes from a mesh + * + * @param mesh A mesh which includes BHE elements, i.e. 1-dimensional + * elements. It is assumed that elements forming a BHE have a distinct + * material ID. + */ +BHEMeshData getBHEDataInMesh(MeshLib::Mesh const& mesh); +} // end of namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/Physics.h b/ProcessLib/HeatTransportBHE/BHE/Physics.h new file mode 100644 index 0000000000000000000000000000000000000000..446543da84e625198a131991709079b91cb00d3a --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/Physics.h @@ -0,0 +1,64 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE // namespace of borehole heat exchanger +{ +inline double prandtlNumber(double const& viscosity, + double const& heat_capacity, + double const& heat_conductivity) +{ + return viscosity * heat_capacity / heat_conductivity; +} + +inline double reynoldsNumber(double const velocity_norm, + double const pipe_diameter, + double const viscosity, + double const density) +{ + return velocity_norm * pipe_diameter / (viscosity / density); +} + +inline double nusseltNumber(double const reynolds_number, + double const prandtl_number, + double const pipe_diameter, + double const pipe_length) +{ + if (reynolds_number < 2300.0) + { + return 4.364; + } + if (reynolds_number < 10000.0) + { + double const gamma = (reynolds_number - 2300) / (10000 - 2300); + + return (1.0 - gamma) * 4.364 + + gamma * + ((0.0308 / 8.0 * 1.0e4 * prandtl_number) / + (1.0 + 12.7 * std::sqrt(0.0308 / 8.0) * + (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) * + (1.0 + std::pow(pipe_diameter / pipe_length, 2.0 / 3.0))); + } + + double const xi = std::pow(1.8 * std::log10(reynolds_number) - 1.5, -2.0); + return (xi / 8.0 * reynolds_number * prandtl_number) / + (1.0 + 12.7 * std::sqrt(xi / 8.0) * + (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) * + (1.0 + std::pow(pipe_diameter / pipe_length, 2.0 / 3.0)); +} +} // end of namespace BHE +} // end of namespace HeatTransportBHE +} // end of namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp b/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..11986ed325805fc17d74634492a5f9daf5bd0da5 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/Pipe.cpp @@ -0,0 +1,35 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "Pipe.h" +#include "BaseLib/ConfigTree.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +Pipe createPipe(BaseLib::ConfigTree const& config) +{ + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__radius} + const double radius = config.getConfigParameter<double>("radius"); + const double wall_thickness = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__wall_thickness} + config.getConfigParameter<double>("wall_thickness"); + const double wall_thermal_conductivity = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__wall_thermal_conductivity} + config.getConfigParameter<double>("wall_thermal_conductivity"); + return {radius, wall_thickness, wall_thermal_conductivity}; +} +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/Pipe.h b/ProcessLib/HeatTransportBHE/BHE/Pipe.h new file mode 100644 index 0000000000000000000000000000000000000000..1eed3b501879818ac38405940ab68b375882c287 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/Pipe.h @@ -0,0 +1,43 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <boost/math/constants/constants.hpp> + +namespace BaseLib +{ +class ConfigTree; +} +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct Pipe +{ + double const diameter; + double const wall_thickness; + double const wall_thermal_conductivity; + + double area() const + { + constexpr double pi = boost::math::constants::pi<double>(); + return pi * diameter * diameter / 4; + } +}; + +Pipe createPipe(BaseLib::ConfigTree const& config); + +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/PipeConfiguration1U.h b/ProcessLib/HeatTransportBHE/BHE/PipeConfiguration1U.h new file mode 100644 index 0000000000000000000000000000000000000000..b71c3115f7294f5912ec52edfe4abe59331ec33a --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/PipeConfiguration1U.h @@ -0,0 +1,37 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <boost/math/constants/constants.hpp> + +#include "BaseLib/ConfigTree.h" +#include "Pipe.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct PipeConfiguration1U +{ + Pipe const inlet; + Pipe const outlet; + + /// Distance between pipes. + double const distance; + + double const longitudinal_dispersion_length; +}; +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.h b/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..ea54310ab99f60528ec3cd7e0cf5fed47004fa0c --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/RefrigerantProperties.h @@ -0,0 +1,46 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct RefrigerantProperties +{ + /** + * unit is kg m-1 sec-1 + */ + double const dynamic_viscosity; + + /** + * unit is kg m-3 + */ + double const density; + + /** + * unit is kg m sec^-3 K^-1 + */ + double const thermal_conductivity; + + /** + * unit is m^2 sec^-2 K^-1 + */ + double const specific_heat_capacity; + + double const reference_temperature; +}; +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/BHE/ThermoMechanicalFlowProperties.h b/ProcessLib/HeatTransportBHE/BHE/ThermoMechanicalFlowProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..1d2b2e0128e8a144a3cd0525955a1a764c82013b --- /dev/null +++ b/ProcessLib/HeatTransportBHE/BHE/ThermoMechanicalFlowProperties.h @@ -0,0 +1,71 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "Physics.h" +#include "PipeParameters.h" +#include "RefrigerantProperties.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace BHE +{ +struct ThermoMechanicalFlowProperties +{ + double velocity; + double nusselt_number; +}; + +inline ThermoMechanicalFlowProperties +calculateThermoMechanicalFlowPropertiesPipe(PipeParameters const& pipe, + double const length, + RefrigerantProperties const& fluid, + double const flow_rate) +{ + double const Pr = + prandtlNumber(fluid.mu_r, fluid.specific_heat_capacity, fluid.lambda_r); + + double const velocity = pipeFlowVelocity(flow_rate, pipe.r_inner); + double const Re = + reynoldsNumber(velocity, 2.0 * pipe.r_inner, fluid.mu_r, fluid.density); + double const nusselt_number = + nusseltNumber(Re, Pr, 2 * pipe.r_inner, length); + return {velocity, nusselt_number}; +} + +inline ThermoMechanicalFlowProperties +calculateThermoMechanicalFlowPropertiesAnnulus( + PipeParameters const& pipe, double const length, + RefrigerantProperties const& fluid, double const flow_rate) +{ + double const Pr = + prandtlNumber(fluid.mu_r, fluid.specific_heat_capacity, fluid.lambda_r); + + double const velocity = + annulusFlowVelocity(flow_rate, pipe.r_outer, pipe.r_inner + pipe.b_in); + + double const Re = reynoldsNumber( + velocity, 2.0 * (pipe.r_outer - (pipe.r_inner + pipe.b_in)), fluid.mu_r, + fluid.density); + + double const diameter_ratio = (pipe.r_inner + pipe.b_in) / pipe.r_outer; + double const pipe_aspect_ratio = + (2 * pipe.r_outer - 2 * (pipe.r_inner + pipe.b_in)) / length; + double const nusselt_number = + nusseltNumberAnnulus(Re, Pr, diameter_ratio, pipe_aspect_ratio); + return {velocity, nusselt_number}; +} +} // namespace BHE +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/CMakeLists.txt b/ProcessLib/HeatTransportBHE/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..2838acf7603c13002f509cb6abfc37c9fe4366a9 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/CMakeLists.txt @@ -0,0 +1,8 @@ +APPEND_SOURCE_FILES(SOURCES) +APPEND_SOURCE_FILES(SOURCES BHE) +APPEND_SOURCE_FILES(SOURCES LocalAssemblers) + +add_library(HeatTransportBHE ${SOURCES}) +target_link_libraries(HeatTransportBHE PUBLIC ProcessLib) + +include(Tests.cmake) diff --git a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp new file mode 100644 index 0000000000000000000000000000000000000000..db6148965ebd88eb58975090ef558ff84451405c --- /dev/null +++ b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp @@ -0,0 +1,219 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "CreateHeatTransportBHEProcess.h" + +#include <vector> + +#include "ProcessLib/Output/CreateSecondaryVariables.h" +#include "ProcessLib/Utils/ProcessUtils.h" + +#include "BHE/BHETypes.h" +#include "BHE/CreateBHE1U.h" +#include "HeatTransportBHEProcess.h" +#include "HeatTransportBHEProcessData.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +std::unique_ptr<Process> createHeatTransportBHEProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler, + std::vector<ProcessVariable> const& variables, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + BaseLib::ConfigTree const& config, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves) +{ + //! \ogs_file_param{prj__processes__process__type} + config.checkConfigParameter("type", "HEAT_TRANSPORT_BHE"); + + DBUG("Create HeatTransportBHE Process."); + + // Process variable. + + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__process_variables} + auto const pv_config = config.getConfigSubtree("process_variables"); + std::vector<std::vector<std::reference_wrapper<ProcessVariable>>> + process_variables; + + // reading primary variables for each + // BHE---------------------------------------------------------- + auto range = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__process_variables__process_variable} + pv_config.getConfigParameterList<std::string>("process_variable"); + std::vector<std::reference_wrapper<ProcessVariable>> per_process_variables; + + for (std::string const& pv_name : range) + { + if (pv_name != "temperature_soil" && + pv_name.find("temperature_BHE") != 0) + { + OGS_FATAL( + "Found a process variable name '%s'. It should be " + "'temperature_soil' or 'temperature_BHE_X'"); + } + auto variable = std::find_if(variables.cbegin(), variables.cend(), + [&pv_name](ProcessVariable const& v) { + return v.getName() == pv_name; + }); + + if (variable == variables.end()) + { + OGS_FATAL( + "Could not find process variable '%s' in the provided " + "variables " + "list for config tag <%s>.", + pv_name.c_str(), "process_variable"); + } + DBUG("Found process variable \'%s\' for config tag <%s>.", + variable->getName().c_str(), "process_variable"); + + per_process_variables.emplace_back( + const_cast<ProcessVariable&>(*variable)); + } + process_variables.push_back(std::move(per_process_variables)); + // end of reading primary variables for each + // BHE---------------------------------------------------------- + + // solid phase thermal conductivity parameter. + auto& thermal_conductivity_solid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__thermal_conductivity_solid} + "thermal_conductivity_solid", parameters, 1); + + DBUG("Use \'%s\' as solid phase thermal conductivity parameter.", + thermal_conductivity_solid.name.c_str()); + + // solid phase thermal conductivity parameter. + auto& thermal_conductivity_fluid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__thermal_conductivity_fluid} + "thermal_conductivity_fluid", parameters, 1); + + DBUG("Use \'%s\' as fluid phase thermal conductivity parameter.", + thermal_conductivity_fluid.name.c_str()); + + // gas phase thermal conductivity parameter. + auto& thermal_conductivity_gas = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__thermal_conductivity_gas} + "thermal_conductivity_gas", parameters, 1); + + DBUG("Use \'%s\' as gas phase thermal conductivity parameter.", + thermal_conductivity_gas.name.c_str()); + + // solid phase heat capacity parameter. + auto& heat_capacity_solid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__heat_capacity_solid} + "heat_capacity_solid", parameters, 1); + + DBUG("Use \'%s\' as solid phase heat capacity parameter.", + heat_capacity_solid.name.c_str()); + + // fluid phase heat capacity parameter. + auto& heat_capacity_fluid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__heat_capacity_fluid} + "heat_capacity_fluid", parameters, 1); + + DBUG("Use \'%s\' as fluid phase heat capacity parameter.", + heat_capacity_fluid.name.c_str()); + + // gas phase heat capacity parameter. + auto& heat_capacity_gas = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__heat_capacity_gas} + "heat_capacity_gas", parameters, 1); + + DBUG("Use \'%s\' as gas phase heat capacity parameter.", + heat_capacity_gas.name.c_str()); + + // solid phase density parameter. + auto& density_solid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__density_solid} + "density_solid", parameters, 1); + + DBUG("Use \'%s\' as solid phase density parameter.", + density_solid.name.c_str()); + + // fluid phase density parameter. + auto& density_fluid = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__density_fluid} + "density_fluid", parameters, 1); + + DBUG("Use \'%s\' as fluid phase density parameter.", + density_fluid.name.c_str()); + + // gas phase density parameter. + auto& density_gas = findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__HEAT_TRANSPORT_BHE__density_gas} + "density_gas", parameters, 1); + + DBUG("Use \'%s\' as gas phase density parameter.", + density_gas.name.c_str()); + + // reading BHE parameters -------------------------------------------------- + std::vector<BHE::BHETypes> bhes; + auto const& bhe_configs = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers} + config.getConfigSubtree("borehole_heat_exchangers"); + + for ( + auto const& bhe_config : + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger} + bhe_configs.getConfigSubtreeList("borehole_heat_exchanger")) + { + // read in the parameters + const std::string bhe_type = + //! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__type} + bhe_config.getConfigParameter<std::string>("type"); + + if (bhe_type == "1U") + { + bhes.push_back(BHE::createBHE1U(bhe_config, curves)); + continue; + } + OGS_FATAL("Unknown BHE type '%s'.", bhe_type.c_str()); + } + // end of reading BHE parameters ------------------------------------------- + + HeatTransportBHEProcessData process_data{thermal_conductivity_solid, + thermal_conductivity_fluid, + thermal_conductivity_gas, + heat_capacity_solid, + heat_capacity_fluid, + heat_capacity_gas, + density_solid, + density_fluid, + density_gas, + std::move(bhes)}; + + SecondaryVariableCollection secondary_variables; + + NumLib::NamedFunctionCaller named_function_caller( + {"HeatTransportBHE_Temperature"}); + + ProcessLib::createSecondaryVariables(config, secondary_variables, + named_function_caller); + + return std::make_unique<HeatTransportBHEProcess>( + mesh, std::move(jacobian_assembler), parameters, integration_order, + std::move(process_variables), std::move(process_data), + std::move(secondary_variables), std::move(named_function_caller)); +} +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.h b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..e6ee4f3d9db41ec449cc3313f2cd238f4b65d1cd --- /dev/null +++ b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.h @@ -0,0 +1,30 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <memory> +#include "ProcessLib/Process.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +std::unique_ptr<Process> createHeatTransportBHEProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler, + std::vector<ProcessVariable> const& variables, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + BaseLib::ConfigTree const& config, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves); +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e940f8f73b18b79bca43b9b06a9c8cac4d74adba --- /dev/null +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.cpp @@ -0,0 +1,254 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "HeatTransportBHEProcess.h" + +#include <cassert> +#include "ProcessLib/HeatTransportBHE/BHE/MeshUtils.h" +#include "ProcessLib/HeatTransportBHE/LocalAssemblers/CreateLocalAssemblers.h" + +#include "ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE.h" +#include "ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil.h" + +#include "ProcessLib/BoundaryCondition/BHEBottomDirichletBoundaryCondition.h" +#include "ProcessLib/BoundaryCondition/BHEInflowDirichletBoundaryCondition.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +HeatTransportBHEProcess::HeatTransportBHEProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&& + process_variables, + HeatTransportBHEProcessData&& process_data, + SecondaryVariableCollection&& secondary_variables, + NumLib::NamedFunctionCaller&& named_function_caller) + : Process(mesh, std::move(jacobian_assembler), parameters, + integration_order, std::move(process_variables), + std::move(secondary_variables), std::move(named_function_caller)), + _process_data(std::move(process_data)), + _bheMeshData(getBHEDataInMesh(mesh)) +{ + if (_bheMeshData.BHE_mat_IDs.size() != + _process_data._vec_BHE_property.size()) + { + OGS_FATAL( + "The number of the given BHE properties (%d) are not consistent " + "with the number of BHE groups in the mesh (%d).", + _process_data._vec_BHE_property.size(), + _bheMeshData.BHE_mat_IDs.size()); + } + + auto material_ids = MeshLib::materialIDs(mesh); + if (material_ids == nullptr) + { + OGS_FATAL("Not able to get material IDs! "); + } + + _process_data._mesh_prop_materialIDs = material_ids; + + // create a map from a material ID to a BHE ID + for (int i = 0; i < static_cast<int>(_bheMeshData.BHE_mat_IDs.size()); i++) + { + // fill in the map structure + _process_data._map_materialID_to_BHE_ID[_bheMeshData.BHE_mat_IDs[i]] = + i; + } +} + +void HeatTransportBHEProcess::constructDofTable() +{ + // Create single component dof in every of the mesh's nodes. + _mesh_subset_all_nodes = + std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes()); + + // + // Soil temperature variable defined on the whole mesh. + // + _mesh_subset_soil_nodes = + std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes()); + std::vector<MeshLib::MeshSubset> all_mesh_subsets{*_mesh_subset_soil_nodes}; + + std::vector<std::vector<MeshLib::Element*> const*> vec_var_elements; + vec_var_elements.push_back(&(_mesh.getElements())); + + std::vector<int> vec_n_components{ + 1}; // one component for the soil temperature variable. + + // + // BHE nodes with BHE type dependend number of variables. + // + int const n_BHEs = _process_data._vec_BHE_property.size(); + assert(n_BHEs == static_cast<int>(_bheMeshData.BHE_mat_IDs.size())); + assert(n_BHEs == static_cast<int>(_bheMeshData.BHE_nodes.size())); + assert(n_BHEs == static_cast<int>(_bheMeshData.BHE_elements.size())); + + // the BHE nodes need to be cherry-picked from the vector + for (int i = 0; i < n_BHEs; i++) + { + auto const number_of_unknowns = apply_visitor( + [](auto const& bhe) { return bhe.number_of_unknowns; }, + _process_data._vec_BHE_property[i]); + auto const& bhe_nodes = _bheMeshData.BHE_nodes[i]; + auto const& bhe_elements = _bheMeshData.BHE_elements[i]; + + // All the BHE nodes have additional variables. + _mesh_subset_BHE_nodes.push_back( + std::make_unique<MeshLib::MeshSubset const>(_mesh, bhe_nodes)); + + std::generate_n( + std::back_inserter(all_mesh_subsets), + // Here the number of components equals to the + // number of unknowns on the BHE + number_of_unknowns, + [& ms = _mesh_subset_BHE_nodes.back()]() { return *ms; }); + + vec_n_components.push_back(number_of_unknowns); + vec_var_elements.push_back(&bhe_elements); + } + + _local_to_global_index_map = + std::make_unique<NumLib::LocalToGlobalIndexMap>( + std::move(all_mesh_subsets), + vec_n_components, + vec_var_elements, + NumLib::ComponentOrder::BY_COMPONENT); + + // in case of debugging the dof table, activate the following line + // std::cout << *_local_to_global_index_map << "\n"; +} + +void HeatTransportBHEProcess::initializeConcreteProcess( + NumLib::LocalToGlobalIndexMap const& dof_table, + MeshLib::Mesh const& mesh, + unsigned const integration_order) +{ + // Quick access map to BHE's through element ids. + std::unordered_map<std::size_t, BHE::BHETypes*> element_to_bhe_map; + int const n_BHEs = _process_data._vec_BHE_property.size(); + for (int i = 0; i < n_BHEs; i++) + { + auto const& bhe_elements = _bheMeshData.BHE_elements[i]; + for (auto const& e : bhe_elements) + { + element_to_bhe_map[e->getID()] = + &_process_data._vec_BHE_property[i]; + } + } + + assert(mesh.getDimension() == 3); + ProcessLib::HeatTransportBHE::createLocalAssemblers< + HeatTransportBHELocalAssemblerSoil, HeatTransportBHELocalAssemblerBHE>( + mesh.getElements(), dof_table, _local_assemblers, element_to_bhe_map, + mesh.isAxiallySymmetric(), integration_order, _process_data); + + // Create BHE boundary conditions for each of the BHEs + createBHEBoundaryConditionTopBottom(_bheMeshData.BHE_nodes); +} + +void HeatTransportBHEProcess::assembleConcreteProcess(const double t, + GlobalVector const& x, + GlobalMatrix& M, + GlobalMatrix& K, + GlobalVector& b) +{ + DBUG("Assemble HeatTransportBHE process."); + + std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>> + dof_table = {std::ref(*_local_to_global_index_map)}; + // Call global assembler for each local assembly item. + GlobalExecutor::executeMemberDereferenced( + _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, + dof_table, t, x, M, K, b, _coupled_solutions); +} + +void HeatTransportBHEProcess::assembleWithJacobianConcreteProcess( + const double /*t*/, GlobalVector const& /*x*/, GlobalVector const& /*xdot*/, + const double /*dxdot_dx*/, const double /*dx_dx*/, GlobalMatrix& /*M*/, + GlobalMatrix& /*K*/, GlobalVector& /*b*/, GlobalMatrix& /*Jac*/) +{ + OGS_FATAL( + "HeatTransportBHE: analytical Jacobian assembly is not implemented"); +} + +void HeatTransportBHEProcess::computeSecondaryVariableConcrete( + const double t, GlobalVector const& x) +{ + DBUG("Compute heat flux for HeatTransportBHE process."); + GlobalExecutor::executeMemberOnDereferenced( + &HeatTransportBHELocalAssemblerInterface::computeSecondaryVariable, + _local_assemblers, *_local_to_global_index_map, t, x, + _coupled_solutions); +} + +void HeatTransportBHEProcess::createBHEBoundaryConditionTopBottom( + std::vector<std::vector<MeshLib::Node*>> const& all_bhe_nodes) +{ + const int process_id = 0; + auto& bcs = _boundary_conditions[process_id]; + + int const n_BHEs = static_cast<int>(_process_data._vec_BHE_property.size()); + + // for each BHE + for (int bhe_i = 0; bhe_i < n_BHEs; bhe_i++) + { + auto const& bhe_nodes = all_bhe_nodes[bhe_i]; + // find the variable ID + // the soil temperature is 0-th variable + // the BHE temperature is therefore bhe_i + 1 + const int variable_id = bhe_i + 1; + + // Bottom and top nodes w.r.t. the z coordinate. + auto const bottom_top_nodes = std::minmax_element( + begin(bhe_nodes), end(bhe_nodes), + [&](auto const& a, auto const& b) { + return a->getCoords()[2] < b->getCoords()[2]; + }); + auto const bc_bottom_node_id = (*bottom_top_nodes.first)->getID(); + auto const bc_top_node_id = (*bottom_top_nodes.second)->getID(); + + auto get_global_bhe_bc_indices = + [&](std::size_t const node_id, + std::pair<int, int> const& in_out_component_id) { + return std::make_pair( + _local_to_global_index_map->getGlobalIndex( + {_mesh.getID(), MeshLib::MeshItemType::Node, node_id}, + variable_id, in_out_component_id.first), + _local_to_global_index_map->getGlobalIndex( + {_mesh.getID(), MeshLib::MeshItemType::Node, node_id}, + variable_id, in_out_component_id.second)); + }; + + auto createBCs = [&](auto& bhe) { + for (auto const& in_out_component_id : + bhe.inflow_outflow_bc_component_ids) + { + // Top, inflow. + bcs.addBoundaryCondition( + ProcessLib::createBHEInflowDirichletBoundaryCondition( + get_global_bhe_bc_indices(bc_top_node_id, + in_out_component_id), + bhe)); + + // Bottom, outflow. + bcs.addBoundaryCondition( + ProcessLib::createBHEBottomDirichletBoundaryCondition( + get_global_bhe_bc_indices(bc_bottom_node_id, + in_out_component_id))); + } + }; + apply_visitor(createBCs, _process_data._vec_BHE_property[bhe_i]); + } +} +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.h b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..1cdcba286a8b29f86aae1bd1254878a3156ba794 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcess.h @@ -0,0 +1,81 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "HeatTransportBHEProcessData.h" +#include "ProcessLib/HeatTransportBHE/BHE/MeshUtils.h" +#include "ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHEProcessAssemblerInterface.h" +#include "ProcessLib/Process.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +struct BHEMeshData; + +class HeatTransportBHEProcess final : public Process +{ +public: + HeatTransportBHEProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& + jacobian_assembler, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&& + process_variables, + HeatTransportBHEProcessData&& process_data, + SecondaryVariableCollection&& secondary_variables, + NumLib::NamedFunctionCaller&& named_function_caller); + + //! \name ODESystem interface + //! @{ + bool isLinear() const override { return false; } + + void computeSecondaryVariableConcrete(double const t, + GlobalVector const& x) override; + +private: + void constructDofTable() override; + + void initializeConcreteProcess( + NumLib::LocalToGlobalIndexMap const& dof_table, + MeshLib::Mesh const& mesh, + unsigned const integration_order) override; + + void assembleConcreteProcess(const double t, GlobalVector const& x, + GlobalMatrix& M, GlobalMatrix& K, + GlobalVector& b) override; + + void assembleWithJacobianConcreteProcess( + const double t, GlobalVector const& x, GlobalVector const& xdot, + const double dxdot_dx, const double dx_dx, GlobalMatrix& M, + GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac) override; + + void createBHEBoundaryConditionTopBottom( + std::vector<std::vector<MeshLib::Node*>> const& all_bhe_nodes); + + HeatTransportBHEProcessData _process_data; + + std::vector<std::unique_ptr<HeatTransportBHELocalAssemblerInterface>> + _local_assemblers; + + std::vector<std::unique_ptr<MeshLib::MeshSubset const>> + _mesh_subset_BHE_nodes; + + std::vector<std::unique_ptr<MeshLib::MeshSubset const>> + _mesh_subset_BHE_soil_nodes; + + std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_soil_nodes; + + const BHEMeshData _bheMeshData; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h new file mode 100644 index 0000000000000000000000000000000000000000..847dce2091921d966b754f9e3dfa7f9e0cb065ae --- /dev/null +++ b/ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h @@ -0,0 +1,87 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <unordered_map> + +#include "MeshLib/PropertyVector.h" +#include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" + +namespace MeshLib +{ +class Element; +} + +namespace ProcessLib +{ +template <typename T> +struct Parameter; + +namespace HeatTransportBHE +{ +struct HeatTransportBHEProcessData +{ + HeatTransportBHEProcessData( + Parameter<double> const& thermal_conductivity_solid_, + Parameter<double> const& thermal_conductivity_fluid_, + Parameter<double> const& thermal_conductivity_gas_, + Parameter<double> const& heat_capacity_solid_, + Parameter<double> const& heat_capacity_fluid_, + Parameter<double> const& heat_capacity_gas_, + Parameter<double> const& density_solid_, + Parameter<double> const& density_fluid_, + Parameter<double> const& density_gas_, + std::vector<BHE::BHETypes>&& vec_BHEs_) + : thermal_conductivity_solid(thermal_conductivity_solid_), + thermal_conductivity_fluid(thermal_conductivity_fluid_), + thermal_conductivity_gas(thermal_conductivity_gas_), + heat_capacity_solid(heat_capacity_solid_), + heat_capacity_fluid(heat_capacity_fluid_), + heat_capacity_gas(heat_capacity_gas_), + density_solid(density_solid_), + density_fluid(density_fluid_), + density_gas(density_gas_), + _vec_BHE_property(std::move(vec_BHEs_)) + { + } + + HeatTransportBHEProcessData(HeatTransportBHEProcessData&& other) = default; + + //! Copies are forbidden. + HeatTransportBHEProcessData(HeatTransportBHEProcessData const&) = delete; + + //! Assignments are not needed. + void operator=(HeatTransportBHEProcessData const&) = delete; + + //! Assignments are not needed. + void operator=(HeatTransportBHEProcessData&&) = delete; + + // ! thermal conductivity values for the three phases + Parameter<double> const& thermal_conductivity_solid; + Parameter<double> const& thermal_conductivity_fluid; + Parameter<double> const& thermal_conductivity_gas; + + // ! heat capacity values for the three phases + Parameter<double> const& heat_capacity_solid; + Parameter<double> const& heat_capacity_fluid; + Parameter<double> const& heat_capacity_gas; + + // ! density values for the three phases + Parameter<double> const& density_solid; + Parameter<double> const& density_fluid; + Parameter<double> const& density_gas; + + MeshLib::PropertyVector<int> const* _mesh_prop_materialIDs = nullptr; + std::unordered_map<int, int> _map_materialID_to_BHE_ID; + + std::vector<BHE::BHETypes> _vec_BHE_property; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/CreateLocalAssemblers.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/CreateLocalAssemblers.h new file mode 100644 index 0000000000000000000000000000000000000000..93ac0d5ce23b7b5fc1e4dee5f787e36fcd1447b9 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/CreateLocalAssemblers.h @@ -0,0 +1,84 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#pragma once + +#include <vector> + +#include <logog/include/logog.hpp> + +#include "LocalDataInitializer.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" +#include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +namespace detail +{ +template <template <typename, typename> class LocalAssemblerSoilImplementation, + template <typename, typename, typename> + class LocalAssemblerBHEImplementation, + typename LocalAssemblerInterface, typename... ExtraCtorArgs> +void createLocalAssemblers( + NumLib::LocalToGlobalIndexMap const& dof_table, + std::vector<MeshLib::Element*> const& mesh_elements, + std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers, + std::unordered_map<std::size_t, BHE::BHETypes*> const& element_to_bhe_map, + ExtraCtorArgs&&... extra_ctor_args) +{ + // Shape matrices initializer + using LocalDataInitializer = + LocalDataInitializer<LocalAssemblerInterface, + LocalAssemblerSoilImplementation, + LocalAssemblerBHEImplementation, ExtraCtorArgs...>; + + DBUG("Create local assemblers for the HeatTransportBHE process."); + // Populate the vector of local assemblers. + local_assemblers.resize(mesh_elements.size()); + + LocalDataInitializer initializer(dof_table); + + DBUG("Calling local assembler builder for all mesh elements."); + GlobalExecutor::transformDereferenced( + initializer, mesh_elements, local_assemblers, element_to_bhe_map, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); +} +} // namespace detail + +/*! Creates local assemblers for each element of the given \c mesh. + * + * \tparam LocalAssemblerImplementation the individual local assembler type + * \tparam LocalAssemblerInterface the general local assembler interface + * \tparam ExtraCtorArgs types of additional constructor arguments. + * Those arguments will be passed to the constructor of + * \c LocalAssemblerImplementation. + * + * The first two template parameters cannot be deduced from the arguments. + * Therefore they always have to be provided manually. + */ +template <template <typename, typename> class LocalAssemblerSoilImplementation, + template <typename, typename, typename> + class LocalAssemblerBHEImplementation, + typename LocalAssemblerInterface, typename... ExtraCtorArgs> +void createLocalAssemblers( + std::vector<MeshLib::Element*> const& mesh_elements, + NumLib::LocalToGlobalIndexMap const& dof_table, + std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers, + ExtraCtorArgs&&... extra_ctor_args) +{ + DBUG("Create local assemblers for the HeatTransportBHE process."); + + detail::createLocalAssemblers<LocalAssemblerSoilImplementation, + LocalAssemblerBHEImplementation>( + dof_table, mesh_elements, local_assemblers, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); +} +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE-impl.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE-impl.h new file mode 100644 index 0000000000000000000000000000000000000000..dadaaef4337407c5cd4bfe779dad9427605e9a50 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE-impl.h @@ -0,0 +1,199 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "HeatTransportBHELocalAssemblerBHE.h" + +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" +#include "ProcessLib/Utils/InitShapeMatrices.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename ShapeFunction, typename IntegrationMethod, typename BHEType> +HeatTransportBHELocalAssemblerBHE<ShapeFunction, IntegrationMethod, BHEType>:: + HeatTransportBHELocalAssemblerBHE(MeshLib::Element const& e, + BHEType const& bhe, + bool const is_axially_symmetric, + unsigned const integration_order, + HeatTransportBHEProcessData& process_data) + : _process_data(process_data), + _integration_method(integration_order), + _bhe(bhe), + _element_id(e.getID()) +{ + // need to make sure that the BHE elements are one-dimensional + assert(e.getDimension() == 1); + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + _ip_data.reserve(n_integration_points); + _secondary_data.N.resize(n_integration_points); + + auto const shape_matrices = + initShapeMatrices<ShapeFunction, ShapeMatricesType, IntegrationMethod, + 3 /* GlobalDim */>(e, is_axially_symmetric, + _integration_method); + + // ip data initialization + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + auto const& sm = shape_matrices[ip]; + // create the class IntegrationPointDataBHE in place + _ip_data.push_back( + {sm.N, sm.dNdx, + _integration_method.getWeightedPoint(ip).getWeight() * + sm.integralMeasure * sm.detJ}); + + _secondary_data.N[ip] = sm.N; + } + + _R_matrix.setZero(bhe_unknowns_size, bhe_unknowns_size); + _R_pi_s_matrix.setZero(bhe_unknowns_size, temperature_size); + _R_s_matrix.setZero(temperature_size, temperature_size); + // formulate the local BHE R matrix + for (int idx_bhe_unknowns = 0; idx_bhe_unknowns < bhe_unknowns; + idx_bhe_unknowns++) + { + typename ShapeMatricesType::template MatrixType< + single_bhe_unknowns_size, single_bhe_unknowns_size> + matBHE_loc_R = ShapeMatricesType::template MatrixType< + single_bhe_unknowns_size, + single_bhe_unknowns_size>::Zero(single_bhe_unknowns_size, + single_bhe_unknowns_size); + // Loop over Gauss points + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + auto const& N = _ip_data[ip].N; + auto const& w = _ip_data[ip].integration_weight; + + auto const& R = _bhe.thermalResistance(idx_bhe_unknowns); + // calculate mass matrix for current unknown + matBHE_loc_R += N.transpose() * N * (1 / R) * w; + } // end of loop over integration point + + // The following assembly action is according to Diersch (2013) FEFLOW + // book please refer to M.127 and M.128 on page 955 and 956 + _bhe.template assembleRMatrices<ShapeFunction::NPOINTS>( + idx_bhe_unknowns, matBHE_loc_R, _R_matrix, _R_pi_s_matrix, + _R_s_matrix); + } // end of loop over BHE unknowns + + // debugging + // std::string sep = "\n----------------------------------------\n"; + // Eigen::IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]"); + // std::cout << "_R_matrix: \n" << sep; + // std::cout << _R_matrix.format(CleanFmt) << sep; + // std::cout << "_R_s_matrix: \n" << sep; + // std::cout << _R_s_matrix.format(CleanFmt) << sep; + // std::cout << "_R_pi_s_matrix: \n" << sep; + // std::cout << _R_pi_s_matrix.format(CleanFmt) << sep; +} + +template <typename ShapeFunction, typename IntegrationMethod, typename BHEType> +void HeatTransportBHELocalAssemblerBHE<ShapeFunction, IntegrationMethod, + BHEType>:: + 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*/) // local b vector is not touched +{ + auto local_M = MathLib::createZeroedMatrix<BheLocalMatrixType>( + local_M_data, local_matrix_size, local_matrix_size); + auto local_K = MathLib::createZeroedMatrix<BheLocalMatrixType>( + local_K_data, local_matrix_size, local_matrix_size); + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + auto const& pipe_heat_capacities = _bhe.pipeHeatCapacities(); + auto const& pipe_heat_conductions = _bhe.pipeHeatConductions(); + auto const& pipe_advection_vectors = _bhe.pipeAdvectionVectors(); + auto const& cross_section_areas = _bhe.cross_section_areas; + + // the mass and conductance matrix terms + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + auto& ip_data = _ip_data[ip]; + + auto const& w = ip_data.integration_weight; + auto const& N = ip_data.N; + auto const& dNdx = ip_data.dNdx; + + // looping over all unknowns. + for (int idx_bhe_unknowns = 0; idx_bhe_unknowns < bhe_unknowns; + idx_bhe_unknowns++) + { + // get coefficient of mass from corresponding BHE. + auto const& mass_coeff = pipe_heat_capacities[idx_bhe_unknowns]; + auto const& lambda = pipe_heat_conductions[idx_bhe_unknowns]; + auto const& advection_vector = + pipe_advection_vectors[idx_bhe_unknowns]; + auto const& A = cross_section_areas[idx_bhe_unknowns]; + + int const single_bhe_unknowns_index = + bhe_unknowns_index + + single_bhe_unknowns_size * idx_bhe_unknowns; + // local M + local_M + .template block<single_bhe_unknowns_size, + single_bhe_unknowns_size>( + single_bhe_unknowns_index, single_bhe_unknowns_index) + .noalias() += N.transpose() * N * mass_coeff * A * w; + + // local K + // laplace part + local_K + .template block<single_bhe_unknowns_size, + single_bhe_unknowns_size>( + single_bhe_unknowns_index, single_bhe_unknowns_index) + .noalias() += dNdx.transpose() * dNdx * lambda * A * w; + // advection part + local_K + .template block<single_bhe_unknowns_size, + single_bhe_unknowns_size>( + single_bhe_unknowns_index, single_bhe_unknowns_index) + .noalias() += + N.transpose() * advection_vector.transpose() * dNdx * A * w; + } + } + + // add the R matrix to local_K + local_K.template block<bhe_unknowns_size, bhe_unknowns_size>( + bhe_unknowns_index, bhe_unknowns_index) += _R_matrix; + + // add the R_pi_s matrix to local_K + local_K + .template block<bhe_unknowns_size, temperature_size>(bhe_unknowns_index, + temperature_index) + .noalias() += _R_pi_s_matrix; + local_K + .template block<temperature_size, bhe_unknowns_size>(temperature_index, + bhe_unknowns_index) + .noalias() += _R_pi_s_matrix.transpose(); + + // add the R_s matrix to local_K + local_K + .template block<temperature_size, temperature_size>(temperature_index, + temperature_index) + .noalias() += 2.0 * _R_s_matrix; + + // debugging + // std::string sep = + // "\n----------------------------------------\n"; + // Eigen::IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]"); + // std::cout << local_K.format(CleanFmt) << sep; + // std::cout << local_M.format(CleanFmt) << sep; +} + +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE.h new file mode 100644 index 0000000000000000000000000000000000000000..0942665922da9804880207c6190c09f462a1f999 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerBHE.h @@ -0,0 +1,106 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <vector> + +#include "NumLib/Fem/ShapeMatrixPolicy.h" + +#include "ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h" + +#include "HeatTransportBHEProcessAssemblerInterface.h" +#include "IntegrationPointDataBHE.h" +#include "SecondaryData.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename ShapeFunction, typename IntegrationMethod, typename BHEType> +class HeatTransportBHELocalAssemblerBHE + : public HeatTransportBHELocalAssemblerInterface +{ + static constexpr int bhe_unknowns = BHEType::number_of_unknowns; + static constexpr int single_bhe_unknowns_size = ShapeFunction::NPOINTS; + static constexpr int temperature_size = ShapeFunction::NPOINTS; + static constexpr int temperature_index = 0; + static constexpr int bhe_unknowns_size = + single_bhe_unknowns_size * bhe_unknowns; + static constexpr int bhe_unknowns_index = ShapeFunction::NPOINTS; + static constexpr int local_matrix_size = + temperature_size + bhe_unknowns_size; + +public: + using ShapeMatricesType = + ShapeMatrixPolicyType<ShapeFunction, 3 /* GlobalDim */>; + using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices; + // Using dynamic size, because the number of unknowns in the BHE is runtime + // value. + using BheLocalMatrixType = + typename ShapeMatricesType::template MatrixType<local_matrix_size, + local_matrix_size>; + HeatTransportBHELocalAssemblerBHE( + HeatTransportBHELocalAssemblerBHE const&) = delete; + HeatTransportBHELocalAssemblerBHE(HeatTransportBHELocalAssemblerBHE&&) = + delete; + + HeatTransportBHELocalAssemblerBHE( + MeshLib::Element const& e, + BHEType const& bhe, + bool const is_axially_symmetric, + unsigned const integration_order, + HeatTransportBHEProcessData& process_data); + + 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; + + Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix( + const unsigned integration_point) const override + { + auto const& N = _secondary_data.N[integration_point]; + + // assumes N is stored contiguously in memory + return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size()); + } + +private: + HeatTransportBHEProcessData& _process_data; + + std::vector< + IntegrationPointDataBHE<ShapeMatricesType>, + Eigen::aligned_allocator<IntegrationPointDataBHE<ShapeMatricesType>>> + _ip_data; + + IntegrationMethod _integration_method; + + BHEType const& _bhe; + + std::size_t const _element_id; + + SecondaryData<typename ShapeMatrices::ShapeType> _secondary_data; + + typename ShapeMatricesType::template MatrixType<bhe_unknowns_size, + bhe_unknowns_size> + _R_matrix; + + typename ShapeMatricesType::template MatrixType<temperature_size, + temperature_size> + _R_s_matrix; + + typename ShapeMatricesType::template MatrixType<bhe_unknowns_size, + temperature_size> + _R_pi_s_matrix; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib + +#include "HeatTransportBHELocalAssemblerBHE-impl.h" diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil-impl.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil-impl.h new file mode 100644 index 0000000000000000000000000000000000000000..5184ff8db392a58dfa16d91d6cd00538146fe182 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil-impl.h @@ -0,0 +1,128 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <valarray> +#include <vector> + +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" +#include "NumLib/Fem/ShapeMatrixPolicy.h" +#include "ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h" +#include "ProcessLib/Utils/InitShapeMatrices.h" + +#include "HeatTransportBHEProcessAssemblerInterface.h" +#include "SecondaryData.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename ShapeFunction, typename IntegrationMethod> +HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: + HeatTransportBHELocalAssemblerSoil( + MeshLib::Element const& e, + bool const is_axially_symmetric, + unsigned const integration_order, + HeatTransportBHEProcessData& process_data) + : _process_data(process_data), + _integration_method(integration_order), + _element_id(e.getID()) +{ + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + _ip_data.reserve(n_integration_points); + _secondary_data.N.resize(n_integration_points); + + _shape_matrices = initShapeMatrices<ShapeFunction, + ShapeMatricesType, + IntegrationMethod, + 3 /* GlobalDim */>( + e, is_axially_symmetric, _integration_method); + + SpatialPosition x_position; + x_position.setElementID(_element_id); + + // ip data initialization + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + x_position.setIntegrationPoint(ip); + + // create the class IntegrationPointDataBHE in place + auto const& sm = _shape_matrices[ip]; + double const w = _integration_method.getWeightedPoint(ip).getWeight() * + sm.integralMeasure * sm.detJ; + _ip_data.push_back( + {sm.N.transpose() * sm.N * w, sm.dNdx.transpose() * sm.dNdx * w}); + + _secondary_data.N[ip] = sm.N; + } +} + +template <typename ShapeFunction, typename IntegrationMethod> +void HeatTransportBHELocalAssemblerSoil<ShapeFunction, IntegrationMethod>:: + 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*/) +{ + assert(local_x.size() == ShapeFunction::NPOINTS); + (void)local_x; // Avoid unused arg warning. + + auto local_M = MathLib::createZeroedMatrix<NodalMatrixType>( + local_M_data, ShapeFunction::NPOINTS, ShapeFunction::NPOINTS); + auto local_K = MathLib::createZeroedMatrix<NodalMatrixType>( + local_K_data, ShapeFunction::NPOINTS, ShapeFunction::NPOINTS); + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + SpatialPosition pos; + pos.setElementID(_element_id); + + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + pos.setIntegrationPoint(ip); + auto& ip_data = _ip_data[ip]; + auto const& M_ip = ip_data.NTN_product_times_w; + auto const& K_ip = ip_data.dNdxTdNdx_product_times_w; + + // auto const k_f = _process_data.thermal_conductivity_fluid(t, pos)[0]; + // auto const k_g = _process_data.thermal_conductivity_gas(t, pos)[0]; + auto const k_s = _process_data.thermal_conductivity_solid(t, pos)[0]; + + // auto const heat_capacity_f = _process_data.heat_capacity_fluid(t, + // pos)[0]; auto const heat_capacity_g = + // _process_data.heat_capacity_gas(t, pos)[0]; + auto const heat_capacity_s = + _process_data.heat_capacity_solid(t, pos)[0]; + + // auto const density_f = _process_data.density_fluid(t, pos)[0]; + // auto const density_g = _process_data.density_gas(t, pos)[0]; + auto const density_s = _process_data.density_solid(t, pos)[0]; + + // for now only using the solid phase parameters + + // assemble Conductance matrix + local_K.noalias() += K_ip * k_s; + + // assemble Mass matrix + local_M.noalias() += M_ip * density_s * heat_capacity_s; + } + + // debugging + // std::string sep = "\n----------------------------------------\n"; + // Eigen::IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]"); + // std::cout << local_K.format(CleanFmt) << sep; + // std::cout << local_M.format(CleanFmt) << sep; +} +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil.h new file mode 100644 index 0000000000000000000000000000000000000000..74f2d7fe6684d02c7c6ad7af27b44ac2bc519a01 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHELocalAssemblerSoil.h @@ -0,0 +1,85 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <vector> + +#include "NumLib/Fem/ShapeMatrixPolicy.h" +#include "ProcessLib/Deformation/BMatrixPolicy.h" +#include "ProcessLib/Deformation/LinearBMatrix.h" +#include "ProcessLib/Utils/InitShapeMatrices.h" + +#include "ProcessLib/HeatTransportBHE/HeatTransportBHEProcessData.h" + +#include "HeatTransportBHEProcessAssemblerInterface.h" +#include "IntegrationPointDataSoil.h" +#include "SecondaryData.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename ShapeFunction, typename IntegrationMethod> +class HeatTransportBHELocalAssemblerSoil + : public HeatTransportBHELocalAssemblerInterface +{ +public: + using ShapeMatricesType = + ShapeMatrixPolicyType<ShapeFunction, 3 /* GlobalDim */>; + using NodalMatrixType = typename ShapeMatricesType::NodalMatrixType; + using NodalVectorType = typename ShapeMatricesType::NodalVectorType; + using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices; + + HeatTransportBHELocalAssemblerSoil( + HeatTransportBHELocalAssemblerSoil const&) = delete; + HeatTransportBHELocalAssemblerSoil(HeatTransportBHELocalAssemblerSoil&&) = + delete; + + HeatTransportBHELocalAssemblerSoil( + MeshLib::Element const& e, + bool is_axially_symmetric, + unsigned const integration_order, + HeatTransportBHEProcessData& process_data); + + 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; + + Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix( + const unsigned integration_point) const override + { + auto const& N = _secondary_data.N[integration_point]; + + // assumes N is stored contiguously in memory + return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size()); + } + +private: + HeatTransportBHEProcessData& _process_data; + + std::vector< + IntegrationPointDataSoil<NodalMatrixType>, + Eigen::aligned_allocator<IntegrationPointDataSoil<NodalMatrixType>>> + _ip_data; + + IntegrationMethod const _integration_method; + + std::vector<ShapeMatrices, Eigen::aligned_allocator<ShapeMatrices>> + _shape_matrices; + + std::size_t const _element_id; + + SecondaryData<typename ShapeMatrices::ShapeType> _secondary_data; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib + +#include "HeatTransportBHELocalAssemblerSoil-impl.h" diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHEProcessAssemblerInterface.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHEProcessAssemblerInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..34f0964fd2d11079d3d1ead040a861b1966381eb --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/HeatTransportBHEProcessAssemblerInterface.h @@ -0,0 +1,25 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include "NumLib/Extrapolation/ExtrapolatableElement.h" +#include "ProcessLib/LocalAssemblerInterface.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +class HeatTransportBHELocalAssemblerInterface + : public ProcessLib::LocalAssemblerInterface, + public NumLib::ExtrapolatableElement +{ +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataBHE.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataBHE.h new file mode 100644 index 0000000000000000000000000000000000000000..983abb0f92a115cabeb5aa6fc493b4a57cbe754c --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataBHE.h @@ -0,0 +1,26 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename ShapeMatrixType> +struct IntegrationPointDataBHE final +{ + typename ShapeMatrixType::NodalRowVectorType const N; + typename ShapeMatrixType::GlobalDimNodalMatrixType const dNdx; + double const integration_weight; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataSoil.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataSoil.h new file mode 100644 index 0000000000000000000000000000000000000000..f67e762730d2cf51d8f3e14fdbbb4d37937890e1 --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/IntegrationPointDataSoil.h @@ -0,0 +1,25 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +template <typename NodalMatrixType> +struct IntegrationPointDataSoil final +{ + NodalMatrixType const NTN_product_times_w; + NodalMatrixType const dNdxTdNdx_product_times_w; + + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/LocalDataInitializer.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/LocalDataInitializer.h new file mode 100644 index 0000000000000000000000000000000000000000..9332acf884f89fc7580cdc434ce62b2c0e966fbf --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/LocalDataInitializer.h @@ -0,0 +1,281 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <functional> +#include <memory> +#include <type_traits> +#include <typeindex> +#include <typeinfo> +#include <unordered_map> + +#include "MeshLib/Elements/Elements.h" +#include "NumLib/DOF/LocalToGlobalIndexMap.h" +#include "NumLib/Fem/Integration/GaussLegendreIntegrationPolicy.h" +#include "ProcessLib/HeatTransportBHE/BHE/BHETypes.h" + +#ifndef OGS_MAX_ELEMENT_DIM +static_assert(false, "The macro OGS_MAX_ELEMENT_DIM is undefined."); +#endif + +#ifndef OGS_MAX_ELEMENT_ORDER +static_assert(false, "The macro OGS_MAX_ELEMENT_ORDER is undefined."); +#endif + +// The following macros decide which element types will be compiled, i.e. +// which element types will be available for use in simulations. + +#ifdef OGS_ENABLE_ELEMENT_SIMPLEX +#define ENABLED_ELEMENT_TYPE_SIMPLEX 1u +#else +#define ENABLED_ELEMENT_TYPE_SIMPLEX 0u +#endif + +#ifdef OGS_ENABLE_ELEMENT_CUBOID +#define ENABLED_ELEMENT_TYPE_CUBOID 1u << 1 +#else +#define ENABLED_ELEMENT_TYPE_CUBOID 0u +#endif + +#ifdef OGS_ENABLE_ELEMENT_PRISM +#define ENABLED_ELEMENT_TYPE_PRISM 1u << 2 +#else +#define ENABLED_ELEMENT_TYPE_PRISM 0u +#endif + +#ifdef OGS_ENABLE_ELEMENT_PYRAMID +#define ENABLED_ELEMENT_TYPE_PYRAMID 1u << 3 +#else +#define ENABLED_ELEMENT_TYPE_PYRAMID 0u +#endif + +// Dependent element types. +// All enabled element types +#define OGS_ENABLED_ELEMENTS \ + ((ENABLED_ELEMENT_TYPE_SIMPLEX) | (ENABLED_ELEMENT_TYPE_CUBOID) | \ + (ENABLED_ELEMENT_TYPE_PYRAMID) | (ENABLED_ELEMENT_TYPE_PRISM)) + +// Include only what is needed (Well, the conditions are not sharp). +#if OGS_ENABLED_ELEMENTS != 0 +#include "NumLib/Fem/ShapeFunction/ShapeLine2.h" +#include "NumLib/Fem/ShapeFunction/ShapeLine3.h" +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_SIMPLEX) != 0 +#include "NumLib/Fem/ShapeFunction/ShapeTet10.h" +#include "NumLib/Fem/ShapeFunction/ShapeTet4.h" +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_CUBOID) != 0 +#include "NumLib/Fem/ShapeFunction/ShapeHex20.h" +#include "NumLib/Fem/ShapeFunction/ShapeHex8.h" +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 +#include "NumLib/Fem/ShapeFunction/ShapePrism15.h" +#include "NumLib/Fem/ShapeFunction/ShapePrism6.h" +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 +#include "NumLib/Fem/ShapeFunction/ShapePyra13.h" +#include "NumLib/Fem/ShapeFunction/ShapePyra5.h" +#endif + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +/// The LocalDataInitializer is a functor creating a local assembler data with +/// corresponding to the mesh element type shape functions and calling +/// initialization of the new local assembler data. +/// For example for MeshLib::Quad a local assembler data with template argument +/// NumLib::ShapeQuad4 is created. +template <typename LocalAssemblerInterface, + template <typename, typename> + class LocalAssemblerDataSoil, + template <typename, typename, typename> + class LocalAssemblerDataBHE, + typename... ConstructorArgs> +class LocalDataInitializer final +{ +public: + using LADataIntfPtr = std::unique_ptr<LocalAssemblerInterface>; + + explicit LocalDataInitializer( + NumLib::LocalToGlobalIndexMap const& dof_table) + : _dof_table(dof_table) + { + // REMARKS: At the moment, only a 3D mesh (soil) with 1D elements (BHE) + // are supported. +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_CUBOID) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 + _builder[std::type_index(typeid(MeshLib::Hex))] = + makeLocalAssemblerBuilder<NumLib::ShapeHex8>(); +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_CUBOID) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 + _builder[std::type_index(typeid(MeshLib::Hex20))] = + makeLocalAssemblerBuilder<NumLib::ShapeHex20>(); +#endif + + // /// Simplices //////////////////////////////////////////////// +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_SIMPLEX) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 + _builder[std::type_index(typeid(MeshLib::Tet))] = + makeLocalAssemblerBuilder<NumLib::ShapeTet4>(); +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_SIMPLEX) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 + _builder[std::type_index(typeid(MeshLib::Tet10))] = + makeLocalAssemblerBuilder<NumLib::ShapeTet10>(); +#endif + + // /// Prisms //////////////////////////////////////////////////// + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 + _builder[std::type_index(typeid(MeshLib::Prism))] = + makeLocalAssemblerBuilder<NumLib::ShapePrism6>(); +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PRISM) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 + _builder[std::type_index(typeid(MeshLib::Prism15))] = + makeLocalAssemblerBuilder<NumLib::ShapePrism15>(); +#endif + + // /// Pyramids ////////////////////////////////////////////////// + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 1 + _builder[std::type_index(typeid(MeshLib::Pyramid))] = + makeLocalAssemblerBuilder<NumLib::ShapePyra5>(); +#endif + +#if (OGS_ENABLED_ELEMENTS & ENABLED_ELEMENT_TYPE_PYRAMID) != 0 && \ + OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 + _builder[std::type_index(typeid(MeshLib::Pyramid13))] = + makeLocalAssemblerBuilder<NumLib::ShapePyra13>(); +#endif + // /// Lines /////////////////////////////////// + +#if OGS_MAX_ELEMENT_DIM >= 2 && OGS_MAX_ELEMENT_ORDER >= 1 + _builder[std::type_index(typeid(MeshLib::Line))] = + makeLocalAssemblerBuilderBHE<NumLib::ShapeLine2>(); +#endif + +#if OGS_MAX_ELEMENT_DIM >= 3 && OGS_MAX_ELEMENT_ORDER >= 2 + _builder[std::type_index(typeid(MeshLib::Line3))] = + makeLocalAssemblerBuilderBHE<NumLib::ShapeLine3>(); +#endif + } + + /// Sets the provided \c data_ptr to the newly created local assembler data. + /// + /// \attention + /// The index \c id is not necessarily the mesh item's id. Especially when + /// having multiple meshes it will differ from the latter. + void operator()(std::size_t const /*id*/, + MeshLib::Element const& mesh_item, + LADataIntfPtr& data_ptr, + std::unordered_map<std::size_t, BHE::BHETypes*> const& + element_to_bhe_map, + ConstructorArgs&&... args) const + { + auto const type_idx = std::type_index(typeid(mesh_item)); + auto const it = _builder.find(type_idx); + + if (it == _builder.end()) + { + OGS_FATAL( + "You are trying to build a local assembler for an unknown mesh " + "element type (%s)." + " Maybe you have disabled this mesh element type in your build " + "configuration or this process requires higher order elements.", + type_idx.name()); + } + + data_ptr = it->second(mesh_item, + element_to_bhe_map, + std::forward<ConstructorArgs>(args)...); + } + +private: + using LADataBuilder = std::function<LADataIntfPtr( + MeshLib::Element const& e, + std::unordered_map<std::size_t, BHE::BHETypes*> const& + element_to_bhe_map, + ConstructorArgs&&...)>; + + template <typename ShapeFunction> + using IntegrationMethod = typename NumLib::GaussLegendreIntegrationPolicy< + typename ShapeFunction::MeshElement>::IntegrationMethod; + + // local assembler builder implementations. + template <typename ShapeFunction> + using LADataSoil = + LocalAssemblerDataSoil<ShapeFunction, IntegrationMethod<ShapeFunction>>; + + template <typename ShapeFunction> + static LADataBuilder makeLocalAssemblerBuilder() + { + return [](MeshLib::Element const& e, + std::unordered_map<std::size_t, BHE::BHETypes*> const& + /* unused */, + ConstructorArgs&&... args) -> LADataIntfPtr { + if (e.getDimension() == 3) // soil elements + { + return LADataIntfPtr{new LADataSoil<ShapeFunction>{ + e, std::forward<ConstructorArgs>(args)...}}; + } + + return nullptr; + }; + } + + template <typename ShapeFunction, typename BHEType> + using LADataBHE = LocalAssemblerDataBHE<ShapeFunction, + IntegrationMethod<ShapeFunction>, + BHEType>; + template <typename ShapeFunction> + static LADataBuilder makeLocalAssemblerBuilderBHE() + { + return [](MeshLib::Element const& e, + std::unordered_map<std::size_t, BHE::BHETypes*> const& + element_to_bhe_map, + ConstructorArgs&&... args) -> LADataIntfPtr { + auto& bhe = *element_to_bhe_map.at(e.getID()); + + if (bhe.type() == typeid(BHE::BHE_1U)) + { + return LADataIntfPtr{new LADataBHE<ShapeFunction, BHE::BHE_1U>{ + e, boost::get<BHE::BHE_1U>(bhe), + std::forward<ConstructorArgs>(args)...}}; + } + OGS_FATAL( + "Trying to create local assembler for an unknown BHE type."); + }; + } + + /// Mapping of element types to local assembler constructors. + std::unordered_map<std::type_index, LADataBuilder> _builder; + + NumLib::LocalToGlobalIndexMap const& _dof_table; +}; // namespace HeatTransportBHE +} // namespace HeatTransportBHE +} // namespace ProcessLib + +#undef ENABLED_ELEMENT_TYPE_SIMPLEX +#undef ENABLED_ELEMENT_TYPE_CUBOID +#undef ENABLED_ELEMENT_TYPE_PYRAMID +#undef ENABLED_ELEMENT_TYPE_PRISM +#undef OGS_ENABLED_ELEMENTS diff --git a/ProcessLib/HeatTransportBHE/LocalAssemblers/SecondaryData.h b/ProcessLib/HeatTransportBHE/LocalAssemblers/SecondaryData.h new file mode 100644 index 0000000000000000000000000000000000000000..19f87a2c59b541f48ef1fcf4dce81f1c4a9efa4b --- /dev/null +++ b/ProcessLib/HeatTransportBHE/LocalAssemblers/SecondaryData.h @@ -0,0 +1,30 @@ +/** + * \copyright + * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <vector> + +#include <Eigen/Eigen> + +#include "NumLib/Fem/CoordinatesMapping/ShapeMatrices.h" + +namespace ProcessLib +{ +namespace HeatTransportBHE +{ +/// Used for extrapolation of the integration point values. It is ordered +/// (and stored) by integration points. +template <typename ShapeMatrixType> +struct SecondaryData +{ + std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>> N; +}; +} // namespace HeatTransportBHE +} // namespace ProcessLib diff --git a/ProcessLib/HeatTransportBHE/Tests.cmake b/ProcessLib/HeatTransportBHE/Tests.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4f2bba15e8bd9944ecfb172c9002357e6dbb744f --- /dev/null +++ b/ProcessLib/HeatTransportBHE/Tests.cmake @@ -0,0 +1,25 @@ +AddTest( + NAME HeatTransportBHE_1U_3D_beier_sandbox + PATH Parabolic/T/3D_Beier_sandbox + EXECUTABLE ogs + EXECUTABLE_ARGS beier_sandbox.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + DIFF_DATA + beier_sandbox_pcs_0_ts_10_t_600.000000.vtu beier_sandbox_pcs_0_ts_10_t_600.000000.vtu temperature_BHE1 temperature_BHE1 0 5e-15 + beier_sandbox_pcs_0_ts_10_t_600.000000.vtu beier_sandbox_pcs_0_ts_10_t_600.000000.vtu temperature_soil temperature_soil 0 1e-13 +) + +AddTest( + NAME HeatTransportBHE_1U_beier_sandbox_fixed_power_constant_flow + PATH Parabolic/T/3D_Beier_sandbox + EXECUTABLE ogs + EXECUTABLE_ARGS fixed_power_constant_flow.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + DIFF_DATA + fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu temperature_BHE1 temperature_BHE1 0 5e-15 + fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu temperature_soil temperature_soil 0 1e-13 +) diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 7de13ac539e0e963233b792c17a05de37ee0b7b5..9e33322967d23bbf16f8f66a7035e03a8daf99bb 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -290,11 +290,13 @@ private: std::vector<std::vector<std::reference_wrapper<ProcessVariable>>> _process_variables; +protected: /// Vector for boundary conditions. For the monolithic scheme or a /// single process, the size of the vector is one. For the staggered /// scheme, the size of vector is the number of the coupled processes. std::vector<BoundaryConditionCollection> _boundary_conditions; +private: /// Vector for nodal source term collections. For the monolithic scheme /// or a single process, the size of the vector is one. For the staggered /// scheme, the size of vector is the number of the coupled processes. diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.gml b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.gml new file mode 100644 index 0000000000000000000000000000000000000000..2a12286f6b134f088856845b213a0a1a77c5c28f --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.gml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e76e63a340a50d4e810928dcdaf27c22fca04d66546daf864a76d3026bb61bdd +size 648 diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.prj b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.prj new file mode 100644 index 0000000000000000000000000000000000000000..6c9750cfe94b23d331bb7a762a32ec244c9464b1 --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.prj @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <mesh>beier_sandbox.vtu</mesh> + <geometry>beier_sandbox.gml</geometry> + + <processes> + <process> + <name>HeatTransportBHE</name> + <type>HEAT_TRANSPORT_BHE</type> + <integration_order>2</integration_order> + <process_variables> + <process_variable>temperature_soil</process_variable> + <process_variable>temperature_BHE1</process_variable> + </process_variables> + + <thermal_conductivity_solid>K_s</thermal_conductivity_solid> + <heat_capacity_solid>Cp_s</heat_capacity_solid> + <density_solid>rho_s</density_solid> + + <thermal_conductivity_fluid>K_f</thermal_conductivity_fluid> + <heat_capacity_fluid>Cp_f</heat_capacity_fluid> + <density_fluid>rho_f</density_fluid> + + <thermal_conductivity_gas>K_g</thermal_conductivity_gas> + <heat_capacity_gas>Cp_g</heat_capacity_gas> + <density_gas>rho_g</density_gas> + + <borehole_heat_exchangers> + <borehole_heat_exchanger> + <type>1U</type> + <flow_and_temperature_control> + <type>TemperatureCurveConstantFlow</type> + <flow_rate>2.0e-4</flow_rate> + <temperature_curve>inflow_temperature</temperature_curve> + </flow_and_temperature_control> + <borehole> + <length>18.0</length> + <diameter>0.13</diameter> + </borehole> + <grout> + <density>2190.0</density> + <porosity>0.0</porosity> + <heat_capacity>1735.160</heat_capacity> + <thermal_conductivity>0.806</thermal_conductivity> + </grout> + <pipes> + <inlet> + <radius> 0.013665</radius> + <wall_thickness>0.003035</wall_thickness> + <wall_thermal_conductivity>0.39</wall_thermal_conductivity> + </inlet> + <outlet> + <radius>0.013665</radius> + <wall_thickness>0.003035</wall_thickness> + <wall_thermal_conductivity>0.39</wall_thermal_conductivity> + </outlet> + <distance_between_pipes>0.053</distance_between_pipes> + <longitudinal_dispersion_length>0.001</longitudinal_dispersion_length> + </pipes> + <refrigerant> + <density>992.92</density> + <viscosity>0.00067418</viscosity> + <specific_heat_capacity>4068</specific_heat_capacity> + <thermal_conductivity>0.62863</thermal_conductivity> + <reference_temperature>298.15</reference_temperature> + </refrigerant> + </borehole_heat_exchanger> + </borehole_heat_exchangers> + + <secondary_variables> + <secondary_variable type="static" internal_name="heat_flux_x" output_name="heat_flux_x" /> + <secondary_variable type="static" internal_name="heat_flux_y" output_name="heat_flux_y" /> + <secondary_variable type="static" internal_name="heat_flux_z" output_name="heat_flux_z" /> + </secondary_variables> + </process> + </processes> + + <time_loop> + <processes> + <process ref="HeatTransportBHE"> + <nonlinear_solver>basic_picard</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <reltol>1e-10</reltol> + </convergence_criterion> + <time_discretization><type>BackwardEuler</type></time_discretization> + <output> + <variables> + <variable>temperature_soil</variable> + <variable>temperature_BHE1</variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <!-- use the following for full simulation + <t_end> 186420 </t_end> + --> + <t_end> 600 </t_end> + <timesteps> + <!-- use the following for full simulation + <pair><repeat>3107</repeat><delta_t>60</delta_t></pair> + --> + <pair><repeat>10</repeat><delta_t>60</delta_t></pair> + </timesteps> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>beier_sandbox</prefix> + <timesteps> + <!-- use the following for full simulation + <pair><repeat> 10</repeat><each_steps> 1 </each_steps></pair> + <pair><repeat> 310</repeat><each_steps> 10 </each_steps></pair> + --> + <pair><repeat> 1</repeat><each_steps> 10 </each_steps></pair> + </timesteps> + </output> + </time_loop> + + <parameters> + <parameter> + <name>K_s</name> + <type>Constant</type> + <value>2.78018</value> + </parameter> + <parameter> + <name>Cp_s</name> + <type>Constant</type> + <value>1778</value> + </parameter> + <parameter> + <name>rho_s</name> + <type>Constant</type> + <value>1800</value> + </parameter> + <parameter> + <name>K_f</name> + <type>Constant</type> + <value>0.1</value> + </parameter> + <parameter> + <name>Cp_f</name> + <type>Constant</type> + <value>4068</value> + </parameter> + <parameter> + <name>rho_f</name> + <type>Constant</type> + <value>992.92</value> + </parameter> + <parameter> + <name>K_g</name> + <type>Constant</type> + <value>3.2</value> + </parameter> + <parameter> + <name>Cp_g</name> + <type>Constant</type> + <value>1000</value> + </parameter> + <parameter> + <name>rho_g</name> + <type>Constant</type> + <value>2500</value> + </parameter> + <parameter> + <name>T0</name> + <type>Constant</type> + <value>295.175</value> + </parameter> + <parameter> + <name>T0_BHE1</name> + <type>Constant</type> + <values>295.36 295.13 295.23 295.115</values> + </parameter> + </parameters> + + <process_variables> + <process_variable> + <name>temperature_soil</name> + <components>1</components> + <order>1</order> + <initial_condition>T0</initial_condition> + <boundary_conditions> + </boundary_conditions> + </process_variable> + <process_variable> + <name>temperature_BHE1</name> + <components>4</components> + <order>1</order> + <initial_condition>T0_BHE1</initial_condition> + </process_variable> + </process_variables> + + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>100</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis> + <eigen> + <solver_type>BiCGSTAB</solver_type> + <precon_type>ILUT</precon_type> + <max_iteration_step>1000</max_iteration_step> + <error_tolerance>1e-16</error_tolerance> + </eigen> + <petsc> + <prefix>gw</prefix> + <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> + <curves> + <curve> + <name>inflow_temperature</name> + <coords>0 60 120 180 240 300 360 420 480 540 600 660 720 780 840 900 960 1020 1080 1140 1200 1260 1320 1380 1440 1500 1560 1620 1680 1740 1800 1860 1920 1980 2040 2100 2160 2220 2280 2340 2400 2460 2520 2580 2640 2700 2760 2820 2880 2940 3000 3060 3120 3180 3240 3300 3360 3420 3480 3540 3600 3660 3720 3780 3840 3900 3960 4020 4080 4140 4200 4260 4320 4380 4440 4500 4560 4620 4680 4740 4800 4860 4920 4980 5040 5100 5160 5220 5280 5340 5400 5460 5520 5580 5640 5700 5760 5820 5880 5940 6000 6060 6120 6180 6240 6300 6360 6420 6480 6540 6600 6660 6720 6780 6840 6900 6960 7020 7080 7140 7200 7260 7320 7380 7440 7500 7560 7620 7680 7740 7800 7860 7920 7980 8040 8100 8160 8220 8280 8340 8400 8460 8520 8580 8640 8700 8760 8820 8880 8940 9000 9060 9120 9180 9240 9300 9360 9420 9480 9540 9600 9660 9720 9780 9840 9900 9960 10020 10080 10140 10200 10260 10320 10380 10440 10500 10560 10620 10680 10740 10800 10860 10920 10980 11040 11100 11160 11220 11280 11340 11400 11460 11520 11580 11640 11700 11760 11820 11880 11940 12000 12060 12120 12180 12240 12300 12360 12420 12480 12540 12600 12660 12720 12780 12840 12900 12960 13020 13080 13140 13200 13260 13320 13380 13440 13500 13560 13620 13680 13740 13800 13860 13920 13980 14040 14100 14160 14220 14280 14340 14400 14460 14520 14580 14640 14700 14760 14820 14880 14940 15000 15060 15120 15180 15240 15300 15360 15420 15480 15540 15600 15660 15720 15780 15840 15900 15960 16020 16080 16140 16200 16260 16320 16380 16440 16500 16560 16620 16740 16800 16860 16920 16980 17040 17100 17160 17220 17280 17340 17400 17460 17520 17580 17640 17700 17760 17820 17880 17940 18000 18060 18120 18180 18240 18300 18360 18420 18480 18540 18600 18660 18720 18780 18840 18900 18960 19020 19080 19140 19200 19260 19320 19380 19440 19500 19560 19620 19680 19740 19800 19860 19920 20040 20160 20220 20280 20340 20400 20460 20520 20580 20640 20700 20760 20820 20880 20940 21000 21060 21120 21180 21240 21300 21360 21420 21480 21540 21600 21660 21720 21780 21900 21960 22080 22140 22200 22260 22320 22380 22440 22500 22560 22680 22800 22860 22920 22980 23040 23100 23160 23220 23280 23340 23400 23460 23520 23580 23700 23760 23820 23880 23940 24000 24060 24120 24180 24240 24300 24420 24480 24600 24660 24720 24780 24840 24900 24960 25020 25080 25140 25200 25260 25320 25380 25440 25560 25620 25680 25740 25800 25860 25920 25980 26040 26160 26220 26280 26400 26460 26520 26580 26700 26760 26820 26880 26940 27000 27060 27120 27180 27240 27300 27360 27420 27480 27540 27600 27660 27720 27780 27840 27900 27960 28020 28080 28140 28200 28260 28320 28380 28440 28500 28680 28740 28800 28860 28920 28980 29040 29100 29160 29220 29280 29340 29400 29460 29520 29580 29640 29700 29760 29820 29880 30000 30060 30180 30240 30300 30420 30480 30540 30660 30780 30900 30960 31020 31080 31140 31200 31260 31320 31380 31440 31500 31560 31620 31680 31740 31800 31860 31980 32040 32100 32160 32220 32280 32340 32400 32460 32580 32700 32760 32820 32940 33000 33060 33120 33180 33240 33300 33420 33480 33540 33600 33660 33720 33780 33900 33960 34020 34080 34140 34200 34260 34320 34380 34500 34560 34620 34680 34740 34860 34920 34980 35040 35100 35160 35220 35280 35340 35400 35460 35520 35580 35640 35700 35760 35820 35880 35940 36000 36060 36120 36180 36240 36300 36360 36420 36480 36540 36600 36660 36720 36780 36840 36900 37020 37080 37140 37200 37260 37320 37440 37500 37620 37680 37800 37860 37980 38040 38160 38280 38340 38460 38520 38580 38640 38700 38760 38820 38940 39000 39060 39240 39300 39360 39540 39660 39720 39780 39840 39900 39960 40020 40080 40140 40200 40260 40380 40440 40560 40620 40680 40860 40920 41100 41160 41280 41340 41520 41580 41640 41700 41760 41820 41880 41940 42000 42060 42120 42240 42300 42360 42480 42540 42660 42780 42840 42900 42960 43020 43080 43140 43200 43260 43380 43440 43620 43680 43740 43800 43860 43920 44040 44100 44160 44400 44460 44520 44580 44640 44700 44760 44820 44880 44940 45000 45060 45120 45180 45240 45300 45360 45420 45480 45540 45600 45660 45720 45780 45900 45960 46020 46080 46140 46200 46260 46320 46380 46440 46560 46620 46680 46740 46800 46920 47040 47100 47160 47220 47280 47340 47400 47460 47520 47580 47640 47700 47760 47820 47880 47940 48060 48120 48240 48300 48420 48480 48540 48600 48660 48720 48780 48840 48900 48960 49020 49080 49140 49200 49260 49320 49380 49440 49500 49560 49740 49800 49860 49920 49980 50040 50100 50160 50220 50400 50520 50580 50640 50880 50940 51060 51120 51180 51240 51300 51360 51420 51480 51540 51600 51660 51780 51840 51900 51960 52020 52140 52260 52320 52380 52500 52560 52620 52680 52740 52800 52860 52920 52980 53040 53100 53160 53220 53280 53340 53400 53460 53580 53640 53700 53760 53820 53880 53940 54000 54060 54120 54240 54420 54480 54540 54600 54660 54720 54780 54900 55080 55140 55200 55320 55500 55560 55620 55680 55860 55980 56100 56160 56280 56400 56460 56520 56580 56640 56760 56820 56880 56940 57000 57120 57180 57240 57300 57360 57420 57480 57540 57600 57720 57780 57840 57900 57960 58080 58140 58260 58320 58380 58440 58560 58620 58680 58740 58800 58920 58980 59040 59100 59160 59220 59280 59340 59400 59460 59520 59580 59640 59700 59760 59880 60000 60120 60180 60240 60300 60360 60420 60480 60540 60600 60660 60720 60780 60900 60960 61080 61260 61380 61560 61620 61680 61740 61860 61920 61980 62040 62100 62160 62280 62340 62400 62460 62520 62580 62700 62760 62820 62880 62940 63000 63060 63120 63180 63240 63300 63360 63420 63540 63600 63660 63720 63840 63900 63960 64200 64260 64380 64500 64620 64680 64740 64800 64860 64920 65040 65100 65160 65280 65340 65400 65460 65520 65580 65640 65700 65820 65880 65940 66000 66060 66120 66240 66300 66420 66480 66540 66600 66660 66720 66780 66840 66900 66960 67020 67140 67200 67260 67320 67380 67440 67500 67560 67620 67680 67740 67800 67860 67920 68040 68100 68160 68220 68280 68340 68400 68460 68520 68580 68640 68700 68760 68820 68880 68940 69000 69060 69120 69180 69300 69420 69480 69540 69600 69660 69720 69840 69900 69960 70020 70080 70320 70380 70440 70560 70620 70740 70920 70980 71040 71100 71160 71220 71280 71340 71460 71520 71580 71640 71700 71760 71820 72000 72060 72120 72240 72300 72360 72480 72540 72600 72660 72720 72780 72900 72960 73020 73080 73140 73200 73260 73320 73380 73440 73500 73620 73680 73740 73800 73920 73980 74040 74100 74160 74220 74280 74340 74400 74460 74520 74580 74640 74700 74760 74880 74940 75000 75060 75120 75180 75240 75300 75420 75480 75540 75600 75660 75720 75780 75840 75900 75960 76020 76080 76140 76200 76260 76320 76440 76500 76560 76620 76680 76740 76800 76920 76980 77040 77100 77160 77220 77280 77340 77400 77460 77580 77640 77700 77760 77880 77940 78000 78060 78120 78180 78240 78300 78420 78480 78540 78600 78660 78720 78780 78840 78900 78960 79020 79080 79140 79200 79260 79320 79380 79440 79500 79560 79620 79680 79740 79800 79860 79920 79980 80100 80160 80220 80280 80340 80400 80460 80520 80580 80640 80700 80760 80820 80880 80940 81000 81060 81120 81180 81300 81360 81420 81480 81540 81600 81660 81720 81780 81840 81900 82020 82080 82140 82200 82260 82320 82380 82440 82500 82560 82620 82680 82740 82800 82860 82920 83040 83100 83160 83220 83280 83340 83400 83520 83580 83640 83700 83760 83820 83880 83940 84000 84060 84120 84180 84240 84300 84360 84420 84480 84540 84600 84660 84720 84780 84840 84900 84960 85020 85080 85140 85200 85260 85320 85380 85440 85500 85560 85620 85680 85740 85800 85860 85920 85980 86040 86160 86220 86280 86340 86400 86460 86520 86580 86640 86700 86760 86820 86880 86940 87060 87120 87180 87240 87300 87360 87420 87480 87540 87600 87660 87720 87780 87840 87900 87960 88020 88140 88200 88260 88320 88380 88440 88500 88560 88620 88680 88740 88800 88860 88920 88980 89040 89100 89160 89220 89280 89340 89460 89520 89580 89700 89760 89820 89880 89940 90060 90120 90180 90240 90300 90360 90420 90480 90540 90600 90660 90720 90780 90840 90900 90960 91020 91080 91140 91200 91260 91320 91380 91440 91500 91560 91620 91680 91740 91800 91860 91920 91980 92040 92100 92160 92220 92280 92340 92400 92460 92520 92640 92700 92760 92820 92880 92940 93000 93060 93120 93180 93240 93300 93360 93420 93480 93540 93600 93660 93720 93780 93840 93900 93960 94020 94080 94140 94200 94260 94320 94380 94440 94500 94560 94620 94740 94800 94860 94920 94980 95040 95100 95160 95220 95280 95340 95400 95460 95520 95580 95640 95700 95760 95820 95940 96000 96060 96120 96180 96240 96300 96360 96420 96480 96540 96600 96660 96720 96780 96840 96900 96960 97020 97080 97140 97200 97260 97320 97380 97440 97500 97560 97620 97680 97740 97800 97860 97920 97980 98040 98100 98160 98220 98280 98340 98400 98460 98520 98580 98640 98700 98760 98820 98880 98940 99000 99060 99120 99240 99360 99420 99480 99540 99600 99660 99720 99780 99840 99900 99960 100020 100080 100140 100200 100260 100320 100380 100440 100500 100560 100620 100680 100740 100800 100860 100920 100980 101040 101100 101160 101220 101280 101340 101400 101460 101520 101580 101640 101700 101760 101820 101880 101940 102000 102060 102120 102180 102240 102300 102420 102480 102540 102600 102660 102720 102780 102840 102900 102960 103020 103080 103140 103200 103260 103320 103380 103440 103500 103560 103620 103680 103740 103800 103860 103920 103980 104100 104160 104220 104280 104340 104400 104460 104520 104580 104640 104700 104760 104820 104880 104940 105000 105060 105120 105180 105240 105300 105360 105420 105480 105540 105600 105660 105720 105780 105840 105900 105960 106020 106080 106140 106200 106260 106320 106380 106440 106500 106560 106620 106680 106800 106860 106920 106980 107040 107100 107160 107220 107400 107460 107520 107580 107640 107760 107940 108000 108060 108120 108180 108240 108300 108360 108420 108480 108540 108600 108660 108720 108840 108900 108960 109020 109080 109140 109200 109260 109320 109500 109560 109620 109680 109740 109800 109860 109920 109980 110040 110100 110160 110220 110280 110340 110400 110460 110520 110640 110700 110760 110880 110940 111000 111060 111120 111180 111300 111360 111420 111480 111540 111600 111660 111720 111780 111840 111900 111960 112020 112080 112140 112200 112260 112320 112380 112440 112500 112560 112620 112680 112740 112800 112860 112920 112980 113040 113160 113220 113280 113340 113400 113460 113520 113580 113640 113700 113760 113820 113880 113940 114000 114120 114240 114300 114360 114420 114540 114600 114660 114720 114840 114960 115020 115080 115140 115260 115320 115380 115440 115500 115560 115620 115680 115740 115800 115860 115920 115980 116040 116100 116160 116220 116280 116340 116400 116460 116520 116580 116760 116820 116880 116940 117000 117060 117120 117180 117240 117300 117360 117420 117480 117540 117600 117660 117720 117780 117840 117900 117960 118020 118080 118140 118200 118260 118320 118380 118440 118500 118560 118620 118680 118740 118800 118860 118980 119100 119160 119280 119340 119400 119460 119520 119640 119760 119820 119880 119940 120000 120120 120180 120240 120300 120360 120420 120480 120540 120600 120660 120780 120840 120900 120960 121020 121080 121140 121200 121260 121380 121440 121500 121560 121620 121680 121740 121980 122040 122100 122160 122220 122280 122340 122400 122460 122520 122580 122640 122760 122880 122940 123000 123060 123120 123180 123240 123300 123360 123420 123480 123540 123600 123660 123720 123780 123840 123960 124020 124080 124140 124200 124260 124320 124380 124440 124500 124680 124740 124860 124920 124980 125040 125160 125220 125280 125340 125400 125460 125520 125580 125640 125700 125760 125820 125880 125940 126000 126060 126120 126180 126240 126300 126360 126420 126480 126540 126600 126660 126780 126840 126900 126960 127020 127080 127140 127200 127260 127320 127380 127440 127500 127560 127620 127800 127920 127980 128040 128100 128160 128220 128280 128340 128400 128460 128520 128580 128640 128700 128820 128880 128940 129000 129060 129120 129180 129240 129300 129360 129480 129540 129600 129780 129900 129960 130020 130140 130200 130260 130320 130380 130440 130620 130740 130800 130860 130980 131040 131100 131160 131220 131340 131400 131460 131520 131580 131640 131700 131760 131820 131880 132000 132060 132120 132240 132300 132480 132540 132600 132660 132720 132780 132840 132960 133020 133080 133140 133200 133260 133320 133380 133440 133500 133560 133620 133680 133740 133800 133860 133920 133980 134040 134100 134160 134220 134280 134340 134400 134460 134520 134580 134640 134700 134760 134880 134940 135000 135060 135120 135180 135240 135300 135360 135420 135480 135540 135720 135780 135840 135900 135960 136020 136080 136140 136200 136260 136320 136440 136500 136560 136620 136680 136740 136800 136920 137040 137100 137160 137220 137280 137340 137400 137460 137520 137580 137640 137700 137760 137820 137880 137940 138000 138060 138120 138180 138240 138300 138360 138420 138480 138540 138600 138720 138780 138840 138900 138960 139020 139080 139140 139200 139260 139320 139500 139620 139680 139740 139800 139860 139920 139980 140040 140100 140160 140220 140280 140340 140400 140460 140520 140580 140640 140700 140760 140820 140880 140940 141000 141060 141120 141180 141240 141300 141360 141420 141480 141540 141600 141660 141720 141780 141840 141900 141960 142020 142080 142140 142200 142260 142320 142380 142440 142500 142560 142620 142680 142800 142860 142920 142980 143040 143100 143220 143280 143340 143520 143580 143640 143700 143760 143820 143880 143940 144000 144060 144120 144180 144240 144360 144420 144480 144540 144600 144660 144720 144780 144840 144900 144960 145020 145080 145140 145200 145260 145320 145440 145560 145620 145680 145740 145800 145860 145920 145980 146040 146100 146160 146280 146340 146400 146460 146520 146580 146640 146700 146760 146820 146880 147000 147060 147120 147180 147240 147300 147360 147420 147480 147540 147660 147720 147780 147840 147900 147960 148020 148080 148140 148200 148260 148320 148380 148440 148500 148620 148680 148740 148800 148860 148920 148980 149040 149100 149160 149220 149280 149340 149400 149460 149520 149580 149640 149700 149760 149820 149880 149940 150000 150060 150120 150180 150240 150300 150360 150420 150480 150600 150660 150720 150780 150840 150900 150960 151020 151080 151140 151200 151260 151320 151380 151440 151500 151560 151620 151680 151740 151800 151860 151920 152040 152100 152160 152220 152340 152460 152520 152580 152640 152700 152760 152880 152940 153000 153060 153120 153180 153240 153300 153360 153420 153480 153540 153600 153660 153780 153840 153900 154020 154080 154140 154200 154260 154320 154380 154440 154500 154560 154620 154680 154740 154800 154860 154920 154980 155040 155100 155160 155220 155280 155340 155400 155460 155520 155580 155640 155700 155820 155880 156000 156060 156120 156180 156240 156300 156360 156420 156480 156540 156600 156660 156720 156780 156840 156900 156960 157020 157080 157140 157200 157260 157320 157380 157440 157500 157560 157620 157680 157740 157800 157860 157920 157980 158040 158100 158160 158280 158340 158400 158460 158520 158640 158700 158760 158820 158880 158940 159000 159060 159120 159180 159240 159300 159360 159420 159480 159540 159600 159660 159720 159780 159840 159900 159960 160020 160080 160140 160200 160260 160320 160380 160440 160500 160560 160620 160680 160740 160800 160860 160920 160980 161040 161100 161160 161220 161280 161340 161400 161460 161580 161640 161700 161760 161820 161880 161940 162000 162060 162120 162180 162240 162300 162360 162420 162480 162540 162600 162660 162720 162780 162840 162900 162960 163020 163080 163140 163200 163260 163320 163380 163440 163500 163560 163620 163680 163740 163800 163860 163920 163980 164040 164100 164160 164220 164280 164340 164400 164460 164520 164580 164640 164700 164760 164820 164880 164940 165000 165060 165120 165180 165240 165300 165360 165420 165480 165540 165600 165660 165720 165780 165840 165900 165960 166020 166080 166140 166200 166260 166320 166380 166440 166500 166560 166620 166680 166740 166800 166860 166920 166980 167040 167100 167160 167220 167280 167340 167400 167460 167520 167580 167640 167700 167760 167820 167880 167940 168000 168060 168120 168180 168240 168300 168360 168420 168480 168540 168600 168660 168720 168780 168840 168900 168960 169020 169080 169140 169200 169260 169320 169380 169440 169500 169560 169620 169680 169740 169800 169860 169920 169980 170040 170100 170160 170220 170280 170340 170400 170460 170520 170580 170640 170700 170760 170820 170940 171000 171060 171120 171180 171240 171300 171360 171420 171480 171540 171600 171660 171720 171840 171900 171960 172020 172140 172200 172260 172320 172380 172440 172500 172560 172620 172680 172740 172860 172920 172980 173040 173100 173160 173220 173280 173340 173400 173460 173520 173580 173640 173700 173760 173820 173880 173940 174000 174060 174120 174180 174240 174300 174360 174420 174480 174540 174600 174660 174720 174780 174840 174900 174960 175020 175080 175140 175200 175260 175320 175380 175440 175500 175560 175620 175680 175740 175800 175860 175920 175980 176040 176100 176160 176220 176280 176340 176400 176460 176520 176580 176640 176700 176760 176820 176880 176940 177060 177120 177180 177240 177300 177360 177420 177480 177540 177600 177660 177720 177780 177840 177900 177960 178020 178080 178140 178200 178260 178320 178380 178440 178500 178560 178620 178680 178740 178800 178860 178920 178980 179040 179100 179160 179220 179280 179340 179400 179460 179520 179580 179640 179700 179760 179820 179880 179940 180000 180060 180120 180180 180240 180300 180360 180420 180480 180540 180600 180660 180720 180780 180840 180900 180960 181020 181080 181140 181200 181260 181320 181380 181440 181500 181560 181620 181680 181740 181800 181860 181920 181980 182040 182100 182160 182220 182280 182340 182400 182460 182520 182580 182640 182700 182760 182820 182880 182940 183000 183060 183120 183180 183240 183300 183360 183420 183480 183540 183600 183660 183720 183780 183840 183900 183960 184020 184080 184140 184200 184260 184320 184380 184440 184500 184560 184620 184680 184740 184800 184860 184920 184980 185040 185100 185160 185220 185280 185340 185400 185460 185520 185580 185640 185700 185760 185820 185880 185940 186000 186060 186120 186180 186240 186300 186360 + </coords> + <values>295.3611111 296.05 296.6111111 296.8722222 297.3222222 297.4222222 297.8388889 298.0166667 298.2555556 298.5 298.6777778 298.8944444 299.0666667 299.2444444 299.4 299.5611111 299.7166667 299.85 299.9944444 300.1277778 300.2611111 300.3833333 300.4944444 300.6166667 300.7277778 300.8388889 300.9444444 301.0444444 301.1444444 301.2277778 301.3277778 301.4222222 301.5111111 301.5944444 301.8166667 301.8555556 301.9277778 302.0388889 302.0888889 302.1777778 302.2388889 302.2611111 302.4111111 302.4722222 302.5111111 302.6111111 302.6722222 302.7222222 302.8111111 302.8611111 302.9222222 302.9722222 303.0333333 303.0944444 303.1444444 303.2111111 303.2611111 303.3111111 303.3722222 303.4333333 303.4833333 303.5222222 303.5833333 303.6333333 303.6722222 303.7444444 303.7722222 303.8222222 303.85 303.9222222 303.9611111 304.0111111 304.0611111 304.0888889 304.1388889 304.1888889 304.2277778 304.1777778 304.2111111 304.2888889 304.4388889 304.4166667 304.4666667 304.5277778 304.5055556 304.5777778 304.5777778 304.5944444 304.7222222 304.7222222 304.6666667 304.7944444 304.7833333 304.9 304.8444444 304.9222222 305 305.0111111 304.9722222 305 305.05 305.0777778 305.1111111 305.15 305.1666667 305.2166667 305.2277778 305.2666667 305.2944444 305.3444444 305.3555556 305.3944444 305.4222222 305.4333333 305.4722222 305.5111111 305.5333333 305.5611111 305.5722222 305.6 305.6388889 305.6611111 305.6888889 305.7166667 305.7388889 305.7666667 305.7777778 305.8055556 305.8444444 305.8555556 305.8833333 305.9055556 305.9222222 305.9611111 305.9722222 306 306.0111111 306.0388889 306.0777778 306.0888889 306.1 306.1277778 306.1555556 306.1777778 306.1888889 306.2166667 306.2277778 306.2666667 306.2666667 306.2944444 306.3222222 306.3333333 306.3611111 306.3722222 306.4 306.4111111 306.4388889 306.45 306.4777778 306.5 306.5 306.5277778 306.5555556 306.5666667 306.5944444 306.6166667 306.6333333 306.6722222 306.6722222 306.6944444 306.7222222 306.7222222 306.7611111 306.75 306.7722222 306.7888889 306.8 306.8111111 306.8277778 306.85 306.8666667 306.8777778 306.9055556 306.9166667 306.9333333 306.9444444 306.9555556 306.9833333 307.0111111 307.0111111 307.0222222 307.0333333 307.0611111 307.0722222 307.0722222 307.1 307.1 307.1277778 307.1388889 307.1666667 307.15 307.1944444 307.1944444 307.2166667 307.2166667 307.2444444 307.2555556 307.2555556 307.2833333 307.2944444 307.3111111 307.3111111 307.3333333 307.35 307.3611111 307.3777778 307.3888889 307.4 307.4166667 307.4277778 307.4388889 307.4555556 307.4666667 307.4777778 307.4944444 307.5166667 307.5055556 307.5333333 307.5444444 307.5611111 307.5611111 307.5722222 307.6111111 307.6111111 307.6222222 307.6222222 307.6222222 307.6388889 307.6666667 307.6777778 307.6777778 307.6888889 307.7055556 307.7166667 307.7277778 307.7444444 307.7555556 307.7555556 307.7666667 307.7833333 307.7944444 307.8111111 307.8222222 307.8222222 307.8333333 307.85 307.8611111 307.8722222 307.8722222 307.8888889 307.9 307.9166667 307.9277778 307.9166667 307.9388889 307.9388889 307.9555556 307.9666667 307.9666667 307.9777778 307.9944444 308.0055556 308.0222222 308.0333333 308.0333333 308.0611111 308.0611111 308.0611111 308.0833333 308.0833333 308.1111111 308.1111111 308.1111111 308.1277778 308.15 308.15 308.15 308.1666667 308.1666667 308.1777778 308.1944444 308.1944444 308.2055556 308.2166667 308.2333333 308.2333333 308.2444444 308.2555556 308.2722222 308.2722222 308.2722222 308.2833333 308.3 308.3111111 308.3111111 308.3222222 308.3222222 308.3388889 308.35 308.3666667 308.3666667 308.3666667 308.3777778 308.3888889 308.3888889 308.3888889 308.4055556 308.4166667 308.4166667 308.4277778 308.4277778 308.4555556 308.4555556 308.4555556 308.4722222 308.4833333 308.4833333 308.4944444 308.5111111 308.5222222 308.5222222 308.5222222 308.55 308.55 308.5611111 308.5611111 308.5611111 308.5888889 308.5888889 308.6055556 308.5888889 308.6055556 308.6277778 308.6166667 308.6277778 308.6444444 308.6444444 308.6555556 308.6555556 308.6555556 308.6722222 308.6944444 308.6833333 308.6833333 308.6944444 308.7111111 308.7111111 308.7222222 308.7388889 308.7388889 308.7388889 308.75 308.75 308.7777778 308.7777778 308.7888889 308.7888889 308.7888889 308.8055556 308.8166667 308.8055556 308.8277778 308.8277778 308.8555556 308.8555556 308.8722222 308.8833333 308.8722222 308.8722222 308.8944444 308.8944444 308.8944444 308.9111111 308.9111111 308.9222222 308.9222222 308.9388889 308.9388889 308.95 308.9611111 308.9611111 308.9611111 308.9777778 308.9611111 308.9777778 308.9888889 308.9888889 308.9888889 309.0055556 309.0166667 309.0277778 309.0277778 309.0555556 309.0833333 309.0722222 309.1 309.1111111 309.1 309.1111111 309.1222222 309.1222222 309.1222222 309.1222222 309.1388889 309.1388889 309.15 309.15 309.1666667 309.1666667 309.1666667 309.1777778 309.1888889 309.1888889 309.1888889 309.2055556 309.2055556 309.2166667 309.2333333 309.2333333 309.2333333 309.2444444 309.2722222 309.2722222 309.2722222 309.2833333 309.2166667 309.2333333 309.2333333 309.2444444 309.2611111 309.2444444 309.2611111 309.2611111 309.2722222 309.2722222 309.2722222 309.2833333 309.2833333 309.3 309.2833333 309.3 309.3111111 309.3111111 309.3111111 309.3277778 309.3277778 309.3388889 309.3388889 309.3277778 309.35 309.35 309.35 309.3777778 309.3777778 309.3666667 309.3777778 309.3944444 309.3777778 309.3944444 309.3944444 309.4055556 309.4222222 309.4055556 309.4222222 309.4333333 309.4333333 309.4222222 309.4333333 309.4333333 309.4611111 309.4611111 309.4444444 309.4611111 309.4611111 309.4611111 309.4722222 309.4888889 309.4888889 309.4888889 309.5 309.5 309.5277778 309.5166667 309.5388889 309.5277778 309.5388889 309.5388889 309.5388889 309.5555556 309.5555556 309.5555556 309.5666667 309.5833333 309.5666667 309.5666667 309.5666667 309.5944444 309.5833333 309.5944444 309.6111111 309.5944444 309.6111111 309.6111111 309.6222222 309.6111111 309.6333333 309.6333333 309.6222222 309.6222222 309.6333333 309.6333333 309.6333333 309.65 309.6611111 309.65 309.6611111 309.6611111 309.6611111 309.6888889 309.6777778 309.6888889 309.6777778 309.7055556 309.6888889 309.6888889 309.7166667 309.7166667 309.7055556 309.7166667 309.7444444 309.7277778 309.7277778 309.7277778 309.7444444 309.7444444 309.7444444 309.7555556 309.7555556 309.7555556 309.7722222 309.7555556 309.7722222 309.8 309.7833333 309.7833333 309.7833333 309.8 309.8 309.8 309.8111111 309.8 309.8111111 309.8111111 309.8111111 309.8111111 309.8111111 309.8222222 309.8222222 309.8388889 309.8222222 309.85 309.8388889 309.8388889 309.85 309.85 309.8666667 309.85 309.8777778 309.8666667 309.8777778 309.8777778 309.8944444 309.8777778 309.8944444 309.8944444 309.8944444 309.9222222 309.8944444 309.9222222 309.9333333 309.9055556 309.9333333 309.9222222 309.9222222 309.9222222 309.9444444 309.9333333 309.9444444 309.9444444 309.9611111 309.9444444 309.9722222 309.9722222 309.9722222 309.9722222 309.9888889 309.9888889 310.0166667 310 309.9888889 310.0166667 310.0277778 310 310.0166667 310.0277778 310.0166667 310.0388889 310.0277778 310.0388889 310.0388889 310.0388889 310.0277778 310.0388889 310.0555556 310.0388889 310.0833333 310.0666667 310.0555556 310.0833333 310.0833333 310.0944444 310.0833333 310.0666667 310.0944444 310.0944444 310.1111111 310.1222222 310.1111111 310.1222222 310.1111111 310.1388889 310.1111111 310.1222222 310.1222222 310.1388889 310.1388889 310.15 310.1611111 310.1388889 310.15 310.1388889 310.1611111 310.1777778 310.15 310.1611111 310.1777778 310.1777778 310.1777778 310.1611111 310.1777778 310.1888889 310.1777778 310.1777778 310.1888889 310.1777778 310.2166667 310.2055556 310.2166667 310.2055556 310.2055556 310.2166667 310.2333333 310.2166667 310.2333333 310.2444444 310.2444444 310.2444444 310.2611111 310.2611111 310.2444444 310.2611111 310.2888889 310.2611111 310.2722222 310.2611111 310.2722222 310.2722222 310.2611111 310.2888889 310.3 310.2722222 310.2722222 310.2888889 310.2888889 310.3 310.2722222 310.3277778 310.3277778 310.3111111 310.3277778 310.3388889 310.3388889 310.3277778 310.3388889 310.3277778 310.3555556 310.3388889 310.3388889 310.3555556 310.3555556 310.3666667 310.3666667 310.3555556 310.3555556 310.3111111 310.3111111 310.3833333 310.3555556 310.3555556 310.3944444 310.3666667 310.3944444 310.3833333 310.3944444 310.3833333 310.4111111 310.3944444 310.4111111 310.4111111 310.3944444 310.3833333 310.4222222 310.4222222 310.4222222 310.4388889 310.4388889 310.4388889 310.45 310.4388889 310.45 310.45 310.4611111 310.45 310.45 310.45 310.4222222 310.4611111 310.4611111 310.4777778 310.4777778 310.4777778 310.4888889 310.4777778 310.4777778 310.4888889 310.4777778 310.4888889 310.5055556 310.4888889 310.5166667 310.5055556 310.5055556 310.5055556 310.5055556 310.5055556 310.5166667 310.5333333 310.5333333 310.4777778 310.5333333 310.5333333 310.5333333 310.5333333 310.5333333 310.5444444 310.5444444 310.5333333 310.5611111 310.5333333 310.5333333 310.5611111 310.5611111 310.5722222 310.5611111 310.5722222 310.5611111 310.5611111 310.5888889 310.5722222 310.5722222 310.6 310.5722222 310.6 310.5888889 310.5888889 310.6 310.5888889 310.5722222 310.6277778 310.6166667 310.6166667 310.6277778 310.6166667 310.6166667 310.6277778 310.6277778 310.6166667 310.6166667 310.6277778 310.6277778 310.6388889 310.6388889 310.6166667 310.6277778 310.6277778 310.6388889 310.6388889 310.6388889 310.6555556 310.6666667 310.6555556 310.6388889 310.6555556 310.6388889 310.6555556 310.6833333 310.6666667 310.6277778 310.6277778 310.6944444 310.6666667 310.7111111 310.6833333 310.6833333 310.7111111 310.6555556 310.7222222 310.7222222 310.6833333 310.7111111 310.7111111 310.7111111 310.6944444 310.7111111 310.7222222 310.7111111 310.7222222 310.7222222 310.7222222 310.7222222 310.7388889 310.7222222 310.7222222 310.7222222 310.7388889 310.7222222 310.7388889 310.7388889 310.7388889 310.75 310.7388889 310.75 310.75 310.75 310.75 310.7666667 310.75 310.7666667 310.7666667 310.7666667 310.7777778 310.7666667 310.7777778 310.7777778 310.7666667 310.7777778 310.7777778 310.7777778 310.7944444 310.7777778 310.7944444 310.7944444 310.7777778 310.7944444 310.7777778 310.7944444 310.8222222 310.7944444 310.8055556 310.7944444 310.8055556 310.8055556 310.8055556 310.8222222 310.8055556 310.8055556 310.8222222 310.8222222 310.8222222 310.8333333 310.8222222 310.8333333 310.8333333 310.8222222 310.8222222 310.8722222 310.8333333 310.8444444 310.8444444 310.8444444 310.8333333 310.8611111 310.8333333 310.8444444 310.8611111 310.8888889 310.8611111 310.8722222 310.8722222 310.8611111 310.8611111 310.8611111 310.8722222 310.8722222 310.8722222 310.8722222 310.8888889 310.8888889 310.8722222 310.8888889 310.8888889 310.8888889 310.8888889 310.9 310.8888889 310.9166667 310.8888889 310.9 310.9 310.9 310.9 310.9 310.9 310.9 310.9 310.9166667 310.9277778 310.9277778 310.9 310.9277778 310.9277778 310.9166667 310.9277778 310.9277778 310.9 310.9277778 310.9444444 310.9444444 310.9444444 310.9555556 310.9444444 310.9444444 310.9444444 310.9444444 310.9444444 310.9444444 310.9444444 310.9444444 310.9444444 310.9555556 310.9555556 310.9555556 310.9555556 310.9555556 310.9722222 310.9555556 310.9722222 310.9722222 310.9722222 310.9722222 310.9722222 310.9555556 310.9722222 310.9722222 310.9722222 310.9722222 310.9722222 310.9722222 310.9722222 310.9833333 310.9833333 310.9833333 310.9722222 310.9722222 310.9833333 311 310.9722222 311 311 311 310.9833333 311 311 311 311.0111111 311 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0111111 311.0277778 311.0111111 311.0277778 311.0388889 311.0277778 311.0277778 311.0277778 311.0277778 311.0388889 311.0277778 311.0388889 311.0388889 311.0388889 311.0388889 311.0555556 311.0388889 311.0666667 311.0555556 311.0555556 311.0555556 311.0555556 311.0666667 311.0555556 311.0666667 311.0666667 311.0666667 311.0555556 311.0666667 311.0666667 311.0666667 311.0833333 311.0833333 311.0833333 311.0833333 311.0944444 311.0666667 311.0833333 311.0944444 311.0833333 311.0833333 311.0833333 311.0833333 311.0944444 311.0833333 311.0944444 311.0833333 311.0944444 311.0944444 311.0833333 311.0833333 311.0944444 311.0944444 311.0944444 311.0944444 311.0833333 311.0944444 311.0833333 311.1111111 311.0944444 311.0944444 311.0944444 311.1111111 311.1111111 311.1111111 311.1111111 311.1222222 311.0944444 311.1222222 311.1222222 311.1111111 311.1111111 311.1111111 311.1111111 311.1222222 311.1111111 311.1222222 311.1222222 311.0944444 311.1222222 311.1111111 311.1333333 311.1333333 311.1333333 311.1333333 311.15 311.1611111 311.15 311.15 311.1333333 311.15 311.1333333 311.15 311.15 311.15 311.15 311.1333333 311.15 311.1333333 311.1611111 311.15 311.1611111 311.1333333 311.1611111 311.1777778 311.15 311.1611111 311.1611111 311.1611111 311.1611111 311.15 311.1611111 311.1777778 311.1611111 311.1777778 311.1611111 311.1611111 311.1611111 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.15 311.1611111 311.1611111 311.1611111 311.1611111 311.1611111 311.1611111 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.1777778 311.1888889 311.1888889 311.1888889 311.1888889 311.2055556 311.1888889 311.1888889 311.1888889 311.1888889 311.1888889 311.1888889 311.1888889 311.1888889 311.1888889 311.2055556 311.2055556 311.2166667 311.2055556 311.2055556 311.2055556 311.2166667 311.2055556 311.2055556 311.2055556 311.2055556 311.2166667 311.2055556 311.2166667 311.2333333 311.2166667 311.2166667 311.2055556 311.2055556 311.2166667 311.2166667 311.2166667 311.2166667 311.2166667 311.2333333 311.2166667 311.2166667 311.2166667 311.2166667 311.2166667 311.2333333 311.2333333 311.2333333 311.2333333 311.2611111 311.2444444 311.2333333 311.2333333 311.2444444 311.2444444 311.2333333 311.2333333 311.2444444 311.2444444 311.2333333 311.2444444 311.2444444 311.2611111 311.2333333 311.2444444 311.2444444 311.2444444 311.2611111 311.2444444 311.2611111 311.2444444 311.2444444 311.2611111 311.2444444 311.2611111 311.2611111 311.2444444 311.2611111 311.2722222 311.2611111 311.2611111 311.2611111 311.2611111 311.2611111 311.2611111 311.2722222 311.2611111 311.2722222 311.2611111 311.2888889 311.2722222 311.2722222 311.2722222 311.2722222 311.2722222 311.2722222 311.2722222 311.2722222 311.2722222 311.2888889 311.2888889 311.2888889 311.2888889 311.2888889 311.2722222 311.2888889 311.2888889 311.2888889 311.2888889 311.2888889 311.2888889 311.2888889 311.2888889 311.3 311.2888889 311.3 311.3 311.3 311.3 311.3166667 311.3166667 311.3 311.3 311.3166667 311.3 311.3166667 311.3 311.3277778 311.3166667 311.3166667 311.3166667 311.3166667 311.3166667 311.3166667 311.3277778 311.3166667 311.3166667 311.3166667 311.3166667 311.3166667 311.3277778 311.3166667 311.3277778 311.3277778 311.3166667 311.3277778 311.3277778 311.3277778 311.3277778 311.3444444 311.3444444 311.3277778 311.3277778 311.3444444 311.3277778 311.3277778 311.3277778 311.3277778 311.3444444 311.3444444 311.3444444 311.3277778 311.3444444 311.3444444 311.3444444 311.3444444 311.3444444 311.3444444 311.3444444 311.3444444 311.3555556 311.3555556 311.3555556 311.3555556 311.3444444 311.3555556 311.3722222 311.3555556 311.3555556 311.3722222 311.3555556 311.3555556 311.3555556 311.3722222 311.3722222 311.3722222 311.3722222 311.3555556 311.3722222 311.3722222 311.3722222 311.3722222 311.3722222 311.3722222 311.3722222 311.3722222 311.3722222 311.3833333 311.3833333 311.3833333 311.3722222 311.3833333 311.3833333 311.3833333 311.4 311.4 311.3833333 311.3833333 311.4 311.3833333 311.4 311.4 311.3833333 311.4 311.4 311.4111111 311.4 311.4 311.4 311.4111111 311.4111111 311.4 311.4 311.4111111 311.4111111 311.4111111 311.4111111 311.4111111 311.4111111 311.4111111 311.4277778 311.4277778 311.4277778 311.4277778 311.4277778 311.4111111 311.4277778 311.4277778 311.4277778 311.4277778 311.4277778 311.4277778 311.4111111 311.4277778 311.4388889 311.4388889 311.4277778 311.4388889 311.4388889 311.4388889 311.4277778 311.4277778 311.4388889 311.4555556 311.4388889 311.4388889 311.4388889 311.4388889 311.4388889 311.4388889 311.4388889 311.4555556 311.4555556 311.4388889 311.4555556 311.4555556 311.4555556 311.4388889 311.4555556 311.4555556 311.4666667 311.4555556 311.4555556 311.4555556 311.4666667 311.4666667 311.4666667 311.4666667 311.4666667 311.4666667 311.4666667 311.4666667 311.4833333 311.4555556 311.4833333 311.4833333 311.4833333 311.4833333 311.4833333 311.4833333 311.4666667 311.4666667 311.4833333 311.4666667 311.4833333 311.4666667 311.4944444 311.4833333 311.4833333 311.4944444 311.4944444 311.4944444 311.4944444 311.4833333 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.4944444 311.5111111 311.4833333 311.5111111 311.5111111 311.5111111 311.5111111 311.5111111 311.5111111 311.5111111 311.5111111 311.4944444 311.5111111 311.5111111 311.5222222 311.5222222 311.5222222 311.5222222 311.5111111 311.5222222 311.5222222 311.5388889 311.5222222 311.5111111 311.5222222 311.5222222 311.5222222 311.5222222 311.5388889 311.5388889 311.5388889 311.5388889 311.5388889 311.5388889 311.5388889 311.55 311.5388889 311.5388889 311.5388889 311.5222222 311.5388889 311.55 311.5388889 311.5388889 311.55 311.5388889 311.5388889 311.5388889 311.55 311.55 311.55 311.55 311.55 311.55 311.55 311.55 311.5666667 311.55 311.5666667 311.5666667 311.5666667 311.5666667 311.5666667 311.5666667 311.5666667 311.5666667 311.55 311.5777778 311.5777778 311.5777778 311.5666667 311.5777778 311.5777778 311.5777778 311.5666667 311.5666667 311.5777778 311.5777778 311.5944444 311.5777778 311.5777778 311.5777778 311.5777778 311.5777778 311.5944444 311.5777778 311.5944444 311.5944444 311.5944444 311.5944444 311.5944444 311.5944444 311.5944444 311.5944444 311.6055556 311.5944444 311.6055556 311.5944444 311.6055556 311.6055556 311.6055556 311.6055556 311.6055556 311.6222222 311.6055556 311.6055556 311.6055556 311.6055556 311.6055556 311.6222222 311.6222222 311.6222222 311.6222222 311.6222222 311.6055556 311.6222222 311.6222222 311.6222222 311.6222222 311.6222222 311.6222222 311.6222222 311.6333333 311.6222222 311.6333333 311.6333333 311.6222222 311.6333333 311.6333333 311.6333333 311.6333333 311.65 311.6333333 311.6333333 311.6333333 311.6333333 311.65 311.6333333 311.6333333 311.6333333 311.6333333 311.65 311.6611111 311.65 311.65 311.6333333 311.6611111 311.6611111 311.65 311.6611111 311.6611111 311.6611111 311.6611111 311.6777778 311.6611111 311.6611111 311.6611111 311.6611111 311.6777778 311.6777778 311.6777778 311.6611111 311.6777778 311.6777778 311.6777778 311.6777778 311.6777778 311.6777778 311.6888889 311.6888889 311.6777778 311.6888889 311.6888889 311.6777778 311.7055556 311.6777778 311.6888889 311.6888889 311.6888889 311.6888889 311.6888889 311.7055556 311.7055556 311.6888889 311.7055556 311.6777778 311.7055556 311.7166667 311.7055556 311.7055556 311.7055556 311.7166667 311.7055556 311.7166667 311.7166667 311.7055556 311.7166667 311.7166667 311.7166667 311.7166667 311.7166667 311.7333333 311.7166667 311.7166667 311.7166667 311.7333333 311.7166667 311.7333333 311.7444444 311.7333333 311.7333333 311.7166667 311.7444444 311.7333333 311.7444444 311.7444444 311.7333333 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7444444 311.7611111 311.7444444 311.7611111 311.7444444 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7611111 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7722222 311.7888889 311.7888889 311.7722222 311.8 311.8 311.7888889 311.7888889 311.7888889 311.8 311.7888889 311.8 311.7888889 311.7888889 311.8 311.8 311.8 311.8 311.8166667 311.8166667 311.8 311.8 311.8166667 311.8166667 311.8 311.8166667 311.8 311.8166667 311.8277778 311.8 311.8166667 311.8277778 311.8166667 311.8277778 311.8166667 311.8166667 311.8277778 311.8166667 311.8277778 311.8277778 311.8277778 311.8277778 311.8277778 311.8277778 311.8444444 311.8444444 311.8277778 311.8277778 311.8277778 311.8277778 311.8444444 311.8277778 311.8444444 311.8444444 311.8277778 311.8444444 311.8444444 311.8444444 311.8444444 311.8444444 311.8444444 311.8555556 311.8444444 311.8555556 311.8555556 311.8444444 311.8555556 311.8555556 311.8555556 311.8555556 311.8555556 311.8555556 311.8555556 311.8555556 311.8722222 311.8722222 311.8722222 311.8555556 311.8833333 311.8722222 311.8722222 311.8555556 311.8722222 311.8722222 311.8833333 311.8833333 311.8722222 311.8833333 311.8833333 311.8722222 311.9 311.9 311.8833333 311.9 311.8833333 311.9 311.8833333 311.9 311.8833333 311.8833333 311.9 311.9 311.9 311.9 311.9 311.9 311.9 311.9 311.9 311.9 311.9111111 311.9111111 311.9 311.9111111 311.9111111 311.9 311.9111111 311.9277778 311.9111111 311.9111111 311.9111111 311.9277778 311.9277778 311.9277778 311.9277778 311.9277778 311.9277778 311.9277778 311.9388889 311.9277778 311.9388889 311.9388889 311.9388889 311.9388889 311.9388889 311.9388889 311.9277778 311.9555556 311.9388889 311.9555556 311.9388889 311.9555556 311.9388889 311.9555556 311.9555556 311.9555556 311.9388889 311.9555556 311.9555556 311.9388889 311.9555556 311.9555556 311.9666667 311.9555556 311.9555556 311.9666667 311.9666667 311.9555556 311.9555556 311.9555556 311.9666667 311.9555556 311.9833333 311.9666667 311.9666667 311.9666667 311.9666667 311.9666667 311.9833333 311.9833333 311.9666667 311.9666667 311.9666667 311.9833333 311.9666667 311.9833333 311.9833333 311.9666667 311.9833333 311.9833333 311.9833333 311.9833333 311.9833333 311.9833333 311.9833333 311.9944444 311.9833333 311.9944444 311.9833333 311.9944444 311.9833333 311.9833333 311.9944444 311.9944444 311.9944444 311.9833333 311.9944444 312.0111111 311.9944444 311.9944444 311.9833333 311.9944444 311.9944444 312.0111111 311.9944444 312.0111111 311.9944444 312.0111111 312.0111111 311.9944444 312.0111111 312.0111111 312.0111111 312.0111111 311.9944444 312.0111111 312.0111111 312.0222222 312.0111111 312.0111111 312.0111111 312.0222222 312.0222222 312.0111111 312.0222222 312.0111111 312.0111111 312.0222222 312.0222222 312.0222222 312.0222222 312.0222222 312.0222222 312.0222222 312.0222222 312.0388889 312.0222222 312.0222222 312.0388889 312.0111111 312.0388889 312.0388889 312.0388889 312.0222222 312.0388889 312.0388889 312.0388889 312.05 312.0388889 312.0388889 312.0388889 312.05 312.05 312.0388889 312.05 312.05 312.0388889 312.05 312.05 312.05 312.05 312.05 312.05 312.0666667 312.0388889 312.05 312.0666667 312.0666667 312.05 312.05 312.0666667 312.0777778 312.05 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0666667 312.0777778 312.0777778 312.0666667 312.0777778 312.0666667 312.0777778 312.0666667 312.0777778 312.0666667 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0944444 312.0944444 312.0944444 312.0944444 312.0777778 312.0944444 312.0944444 312.0944444 312.0777778 312.0777778 312.0777778 312.0944444 312.0777778 312.0777778 312.0777778 312.0777778 312.0777778 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0777778 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.1055556 312.1055556 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.0944444 312.1055556 312.1055556 312.1055556 312.1055556 312.1055556 312.1222222 312.1222222 312.1222222 312.1055556 312.1222222 312.1055556 312.1055556 312.1222222 312.1055556 312.1222222 312.1222222 312.1222222 312.1222222 312.1222222 312.1055556 312.1055556 312.1055556 312.1055556 312.1222222 312.1055556 312.1055556 312.1055556 312.1222222 312.1222222 312.1333333 312.1222222 312.1222222 312.1222222 312.1222222 312.1222222 312.1222222 312.1222222 312.1055556 312.1222222 312.1222222 312.1222222 312.1333333 312.1222222 312.1222222 312.1222222 312.1222222 312.1333333 312.1222222 312.1222222 312.1333333 312.1333333 312.1333333 312.1333333 312.1333333 312.15 312.1222222 312.1222222 312.1222222 312.1333333 312.1333333 312.1333333 312.1333333 312.1333333 312.1333333 312.1333333 312.1222222 312.1333333 312.1333333 312.1222222 312.1333333 312.1333333 312.15 312.1333333 312.1333333 312.1333333 312.1333333 312.15 312.1333333 312.1333333 312.15 312.1333333 312.15 312.1333333 312.1333333 312.15 312.1333333 312.15 312.15 312.15 312.15 312.1333333 312.15 312.1333333 312.15 312.15 312.15 312.15 312.1333333 312.15 312.15 312.15 312.15 312.15 312.15 312.15 312.1611111 312.1611111 312.15 312.1333333 312.1333333 312.1611111 312.1611111 312.15 312.15 312.15 312.1611111 312.1611111 312.1611111 312.1611111 312.15 312.1611111 312.1777778 312.15 312.1611111 312.1611111 312.1611111 312.1611111 312.1611111 312.1611111 312.1611111 312.1611111 312.1777778 312.1611111 312.1777778 312.1611111 312.1777778 312.1777778 312.1611111 312.1611111 312.1777778 312.1611111 312.1777778 312.1777778 312.1777778 312.1611111 312.1611111 312.1777778 312.1611111 312.1611111 312.1777778 312.1611111 312.1777778 312.1611111 312.1777778 312.1611111 312.1611111 312.1777778 312.1777778 312.1777778 312.1944444 312.1611111 312.1777778 312.1777778 312.1777778 312.1777778 312.1777778 312.1777778 312.1777778 312.1777778 312.1777778 312.1944444 312.1944444 312.1611111 312.1777778 312.1944444 312.1777778 312.1944444 312.1777778 312.1777778 312.1777778 312.1944444 312.1944444 312.1777778 312.1944444 312.1944444 312.1944444 312.1777778 312.1777778 312.1944444 312.1944444 312.1777778 312.1944444 312.1944444 312.1944444 312.1777778 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.2055556 312.1777778 312.1944444 312.2055556 312.1944444 312.2055556 312.2055556 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.1944444 312.2055556 312.2055556 312.2055556 312.2055556 312.2055556 312.1944444 312.2055556 312.1944444 312.2055556 312.2055556 312.2055556 312.2222222 312.2222222 312.1944444 312.2055556 312.2055556 312.2222222 312.2055556 312.2222222 312.2222222 312.2055556 312.2222222 312.2055556 312.2222222 312.2055556 312.2055556 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2222222 312.2333333 312.2333333 312.2222222 312.2333333 312.2333333 312.2333333 312.2222222 312.2333333 312.2222222 312.25 312.2333333 312.2333333 312.2333333 312.2333333 312.2333333 312.2333333 312.2333333 312.2333333 312.25 312.2222222 312.2333333 312.25 312.2333333 312.2333333 312.2333333 312.2333333 312.25 312.25 312.25 312.25 312.2333333 312.25 312.2333333 312.2333333 312.25 312.25 312.25 312.2333333 312.2333333 312.25 312.25 312.25 312.25 312.25 312.25 312.25 312.25 312.2611111 312.25 312.25 312.2611111 312.2611111 312.25 312.2611111 312.2611111 312.2611111 312.25 312.2611111 312.2611111 312.2611111 312.2611111 312.25 312.2611111 312.25 312.25 312.25 312.25 312.2611111 312.2611111 312.2611111 312.2777778 312.2611111 312.2611111 312.2611111 312.2611111 312.2611111 312.2611111 312.2777778 312.2611111 312.25 312.2611111 312.2611111 312.2611111 312.2777778 312.2611111 312.2777778 312.2611111 312.2611111 312.2777778 312.2611111 312.2888889 312.2777778 312.2888889 312.2888889 312.2777778 312.2611111 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2777778 312.2888889 312.2888889 312.2777778 312.3055556 312.2888889 312.2888889 312.2888889 312.2777778 312.2888889 312.2888889 312.2888889 312.3055556 312.2888889 312.2888889 312.2777778 312.2888889 312.2888889 312.2888889 312.2777778 312.2777778 312.2888889 312.2888889 312.2888889 312.2888889 312.2888889 312.2888889 312.2777778 312.2888889 312.2888889 312.2888889 312.3055556 312.2888889 312.2888889 312.2888889 312.3055556 312.3055556 312.2777778 312.2888889 312.2888889 312.2888889 312.2888889 312.2888889 312.3055556 312.3055556 312.2888889 312.2888889 312.3055556 312.2888889 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3055556 312.3166667 312.3055556 312.3055556 312.3055556 312.3166667 312.3055556 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3055556 312.3166667 312.3055556 312.3333333 312.3055556 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3333333 312.3333333 312.3055556 312.3166667 312.3333333 312.3166667 312.3055556 312.3166667 312.3166667 312.3166667 312.3166667 312.3166667 312.3333333 312.3166667 312.3166667 312.3333333 312.3333333 312.3166667 312.3333333 312.3333333 312.3333333 312.3333333 312.3333333 312.3444444 312.3333333 312.3444444 312.3333333 312.3333333 312.3444444 312.3333333 312.3333333 312.3333333 312.3166667 312.3444444 312.3333333 312.3333333 312.3333333 312.3333333 312.3444444 312.3333333 312.3444444 312.3333333 312.3444444 312.3333333 312.3333333 312.3444444 312.3333333 312.3611111 312.3333333 312.3333333 312.3333333 312.3333333 312.3333333 312.3444444 312.3444444 312.3444444 312.3444444 312.3444444 312.3611111 312.3444444 312.3444444 312.3611111 312.3444444 312.3444444 312.3444444 312.3611111 312.3333333 312.3444444 312.3333333 312.3611111 312.3611111 312.3444444 312.3444444 312.3444444 312.3444444 312.3444444 312.3611111 312.3444444 312.3444444 312.3444444 312.3611111 312.3611111 312.3611111 312.3444444 312.3444444 312.3611111 312.3722222 312.3611111 312.3444444 312.3611111 312.3611111 312.3722222 312.3611111 312.3611111 312.3611111 312.3611111 312.3611111 312.3722222 312.3611111 312.3722222 312.3722222 312.3888889 312.3722222 312.3722222 312.3722222 312.3611111 312.3611111 312.3722222 312.3611111 312.3722222 312.3611111 312.3722222 312.3722222 312.3611111 312.3722222 312.3722222 312.3722222 312.3722222 312.3888889 312.3722222 312.3722222 312.3611111 312.3722222 312.3888889 312.3888889 312.3722222 312.3722222 312.3888889 312.3722222 312.3722222 312.3722222 312.3888889 312.3722222 312.3888889 312.3888889 312.3722222 312.3888889 312.3888889 312.3722222 312.3888889 312.3722222 312.3722222 312.3888889 312.3888889 312.3888889 312.3888889 312.3888889 312.3888889 312.3888889 312.4 312.3888889 312.4 312.4 312.4 312.3888889 312.3888889 312.3888889 312.3888889 312.4 312.3888889 312.4 312.4 312.3888889 312.4 312.4 312.3888889 312.4 312.4 312.4 312.4 312.3888889 312.4 312.4 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4 312.4 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4166667 312.4277778 312.4277778 312.4166667 312.4277778 312.4166667 312.4166667 312.4277778 312.4166667 312.4166667 312.4166667 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4166667 312.4166667 312.4277778 312.4277778 312.4166667 312.4166667 312.4277778 312.4277778 312.4277778 312.4277778 312.4444444 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4277778 312.4444444 312.4444444 312.4277778 312.4277778 312.4611111 312.4277778 312.4277778 312.4277778 312.4444444 312.4277778 312.4277778 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4444444 312.4611111 312.4444444 312.4611111 312.4611111 312.4444444 312.4611111 312.4444444 312.4444444 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4444444 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4611111 312.4722222 312.4722222 312.4722222 312.4722222 312.4722222 312.4611111 312.4722222 312.4611111 312.4722222 312.4722222 312.4722222 312.4611111 312.4888889 312.4722222 312.4722222 312.4722222 312.4722222 312.4611111 312.4722222 312.4888889 312.4722222 312.4611111 312.4722222 312.4722222 312.4722222 312.4722222 312.4722222 312.4722222 312.4722222 312.4722222 312.4888889 312.4722222 + </values> + </curve> + </curves> +</OpenGeoSysProject> diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.vtu b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.vtu new file mode 100644 index 0000000000000000000000000000000000000000..6be1b976a9c13e9459614724c796a27b83cc8470 --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccf17b79ecd727f0f7019717b24ee8467ebd5cbc6fbe1d974b65769e1280a915 +size 683856 diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox_pcs_0_ts_10_t_600.000000.vtu b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox_pcs_0_ts_10_t_600.000000.vtu new file mode 100644 index 0000000000000000000000000000000000000000..42b54ac12540254d6bf8ca41aa7cef7a6fbcab88 --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/beier_sandbox_pcs_0_ts_10_t_600.000000.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:360c7791ee71d2312add528d97306295d113cea3ad7cfa5d2d400c51f3961569 +size 237193 diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow.prj b/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow.prj new file mode 100644 index 0000000000000000000000000000000000000000..cc45512ed0537089c4f9bafae0bd0916d69606d2 --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow.prj @@ -0,0 +1,219 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<OpenGeoSysProject> + <mesh>beier_sandbox.vtu</mesh> + <geometry>beier_sandbox.gml</geometry> + + <processes> + <process> + <name>HeatTransportBHE</name> + <type>HEAT_TRANSPORT_BHE</type> + <integration_order>2</integration_order> + <process_variables> + <process_variable>temperature_soil</process_variable> + <process_variable>temperature_BHE1</process_variable> + </process_variables> + + <thermal_conductivity_solid>K_s</thermal_conductivity_solid> + <heat_capacity_solid>Cp_s</heat_capacity_solid> + <density_solid>rho_s</density_solid> + + <thermal_conductivity_fluid>K_f</thermal_conductivity_fluid> + <heat_capacity_fluid>Cp_f</heat_capacity_fluid> + <density_fluid>rho_f</density_fluid> + + <thermal_conductivity_gas>K_g</thermal_conductivity_gas> + <heat_capacity_gas>Cp_g</heat_capacity_gas> + <density_gas>rho_g</density_gas> + + <borehole_heat_exchangers> + <borehole_heat_exchanger> + <type>1U</type> + <flow_and_temperature_control> + <type>FixedPowerConstantFlow</type> + <flow_rate>2.0e-4</flow_rate> + <power>1056</power> + </flow_and_temperature_control> + <borehole> + <length>18.0</length> + <diameter>0.13</diameter> + </borehole> + <grout> + <density>2190.0</density> + <porosity>0.0</porosity> + <heat_capacity>1735.160</heat_capacity> + <thermal_conductivity>0.806</thermal_conductivity> + </grout> + <pipes> + <inlet> + <radius> 0.013665</radius> + <wall_thickness>0.003035</wall_thickness> + <wall_thermal_conductivity>0.39</wall_thermal_conductivity> + </inlet> + <outlet> + <radius>0.013665</radius> + <wall_thickness>0.003035</wall_thickness> + <wall_thermal_conductivity>0.39</wall_thermal_conductivity> + </outlet> + <distance_between_pipes>0.053</distance_between_pipes> + <longitudinal_dispersion_length>0.001</longitudinal_dispersion_length> + </pipes> + <refrigerant> + <density>992.92</density> + <viscosity>0.00067418</viscosity> + <specific_heat_capacity>4068</specific_heat_capacity> + <thermal_conductivity>0.62863</thermal_conductivity> + <reference_temperature>298.15</reference_temperature> + </refrigerant> + </borehole_heat_exchanger> + </borehole_heat_exchangers> + + <secondary_variables> + <secondary_variable type="static" internal_name="heat_flux_x" output_name="heat_flux_x" /> + <secondary_variable type="static" internal_name="heat_flux_y" output_name="heat_flux_y" /> + <secondary_variable type="static" internal_name="heat_flux_z" output_name="heat_flux_z" /> + </secondary_variables> + </process> + </processes> + + <time_loop> + <processes> + <process ref="HeatTransportBHE"> + <nonlinear_solver>basic_picard</nonlinear_solver> + <convergence_criterion> + <type>DeltaX</type> + <norm_type>NORM2</norm_type> + <reltol>1e-10</reltol> + </convergence_criterion> + <time_discretization><type>BackwardEuler</type></time_discretization> + <output> + <variables> + <variable>temperature_soil</variable> + <variable>temperature_BHE1</variable> + </variables> + </output> + <time_stepping> + <type>FixedTimeStepping</type> + <t_initial> 0.0 </t_initial> + <!-- use the following for full simulation + <t_end> 186420 </t_end> + --> + <t_end> 600 </t_end> + <timesteps> + <!-- use the following for full simulation + <pair><repeat>3107</repeat><delta_t>60</delta_t></pair> + --> + <pair><repeat>10</repeat><delta_t>60</delta_t></pair> + </timesteps> + </time_stepping> + </process> + </processes> + <output> + <type>VTK</type> + <prefix>fixed_power_constant_flow</prefix> + <timesteps> + <pair><repeat> 1</repeat><each_steps> 10 </each_steps></pair> + </timesteps> + </output> + </time_loop> + + <parameters> + <parameter> + <name>K_s</name> + <type>Constant</type> + <value>2.78018</value> + </parameter> + <parameter> + <name>Cp_s</name> + <type>Constant</type> + <value>1778</value> + </parameter> + <parameter> + <name>rho_s</name> + <type>Constant</type> + <value>1800</value> + </parameter> + <parameter> + <name>K_f</name> + <type>Constant</type> + <value>0.1</value> + </parameter> + <parameter> + <name>Cp_f</name> + <type>Constant</type> + <value>4068</value> + </parameter> + <parameter> + <name>rho_f</name> + <type>Constant</type> + <value>992.92</value> + </parameter> + <parameter> + <name>K_g</name> + <type>Constant</type> + <value>3.2</value> + </parameter> + <parameter> + <name>Cp_g</name> + <type>Constant</type> + <value>1000</value> + </parameter> + <parameter> + <name>rho_g</name> + <type>Constant</type> + <value>2500</value> + </parameter> + <parameter> + <name>T0</name> + <type>Constant</type> + <value>295.175</value> + </parameter> + <parameter> + <name>T0_BHE1</name> + <type>Constant</type> + <values>295.36 295.13 295.23 295.115</values> + </parameter> + </parameters> + + <process_variables> + <process_variable> + <name>temperature_soil</name> + <components>1</components> + <order>1</order> + <initial_condition>T0</initial_condition> + <boundary_conditions> + </boundary_conditions> + </process_variable> + <process_variable> + <name>temperature_BHE1</name> + <components>4</components> + <order>1</order> + <initial_condition>T0_BHE1</initial_condition> + </process_variable> + </process_variables> + + <nonlinear_solvers> + <nonlinear_solver> + <name>basic_picard</name> + <type>Picard</type> + <max_iter>100</max_iter> + <linear_solver>general_linear_solver</linear_solver> + </nonlinear_solver> + </nonlinear_solvers> + + <linear_solvers> + <linear_solver> + <name>general_linear_solver</name> + <lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis> + <eigen> + <solver_type>BiCGSTAB</solver_type> + <precon_type>ILUT</precon_type> + <max_iteration_step>1000</max_iteration_step> + <error_tolerance>1e-16</error_tolerance> + </eigen> + <petsc> + <prefix>gw</prefix> + <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters> + </petsc> + </linear_solver> + </linear_solvers> +</OpenGeoSysProject> diff --git a/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu b/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu new file mode 100644 index 0000000000000000000000000000000000000000..965002cec993bff2540e23e6445456adb9185307 --- /dev/null +++ b/Tests/Data/Parabolic/T/3D_Beier_sandbox/fixed_power_constant_flow_pcs_0_ts_10_t_600.000000.vtu @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6766c08aecdd845d6c53cd460551a457a69b5ff867e5630a40c9c9c38da592d +size 240745 diff --git a/web/config.toml b/web/config.toml index 32f601f5c16f816740afcade65298e8130c9a630..49f16a4fc8a8dc627c94a843b2dbc0aea16acec3 100644 --- a/web/config.toml +++ b/web/config.toml @@ -73,6 +73,10 @@ staticDir = ["dist", "static"] name = "Heatconduction" identifier = "heatconduction" weight = 3 +[[menu.benchmarks]] + name = "Heat Transport BHE" + identifier = "heat-transport-bhe" + weight = 10 [[menu.benchmarks]] name = "Richards Flow" identifier = "richards-flow" diff --git a/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox.pandoc b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox.pandoc new file mode 100644 index 0000000000000000000000000000000000000000..d89a572c1c39bb7d8a45c1d25471c79ea8845c55 --- /dev/null +++ b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox.pandoc @@ -0,0 +1,70 @@ ++++ +author = "Chaofan Chen, Philipp Hein, Haibing Shao" +date = "2018-09-25T13:44:00+01:00" +title = "Benchmark of 3D Beier sandbox" +weight = 123 +project = "Parabolic/T/3D_Beier_sandbox/beier_sandbox.prj" + +[menu] + [menu.benchmarks] + parent = "heat-transport-bhe" + ++++ + +{{< data-link >}} + +## Problem description + +The U-type Borehole Heat Exchanger (BHE) is always utilized to extract the shallow geothermal energy all over the world. In this benchmark, the 1-U type BHE numerical model in OGS-6 was verified through comparing with experimental results obtained by Beier et al. (2011). In their experiment, one single U-type BHE was embedded in a sandbox together with some temperature sensors at the specific locations in the sand. Using the pump to circulate the fluid in the U-type pipe, which was heated by a electrical heater. Different from the geothermal enenrgy exploitation, the temperature of the sand will be lifted due to the inflow temperature of BHE is higher than its outflow temperature, which was dynamically monitored as one of the key results in the Thermal Response Test (TRT). + +## Model Setup + +The numerical model was established using dual continuum method Diersch et al. (2011), in which the BHE is represented by the line element and 3D prism stands for the sand part. The numerical geometry model can be visualized as shown in Figure 1. Thus, there are two material groups in the model distinguishing the soil part and the BHE part. The length of the whole box is 18.5 m with a square cross section of 5 m per side to avoid the impact of boundary conditions on the soil temperature. Detailed parameters for the model configuration are listed in the follwoing table. + +| Parameter | Symbol | Value | Unit | +| ---------------------------------- |:------------------ | -------------------:| --------------------------: | +| Soil thermal conductivity | $\lambda_{s}$ | 2.78 | $\mathrm{W m^{-1} K^{-1}}$ | +| Soil heat capacity | $(\rho c)_{soil}$ | $3.2\times10^{6}$ | $\mathrm{Jm^{-3}K^{-1}}$ | +| Length of the BHE | $L$ | 18 | $\mathrm{m}$ | +| Diameter of the BHE | $D$ | 13 | $\mathrm{cm}$ | +| Diameter of the pipeline | $d$ | 2.733 | $\mathrm{cm}$ | +| Wall thickness of the pipeline | $b$ | 0.3035 | $\mathrm{cm}$ | +| Distance between pipelines | $w$ | 5.3 | $\mathrm{cm}$ | +| Pipeline wall thermal conductivity | $\lambda_{p}$ | 0.39 | $\mathrm{W m^{-1} K^{-1}}$ | +| Grout thermal conductivity | $\lambda_{g}$ | 0.806 | $\mathrm{W m^{-1} K^{-1}}$ | +| Grout heat capacity | $(\rho c)_{grout}$ | $3.8\times10^{6}$ | $\mathrm{Jm^{-3}K^{-1}}$ | + + +{{< img src="../3D_Beier_sandbox_figures/numerical_geometry_of_BHE.png" width="200">}} + +Figure 1: Sandbox model + +In Beier's experiment, the inner diameter of aluminum pipe is 12.6 $\mathrm{cm}$ and the borehole wall thickness of aluminum is 0.2 $\mathrm{cm}$. In the numerical model, the borehole wall feature cannot be reflected because of the line elements. Therefore, the diameter of the BHE in numerical model was set 13 $\mathrm{cm}$. Meanwhile, the grout's thermal conductivity was increased from original 0.73 $\mathrm{W m^{-1} K^{-1}}$ to 0.806 $\mathrm{W m^{-1} K^{-1}}$. As for the circulating water in the BHE pipe, the thermal physical parameters are taken from the state at an average temperature of approx. 309.15 K. + +## OGS-6 Input Files + +The detailed input file can be seen from the .prj file. The inflow temperature of the BHE, which was imposed as boundary condition of the BHE can be shown in Figure 2. Initial conditions of inflow and outflow temperature for the BHE were directly obtained from the measurements at t=0. For the initial soil temperature, the average value of all sensors placed in the sand and the borehole wall was set in the numerical model. + +{{< img src="../3D_Beier_sandbox_figures/Inflow_temp.png" width="200">}} + +Figure 2: Inflow temperature curve as the BHE boundary condition + +## Results + +The numerical outflow temperature of OGS-5 (Shao et al. (2016)) and OGS-6 was compared with the experimental results, which is presented in the Figure 3. And the soil temperature at different locations among experimental and numerical results were compared and shown in the Figure 4. The comparison figures demonstrate that the numerical results and experimental data can fit very well and the largest relative error is 0.17\% on the wall temperature and 0.014\% on the outflow temperature. The initial temperature of borehole wall in numerical model was set an average value as mentioned in the above, which has initial error of 0.07 K compared to the experimental data. Besides, normally, the error of measuring temperatures during experiment, difference on the real thermal physical parameters of the sand and the BHE are all at the same value range. Therefore, it can be concluded that the numerical model of 1U-type BHE is fully verified. + +{{< img src="../3D_Beier_sandbox_figures/comparison_with_experiment_data_and_OGS5.png" width="200">}} + +Figure 3: Comparison with experiment and OGS-5 results regarding outflow temperature of the BHE + +{{< img src="../3D_Beier_sandbox_figures/soil_temp_comparison.png" width="200">}} + +Figure 4: Comparison of modelled and measured wall and soil temperatures + +## References + +[1] Richard A Beier, Marvin D Smith, and Jeffrey D Spitler. Reference data setsfor vertical borehole ground heat exchanger models and thermal responsetest analysis. Geothermics, 40(1):79–85, 2011 + +[2] Diersch, H. J., Bauer, D., Heidemann, W., Rühaak, W., & Schätzl, P. (2011). Finite element modeling of borehole heat exchanger systems: Part 1. Fundamentals. Computers & Geosciences, 37(8), 1122-1135. + +[3] Haibing Shao, Philipp Hein, Agnes Sachse, and Olaf Kolditz. GeoenergyModeling II: Shallow Geothermal Systems. Springer, 2016 diff --git a/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/Inflow_temp.png b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/Inflow_temp.png new file mode 100644 index 0000000000000000000000000000000000000000..8a465d6ed144a0ddda61fd6af4b253b1735d21da --- /dev/null +++ b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/Inflow_temp.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27d5c3f105e356b1ce71fc2d5d265694b95b446dd8a73d24c59642a82e118d5e +size 50713 diff --git a/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/comparison_with_experiment_data_and_OGS5.png b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/comparison_with_experiment_data_and_OGS5.png new file mode 100644 index 0000000000000000000000000000000000000000..197cd9c8b618b36e919e662e1a899172644ff108 --- /dev/null +++ b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/comparison_with_experiment_data_and_OGS5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86b05347004a11e55156c89bd3ad4f8de913174c5da7f38a0de298a1a4f76d98 +size 66584 diff --git a/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/numerical_geometry_of_BHE.png b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/numerical_geometry_of_BHE.png new file mode 100644 index 0000000000000000000000000000000000000000..e277b522ccdf4fdb0a0d0441c0da092658e07d91 --- /dev/null +++ b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/numerical_geometry_of_BHE.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af8ddb769bbeeb55c6b687194aee9290c8d6b017de1c6febcec91cb15d82a147 +size 198418 diff --git a/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/soil_temp_comparison.png b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/soil_temp_comparison.png new file mode 100644 index 0000000000000000000000000000000000000000..d81841f5d8ea5701f3c7d51994431efac41eef90 --- /dev/null +++ b/web/content/docs/benchmarks/heat-transport-bhe/3D_Beier_sandbox_figures/soil_temp_comparison.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:719b4ea0683907850112059656766d585b5ce1927505289f90035fc73518448f +size 88533