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

Implemented box specific enthalpy and compressibility calculations and printing to block averages, as well as compressibility to log files. #362

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

dyukovsm
Copy link
Contributor

@dyukovsm dyukovsm commented Aug 21, 2021

Currently Enthalpy needs to be hand calculated from TOT_EN, pressure and volume of the system. This small cosmetic change prints enthalpy as calculated by formula H = U + PV (in units of kJ/mol), and compressibility as calculated by formula Z = PV/nRT.

Copy link
Collaborator

@GregorySchwing GregorySchwing left a comment

Choose a reason for hiding this comment

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

src/OutConst.h : 48
TOTAL_SINGLE should stay 13, since pressure doesn't change in NVT. If you have compiler errors by leaving this a 13, then you aren't initializing the blocks correctly.

You need to move your new outputs into the NPT and the else, which is GEMC, compiler pragmas (#elif ENSEMBLE == NPT). Nothing should change in the NVT and GCMC areas.

@GregorySchwing
Copy link
Collaborator

You are correct that the NVT ensemble is relevant ensemble. Please test support for GEMC NVT also.

@dyukovsm
Copy link
Contributor Author

I did test out on GEMC NVT. I need to test on GEMC NPT as well?

@GregorySchwing
Copy link
Collaborator

No, just post some screenshots of the Block output files.

@dyukovsm
Copy link
Contributor Author

dyukovsm commented Aug 23, 2021

image
image

Butane vapor (smaller density) and liquid (larger density) boxes.
GEMC NVT simulation.

@dyukovsm dyukovsm changed the title hand typed the changes. copies this src files to cluster. ran. it works Implemented box specific enthalpy and compressibility calculations and printing to block averages, as well as compressibility to log files. Aug 23, 2021
@dyukovsm
Copy link
Contributor Author

Z calculation for ethane was verified for ethane, along saturation lines, and deviation from NIST is thought to be explained in the TRAPPE-ua overestimating pressure.
image (6)
image (5)

@dyukovsm
Copy link
Contributor Author

Hvape was compared both against NIST and GEMC heat of evaporation calculation. The method is closely matches GEMC results, with an exception of temperatures close to critical point, where liquid pressure diverges: a nonissue for GEMC, because GEMC uses pressure of vapor box only.
image
image

@GregorySchwing GregorySchwing merged commit c9a7261 into GOMC-WSU:development Aug 23, 2021
@dyukovsm
Copy link
Contributor Author

Calculations can be turned off by disabling the pressure, for example by using this in the mbuild config writer: "PressureCalc": [False, int(1000)].

image
image

@GregorySchwing
Copy link
Collaborator

I was mistaken when I told you PressureCalc turns off pressure output. You use #################################

ENABLE: BLK, FLUC.

#################################
OutEnergy true true
OutPressure false false
OutMolNum true true
OutDensity true true
OutVolume true true
OutSurfaceTension false false

@GregorySchwing
Copy link
Collaborator

Add or modify the bolded line to your config file.

@dyukovsm
Copy link
Contributor Author

I just disabled pressure calc, and it printed the block output without compressibility, pressure or enthalpy.
image
image

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.

2 participants