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
Changes to add code for mixing in thermal simulation, for now setting… #3889
base: master
Are you sure you want to change the base?
Conversation
hnil
commented
Feb 2, 2024
- Changed code to include a mixing rule for blackoil.
- Settings do not change results: will be done in separate pullrequest
jenkins build this please |
2 similar comments
jenkins build this please |
jenkins build this please |
… dones not change result
bcbe7c2
to
739c615
Compare
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.
Most of the PR is fine. I have some questions I would like your comments on. And please check the sign of hvap.
const Scalar hVap = 480.6e3; // [J / kg] | ||
|
||
// this is the heat capasity for gas without dissolution which is handled else where | ||
const Scalar hVap = 480.6e3; | ||
Scalar u = temperatureColumn[0]*cvGasColumn[0] + hVap; |
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.
You want to keep this for now? And not use hvap() Is this to avoid test failures.
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. will change the settings in separate pullrequest.
const auto& p = decay<LhsEval>(fluidState.pressure(phaseIdx)); | ||
const auto& T = decay<LhsEval>(fluidState.temperature(phaseIdx)); | ||
// immiscible oil | ||
const LhsEval Rs(0.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.
if enableDisgas etc is false, do we need to enter internalMixingTotalEnergy(...) at all? Why dont just return false in the mixingEnergy() for immiscible cases?
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.
We can do this. With all the different models of mixing i think it would be easier to keep the code as it is. A posibility is to set the mixingEnergy() false for this cases.
return | ||
oilEnergy*bo*referenceDensity(oilPhaseIdx, regionIdx) | ||
+ (gasEnergy-hVapG)*Rs*bo*referenceDensity(gasPhaseIdx, regionIdx); | ||
} |
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 hVapG minus? Later it is pluss? I guess this should be consistent.
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 idea was that energy of gas was given in the gas phase and the energy of liquid is given in the liquid phase. hVap is positive going from liquid to gas. Does this make sence?
gasEnergy*bg*referenceDensity(gasPhaseIdx, regionIdx) | ||
+ (oilEnergy+hVapO)*Rv*bg*referenceDensity(oilPhaseIdx, regionIdx) | ||
+ (waterEnergy+hVapW)*Rvw*bg*referenceDensity(waterPhaseIdx, regionIdx); | ||
} |
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.
Here +hVapO
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.
Se comment above.
default: { | ||
return false; | ||
} | ||
} |
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.
For CO2STORE and H2STORE the mixingEnergy is already included. Do you plan to extract that part out and return true here or just keep it as is and return false.
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 will return true for the cases which should use a mixing model. i.e. only for thermal blackoil?
jenkins build this please |