-
Notifications
You must be signed in to change notification settings - Fork 30
Parallel evaluation of properties for fits/training #289
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
Conversation
|
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
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