-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathchanges.txt
More file actions
3055 lines (2536 loc) · 154 KB
/
Copy pathchanges.txt
File metadata and controls
3055 lines (2536 loc) · 154 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file contains information on OpenCalphad (OC) version 6 and
earlier. This log started 2016-03-03.
For general information please read the intro-OC7.pdf and the
macros-OC7.pdf.
There is an old precompiled installation of OC for Windows on the
OpenCalphad web page. OC can handle many thermodynamic models and
when the MQMQA model is installed I will probably not add anything new
to OC, just clean up the code and work on the documentation. Using
the AI Claude I may be able to make the code easier to understand,
simpler and faster.
The documentation in the pdf files include a short introduction. OC
has a command line user interface and there are examples with macro
files (OCM) and some small databases and some on-line help if
correctly installed. For graphics the free GNUPLOT software must be
installed separately from Sourceforge or a similar website.
A recent Fortran compiler is needed, OC uses features from the new
Fortran 2018 standard. On Linux, MacOS and other OS the installation
requires some general knowledge about compiling and linking of
software.
There is an installation manual (and an old mainly redundant video on
You Tube) and if you are not familiar with such procedures please ask
a local guru for help. Installation problems depend on your local
environment and we who provide this software for free do not have the
time or knowledge to answer such questions.
In the list below the most recent changes come first.
2026.09.02 version 6.128. Progress is finally forward ...Wow again.
The code for the MQMQA liquid now seems to have solidified. The code
for asymmetric ternaries now seems stable and if there are any bugs I
hope my collaborators will tell me. The ternary parameters are still
not there because I got confused when I understood one can have 3
separate sets of ternary parameters in a single ternary. But I
reallize that is more of a problem for those developing databases than
for the software. Maybe they will be around next week and the
champagne may flow freely.
2026.08.31 version 6.127. Wow, two updates the same day! This time I
think there are some real progress with the software stability. In
previous versions calculations with the MQMQA phase have crashed as
soon as I tried to make any modifications or changes. Now there are
some real progress with the asymmetries.
With all the other model calculations there have been without
problems. And soon I will have to add some MQMQA examples. There are
some for the old MQM model but that had slightly different models for
the quasichemical entropy and excess Gibbs energy.
2026.08.31 version 6.126. I have added that MQMQA asymmetries can be
extracted from the TDB file and fixed a lot of minor problems about
ternary asymmetries. Still many bugs using MQMQA though...
2026.08.29 version 6.125. More work on asymmetries but not yet finished.
Please test and report problems (or successes).
2026.08.24 version 6.124. It seems that the code to handle ternary
asymmetries in MQMQA now work, please test and report errors!
2026.08.23 version 6.123. The code to handle ternary asymmetries in
MQMQA has been totally rewitten. It is not finished but I want to
save this stage if I made a mess of it in the future. Calculations
with other models has not been changed.
For MQMQA phases OC should be able to handle multicomponent system and
all kinds of binary parameters also with ternary asymmetries. The
asymmetries MUST BE SPECIFIED INTERACTIVELY, reading asymmetries from
the TDB file is not yet supported.
Ternary parameters are ignored.
As always report problems to me with a macro file and a TDB file.
2026.08.23 version 6.122. The treatment of ternary asymmetries
for MQMQA has been rewritten. It is not finished so an next update
will be made shortly.q
2026.07.30 version 6.121. This version uses a new version of
metlib/utilities.F90 which handles the command line user interface.
It interprets the commands from the user and calls the appropriate
routines to enter data, read databases, set commands. With the help
of AI Claude this has now been cleaned up and a lot of redundant code
eliminated. If there are any problems please send feedback to me.
There are no changes in the routines calling the utilities.F90 routines,
that may be a later case when I will try to clean up the command
unter interface in userif/pmon6.F90.
2026.07.22 version 6.120. Almost 2 month vacation from MQMQA!! The
only thing really changed is that the problem with appended csv files
should have been fixed. In previous versions there were a small shift
in the x-axis values which required an editing of the gnuplot plt file
to ensure the diagrams were correct. With the help of Claude this has
now been fixed but now the y-axis texts may be sligtly shifted.
As usual, if you have any problems please send me a macro file and the
database used and I will have a look.
2026.05.29 version 6.119. Finally MQMQA model in OC can handle
cations with multiple valences, such as UCl3 and UCl4. Ternary
parameters still missing and ternary extrapolations not sufficiently
tested.
2026.05.25 version 6.118. Some more bugfixes.
2026.05.20 version 6.117. Some more bugfixes.
2026.05.14 version 6.116. Corrected the alphabetical order of the
elements of species needed for the MQMQA phase.
2026.05.14 version 6.115. A general cleanup of the code have been
made and the MQMQA implementation continues slowly.
2026.05.01 version 6.114. A second session with AI Claude has been
necessary for the problems with cations having multiple valencies and
most likely a third. In the original data structure each element
could be associated with a single cation and the has caused multiple
problems. There is still a problem with the entropy calculation in
the binaty system U-Cl which in the MQMQA model is a ternary with
U/+3, U/+4 and U2/+6 cations (although the U/+3 ion seems to have only
very low fractions). There are several modifications mainly for the
MQMQA model in this update but probably a third session with Claude is
needed.
2026.05.01 version 6.113. A long session with AI Claude has fixed
most of the remaining problems with the MQMQA model. In particular
handling of cations with several valencies. The notation of such
constituents in the database is still under discussion and there are
many tests still do be performed.
The two old examples of the MQMQA model, map19 and map20 does
no longer work as the previous implementation was limited to
binary systems. New examples will be added.
2026.04.23 version 6.112. Just correcting the version number
and removing some debug output.
2026.04.22 version 6.111. The MQMQA model should now work also with
asymmetric ternaries. Only one Toop element per ternary allowed, it
seems meaningless to have several Toop elements in a ternary. There
is a command AMEND PHASE .. ASYM to specify the asymmetric ternary and
quad. The awkward way to use LIST to set the asymmetry has been
removed. Many minor changes have been made in the code but there are
more modifications to be made also in the user interface and many more
tests are needed.
2026.04.01 version 6.110. The MQMQA ternary has now also been tested
using a Toop ternary excess model, previously the Kohler ternary model
was used. Both works and a this now available for further testing.
However, the MQMQA model requires some less restrictive convergence
criteria and these were not comparible with other case studies. Thus
one subroutine, meq_sameset in the matsmin.F90 file has been doubled.
Eventually this can be removed but for the time being it will
hopefully work.
There are many more tests needed and please send me problemantic
systems including macro OCM files and excell cvs files from FactSage
with the data which should be corrected.
The selection of Toop/Kohler model is normally made in the TDB file
but can be made interactively using the command
"LIST MQMQA <phase name> AMEND".
Use the command LIST MQMQA ASYM YES to find the index of the ternay
with the Toop element. One must first specify the index of the
ternary with a Toop element and then the cation constituent in this
ternary which is the Toop element. There can only be one TOOP element
in a ternary. The other cations in the ternary use a symmetric Kohler
model.
An example is given below (as there will be some time before the
User Guide will be available ...)
--->OC6:l mq ms asym <<<< user command
Listing of the 1 ternary systems and their asymmetries
i seq cat1 cat2 cat3 T/0 T/0 T/0 asymmetry code
1 1 1 2 3 1 0 0 TKK
Number in T/0 column is actual asymmetric cation
Fractions 6 in species OC alphabetical order:
0.085 0.152 0.178 0.035 0.277 0.272
Fractions 6 in Quad order:
0.085 0.152 0.178 0.035 0.277 0.272
The 6 quads for 3 cations are arranged in order of the n cations:
Quad 1 2 ... n | n+1 n+2 ... 2n-1 | 2n .. | n(n+1)/2
Cation 1 1 ... 1 | 2 2 ... 2 | 3 .. | n
Cation 1 2 ... n | 2 3 ... n | 3 .. | n
quad2compvar: ** 1 2 ** 3 **
Number of varkappa_ij asymmetry variables, n*(n-1)/2: 0
em2quad: 12 30 1 4 6
Fractions in OC order 1 2 3 4 5 6
Fractions in Quad order 1 2 3 4 5 6
List of compvar, the binary asymmetric composition variables, last update: 0
seq cat_i cat_j varkappa_ij varkappa_ji xi_ij xi_ji
1 1 2 3.1179E-01 1.3009E-01 2.5000E-01 2.5000E-01
2 1 3 1.5864E-01 5.0879E-01 2.5000E-01 5.0000E-01
3 2 3 6.0588E-02 4.6573E-01 2.5000E-01 5.0000E-01
Values of y_i/k: 0.2500 0.2500 0.5000
Quad: 1 2 3 4 5 6
Cat1: 1 1 1 2 2 3
Cat2: 1 2 3 2 3 3
vk_12 = x_11
vk_21 = x_22
denom = x_11+x_22 +x_12
vk_13 = x_11
vk_31 = x_33
denom = x_11+x_33 +x_13
vk_23 = x_22
vk_32 = x_33
denom = x_22+x_33 +x_23
Listing of the 1 ternary systems and their asymmetries
i seq cat1 cat2 cat3 T/0 T/0 T/0 asymmetry code
1 1 1 2 3 0 0 0 KKK
Number in T/0 column is actual asymmetric cation
^^^^^^^^^^^^^^^^ above ternary is a Kohler symmetric ternary
The example below was update 2026.04.25
--->OC6:AMEND PHASE ms ASYM <<<<<<<<<<<<<< user command to change asymmetry
You can amend MQMQA asymmetry interactivly
Element names: CL LI MG NA
Cation indices: 4 -1 1 2 3
The anion element name, index and link: CL 1 1
Listing of the 1 ternary systems and their asymmetries
i tern cat1 cat2 cat3 T/0 T/0 T/0 asymmetry code
1 1 1 2 3 0 0 0 KKK
Number in cat1/2/3 columns is actual cation,
Number 1, 2 or 3 in T/0 columns refer to the cation colums.
Asymmetry code is KKK for symmetric, Tn for Toop n.
Index of ternary to modify (0=none)? /0/: 1
Specify the Toop cation as 1, 2 or 3.
(When implemented 0 can be used to set symmetric)
Specify 0, 1, 2 or 3 /0/: 2
Listing of the 1 ternary systems and their asymmetries
i tern cat1 cat2 cat3 T/0 T/0 T/0 asymmetry code
1 1 1 2 3 0 2 0 T2
Number in cat1/2/3 columns is actual cation,
Number 1, 2 or 3 in T/0 columns refer to the cation colums.
Asymmetry code is KKK for symmetric, Tn for Toop n.
Listing new asymmetries
Quad: 1 2 3 4 5 6
Cat1: 1 1 1 2 2 3
Cat2: 1 2 3 2 3 3
3XQ some ternary asymmetries may still be wrong 3
Varkappa index: 1, summing quads: 3 1 6 2
nomin: vk_12 = x_11+x_13+x_33
nomin: vk_21 = x_22
denom: = x_11+x_13+x_33+x_22 +x_12+x_23
Varkappa index: 2, summing quads: 1 1 3 1
nomin: vk_13 = x_11
nomin: vk_31 = x_33
denom: = x_11+x_33 +x_13
Varkappa index: 3, summing quads: 1 3 6 2
nomin: vk_23 = x_22
nomin: vk_32 = x_33+x_13+x_11
denom: = x_22+x_33+x_13+x_11 +x_23+x_12
^^^^^^^^^^^^^^^^^ Listing above show cation 1 is Toop element
2026.04.01 version 6.109. By changing some of the criteria for
convergence the STEP command now works for the complete range of
compositions of a ternary test case for the MQMQA phase with values
exactly the same as calculated by FactSage. I believe that the
convergence problem is due to the fact that for one of the components
must use an arbitrary activity condition in order to calculate the
pseudo-equilibrim. The calculated value of this activity is more or
less random and may have any value.
But changing the convergence criteria may cause problems for other
systems so I have tested that all my 35 test cases works. But please
check that your important calculations with this version gives the
same results as with the previous and please report any differences.
2026.03.22 version 6.108. This version works for the MQMQA model for
some ternary systems but probably there are still problems with
others. You are welcome to send me problematic calculations (also for
other systems) together with an OCM and TDB file to reproduce the problem.
There has been total confusion implementing the MQMQA model. Suddenly
the STEP and MAP commands gives up after first calculated equilibria
also for other cases. I had also messed up the user i/f because I had
forgotten there was already a SET ADV WORKSPACE and added a new
similar command. I had also made other changes and I whatever I
changed I could not completely make sure that the STEP/MAP worked.
I renamed my own src/ directory to src-bad and created a new src/ by
copying the files from the saved version 6.107 on my directory
GitHub/opencalphad/src/ I renamed the version to 6.108 in the file
OC/OC7/src/models/gtp3.F90.
+ Then I tested that all the examples/macros/ worked. Puh
- Testing the my own Systems/CeMgCl/master2.OCM failed first time but
worked running the micro a second time (without restarting OC).
This is the same behaviour I found earlier with the deleted
version. In the deleted version today it failed all the times.
Testing CEA/Systems/KLiNa-master.OCM worked first (and second) time.
- To find the problem with the "sometimes" failed STEP/MAP I had
modified in src/stepmapplot/smp2A.F90 the call to the
meq_sameset(irem,iadd,... (which is in matsmin.F90) by setting
iadd=-1 in the call. This is a feature activates debug output
inside meq_sameset and may help to find the problem. I had
forgotten this feature ... and I suspect an uninitiated variable
or something else set wrongly when using an MQMQA phase.
Searching for this problem in the deleted 108 version may have made
things worse. At the end of working with the now deleted version I
had this problem also when calculating systems without the MQMQA
phase. I had already made minor changes in many files so that is
why I gave up on this version and restart from the previous one.
The work to fix the bugs continues. I installed Claude AI and asked
for help. After analyzing the code and the problem the final
suggestion was that it was a rounding off problem and the debug
version of OC (compiled with -O0 or rather no optimization) was more
likely to have roundoff errors of the order 1E-6 than the the code
compiled with -O2 and -fopenmp. The convergence criteria for the
equilibrium is 1E-6. Normally I use the debug version for testing but
I think I have had convergence problems also withe the optimized code.
Anyway Claude suggested using -O1 should avoid some problems with
roundoff errors and all tests seems to work since I added that. When
asking for advice on the Internet Fortran forum, this advice was
questioned but it seems to work for OC and me.
This has been a rather horrible experience because modifying the MQMQA
code created unrelated errors for the convergence. Finally I was
modifying code all over to try to eliminate the problem.
In the GitHub version of Makefile_MacOS I compile with -O2 but I have
now added a Makefile created by Claude which include the clean and
debug options.
2026.03.14 version 6.107. A lot of debug output related to MQMQA
removed. Tests of symmetrical MQMQA excess parameter works. Some
modifications suggested by Claude (AI) has improved the stability of
the MAP/STEP commands, usually they are imcomplete after a few macros.
2026.03.03 version 6.106. Corrected partial derivatve bug for MQMQA.
2026.03.01 version 6.105. Added partial derivatives to the calculation
of the Gibbs energy for the MQMQA model. Some improvements but
debugging continues. This is still very fragile.
2026.01.23 version 6.104. Yet another asymmentry bug eliminated.
2026.01.21 version 6.103. Yet another asymmentry bug eliminated.
2026.01.21 version 6.102. Yet another asymmetry bug eliminated.
2026.01.10 version 6.101. Yet another asymmetry bug eliminated.
2026.01.01 version 6.100. Yet another asymmetry bug eliminated.
2025.12.31 version 6.099. The (last?) bug for the asymmetry relations
of quad fractions fixed with the help of Nathalie.
2025.12.26 version 6.098. Added a facility to list how the
\varkappa_ij asymmetric composition variables depend on the quad
fractions. Useful to understand how they are calculated and how to
debug them.
2025.12.24 version 6.097. The new implementation of the MQMQA excess
is still debugged but is approaching to the original FactSage
implementation. Some more work is needed to become identical. A Merry
Christmas to everyone.
2025.12.08 version 6.096. The new implementation of the MQMQA excess
parameters can now calculate equilibria but needs further testing and
some ternary parameters are still missing. Temporarily the old, more
limited examples using the MQMQA excess model, has been removed.
2025.12.08 version 6.095. The new implementation of MQMQA is now going
to be tested and hopefully become availabe within a month or so unless
serious problems appears. This version calculates but does not
include the asymmetric excess energy in the total Gibbs energy. For
that it is necessesary to add first and second partial derivatives.
It can read a file in the TDB format with the model parameters as
developed by Nathalie Dupin. Later the XTDB format will be used but
all XTDB work has been postponed due to the MQMQA model.
2025.12.06 version 6.094. The new implementation of MQMQA is close to
be finished. The data structure is done and there are minor bugs
reading the TDB file and calculating an equilibrium to be fixed. The
final test is to compare with the FactSage software if the entropy and
the asymmetric relations are taken into account in a correct way. All
test macros in the examples directory works.
2025.12.02 version 6.093. I am now almost able to include the excess
parameters when calculating the Gibbs energies for the MQMQA phase.
There are still some problems to read the parameters from the database
but it is more important to have the code that can use the parameters
for the calculations. This is just an intermedate save to establish
that most other calculations among the examples still work.
2025.11.25 version 6.092. The previous release did not really store
all MQMQA parameters correctly and it took a few days to find the
reason. I am now working on using them to calculate the Gibbs energy
trying to take care of all odd normalizing and asymmetrical relations
imposed by the model. The set of model parameters in the database are
really strange. How can a ternary parameter with the value -33.5
contribute to the Gibbs energy in a multicomponent system?
2025.11.21 version 6.091. Reading from TDB files now works and all
parameters for the MQMQA phase are stored correctly in the data
structure. Some test to use them in calculations have been made and
also to save them on a new TDB file but these are not finished. The
data structure is complex and any changes must be tested to avoid they
create problems for other calculations.
2025.11.21 version 6.090. More bugfixes reading MQMQA data from TDB
files and for calculation of excess Gibbs energies. New version for
testing by my collaborators.
2025.11.19 version 6.089. More work done on the MQMQA model and
handling of its particular excess model parameters. The actual code
for calculating the excess Gibbs energy is still under development and
to facilitate collaboration of testing the model this release is made
available for everyone. The format of MQMQA parameter on a TDB/XTDB
file has been revised.
2025.11.14 version 6.088. Yesterdays version had a number of problems,
duplications and bugs which occured when integrating the new MQMQA
excess structure together with the already existing configurational
MQMQA entropy. This version have fixed some of these.
2025.11.13 version 6.087. The data structures for the excess model of
MQMQA is now fairly established. It is possible to read data from a
modified TDB file. Listing of the various forms of asymmetric options
has been added. Time for saving this version.
There is still a long way to go for calculating anything.
2025.11.11 version 6.086. The work with the MQMQA excess model is
slowly progressing (rather than progressing slowly). As the fraction
variables in the MQMQA excess model can have several different
asymmetric relations and this require a totally new ordering of the
composition variables as there are mixed quadruplets with the same
elements involved. The first steps to convert from independent
fraction variables to the dependent ones in the model have been made
and I decided to save this version as future work may make a new mess
of the implementation.
2025.11.08 version 6.085. The work on the MQMQA model in OC started
in 2021 (version 6.035) when the SRO configurational entropy
expression was implemented. However, the the excess model implemented
in FactSage for the MQMQA model was never finished. I did not
reallize how complex this model is with a mix of a asymmetrical
ternary methods.
With the help of Nathalie and Christine and with some economic support
from CEA I have now continued to work on this and the current release
has some new facilities to read and use excess model parameters for
the MQMQA phase from a database using the TDB foormat. The TDB can be
obtained by converting from a FactSage DAT file using a separate
software. The new version of MQMQA is identified by the letter X
after the phase name.
The current code can still not use the excess model parameters as this
release is a preliminary release but it has some additional
functionallity including a LIST MQMQA_SPECIAL command needed for
debugging.
On my Mac I have installed Gnuplot 6 whereas on my old DELL I used
Gnuplot 5 and in the new version of Gnuplot one is not allowed to use
"plot '-'" inside multiplot (the plot works but there are a lot of
messages during plotting). I have tried to fix that in OC and tested
the new version also with Gnuplot 5 without problems.
2025.05.13 version 6.084. First uploading from my Mac. Many problems
working on the Mac and many examples fails when run in sequence.
Probably memory is not reinitiated properly, the NEW command may not
take into account some of the new datastructures. All the examples
have been slightly modified and there are now several OCM files
running just a few of them. Trying to run all examples in sequence
makes will always fail one has to restart the program.
I am not familiar with Makefiles but has created a rudimentary one
compiling OC with -O2 and -OpenMP and a second Makefile_debug with
several compiler checks which is much more stable. I was quite happy
that the TINYFILEDIALOGS works on the Mac and I also found that the
linee diting facility and the "history" feature works although one has
to use (as in emacs) ctrl-P to call back a previous line.
Fixing this is done in parallel with implementing the MQMQA model
where the SRO entropy seems to work but the very strange way the
excess model depends on the various quadruplet fractions is still
problematic. The proposed XTDB format replacing the old TDB format
for databases is not yet finished.
2025.05.04 version 6.083. Removed 2 redundant files. Testing uploading.
2025.04.24 version 6.083. Istalled OC in a Mac. Testing uploading.
2025.01.20 version 6.083. A major bug in the MQMQA model fixed, it
should now be no problem to calculate with several "cations". Tests
using several "anions" is progressing. However, the MQMQA model has a
very excessive set of excess Gibbs energy parameters and only a few of
all possible excess parameters are allowed in OC.
A facility added to the PLOT command. It is now possible to APPEND an
excel "comma separated value" or ".csv" file to a calculated diagram.
Such files can represent experimental data or calculated values in a
standard excel format with values separated by a space, comma or
semicolon.
The syntax to enter excess parameters may also deviate from what is
used in DAT files or related input files to FactSage and other
software which has this model implemented. Please look at the macro
examples using this model (the cslaf.OCM and map19.OCM) and their TDB
files. A similar syntax will also be available in the XTDB format.
You are welcome to send me problematic databases (using the TDB
format) using the MQMQA model.
2025.01.20 version 6.082 Preparations for reading XML based XTDB files has
been added. Minor bug fixes.
2025.01.08 version 6.081 I forgot to remove a lot of debug output in
the version 6.080, that is fixed now. I also cleaned up the code
handling partitioning of phases with a disordered fraction set such as
FCC and BCC with 4 sublattices for ordering.
2025.01.08 version 6.080 A major change have been made for entering
constituents (quads) in the MQMQA phase. Previously these were
entered together with their bond data with the phase. That made it
impossible, or at least very complicated, to handle MQMQA quads with
the new proposed XTDB format. Thus a new way to enter species has
been implemented. Any species with a slash, "/" followed by a letter
is considered as an MQMQA quad and one must specify the additional
information when entering the species. The / is used to separate
elements on the fictive sublattices in the MQMQA phase. See the TDB
files MgNaClX.TDB used in the map19.OCM example and caslaf.TDB in the
macros/examples directory. When entering these quads as constituents
they must have the suffix -Q. After entering these as constituents
the Q will have two digits appended for bookkeeping in the phase but
the species names are without these digits.
The / in a species normally means the species have an electric charge
and is then followed by -, + or a digit. Thus the / in the quad
species followed by a letter A-Z will not change this. For the quads
the / means the separation of the constituents of the sublattices in
the MQMQA phase. A quad NA/CL is thus entered using
SPECIES NA/CL NA/CL 6 6 2.4
where the numbers represent the bonds and the 2.4 the SNN/FNN ratio in
the MQMQA model. The NA/CL is repreated twice, the first time is the
actual name and the second is needed because SNN quads with 2 elements
on one or both sublattices must be entered as
SPECIES MGNA/CL MG,NA/CL 6.0 3.0 3.0
where the two elements on the first sublattice, Mg and Na, must be
separated by a comma, ",". As already mentioned, when entering these
as constituent of the phase they must have a suffix -Q
CONSTITUENT SALT:Q : NA/CL-Q MG/CL-Q MGNA/CL-Q : !
in the TDB file. The :Q after the phase name, SALT, indicates the
MQMQA model. A similar syntax will be adopted for the proposed XTDB
database format. Sometimes modeling leads to some awkward notation.
2025.01.08 version 6.079 Working on implementing the XTDB database
format. It now works to write XTDB files in the preliminary format
except for some of the new features such as TernayXpol. The source
code for reading XTDB format is under development.
2024.11.05 version 6.078 Fixed some bugs and modified somewhat the
database format for entering Toop/Kohler extrapolations.
2024.11.04 version 6.077 Some more testing of calculations using
different ternary extrapolations and code added to eliminate duplicate
adding/subtracting of fractions. There is no check when entering
ternary extrapolations but at the first calculations any duplicate
fractions (to be added or sbtracted) are eliminated. The example with
multiple extrapolations in the paper by Pelton 2001 correctly
reproduced.
2024.10.28 version 6.076 A preliminary code for calculating
Toop/Kohler extrapolations has been added. This is still debugged and
very tentative. If you want to test any feedback is appreciated.
2024.10.26 version 6.075 The data structure for Kohler/Toop ternary
extrapolation structure revised but still not implemented for
calculations.
2024.10.22 version 6.074 A number of bugfixes and cleanups. Using the
MQMQA or new ternary extrapolation methods may still generate a lot of
information useful for debugging.
2024.10.20 version 6.073 The implementation of the MQMQA model and the
Toop/Kohler ternary extrapolation method has progressed somewhat.
Time to save an intermedeate state.
2024.10.04 version 6.073 Cleaned up some code in ges5E.F90. Added an
example sro-cef.OCM to calculate the prototype FCC phase diagram.
2024.06.30 version 6.072 The subroutine calc_toop moved to the
gtp3XQ.F90 file as it is closely associated with the MQMQA model even
if Toop and Kohler ternary extrapolation methods can be used in any
phase (without sublattices). I had forgotten this subroutine
evidently written in 2020. It uses records of the TYPE gtp_tooprec to
identify a ternary with Toop or Kohler extrapolation. Most probably
the more elabore Toop/Kohler/Muggianu extrapolations described in
Peltion's paper from 2001 are not included.
2024.06.18 OC version 6.071: Long time no development. Created a
gtp3XQ.F90 so simplify work in the MQMQA model and handling
multicomponent Kohler-Toop extrapolations.
2023.12.16 OC version 6.070: Many minor changes to prepare for the
implementation of TDB files using the XML markup language.
2023.10.29 OC version 6.069: In the previous update I forgot to
mention that the argument for the GEIN function has been changed to be
the actual Einstein THETA, not the logarithm. See OC version 6.062.
In the LNTH parameter the logarithm of the THETA is used because it is
physically more reasonable to vary the logarithm of THETA with the
composition. But one can use the same numeric THETA value as in the
GEIN function by using LN(THETA) for the parameter.
Last update also included a macro to calculate the Al-C system with
the new unary. But I forgot the explain how one can handle the Gibbs
energy for unaries with multiple Einstein THETA, for example carbon,
C, in graphite or diamond. In the database for the Al-C system you
can see for example the carbon phases, which has been assessed using 5
THETA, the parameters are:
PARAMETER G(GRAPHITE,C) 10 +GHSERCC; 6000 N 20HE !
PARAMETER LNTH(GRAPHITE,C) 10 LN(1953); 6000 N 20HE !
where the function GHSERCC use several Einstein functions:
FUNCTION GHSERCC 10 -17752.213 +GEGRACC +GTSERCC; 6000 N !
FUNCTION GEGRACC 10 -0.5159523*GEIN(1953) +0.121519*GEIN(448)
+0.3496843*GEIN(947)+0.0388463*GEIN(193)+0.005840323*GEIN(64); 6000 N !
FUNCTION GTSERCC 10 -2.9531332E-04*T**2-3.3998492E-16*T**5; 6000 N !
The sum of the coefficients for the GEIN functions in GEGRACC must be
unity. The major Einstein THETA, equal to 1953, is used also in the
LNTH parameter and this has a coefficient equal to unity. Thus the
coefficient of the GEIN(1953) function in GEGRACC must be negative.
Note that the GTSERCC has no linear T term (thus entropy at zero
Kelvin is zero) and no T*LN(T) term (thus the heat capacity at zero
Kelvin is zero). A minor spelling error is also fixed.
2023.10.27 OC version 6.068: A new example added using the new unary
models. The Al-C system assessed in 2021 by Zingtang He et al. The
new unary models are implemented in the software but there is still no
way to specify these in the TDB file which is one of the reasons for
the project to develop a new XML based format. Anyway I added an
example showing one can now calculate heat capacities down to a few K.
2023.10.23 OC version 6.067: A rather serious bug in handling
expressions for TP functions and parameters has been discovered. This
is now fixed and illegal expressions which were previously accepted,
for example "T**-1", without parenthesis surrounding the power,
i.e. "T**(-1)", will now give an explicit error message indicating the
line on the databases which needs correction. This error may occur
also with database you have used for a long time.
2023.10.01 OC version 6.066: A fix to supress illegal XML characters
(< > & and ") in bibliogaphic references. The characters are replaced
by [ ] | and ' to avoid increasing the length of the text.
2023.09.30 OC version 6.065: A tentative XML format has been
implemented when saving databases. The command is SAVE XTDB. The
current TDB format has worked for 40 years but new models has made it
cumbersome and different software has added various features which
makes it difficult to read a TDB file generated by one software by
another one. The TDB file was developed for the 1991 unary and
hopefully there will be a new XML standard developed for the new
generation unary data. There is still no way to read the XTDB format
by OC as the different features are still discussed.
2023.09.18 OC version 6.064: The first update using my new PC! I am
still not working full time, there are reasons to enjoy the time as
retired also. I added a LIST WORKING_DIR making it easier to know
where any plot files have disappeared if you do not find them. The
macros STEP-TZERO and and MAP19 have some additional features also.
No major changes in the software.
2023.05.27 OC version 6.063: The development is really slow, the only
thing added is the command CALCULATE LIQUID_EET which calculates the T
(or composition) where two phases (not necessarily the liquid) have
the same entropy. This can be useful to calculate when the "EEC" or
Equi-Entropy Criteria would prevent a solid phase to become stable
because it has higher entropy than the liquid. This is one feature
added to the new unary database to avoid introducing a breakpoint in
the heat capacity of the solid phases extrapolated above the melting
point of the element. However, STEP LIQUID_EET is not implemented
yet, one has to calculate point by point.
2023.04.24 OC version 6.062: The example step-epz has been modified.
This macro calculates sections of an Fe-C alloy with small additions
of Mn and Si system in order to explain various transformations in
steels using full equlibrium, the para-equilibrium concept and the
T-zero line for diffusionless transformations (martensite!).
The GEIN function to calculate the Einstein low T vibrational
contribution to the heat capacity has been modified to take the
logarithm of the Einstein THETA as argument. This is to be compatible
with the LNTH parameter which calculates the composition dependent
Einstein function. When an element has several THETA they are each
weighted with factors, sum of which must be unity. When one of them
is selected as the LNTH parameter, which has the weight unity, the
weight factor for the corresponding GEIN function must be negative and
the same value of the Einsten T must be used for the LNTH and the GEIN
function.
2023.03.08 OC version 6.061: Celebrating women day! I have started
implementing a model for SRO a la CVM for tetrahedron FCC. This is
still only for testing and a model also for CVM LRO is in the
pipeline. A number of other minor improvement added and bugs fixed.
2023.01.22 OC version 6.060: A long time without work, or rather too
much to have time with the software. I am still struggling with the
MQMQA model with litte progress, the map19 and cslaf-map macros are
still the only examples. But I have improved the stability of some
STEP calculations using T as axis variable. An OC user had a
complicated step calculation with 18 components (a nuclear fuel) and
it failed many times calculating phase amounts from 1000 to 3000 K. I
found the reason was the negligable solubility of some elements in the
metallic liquid combined with bad extrapolation of the Gibbs energies
of some of the 200 solid compounds. This meant that some elements did
not dissolve properly in the liquid and some compounds tried to become
stable at various T. I added an extra check to prevent this and the
step calculation became much more stable. Unfortunately this extra
check had a bad influence on the normal MAP/STEP calculations so the
checks had to be refined. But the current version should be able to
reproduce all the examples.
2022.10.13 OC version 6.059: The way of entering constitutions for the
command "calculate phase" has changed to set, by default, the same
fraction of all constituents in each sublattice. That is usually the
best when using this command to set an initial composition of a phase
when there are convergence problems. Individual fractions can be set
and the fraction of the major constituent can be set as the "rest".
2022.09.21 OC version 6.058: An irritating bug that FCC_4SL with FCC
permutations was stored as the alphabetically last phase has been
fixed. Several minor things also fixed, for example append plot files
were very sensitive to text on comment lines.
2022.08.18 OC version 6.057: The command SET OPTIMIZING_COND has been
changed to SET LMDIF_ACCURACY. LMDIF is the least square routine used
for assessments in OC. The commands to set an optimizing coefficent
as VARIABLE, FIXED or SCALED (the latter not yet implemented) are now
set OPTCOEFF_VARIABL, OPTCOEFF_FIXED and OPTCOEFF_SCALED respectivly.
This should make the commands a little easier to remember. The files
in examples/macros for testing the optimizer been modified for this.
The documentation of the GTP and the minimizer has been updated. Work
in ongoing on the online help and other modules to prepare for a
release of version 7 later this year.
2022.07.28 OC version 6.056: The code for the models have been
reorganized to prepare for its documentation. Some minor bugs fixed
and some commands have been modified.
2022.07.15 OC version 6.055: Modified reading TDB files to accept
longer input lines (120 characters) and to handle some odd terms in
functions, such as T**(+2) rather than just T**2, which was prevously
not accepted.
2022.07.13 OC version 6.054: Summer vacation, some more fixes of the
MQMQA model, a new macro map19.OCM for NaCl-MgCl2, added for the MQMQA
model in the examples/macro directory. A bug using the assessment
module which caused crashes on Linux but was undetected on Windows has
been fixed. The converter of ChemSage DAT files to TDB files
developed by Nathalie Dupin has been tested and works although some
DAT file seems to contain a lot of redundant phases.
2022.06.10 OC version 6.053: A redundant debug message removed.
2022.05.16 OC version 6.052: Just some more bugfixes. MQMQA tested
with three cations, some problems with reciprocal system.
2022.05.13 OC version 6.051: Friday 13th version with a minor bugfix
in MQMQA model. I have added a sleep function after submitting a plot
to GNUPLT from OC for my own testing of the graphics as sometimes a
plot was overwritten by the next plot. Normal plotting should not be
affected.
2022.05.11 OC version 6.050: The OC implementation of the MQMQA model
can now handle some of the excess parameters. As this model is
different from anyone previously implemented in OC and its
documentation is involved and fairly cryptic there has been some
difficulties to understand some "hidden" model parameters in the way
the Gibbs energy is calculated. A second problem is that most systems
used with this model are quasi-binary or -ternary system where the
amount of one of the components is is given by the ratio of the amount
of the other components. This works also in OC but will proably
require some modificatons to improve the convergence.
2022.04.19 OC version 6.049: The declaration of error code gx%bmperr
has been moved to METLIB4 in a first step to unify error codes. Some
strange problems compiling with OpenMP for parallel had to be fixed.
Some more general routines has been moved from gtp3*.F90 to
metlib4.F90. The TDB reader in gtp3E.F90 has been prepared to handle
reading encrypted databases but such options are outside the scope of
the free version of OC.
2022.04.07 OC version 6.048: A number of minor bugfixes and other things.
2022.04.02 OC version 6.047: I have now implemented a binary version
of the TISR model for SRO, (see a recent Calphad journal). I have
also made additional changes to prepare for reading encrypted
databases with OC. This means changes in datastructures that I have
not touched for many years and this may cause trouble for some
applications, please report problems!
2022.04.01 OC version 6.046: The Makefiles have now been updated for
all the changes made.
2022.03.30 OC version 6.045: In order to prepare OC to read encrypted
databases some modifications of the data structures and subroutines
has been made. There should be no change for using unencrypted
databases. Please report any problems!
2022.03.26 OC version 6.044: The war in Ukraine has made me think
developing thermodynamic software is not very important. But work
goes on, the reading of TDB files has been simplified by reading
all TYPE_DEF first, before any other keyword. The reason is that in
OC a TYPE_DEF character had to be defined before it was used in a
PHASE keyword. But many TDB files are organized differently and as it
is accepted by other software it is now finally accepted also by OC.
This should not affect anything in the calculations but please report
problems! Additionally a parameter identifier "BM", used as
abbreviation for BMAGN (for the Bohr magneton number), will be
interpreted as BMAG, which is the coresponding OC parameter
identifier.
There is a new command "LIST ESTIMAT_ACCURACY" which can be used after
an equilibrium calculation to obtain error estimates of the results.
This is done by calculating mumltiple equilibria varying the value of
the conditions with +/-5%. It can be useful to understand how the
system will behave in a production situation when it can be difficult
to keep compositions and temperatures at the optimal values.
2022.02.21 OC version 6.043: Clement Introini and his colleagues at
CEA Cadarache have worked extensively with the grid minimizer and
various other parts of the code and has allowed that to be shared by
all users of OC. The integration is still ongoing and there are some
examples that may fail until all is finished as well as some which
work better.
2021.12.15 OC version 6.042: Working with Nathalie Dupin to make it
possible for OC to read MQMQA databases using a TDB format. The
converter from DAT format is written by Nathalie. Update with some
bugfixes.
2021.12.12 OC version 6.041: Restored using the fraction of the
reference state of an MQMQA FNN endmember and removed the irrelevant
reference state from listing of MQMQA SNN parameters. Now the way to
transform endmember parameters from DAT to TDB should be stable. But
there are still problems to be solved for excess parameters.
2021.12.11B OC version 6.040: Fixed one more bug for the reference
state. Now the excess parameters ... and some peace of mind during
Christmas.
2021.12.11 OC version 6.039: There is no nobel price in thermodynamics
but maybe there should be ... . The MQMQA model is a bit more stable
and spurious lines for tracing removed.
2021.12.03 OC version 6.038: First calculation with MQMQA with SRO and
correct reference state. Still fixing minor bugs and the data
structures can be improved. This model violates almost all principles
I have had developing models and I have not tried reciprocal models
yet. It is still just the basic MQM but include the possibility to
have several constituents on both sublattices.
2021.11.26 OC version 6.037: Even more bugfixes in the MQMQA routines.
Collaborating with Nathalie Dupin to convert ChemSage DAT files to TDB
files.
2021.11.15 OC version 6.036: More bugfixes in the MQMQA routines.
2021.11.07 OC version 6.035: A version of the SGTE unary database
adapted for OC is available on exaples/macro. Some problems with
converting a TDB file to a ChemSage DAT file has been fixed but there
may still be problems.
2021.11.01 OC version 6.034: Finally the MQMQA model works for some
simple examples such as SRO in a system A-B-AB. Further testing and
calculations on real systems are needed but as OC cannot read DAT
files we have to wait for some files to be converted a TDB format
extended with some bond parameters. Thanks to Max Poschmann and the
people developing Thermochimica for all the help.
2021.10.13 OC version 6.033: Some progress with MQMQA to be saved
before I make a mess of it again.
Working on the implementation of MQMQA model has revieled some
problems within OC. The first was the fact that a species containing
Va, which may occur in a "quadrupole" in this model, is counted as a
real atom and this upset the calculation of mole fractions. This has
been fixed temporarily but needs further attention if the vacancy mix
with other species in a sublattice. Secondly the amount of formula
units of a phase is upset when the total amount of atoms in a phase is
less than unity. This occur regularly in MQMQA because most
quadrupoles, which are treated as real species in OC, normally contain
less than 1 atom, often 1/3 or even less.
The reason is that in OC and FactSage the "amount of a phase" means
different things, in FactSage there is no specific "amount of phase",
only the amount of atomes in a phase, whereas OC (and TC) has defined
a property called "Formula Unit" (FU) of a phase and normally one has
values of properties "per FU" as well as "per mole of atoms". The
difference can be big as phases such as sigma has 30 atoms per FU and
23-catbide contains 29 atoms. The FU simplifies slightly the modeling
of phases because the Gibbs energy of a phase in OC is defined per
mole formula unit wheras in FactSage it is defined per mole of atoms
in the phase. Thus in OC there is a property "amount of phase per
formula unit" which is used in the "list result" whereas the property
NP(phase) is the "amount of atoms" in the phase. These can differ if
there is not 1 atom/FU.
The value of the FU of a phase can vary if there are vacancies or
species with different number of atoms in a phase (for example in a
gas phase or an interstitial phase with vacancies). Using FU normally
simplifies writing the Gibbs energy formula for the phase as it is
independent of the actual amount of the phase. But the MQMQA model is
defined using the amount of atoms in the different quads and initially
I tried to follow this but it became incompatible with the rest of OC.
The simplest is to use the formula unit 1 for the MQMQA liquid. The
sublattices in MQMQA can contain vacancies but they have no charge (in
contrast to the I2SL model where the number of sites are adjusted to
make the phase neutral). The actual number of atoms per sublattice
can vary in MQMQA, normally it seems to be less than unity. The
sublattice occupancy is calculated from the quad fractions and as
several quads contain the same species on the different sublattices
the fraction of the identical species fractions in a sublattice are
added together. In the case of the same species with different
valency (such as Fe+2 and Fe+3) they will be be treated as different
and give a contribution to the configurational entropy in the
sublattice.
I have also found that there are some restrictions in OC when the
amount of atomes per FU is less than one to avoid dealing with phases
with an excess of vacancies, this may have to be modified.
2021.10.01 OC version 6.032: More time with no work, or rather very
little progress. The MQMQA model is still refusing to work but some
light in the end of the tunnel. I wish to save the current status on
the github server as I continue.
2021.08.04 OC version 6.031: Long time no work ... the problem using
mass % for mapping seems to be fixed, I am not sure why it occured.
I have added a directory examples/TQ4lib/F90/parallel-alnipt with a
new example for the TQ interface simulating diffusion in an AL-Ni-Pt
system in parallel. There are instructions in the directory how to
compile, link, run and plot. There is also a slideshow explaining the
example.
For database managers looking for errors in the database there is a
DEBUG TRACE command which can turn on a listing of rejected
parameters.
I have added a new command that can be useful for assessments. It
copies the phase amounts and constitutions from one specified
equilibrium to the current one. When assessing miscibility gaps using
several equilibria with tie-lines the miscibility gap frequently fails
in some (or all) equilibria during an optimize run. To restore the
constitutions in several equilibria can be a pain. Now, after
restoring the model parameter and recalculated the miscibility gap in
one equilibrium "eqnum", one can select another experiental
equilibrium with the miscibility gap and transfer the phase amounts
and constitutions from eqnum to this using "AMEND START_CONST eqnum".
In PARROT this was the "TRANSFER" command.
My main task is still to implememt the MQM model but ... I am also
working on adding a new STEP variant called STEP FAST which is a
Scheil-Gulliver solidification model with one or more fast diffusing
elements. The fast diffusing element has the same chemical potential
in the liquid as in the already solidified sections. Typical examples
is solidification of steels with C.