-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: Temperature dependent single phase thermal conductivity #3135
feat: Temperature dependent single phase thermal conductivity #3135
Conversation
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.
Thank you Sy Tuan. Lots of change in this PR, but everything looks in order.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3135 +/- ##
===========================================
+ Coverage 56.58% 56.59% +0.01%
===========================================
Files 1064 1064
Lines 89715 89752 +37
===========================================
+ Hits 50763 50793 +30
- Misses 38952 38959 +7 ☔ View full report in Codecov by Sentry. |
src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.cpp
Outdated
Show resolved
Hide resolved
} ); | ||
} | ||
|
||
void SinglePhaseThermalConductivity::updateFromTemperature( arrayView1d< real64 const > const & temperature ) const |
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.
this is not really how things are usually done in GEOS since we usually have these update functions in the kernelWrapper objects.
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.
Before this PR, there is an "update" function here, I just replace it by this function. By doing so, I did not intend to change the architecture design of GEOS.
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.
Can we find a better name to replace ThermalConductivityGradientComponents
?
@@ -11,7 +11,7 @@ | |||
targetRegions="{ region }"> | |||
<NonlinearSolverParameters | |||
newtonTol="1.0e-6" | |||
newtonMaxIter="10"/> | |||
newtonMaxIter="100"/> |
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? is this case taking 100 nonlinear iterations?
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.
20 would be sufficient
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.
This number is to ensure the convergence of the benchmark case
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.
I should converge in 20. if not, then something is wrong.
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.
I can confirm that it converges in 20.
return SinglePhaseThermalConductivityBase::deliverClone( name, parent ); | ||
} | ||
|
||
void SinglePhaseThermalConductivity::initializeRockFluidState( arrayView2d< real64 const > const & initialPorosity ) const |
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.
well, can we change it? I don't understand why it would use the porosity. And the name is quite confusing.
* @brief Getter for the derivative of effective conductivities in the subRegion w.r.t. temperature | ||
* @return an arrayView of derivative of effective conductivities w.r.t. temperature | ||
*/ | ||
arrayView3d< real64 const > dEffectiveConductivity_dT() const { return m_dEffectiveConductivity_dT; } |
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.
do you need 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.
Yes, absolutly, adding this term is the core of this implementation for temperature dependent single phase thermal conductivity.
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.
Does it need to be in the base class? Can it be in the SinglePhaseThermalConductivity
class itself. I can imagine we might later have thermal conductivity models that don't need 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.
I meant "do you need this getter"? We have specific ways to grab fields from consitutive models through getField
How about |
From my point of view, ThermalConductivityGradientComponents is more appropriate because it stands for the components of the thermal gradient vector, also it is consistent to the existing name ThermalConductivityComponents for the components of the thermal conductivity. |
This PR still needs a codeowner's review so I cannot merge it. Let's not put in the merge queue PR's that still need approval because they clog it. |
What does this means? Do you mean this PR need to be validated by all the 10 code owners or just some of you? |
src/coreComponents/constitutive/thermalConductivity/SinglePhaseThermalConductivity.hpp
Show resolved
Hide resolved
* @brief Getter for the derivative of effective conductivities in the subRegion w.r.t. temperature | ||
* @return an arrayView of derivative of effective conductivities w.r.t. temperature | ||
*/ | ||
arrayView3d< real64 const > dEffectiveConductivity_dT() const { return m_dEffectiveConductivity_dT; } |
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.
Does it need to be in the base class? Can it be in the SinglePhaseThermalConductivity
class itself. I can imagine we might later have thermal conductivity models that don't need this.
Only 1 code owner for each folder that was modified by the PR. |
Hello @rrsettgast, please take a look on this PR, which is waiting for your approval. |
@@ -11,7 +11,7 @@ | |||
targetRegions="{ region }"> | |||
<NonlinearSolverParameters | |||
newtonTol="1.0e-6" | |||
newtonMaxIter="10"/> | |||
newtonMaxIter="100"/> |
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.
I should converge in 20. if not, then something is wrong.
@@ -11,7 +11,7 @@ | |||
targetRegions="{ region }"> | |||
<NonlinearSolverParameters | |||
newtonTol="1.0e-6" | |||
newtonMaxIter="10"/> | |||
newtonMaxIter="100"/> |
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.
I can confirm that it converges in 20.
This PR is part of the project for non-linear thermal constitutive behavior from TotalEnergies. It tackles the problem of linear temperature dependent single phase effective thermal conductivity of porous medium.
thermalConductivity = defaultThermalConductivity + dThermalConductivity_dT * (T - T_reference)
where defaultThermalConductivity, dThermalConductivity_dT and T_reference are given in the xml inputs. The existing linear model in GEOS corresponds to the particular case of a constant thermal conductivity, i.e. dThermalConductivity_dT = 0.