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
New equilibrium tests #103
Comments
This isn't directly related to solve_eq_at_conditions because it doesn't even get to an equilibrium calculation. Changing the starting values of the starting Al concentration seems to make it work sometimes. database_file = '/Users/brandon/Box Sync/databases/literature/Al-Cu-Zr_Zhou.tdb'
from matplotlib import pyplot as plt
from pycalphad import Database, equilibrium, variables as v
dbf = Database(database_file)
phases = list(dbf.phases.keys())
comps = ['AL','CU','ZR','VA']
conditions = {v.X('ZR'): 0.4, v.X('AL'): (0,1,0.04), v.P: 101325, v.T: 1373}
equilibrium(dbf, comps, phases, conditions, x=v.X('ZR'), y=v.X('AL'),verbose=True) Unhelpful traceback:Calculation Backend: Compiled (autowrap)
Components: AL CU VA ZR
Phases: AL2CU AL2ZR AL2ZR3 AL3ZR2 AL3ZR4 AL3ZR5 AL4ZR5 AL5CU8 AL9CU11 ALPHA2 ALZR ALZR2 ALZR3 BCC_A2 CBCC_A12 CU10ZR7 CU2ZR CU51ZR14 CU5ZR7 CU8ZR3 CU9ZR2 CUB_A13 CUZR CUZR2 EPS2 ETA1 ETA2 FCC_A1 GAM1 GAM2 HCP_A3 LIQUID M3ZR OMEGA T1 T11 T2 T3 T4 T6 T7 T9 [done]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-29-7abb40511c4f> in <module>()
1 fig = plt.figure(figsize=(20,20))
----> 2 equilibrium(dbf, comps, phases, conditions, x=v.X('ZR'), y=v.X('AL'),verbose=True)
/Users/brandon/Projects/pycalphad/pycalphad/core/equilibrium.py in equilibrium(dbf, comps, phases, conditions, output, model, verbose, broadcast, calc_opts, scheduler, parameters, **kwargs)
356 properties = delayed(properties.merge, pure=False)(eqcal, inplace=True, compat='equals')
357 if scheduler is not None:
--> 358 properties = dask.compute(properties, get=scheduler)[0]
359 properties.attrs['created'] = datetime.utcnow()
360 if len(kwargs) > 0:
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/base.py in compute(*args, **kwargs)
177 dsk = merge(var.dask for var in variables)
178 keys = [var._keys() for var in variables]
--> 179 results = get(dsk, keys, **kwargs)
180
181 results_iter = iter(results)
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in get_sync(dsk, keys, **kwargs)
521 queue = Queue()
522 return get_async(apply_sync, 1, dsk, keys, queue=queue,
--> 523 raise_on_exception=True, **kwargs)
524
525
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in get_async(apply_async, num_workers, dsk, result, cache, queue, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, **kwargs)
488 f(key, res, dsk, state, worker_id)
489 while state['ready'] and len(state['running']) < num_workers:
--> 490 fire_task()
491
492 # Final reporting
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in fire_task()
459 # Submit
460 apply_async(execute_task, args=[key, dsk[key], data, queue,
--> 461 get_id, raise_on_exception])
462
463 # Seed initial tasks into the thread pool
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in apply_sync(func, args, kwds)
509 def apply_sync(func, args=(), kwds={}):
510 """ A naive synchronous version of apply_async """
--> 511 return func(*args, **kwds)
512
513
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in execute_task(key, task, data, queue, get_id, raise_on_exception)
265 """
266 try:
--> 267 result = _execute_task(task, data)
268 id = get_id()
269 result = key, result, None, id
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in _execute_task(arg, cache, dsk)
247 func, args = arg[0], arg[1:]
248 args2 = [_execute_task(a, cache) for a in args]
--> 249 return func(*args2)
250 elif not ishashable(arg):
251 return arg
/Users/brandon/Projects/pycalphad/pycalphad/core/lower_convex_hull.py in lower_convex_hull(global_grid, result_array)
108 hyperplane(idx_global_grid_X_values, idx_global_grid_GM_values,
109 idx_comp_values, idx_result_array_MU_values,
--> 110 idx_result_array_NP_values, idx_result_array_points_values)
111 # Copy phase values out
112 points = result_array_points_values[it.multi_index]
/Users/brandon/Projects/pycalphad/pycalphad/core/hyperplane.pyx in pycalphad.core.hyperplane.hyperplane (pycalphad/core/hyperplane.c:4379)()
/Users/brandon/Projects/pycalphad/pycalphad/core/hyperplane.pyx in pycalphad.core.hyperplane.hyperplane (pycalphad/core/hyperplane.c:4073)()
ValueError: ('Max hull iterations exceeded. Remaining driving force: ', -6.815012708108264e+20) |
What is |
This used to be a ternplot call and those got left behind. |
A better case %matplotlib inline
from matplotlib import pyplot as plt
from pycalphad import Database, equilibrium, variables as v
from time import time
dbfile = '/Users/brandon/Box Sync/databases/nims-databases/Cr-Ti-V.tdb'
dbf = Database(dbfile)
comps = ['CR', 'TI', 'V', 'VA']
import numpy as np
phases = list(dbf.phases.keys())
conditions = {v.X('TI'): 0.7, v.X('V'): 0.08, v.P: 101325, v.T: 873}
equilibrium(dbf, comps, phases, conditions, verbose=True) Traceback with verbose:Calculation Backend: Compiled (autowrap)
Components: CR TI V VA
Phases: BCC_A2 HCP_A3 LAVES_C14 LAVES_C15 LAVES_C36 LIQUID [done]
('Composition Sets', [CompositionSet(LAVES_C15, [ 5.92592593e-01 4.07407407e-01 1.00000000e-12], NP=0.1698454988461324), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.09091405367343551), CompositionSet(BCC_A2, [ 0.1614506 0.73033021 0.10821919], NP=0.7392404474804323)])
('reduced_hessian eigenvalues', array([ -9.35555842e+01, 2.63716672e+03, 7.34835746e+03,
9.45520023e+13, 1.50880519e+14, 2.83273159e+14,
3.71086120e+14, 4.52127157e+14]))
('reduced_hessian modified eigenvalues', array([ 9.36119157e+01, 2.63710806e+03, 7.34838927e+03,
9.45520023e+13, 1.50880519e+14, 2.83273159e+14,
3.71086120e+14, 4.52127157e+14]))
('NEW_L_MULTIPLIERS', array([ 1119.36911679, 4228.36452636, -10806.09864172, 49436.7410664 ,
22101.91951702, -71468.68284031, -40784.31179058, -37035.98269442,
-56564.00520976]))
('L_CONSTRAINTS', array([ -1.86045099e-16, -1.99922887e-16, -1.99922887e-16,
0.00000000e+00, -1.38777878e-17, 0.00000000e+00,
0.00000000e+00, 1.11022302e-16, 0.00000000e+00]))
('penalty', 10000)
('old_driving_force', -38877.441584370004, 1.9992288680364425e-16)
('sublsum', -773.12325259891827)
(1.0, -32832.10507939454, 0.30000000000146687)
(0.5, -34526.129460600612, 0.23781870035898778)
(0.25, -36550.40915897314, 0.16979519781956143)
(0.125, -37662.797858529128, 0.11915583853618006)
(0.0625, -38792.486883353755, 0.011080696692249536)
(0.03125, -38889.196045920362, 0.00076004893197989531)
('alpha', 0.03125)
('Phases', [CompositionSet(LAVES_C15, [ 5.90738131e-01 4.09261869e-01 1.00000000e-12], NP=0.15918950839059595), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.04143677635789113), CompositionSet(BCC_A2, [ 0.15728563 0.74329824 0.09941613], NP=0.7993737152515131)])
('step', array([ -8.90141369e-02, 8.90141370e-02, -3.67062453e-11,
-2.00583381e-11, 4.99099204e-11, -2.98513200e-11,
-5.24027252e-10, 1.07005822e-09, -5.46031187e-10,
0.00000000e+00, -1.33279261e-01, 4.14976979e-01,
-2.81697717e-01, 0.00000000e+00, -3.40991695e-01,
-1.58327287e+00, 1.92426457e+00]))
('conv_angle', 89.79776732441249)
('Site fractions', array([ 8.86107197e-01, 1.13892803e-01, 1.00000000e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e+00, 1.57285625e-01, 7.43298242e-01,
9.94161330e-02, 1.00000000e+00]))
('Phase fractions', array([ 0.15918951, 0.04143678, 0.79937372]))
('Chemical potentials', array([-40784.31179058, -37035.98269442, -56564.00520976]))
('Chem pot progress', array([ 603.09879796, -288.9259566 , -5948.11097951]))
('Energy progress', -15.753445324575296)
('Driving force', 518.45987218480877)
('Composition Sets', [CompositionSet(LAVES_C15, [ 5.90738131e-01 4.09261869e-01 1.00000000e-12], NP=0.15918950839059595), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.04143677635789113), CompositionSet(BCC_A2, [ 0.15728563 0.74329824 0.09941613], NP=0.7993737152515131)])
('reduced_hessian eigenvalues', array([ -8.42443784e+02, 2.34981063e+03, 7.17174080e+03,
6.93551800e+13, 8.87081258e+13, 2.07965079e+14,
2.65899737e+14, 3.50012665e+14]))
('reduced_hessian modified eigenvalues', array([ 8.42437928e+02, 2.34980974e+03, 7.17175571e+03,
6.93551800e+13, 8.87081258e+13, 2.07965079e+14,
2.65899737e+14, 3.50012665e+14]))
('NEW_L_MULTIPLIERS', array([ -1205.86044506, -4319.34053693, -861.09764171, 3736.35810387,
7942.45623166, -25231.16025878, -42373.47010455, -36909.29646803,
-47771.87770541]))
('L_CONSTRAINTS', array([ 1.14685475e-12, 1.55944138e-12, 1.99997788e-12,
0.00000000e+00, 9.71445147e-17, 0.00000000e+00,
-2.30692550e-04, 7.60048932e-04, -5.29356381e-04]))
('penalty', 10000)
('old_driving_force', -38885.004771838554, 0.00076004893197989531)
('sublsum', -193.8734426569564)
(1.0, -37533.127304432441, 0.12621820700173769)
(0.5, -38548.015722427459, 0.03868429303661336)
(0.25, -38919.582663747016, 0.001151425059618294)
('alpha', 0.25)
('Phases', [CompositionSet(LAVES_C15, [ 6.14872349e-01 3.85127651e-01 9.90618126e-12], NP=0.16211497243643985), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.0027290306171850534), CompositionSet(BCC_A2, [ 0.14334914 0.76151933 0.09513153], NP=0.8351559969464489)])
('step', array([ 1.44805306e-01, -1.44805306e-01, 3.81484640e-11,
2.14076136e-11, -5.35444062e-11, 3.05772471e-11,
-8.82166499e-11, 1.72257830e-10, -8.60411583e-11,
0.00000000e+00, -5.57459552e-02, 7.28843570e-02,
-1.71384018e-02, 0.00000000e+00, 1.17018562e-02,
-1.54830983e-01, 1.43129127e-01]))
('conv_angle', 88.46881504278565)
('Site fractions', array([ 9.22308524e-01, 7.76914763e-02, 1.05371160e-11,
6.35190339e-12, 1.00000000e+00, 8.64431179e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e+00, 1.43349137e-01, 7.61519331e-01,
9.51315326e-02, 1.00000000e+00]))
('Phase fractions', array([ 0.16211497, 0.00272903, 0.835156 ]))
('Chemical potentials', array([-42373.47010455, -36909.29646803, -47771.87770541]))
('Chem pot progress', array([-1589.15831397, 126.68622639, 8792.12750435]))
('Energy progress', -40.15364283663075)
('Driving force', 37.8100020674392)
('Composition Sets', [CompositionSet(LAVES_C15, [ 6.14872349e-01 3.85127651e-01 9.90618126e-12], NP=0.16211497243643985), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.0027290306171850534), CompositionSet(BCC_A2, [ 0.14334914 0.76151933 0.09513153], NP=0.8351559969464489)])
('reduced_hessian eigenvalues', array([ 4.46456395e+02, 3.89343994e+03, 8.50166182e+03,
4.57677544e+12, 1.37303023e+13, 1.72840787e+13,
4.89565008e+13, 5.43895215e+13]))
('NEW_L_MULTIPLIERS', array([ -905.93107499, -3121.6072806 , -2441.54492526, 10867.32368692,
9922.92239094, -32148.4761443 , -41659.13591996, -36747.05577181,
-51310.29274292]))
('L_CONSTRAINTS', array([ 8.60190063e-13, 1.16962425e-12, 1.99997788e-12,
0.00000000e+00, 5.55111512e-17, 0.00000000e+00,
-6.01094994e-04, 1.15142506e-03, -5.50330066e-04]))
('penalty', 10000)
('old_driving_force', -38921.287385225973, 0.001151425059618294)
('sublsum', -144.7594778295913)
(1.0, -36482.972200633551, 0.18966235922116914)
(0.5, -37317.778371026041, 0.15658228013220343)
(0.25, -38120.027402641885, 0.083003249157682313)
(0.125, -38544.718951472183, 0.040225841781000082)
(0.0625, -38749.216837186337, 0.019202373107327309)
(0.03125, -38849.535084471499, 0.0087819475241579514)
(0, -38921.287385225973, 0.001151425059618294)
Decreasing constraint penalty because alpha is zero
('alpha', 0)
('Phases', [CompositionSet(LAVES_C15, [ 6.14872349e-01 3.85127651e-01 9.90618126e-12], NP=0.16211497243643985), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.0027290306171850534), CompositionSet(BCC_A2, [ 0.14334914 0.76151933 0.09513153], NP=0.8351559969464489)])
('step', array([ 3.86175350e-02, -3.86175352e-02, 1.78821469e-10,
5.94845425e-11, -1.77926962e-10, 1.17272771e-10,
-3.82948664e-09, 7.90159662e-09, -4.07410999e-09,
0.00000000e+00, -4.13802338e-02, 8.25034002e-02,
-4.11231664e-02, 0.00000000e+00, -3.51204416e-02,
-3.31683164e-01, 3.66803605e-01]))
('conv_angle', 89.358796949372461)
('Site fractions', array([ 9.22308524e-01, 7.76914763e-02, 1.05371160e-11,
6.35190339e-12, 1.00000000e+00, 8.64431179e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e+00, 1.43349137e-01, 7.61519331e-01,
9.51315326e-02, 1.00000000e+00]))
('Phase fractions', array([ 0.16211497, 0.00272903, 0.835156 ]))
('Chemical potentials', array([-41659.13591996, -36747.05577181, -51310.29274292]))
('Chem pot progress', array([ 714.33418458, 162.24069622, -3538.41503751]))
('Energy progress', 0.0)
('Driving force', 48.456475626393512)
('Composition Sets', [CompositionSet(LAVES_C15, [ 6.14872349e-01 3.85127651e-01 9.90618126e-12], NP=0.16211497243643985), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=0.0027290306171850534), CompositionSet(BCC_A2, [ 0.14334914 0.76151933 0.09513153], NP=0.8351559969464489)])
('reduced_hessian eigenvalues', array([ -5.25172181e+00, 3.93388283e+03, 8.28720491e+03,
4.57677544e+12, 1.37303023e+13, 1.72840787e+13,
4.89565008e+13, 5.43895215e+13]))
('reduced_hessian modified eigenvalues', array([ 5.25295878e+00, 3.93387771e+03, 8.28720535e+03,
4.57677544e+12, 1.37303023e+13, 1.72840787e+13,
4.89565008e+13, 5.43895215e+13]))
('NEW_L_MULTIPLIERS', array([ 35829.90163072, 127805.33633421, -176724.53539448,
806324.14030158, 251528.01229684, -822187.35916907,
-36504.40278557, -37002.57161944, -173162.81680812]))
('L_CONSTRAINTS', array([ 8.60190063e-13, 1.16962425e-12, 1.99997788e-12,
0.00000000e+00, 5.55111512e-17, 0.00000000e+00,
-6.01094994e-04, 1.15142506e-03, -5.50330066e-04]))
('penalty', 1000.0)
('old_driving_force', -39005.679452090502, 0.001151425059618294)
('sublsum', -8002.0561721167178)
(1.0, -45740.461950679797, 0.300000000002)
('alpha', 1.0)
('Phases', [CompositionSet(LAVES_C15, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1e-12), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1e-12), CompositionSet(BCC_A2, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1.0)])
('step', array([ -1.43150068e+00, 1.43150069e+00, -7.59120765e-09,
-2.43604475e-09, 7.44952714e-09, -5.01465140e-09,
-2.84421040e-07, 5.79367197e-07, -2.94948156e-07,
0.00000000e+00, -9.54884955e-01, 4.34094822e+00,
-3.38606327e+00, 0.00000000e+00, -5.38201409e+00,
-2.43498876e+01, 2.97319017e+01]))
('conv_angle', 89.990761583271507)
('Site fractions', array([ 1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e-12, 1.00000000e+00, 1.00000000e-12,
1.00000000e+00, 1.00000000e-12, 1.00000000e+00,
1.00000000e-12, 1.00000000e+00]))
('Phase fractions', array([ 1.00000000e-12, 1.00000000e-12, 1.00000000e+00]))
('Chemical potentials', array([ -36504.40278557, -37002.57161944, -173162.81680812]))
('Chem pot progress', array([ 5154.7331344 , -255.51584763, -121852.5240652 ]))
('Energy progress', 3376.109193678065)
('Driving force', 1445.3321408723932)
('Composition Sets', [CompositionSet(LAVES_C15, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1e-12), CompositionSet(HCP_A3, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1e-12), CompositionSet(BCC_A2, [ 1.00000000e-12 1.00000000e+00 1.00000000e-12], NP=1.0)])
('reduced_hessian eigenvalues', array([-109983.28494995, -60379.19386669, 603.2074116 ,
1658.93227169, 2416.0378329 , 3359.32297988,
62808.00517844, 112933.63809998]))
('reduced_hessian modified eigenvalues', array([ 603.2074116 , 1658.93227169, 2416.0378329 ,
3359.32297988, 60379.19386669, 62808.00517844,
109983.28494995, 112933.63809998]))
('NEW_L_MULTIPLIERS', array([ 1.86543170e+04, 1.11026430e+04, 1.23210752e+04,
6.64815637e+03, 2.78243137e+04, -7.02837564e+04,
1.10687486e+15, -5.17724029e+04, 4.02499948e+14]))
('L_CONSTRAINTS', array([ 1.99997788e-12, 1.99997788e-12, 1.99997788e-12,
0.00000000e+00, 1.99997788e-12, 0.00000000e+00,
-2.20000000e-01, 3.00000000e-01, -8.00000000e-02]))
('penalty', 10000)
('old_driving_force', 275712464769945.09, 0.300000000002)
('sublsum', -275712464857543.66)
(1.0, -39927.237237187896, 0.10898146238945319)
('alpha', 1.0)
('Phases', [CompositionSet(LAVES_C15, [ 0.05219216 0.87596675 0.14449539], NP=1e-12), CompositionSet(HCP_A3, [ 1.00000000e-12 8.82959720e-01 1.57626177e-01], NP=1e-12), CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('step', array([-0.10898146, -0.06327894, 0.1722604 , 0.15657649, -0.24554187,
0.08896538, -0.0405859 , -0.11704028, 0.15762618, 0. ,
0.22 , -0.3 , 0.08 , 0. , -0.31651209,
-0.20152023, 0.51803232]))
('conv_angle', 74.125330171074097)
('Site fractions', array([ 1.00000000e-12, 9.36721065e-01, 1.72260398e-01,
1.56576488e-01, 7.54458133e-01, 8.89653793e-02,
1.00000000e-12, 8.82959720e-01, 1.57626177e-01,
1.00000000e+00, 2.20000000e-01, 7.00000000e-01,
8.00000000e-02, 1.00000000e+00]))
('Phase fractions', array([ 1.00000000e-12, 1.00000000e-12, 1.00000000e+00]))
('Chemical potentials', array([ 1.10687486e+15, -5.17724029e+04, 4.02499948e+14]))
('Chem pot progress', array([ 1.10687486e+15, -1.47698313e+04, 4.02499949e+14]))
('Energy progress', -3207.3673680377105)
('Driving force', -275712464788129.16)
('Composition Sets', [CompositionSet(LAVES_C15, [ 0.05219216 0.87596675 0.14449539], NP=1e-12), CompositionSet(HCP_A3, [ 1.00000000e-12 8.82959720e-01 1.57626177e-01], NP=1e-12), CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('reduced_hessian eigenvalues', array([ -7.04596003e+14, -2.59499700e+14, -6.17927018e-02,
2.66672720e-04, 4.32787545e+02, 6.78061826e+02,
4.86357843e+14, 7.30006612e+14]))
('reduced_hessian modified eigenvalues', array([ 5.55323318e-02, 1.52176901e-01, 4.32791216e+02,
6.77994043e+02, 2.59499700e+14, 4.86357843e+14,
7.04596003e+14, 7.30006612e+14]))
('NEW_L_MULTIPLIERS', array([ 1.30161410e+13, 6.50807052e+12, 3.59841134e+12,
2.26881529e+11, -3.38490915e+13, -2.58382807e+13,
-2.24606772e+13, 3.52119424e+13, 1.47344520e+13]))
('L_CONSTRAINTS', array([ 1.08981462e-01, 2.77555756e-17, 4.05858971e-02,
0.00000000e+00, -1.38777878e-16, 0.00000000e+00,
1.13187237e-13, 1.99995576e-12, -4.16333634e-17]))
('penalty', 10000)
('old_driving_force', -1564562874705.7666, 0.10898146238945319)
('sublsum', 1564562837101.6934)
(1.0, -1238422768383.885, 0.052408568767892488)
(0.5, -1401492821545.2434, 0.080695015578672896)
(0.25, -1483027848125.6069, 0.094838238984062989)
(0.125, -1523795361415.7114, 0.10190985068675815)
(0.0625, -1544179118060.7454, 0.10544565653810567)
(0.03125, -1554370996383.2598, 0.10721355946377942)
(0, -1564562874705.7666, 0.10898146238945319)
Decreasing constraint penalty because alpha is zero
('alpha', 0)
('Phases', [CompositionSet(LAVES_C15, [ 0.05219216 0.87596675 0.14449539], NP=1e-12), CompositionSet(HCP_A3, [ 1.00000000e-12 8.82959720e-01 1.57626177e-01], NP=1e-12), CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('step', array([-0.05240857, -0.00496618, -0.05160671, 0.02311418, -0.01256448,
-0.0105497 , -0.03002138, -0.01556654, 0.00500203, 0. ,
-0.00876953, 0.00596031, 0.00280922, 0. , -0.03880589,
-0.00715212, 0.0490677 ]))
('conv_angle', 100.19389240121117)
('Site fractions', array([ 1.00000000e-12, 9.36721065e-01, 1.72260398e-01,
1.56576488e-01, 7.54458133e-01, 8.89653793e-02,
1.00000000e-12, 8.82959720e-01, 1.57626177e-01,
1.00000000e+00, 2.20000000e-01, 7.00000000e-01,
8.00000000e-02, 1.00000000e+00]))
('Phase fractions', array([ 1.00000000e-12, 1.00000000e-12, 1.00000000e+00]))
('Chemical potentials', array([ -2.24606772e+13, 3.52119424e+13, 1.47344520e+13]))
('Chem pot progress', array([ -1.12933554e+15, 3.52119424e+13, -3.87765496e+14]))
('Energy progress', 0.0)
('Driving force', -20885766892715.602)
Removing CompositionSet(HCP_A3, [ 1.00000000e-12 8.82959720e-01 1.57626177e-01], NP=nan)
Removing CompositionSet(LAVES_C15, [ 0.05219216 0.87596675 0.14449539], NP=nan)
('Composition Sets', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('NEW_L_MULTIPLIERS', array([ 8611.67863773, -25809.24934117, -38212.58516708, -37589.9336589 ,
-50527.75194443]))
('L_CONSTRAINTS', array([ -1.38777878e-16, 0.00000000e+00, 6.10067552e-14,
2.41029419e-13, -3.02161074e-13]))
('penalty', 1000.0)
('old_driving_force', -38764.606846821727, 3.0216107393954417e-13)
('sublsum', 7.3943593899036551e-17)
(1.0, -38764.606846822324, 4.163336342344337e-17)
('alpha', 1.0)
('Phases', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('step', array([ -6.10037021e-14, -2.41019704e-13, 3.02162184e-13,
0.00000000e+00, -1.38777878e-17]))
('conv_angle', 90.002873286102101)
('Site fractions', array([ 0.22, 0.7 , 0.08, 1. ]))
('Phase fractions', array([ 1.]))
('Chemical potentials', array([-38212.58516708, -37589.9336589 , -50527.75194443]))
('Chem pot progress', array([ 2.24606772e+13, -3.52119424e+13, -1.47344520e+13]))
('Energy progress', -3.8708094507455826e-09)
('Driving force', -2.664393281134835)
('Composition Sets', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('NEW_L_MULTIPLIERS', array([ 8614.34274117, -25809.24963102, -38215.24895881, -37592.59825099,
-50530.41625235]))
('L_CONSTRAINTS', array([ 4.16333634e-17, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00]))
('penalty', 10000)
('old_driving_force', -38764.606846822324, 4.163336342344337e-17)
('sublsum', 1.6357819730662906e-28)
(1.0, -38764.606846822324, 4.163336342344337e-17)
(0.5, -38764.606846822324, 4.163336342344337e-17)
(0.25, -38764.606846822324, 4.163336342344337e-17)
(0.125, -38764.606846822324, 4.163336342344337e-17)
(0.0625, -38764.606846822324, 4.163336342344337e-17)
(0.03125, -38764.606846822324, 4.163336342344337e-17)
(0, -38764.606846822324, 4.163336342344337e-17)
Decreasing constraint penalty because alpha is zero
('alpha', 0)
('Phases', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('step', array([ -9.15933995e-18, -2.91433544e-17, -3.33066907e-18,
0.00000000e+00, 4.16333634e-17]))
('conv_angle', 110.77760244046381)
('Site fractions', array([ 0.22, 0.7 , 0.08, 1. ]))
('Phase fractions', array([ 1.]))
('Chemical potentials', array([-38215.24895881, -37592.59825099, -50530.41625235]))
('Chem pot progress', array([-2.66379173, -2.6645921 , -2.66430791]))
('Energy progress', 0.0)
('Driving force', 0.0)
('Composition Sets', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('NEW_L_MULTIPLIERS', array([ 8614.34274117, -25809.24963102, -38215.24895881, -37592.59825099,
-50530.41625235]))
('L_CONSTRAINTS', array([ 4.16333634e-17, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00]))
('penalty', 1000.0)
('old_driving_force', -38764.606846822324, 4.163336342344337e-17)
('sublsum', 1.6357819730662906e-28)
(1.0, -38764.606846822324, 4.163336342344337e-17)
(0.5, -38764.606846822324, 4.163336342344337e-17)
(0.25, -38764.606846822324, 4.163336342344337e-17)
(0.125, -38764.606846822324, 4.163336342344337e-17)
(0.0625, -38764.606846822324, 4.163336342344337e-17)
(0.03125, -38764.606846822324, 4.163336342344337e-17)
(0, -38764.606846822324, 4.163336342344337e-17)
Decreasing constraint penalty because alpha is zero
('alpha', 0)
('Phases', [CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0)])
('step', array([ -9.15933995e-18, -2.91433544e-17, -3.33066907e-18,
0.00000000e+00, 4.16333634e-17]))
('conv_angle', 110.77760244046381)
('Site fractions', array([ 0.22, 0.7 , 0.08, 1. ]))
('Phase fractions', array([ 1.]))
('Chemical potentials', array([-38215.24895881, -37592.59825099, -50530.41625235]))
('Chem pot progress', array([ 0., 0., 0.]))
('Energy progress', 0.0)
('Driving force', 0.0)
Candidates to add:
defaultdict(<class 'list'>, {'LAVES_C14': [(CompositionSet(LAVES_C14, [ 0.66666667 0.33333333 0. ], NP=1.0), 1454.7565379485677), (CompositionSet(LAVES_C14, [ 0.66666667 0.33333333 0. ], NP=1.0), 1454.7565379485677), (CompositionSet(LAVES_C14, [ 0.66666667 0.33333333 0. ], NP=1.0), 1454.7565379485677), (CompositionSet(LAVES_C14, [ 0.66666667 0.33333333 0. ], NP=1.0), 1454.7565379485677), (CompositionSet(LAVES_C14, [ 0.66666667 0.33333333 0. ], NP=1.0), 1454.756538460002)], 'BCC_A2': [(CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0), -1.4551915228366852e-11), (CompositionSet(BCC_A2, [ 0.22000001 0.70000002 0.07999997], NP=1.0), -4.3655745685100555e-11), (CompositionSet(BCC_A2, [ 0.21999999 0.70000004 0.07999997], NP=1.0), -6.548361852765083e-11), (CompositionSet(BCC_A2, [ 0.22000002 0.7 0.07999998], NP=1.0), -1.4551915228366852e-11), (CompositionSet(BCC_A2, [ 0.22000003 0.69999999 0.07999998], NP=1.0), -5.093170329928398e-11), (CompositionSet(BCC_A2, [ 0.22000002 0.70000004 0.07999994], NP=1.0), -1.6007106751203537e-10), (CompositionSet(BCC_A2, [ 0.21999994 0.70000004 0.08000002], NP=1.0), -8.731149137020111e-11), (CompositionSet(BCC_A2, [ 0.22 0.70000002 0.07999998], NP=1.0), -1.4551915228366852e-11), (CompositionSet(BCC_A2, [ 0.22 0.7 0.08], NP=1.0), -2.1827872842550278e-11)], 'LAVES_C36': [(CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.03086370e-11], NP=1.0), 1724.6360362269697), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205), (CompositionSet(LAVES_C36, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1724.6360314516205)], 'LIQUID': [], 'LAVES_C15': [(CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 3.28019791e-11], NP=1.0), 1787.165926706286), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133), (CompositionSet(LAVES_C15, [ 6.66666667e-01 3.33333333e-01 1.00000000e-12], NP=1.0), 1787.1659214603133)], 'HCP_A3': []})
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-43-90ff3312d790> in <module>()
9 phases = list(dbf.phases.keys())
10 conditions = {v.X('TI'): 0.7, v.X('V'): 0.08, v.P: 101325, v.T: 873}
---> 11 equilibrium(dbf, comps, phases, conditions, verbose=True)
12
13
/Users/brandon/Projects/pycalphad/pycalphad/core/equilibrium.py in equilibrium(dbf, comps, phases, conditions, output, model, verbose, broadcast, calc_opts, scheduler, parameters, **kwargs)
356 properties = delayed(properties.merge, pure=False)(eqcal, inplace=True, compat='equals')
357 if scheduler is not None:
--> 358 properties = dask.compute(properties, get=scheduler)[0]
359 properties.attrs['created'] = datetime.utcnow()
360 if len(kwargs) > 0:
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/base.py in compute(*args, **kwargs)
177 dsk = merge(var.dask for var in variables)
178 keys = [var._keys() for var in variables]
--> 179 results = get(dsk, keys, **kwargs)
180
181 results_iter = iter(results)
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in get_sync(dsk, keys, **kwargs)
521 queue = Queue()
522 return get_async(apply_sync, 1, dsk, keys, queue=queue,
--> 523 raise_on_exception=True, **kwargs)
524
525
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in get_async(apply_async, num_workers, dsk, result, cache, queue, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, **kwargs)
488 f(key, res, dsk, state, worker_id)
489 while state['ready'] and len(state['running']) < num_workers:
--> 490 fire_task()
491
492 # Final reporting
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in fire_task()
459 # Submit
460 apply_async(execute_task, args=[key, dsk[key], data, queue,
--> 461 get_id, raise_on_exception])
462
463 # Seed initial tasks into the thread pool
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in apply_sync(func, args, kwds)
509 def apply_sync(func, args=(), kwds={}):
510 """ A naive synchronous version of apply_async """
--> 511 return func(*args, **kwds)
512
513
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in execute_task(key, task, data, queue, get_id, raise_on_exception)
265 """
266 try:
--> 267 result = _execute_task(task, data)
268 id = get_id()
269 result = key, result, None, id
/Users/brandon/.virtualenvs/pycalphad/lib/python3.5/site-packages/dask/async.py in _execute_task(arg, cache, dsk)
247 func, args = arg[0], arg[1:]
248 args2 = [_execute_task(a, cache) for a in args]
--> 249 return func(*args2)
250 elif not ishashable(arg):
251 return arg
/Users/brandon/Projects/pycalphad/pycalphad/core/eqsolver.pyx in pycalphad.core.eqsolver._solve_eq_at_conditions (pycalphad/core/eqsolver.c:23270)()
/Users/brandon/Projects/pycalphad/pycalphad/core/eqsolver.pyx in pycalphad.core.eqsolver.add_new_phases (pycalphad/core/eqsolver.c:9833)()
/Users/brandon/Projects/pycalphad/pycalphad/core/hyperplane.pyx in pycalphad.core.hyperplane.hyperplane (pycalphad/core/hyperplane.c:4073)()
ValueError: ('Max hull iterations exceeded. Remaining driving force: ', -39793.86464999274) <\details> |
Looks like two different bugs with the same symptom. Can you send the TDB file? |
Discussed OOB on 2017-07-28: A new branch will be created to hold failing equilibrium calls written as tests. As solver improvements make tests pass, they will be git cherry-picked into the test suite. Challenge: tests for databases with licensing issues. I have some examples that are non working for CC licensed tdbs from the NIST website and open-access CC databases in literature to start. |
Note to @bocklund:
Add any working examples that are now non-working to test suite to be fixed before merge |
@richardotis should calculations that are successful at higher point densities, but not at the default (e.g. 2000 over 500 current default) be added to the test suite at the working (e.g. 2000) or non-working (equilibrium default) point density? I think we should do the latter. |
That effect means higher point density is hiding a convergence problem. We should use the same point density with every test. |
I would like to see your current results comparing develop to fix_memory, before I start breaking things up. |
import numpy as np
from pycalphad import CompiledModel, Model, Database, calculate, equilibrium
import pycalphad.variables as v
#from sympy.core.cache import clear_cache
dbf = Database('alfe_sei.TDB')
from pympler import tracker
phx = dbf.phases.keys()
conds = {v.T: (300,2000,100), v.X('AL'): 0.3, v.P: 101325}
#clear_cache()
tr = tracker.SummaryTracker()
tr.print_diff()
tr.print_diff()
tr.print_diff()
tr.print_diff()
eq = equilibrium(dbf, ['AL', 'FE', 'VA'], phx, conds)
dbf = Database('alfe_sei.TDB')
eq = equilibrium(dbf, ['AL', 'FE', 'VA'], phx, conds)
#clear_cache()
tr.print_diff()
If you enable the lines to clear the sympy cache, we get fewer dangling objects:
|
For one case in Cr-Ti-V, I'm finding a stochastic result (one clearly not mass balanced, another that appears correct): from pycalphad import Database, equilibrium, variables as v
dbfile = 'Cr-Ti-V.tdb'
dbf = Database(dbfile)
comps = ['CR', 'TI', 'V', 'VA']
import numpy as np
phases = list(dbf.phases.keys())
conditions = {v.X('TI'): 0.4, v.X('V'): 0.28, v.P: 101325, v.T: 873}
eq = equilibrium(dbf, comps, phases, conditions, verbose=True)
print(eq)
print(eq.X) |
(This is on 006aa37) |
The above bug should be fixed in 6242690. I'd be interested in seeing the calculation results with that commit. It should be a little faster, too. |
Comparing energies calculated by 6242690 ("current") to develop
Filtering to just the interesting ones:
No convergence failures, but there seems to be some variation in how the edge of composition space is handled:
|
This is a global minimization issue, with most of the issue being how the phases get changed during miscibility gap detection inside
|
One other challenging system is the sigma phase in this Fe-Ni-V system. https://psu.box.com/s/yhlg629eh48ble1sarn252zcx5kdxt5s The following image is from the solver near develop head. The sigma phase should go from that tie triangle (near equiatomic Fe-Ni-V) to roughly ~50/50 Ni-V. I can provide specific points that failed to converge in this figure, if needed. I tried (but I think did not save) an image from the current fix-memory branch last week. The results were similar to the Cr-Ti-V system in that there were few (or no) convergence failures, but some regressions in the phase fractions in certain areas. This is more blocking to my current work than Cr-Ti-V, for what it's worth. |
Some issues in Al-Ni: db_alni = Database('NI_AL_DUPIN_2001.TDB')
my_phases_alni = ['LIQUID', 'FCC_L12', 'BCC_B2', 'AL3NI5', 'AL3NI2', 'AL3NI1']
# should be a two phase region of the ordered phase and disordered phase
# basically anything above 610c doesn't find the right phases
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.2, v.T: 1000, v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.2, v.T: 700, v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.2, v.T: 1400, v.P:101325})
# should be two phase B2 and liquid
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.6, v.T: 1600, v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.4, v.T: 1800, v.P:101325}) These take ~7 seconds on develop and ~70 seconds on 66e3fc2 Full diagram (completed after ~5 hours!) with 2% composition steps and a temperature step size of 10 Kelvin. |
I'm unable to reproduce errors with any of the first three equilibria (I get an ordered phase and a disordered phase). I am on Python 3.5 and 66e3fc2. |
Note that I'm running with |
I'm unable to reproduce errors with any of the Al-Ni equilibria listed. |
Ok. I've tried to re plot the phase diagram, but I am running into the following error Traceback:---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-12-2b529cb341cb> in <module>()
----> 1 eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.05), v.T: (400, 2000, 50), v.P:101325})
~/Projects/pycalphad/pycalphad/core/equilibrium.py in equilibrium(dbf, comps, phases, conditions, output, model, verbose, broadcast, calc_opts, scheduler, parameters, **kwargs)
355 properties = delayed(properties.merge, pure=False)(eqcal, inplace=True, compat='equals')
356 if scheduler is not None:
--> 357 properties = dask.compute(properties, get=scheduler)[0]
358 properties.attrs['created'] = datetime.utcnow().isoformat()
359 if len(kwargs) > 0:
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/base.py in compute(*args, **kwargs)
203 dsk = collections_to_dsk(variables, optimize_graph, **kwargs)
204 keys = [var._keys() for var in variables]
--> 205 results = get(dsk, keys, **kwargs)
206
207 results_iter = iter(results)
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/async.py in get_sync(*args, **kwargs)
12 def get_sync(*args, **kwargs):
13 warnings.warn(_msg.format('get_sync'))
---> 14 return local.get_sync(*args, **kwargs)
15
16
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in get_sync(dsk, keys, **kwargs)
560 """
561 kwargs.pop('num_workers', None) # if num_workers present, remove it
--> 562 return get_async(apply_sync, 1, dsk, keys, **kwargs)
563
564
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in get_async(apply_async, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, **kwargs)
527
528 while state['ready'] and len(state['running']) < num_workers:
--> 529 fire_task()
530
531 succeeded = True
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in fire_task()
502 args=(key, dumps((dsk[key], data)),
503 dumps, loads, get_id, pack_exception),
--> 504 callback=queue.put)
505
506 # Seed initial tasks into the thread pool
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in apply_sync(func, args, kwds, callback)
549 def apply_sync(func, args=(), kwds={}, callback=None):
550 """ A naive synchronous version of apply_async """
--> 551 res = func(*args, **kwds)
552 if callback is not None:
553 callback(res)
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in execute_task(key, task_info, dumps, loads, get_id, pack_exception)
293 failed = False
294 except BaseException as e:
--> 295 result = pack_exception(e, dumps)
296 failed = True
297 return key, result, failed
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in execute_task(key, task_info, dumps, loads, get_id, pack_exception)
288 try:
289 task, data = loads(task_info)
--> 290 result = _execute_task(task, data)
291 id = get_id()
292 result = dumps((result, id))
~/anaconda3/envs/pycalphad_ipopt/lib/python3.6/site-packages/dask/local.py in _execute_task(arg, cache, dsk)
269 func, args = arg[0], arg[1:]
270 args2 = [_execute_task(a, cache) for a in args]
--> 271 return func(*args2)
272 elif not ishashable(arg):
273 return arg
~/Projects/pycalphad/pycalphad/core/eqsolver.pyx in pycalphad.core.eqsolver._solve_eq_at_conditions()
ValueError: cannot copy sequence with size 3 to array axis with dimension 2 I'm just trying to track down the behavior that triggers it can't quite figure it out. Things that do trigger it: eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.05), v.T: (400, 1900, 20), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.05), v.T: (400, 2000, 50), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0,1,0.25), v.T: (400, 2000, 50), v.P:101325}) Things that do not: eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0,1,0.25), v.T: (400, 2000, 75), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.5, v.T: (400, 2000, 10), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): 0.5, v.T: (400, 2000, 5), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: 500, v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: 2000, v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.002), v.T: 500, v.P:101325}) It looks like possibly the combination and number of temperature and composition conditions trigger this. |
These also work so I don't think it's a number of points thing eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: (500, 600, 10), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: (500, 600, 5), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: (500, 600, 1), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: (1800, 2000, 10), v.P:101325})
eq = equilibrium(db_alni, ['AL', 'NI', 'VA'] , my_phases_alni, {v.X('AL'): (0, 1, 0.01), v.T: (500, 700, 10), v.P:101325}) |
When you get the error: |
Checking into
Looks to be near the two phase order/disorder region |
Verbose output for that is
Are the phases right? Should I be using both FCC_A1 and FCC_L12 (same for BCC)? If I do calculations at x(AL)=0.095 and 0.105, I get the following eq results:
If I just use |
|
I understand. I'm happy with AL-NI then. Did you have a chance to look at the CR-TI-V FE-NI-V? If those are fine in Do we also need to write tests to check the equilibrium results of the binary examples, or is our current coverage adequate? |
I have not checked the ternaries. |
I'm still missing the miscibility gap in the ternary, Cr-Ti-V. I think Fe-Ni-V is satisfactory. I am able to pick up the miscibility gaps with higher point density. |
Closed by gh-124. |
While working on solver improvements I came across a few phase diagram points that kept failing even when the test suite would pass. These should probably be added to the suite.
The text was updated successfully, but these errors were encountered: