-
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
fix: use mass and energy consistently for single phase solvers #3485
base: develop
Are you sure you want to change the base?
Conversation
@@ -241,46 +241,38 @@ DECLARE_FIELD( temperatureScalingFactor, | |||
NO_WRITE, | |||
"Scaling factors for temperature" ); | |||
|
|||
DECLARE_FIELD( mass, |
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.
mass
went to single phase file since it is used there, not for compositional
@@ -594,8 +634,6 @@ void SinglePhaseBase::initializeFluidState( MeshLevel & mesh, arrayView1d< strin | |||
|
|||
// 2. save the initial density (for use in the single-phase poromechanics solver to compute the deltaBodyForce) | |||
fluid.initializeState(); | |||
|
|||
updateMass( subRegion ); |
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 call is redundant, updateMass
already called in updateFluidState few lines above
@@ -291,13 +260,11 @@ class SurfaceElementAccumulationKernel : public AccumulationKernel< SurfaceEleme | |||
void computeAccumulation( localIndex const ei, | |||
Base::StackVariables & stack ) const | |||
{ | |||
Base::computeAccumulation( ei, stack, [&] () | |||
Base::computeAccumulation( ei, stack ); |
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.
keep it simple
stack.dSolidEnergy_dPres = dSolidVolume_dPres * m_rockInternalEnergy[ei][0]; | ||
stack.dSolidEnergy_dTemp = solidVolume * m_dRockInternalEnergy_dTemp[ei][0] + dSolidVolume_dTemp * m_rockInternalEnergy[ei][0]; | ||
} | ||
{}; |
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 could not remove this, somehow compiler gets always confused
you may want to keep an eye on this: #3460 |
Yes thanks |
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.
LGTM
unified where possible
for poromechanics - hard to do because porosity is being updated inside the assembly kernel, so left it as is
fixed glitch with double porosity update in poromechanics when it was updated both in flow solver and in poromechanics kernel using different equations leading to potential inconsistencies