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

Adapt the IsothermAccurateWorkChain #111

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

Adapt the IsothermAccurateWorkChain #111

wants to merge 1 commit into from

Conversation

mbercx
Copy link
Collaborator

@mbercx mbercx commented Sep 8, 2023

Draft Pull request with changes from @ElMouba to the IsothermAccurateWorkChain.

@mbercx
Copy link
Collaborator Author

mbercx commented Sep 8, 2023

@ElMouba could you explain what the changes are trying to accomplish, and what is going wrong?

@ElMouba
Copy link
Collaborator

ElMouba commented Sep 8, 2023

Previously, when the last pressure point calculated was higher than the saturation pressure, the workchain should stop and converge. Now, I changed a bit the logic (for a different application):
When the last uptake calculated is higher than half of the saturation uptake, calculate the last pressure point, run gcmc for that last pressure point then exit (converge). What's happening in reality is that the last pressure point is calculated correctly but the gcmc doesn't run and the last pressure point in the output dictionary is being replaced by the one calculated last.

I also tried another way by defining a totally new function for that last calculation and add it to the outline of the workchain and still didn't work. The logic seems to me an easy one to implement, but I am not being able to !!

inter = scipy.stats.linregress([preg1, preg2, preg3], [conv1*load1, conv2*load2, conv3*load3])[1]

self.ctx.pressure = (self.ctx.geom['Estimated_saturation_loading'] - inter)/slope
self.ctx.gcmc_1 += 1
Copy link
Member

Choose a reason for hiding this comment

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

Should that be

Suggested change
self.ctx.gcmc_1 += 1
self.ctx.gcmc_i += 1

?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am sorry, it was a typo but it changes nothing !!
I am trying something now and will let you know if it works.
In the outline of the workchain, a new gcmc calculation is called only if the While loop returns True.
The fact that we have return False there then it converges and exits.
I switched it to True and added a dummy condition as False afterwards.

Copy link
Collaborator

Choose a reason for hiding this comment

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

still not working :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is the gcmc at least running now?

Could you commit & push your changes?

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.

3 participants