Parallel evaluation of properties for fits/training#289
Merged
Conversation
Contributor
Author
|
With the extremely performant implementations in Vapor pressuresn = 10000000
fit_params = ["m", "sigma", "epsilon_k"]
parameters = np.array([[1.5,3.4,230.,2.3]]*n)
temperature = np.expand_dims(np.linspace(250., 400.0, n),1)
%time ParameterFit.vapor_pressure(Model.PcSaftNonAssoc, fit_params, parameters, temperature)Liquid densitiesn = 10000000
fit_params = ["m", "sigma", "epsilon_k"]
parameters = np.array([[1.5,3.4,230.,2.3]]*n)
temperature = np.linspace(250., 400.0, n)
pressure = np.array([1e5]*n)
input = np.stack((temperature, pressure),axis=1)
%time ParameterFit.liquid_density(Model.PcSaftNonAssoc, fit_params, parameters, input)Bubble pointsn = 1000000
fit_params = ["k_ij"]
parameters = np.array([[1.5,3.4,230.,2.3,2.3,3.5,245.,1.4,0.01]]*n)
temperature = np.linspace(200., 406.0, n)
molefracs = np.array([.5]*n)
pressure = np.array([1e5]*n)
input = np.stack((temperature, molefracs, pressure),axis=1)
%time ParameterFit.bubble_point_pressure(Model.PcSaftNonAssoc, fit_params, parameters, input)A million bubble point calculations in under 15 seconds 🥳 Bubble points with cross-associationn = 100000
fit_params = ["k_ij"]
parameters = np.array([[1.5,3.4,230.,2.3,0.01,1200.,1.0,2.0,2.3,3.5,245.,1.4,0.01,0.005,500.,1.0,1.0]]*n)
temperature = np.linspace(200., 388.0, n)
molefracs = np.array([.5]*n)
pressure = np.array([1e5]*n)
input = np.stack((temperature, molefracs, pressure),axis=1)
%time ParameterFit.bubble_point_pressure(Model.PcSaftFull, fit_params, parameters, input)As expected significantly slower but still one million in under one minute |
8cb432f to
57d9f2e
Compare
b6ef166 to
987bd7f
Compare
g-bauer
approved these changes
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
example
return values are the vapor pressure in Pa, the gradients of the vapor pressure with respect to
fit_paramsand the success status of every input.Went to 10 million vapor pressures to catch a glimpse of the CPU usage in
top. Efficiency as defined as total CPU time divided by number of cores and wall time is 88.4% which also seems high.liquid density