Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hnil
Copy link
Member

@hnil 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

@hnil hnil requested review from totto82 and atgeirr February 2, 2024 13:26
@bska
Copy link
Member

bska commented Feb 2, 2024

jenkins build this please

2 similar comments
@bska
Copy link
Member

bska commented Feb 2, 2024

jenkins build this please

@hnil
Copy link
Member Author

hnil commented Feb 2, 2024

jenkins build this please

@hnil hnil marked this pull request as draft February 7, 2024 08:19
@hnil hnil force-pushed the blackoilthermal_fixes_enthalpy branch from bcbe7c2 to 739c615 Compare February 7, 2024 13:32
@hnil hnil marked this pull request as ready for review February 7, 2024 13:45
Copy link
Member

@totto82 totto82 left a 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;
Copy link
Member

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.

Copy link
Member Author

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);
Copy link
Member

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?

Copy link
Member Author

@hnil hnil Feb 14, 2024

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);
}
Copy link
Member

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.

Copy link
Member Author

@hnil hnil Feb 14, 2024

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);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here +hVapO

Copy link
Member Author

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;
}
}
Copy link
Member

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.

Copy link
Member Author

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?

@totto82
Copy link
Member

totto82 commented Feb 15, 2024

jenkins build this please

@hnil hnil marked this pull request as draft April 11, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants