-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using MPL in Heat_Transport_BHE process #2671
Conversation
8ead59f
to
022ae2e
Compare
@@ -28,7 +28,7 @@ createMaterialSpatialDistributionMap( | |||
|
|||
if (max_material_id > static_cast<int>(media.size() - 1)) | |||
{ | |||
OGS_FATAL( | |||
WARN( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide explanation in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation was added in the commit 4ffd04f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this an OGS_FATAL? I would expect that bad things could be happen if something in the input project file is inconsistent with the mesh file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem originates from the fact that we use the material IDs to differentiate the 1D line elements assigned to the BHE in a 3D mesh. The simplest case would be, we have one material ID assigned to 3D prism elements for all the soil part. Then we have the 2nd material ID assigned to the one BHE. In this case, our max_material_id == 1. However, we can only define 1 media in the input files (which is the soil media). This means media.size() = 1. The if clause on line 29 is then true and we will trigger the block. If we keep the OGS_FATAL function, then we will not be able to run BHE simulations with different types of materials (soil layers). I discussed this with Dima and we agreed to change it to WARN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining the background. ⏩
ParameterLib::SpatialPosition pos; | ||
pos.setElementID(_element_id); | ||
pos.setElementID(this->_element_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not needed. Removed.
// fluid_phase.property(MaterialPropertyLib::PropertyType::density).template | ||
// value<double>(vars, pos, t); auto const density_g = | ||
// gas_phase.property(MaterialPropertyLib::PropertyType::density).template | ||
// value<double>(vars, pos, t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These "comments" were not touched for the last two years. I'd recommend to remove them.
If someday there is a need for those densities etc. it can be easily copied from the solid properties. No need to fix that dead "code"
Actually it was discussed in the original PR and nothing has changed: #2221 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although we will need them soon in order to include GW flow and partially saturated processes, they are not needed for now. Therefore removed.
<!-- <name>porosity</name> --> | ||
<!-- <type>Constant</type> --> | ||
<!-- <value>0.001</value> --> | ||
<!-- </property> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties seems to be unused currently. I strongly recommend to drop the unused, commented code parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above. Removed for now.
ParameterLib::SpatialPosition pos; | ||
pos.setElementID(_element_id); | ||
|
||
auto const& process_data = this->_process_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this local process_data is not necessary. Removed.
fix the linking error ufz#2019 disable the unused liquid and gas phase remove unused code from the soil assembler remove this and also remove unnecessary local variable
remove tailing white space
In this commit, the original OGS_FATAL function was changed to a WARN function. The reason behind is that, when running a HEAT_TRANSPORT_BHE process, the BHEs are sitting on a separate material ID. This means , the total number of material IDs is more than the number of media defined. By changing from OGS_FATAL to WARN, this allowing the process to be running.
modify prj files - continued replace tabs by spaces modify prj files - continued remove unused parameters from the input files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. ⏩
OpenGeoSys development has been moved to GitLab. |
In this PR, the source code and input files related to HEAT_TRANSPORT_BHE process were changed in order to use the MPL data structure for reading in soil parameters such as thermal conductivity and heat capacity.