Code Monkey home page Code Monkey logo

opencalphad's People

Contributors

anilkunwar avatar dschwen avatar mstratm avatar richardotis avatar sundmanbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencalphad's Issues

Defining components

Currently OC does not allow defining components.
Can this be added?
Without defining components it is difficult to calculate and present phase diagrams of systems such as KCl-MgCl2.

Thanks,
Eli

Installation issue in v5 parallel

I cloned the latest commit and tried to build the parallel version and it looks like one of the files is missing in the GETKEY folder. The error reads as following

# copy getkey module information cp utilities/GETKEY/m_getkey.mod . cp: utilities/GETKEY/m_getkey.mod: No such file or directory make: *** [metlib3.o] Error 1

Serial version is building fine without issues. I downloaded the *.zip file of the version5 directly from the website as well and it reproduces the same issue.

Error 4244 at peritectic reaction

I have been having error 4244 at peritectic reactions when using cost507R.tdb to calculate aluminum alloys. The error is not limited to Al-Zr alloys and the following script will reproduce my error message:

r t cost507R
Al Zr

set c w%(Zr)=0.3 t=800 p=1e5 n=1
c e
l,,,
set axis 1 t 500 1000 5
step normal

======================================

I get error after the stepping. The message is below:

Line 1 from 8.000000E+02 with: AL3ZR1 FCC_A1
SMP2 Successful calculation of a node point 1
Creating node where a new phase LIQUID becomes stable
Finishing line with 33 equilibria at T= 933.83

Line 2 from 8.000000E+02 with: AL3ZR1 FCC_A1
Terminating line with 46 equilibria at axis limit 6.0000E+02

Line 3 from 9.338849E+02 with: LIQUID AL3ZR1 FCC_A1
MM Phase change not allowed: -FCC_A1
MM Phase change not allowed: -FCC_A1
MM Phase change not allowed: -FCC_A1
Terminating line with 0 equilibria at 6.0000E+02 due to error 4244
Finished step/map 9.4000E-02 s and 105 clockcycles

===============================================

OpenCalphad build with MinGW

Dear Bosse,
The TQ4 and OC don't compile out of the box on the Windows machine with MinGW.
The problem is the getkey.c file which implements the getch() functionality using POSIX functions.
However, MinGW doesn't implement POSIX functionality on windows. The workaround is a function
getch() defined in conio.h which do the same thing as getkey but it is not POSIX compliant.
I think it is implemented on many other systems but it is not guaranteed to exists as it is not POSIX :)

I don't know if the additional complexity of adding flags to compile with MinGW is worth it.
Do you plan to support the MinGW for the future release?

Best regards
∃t

start.OCM causes crash

Ubuntu Linux 18.04 LTS, openCalphad v 6.001
Question: Is there a specific text format and encoding to be used for the start.OCM file? Having a start.OCM file in the OCHOME path causes oc6 to crash.
Doing this: I need to change the default gnuplot terminal on each run of oc6P. I have tried putting this into a start.OCM file with the following single line that works on the oc6 command prompt:
enter gnuplot SCREEN x11 size 768,640 font "Arial,16"
However, next start of oc6 results in a crash:
Details:
`divakar@divakar:~/dev/oc/opencalphad-v.6.0$ ./oc6P

Open Calphad (OC) software version 6.001 , linked 2021-10-25
with command line monitor version 55

This program is available with a GNU General Public License.
either version 2 of the License, or any later version.
It includes the General Thermodynamic Package, version GTP-3.30,
Hillert's equilibrium calculation algorithm version HMS-3.0 ,
step/map/plot software version SMP-2.30 using GNUPLOT 5.0 graphics.
Numerical routines are extracted from LAPACK and BLAS and
the assessment procedure uses LMDIF from ANL.

Linked with OpenMp for parallel execution
Found OC home directory (OCHOME): /home/divakar/dev/oc
Online help provided by your browser using ochelp.html
Reading your startup macro: /home/divakar/dev/oc/start.OCM
Working directory is: /home/divakar/dev/oc/opencalphad-v.6.0
--->OC6:GNUPLOT terminals are: 5
Name > command GNUPLOT options
1 SCREEN > set terminal qt size 600,500 font "Arial,16"
2 PS > set terminal postscript color solid fontscale 1.2
3 PDF > set terminal pdf color solid size 6,5 enhanced font "Arial,16"
4 GIF > set terminal gif enhanced fontscale 0.7
5 PNG > set terminal png enhanced fontscale 0.7
Change (exact match required) or enter a new GNUPLOT termial
Modifying terminal SCREEN
New terminal definition for plot
1 SCREEN set terminal x11 size 768,640 font "Arial,16"
with file extention:
--->OC6:--->OC6:--->OC6:--->OC6:--->OC6:--->OC6:--->OC6:--->OC6:--->OC6:At line 4169 of file utilities/metlib4.F90 (unit = 50, file = '/home/divakar/dev/oc/start.OCM')
Fortran runtime error: End of file

Error termination. Backtrace:
#0 0x7efecb31b32a
#1 0x7efecb31bed5
#2 0x7efecb31c69d
#3 0x7efecb492ca3
#4 0x7efecb49328a
#5 0x7efecb48fe8f
#6 0x7efecb49479c
#7 0x7efecb49572c
#8 0x555c4ec8f95e
#9 0x555c4ec9a1f2
#10 0x555c4ec9b7b9
#11 0x555c4ec9ca15
#12 0x555c4ee0483f
#13 0x555c4ec7de44
#14 0x555c4ec7db5e
#15 0x7efeca52cbf6
#16 0x555c4ec7db99
#17 0xffffffffffffffff
Even having a blank zero byte start.OCM file causes oc6 to fail with--->OC6:At line 4169 of file utilities/metlib4.F90 (unit = 50, file = '/home/divakar/dev/oc/start.OCM')
Fortran runtime error: End of file`

Modeling ordered phases with more then 1 interstitial sublattice

Hello Professor Bo,

I'm interested on modeling an ordered phase which interstitial sites can be occupied. It turns out that when the ordered phase is formed, we have 2 distinct octahedral interstitial sites. I would like to compute these differences. When I tried entering this on TC, the following message appeared:

*** ERROR 1181 IN GZDIS2: INCONSISTENT NUMBER OF SUBLATTICES
The database violates some of these checks:

*** BEWARE, minimal checks are made that you use this command correctly
Requirements are:

  1. The disordered phase (DP) should have max two sublattices.
  2. The ordered phase (OP) should have at least one more sublattice.
  3. If the DP has two sublattices the last sublattice for both phases should be for the same "interstitial" constituents.
  4. The ratio between the substitutional and interstital sublattice for DP must be the same as the ratio between the sum of all ordering sublattices for OP and the interstitial sublattice.
  5. The first (or only) sublattice for the DP represent a substitutional mixing of all constituents on all ordering sublattices of the OP.
  6. Normally the constituents on all ordering sublattices in the OP are identical to those on the first sublattice of the DP.
    It is allowed that some constituents do not enter all sublattices in the OP.
  7. The Gibbs energy (and all first and second partial derivatives) for OP and DP (multiplied with the site ratio) will be added together. (Ignoring the config. entropy for DP). If you read from a database the type definitions may have to be rearranged for the phases BCC_B2 and BCC_A2
    Type definitions are executed in the order they appear. ERROR 1181 RESET

Is it possible to do it with OC? Could you please point me in the right direction on the source code?

Thank you very much

EA

New iso_c_binding interface

Dear Prof. Sundman,

I have finished the iso_c_binding for the new TQ interface. The new zip file you can download from my git repo https://github.com/Teslos/opencalphad. The main iso binding interface is in liboctqisoc.F90.
I am also new to git versioning system, so I hope that I properly merged your version with my modified version.
There still some open issuses with the with deprecated functions for example tqgcom, which currently don't work in the this version of TQ interface. But I suppose you will update these functions or removed them in a new version.
The module variables which are now global to liboctq interface are exported in iso_c_binding as global variables in C program. I think this is not a good design decision, but iso_c_binding standard does not give any other option to do this (at least I don't know of any). Currently, all global variables and function are prefixed with c_ for example c_ntup. This reduces the probability that it will clash with names of other variables in C program but it doesn't eliminate it. Thank you very much for the opencalphad project!!

Best regards,
∃t

TDB parser silently fails on commands without all uppercase characters

Reproducible Example

 Phase TEST % 1 1 !
 Constituent TEST : H,HE,LI,BE,B,C,N,O,F,NE : !

Observed Behavior

"list data" will not show the phase or any of its parameters.
No calculations will work and OC will complain about missing data.

Expected Behavior

The TDB parser should not care about capitalization of the commands, or it should at least warn the user.

Workaround

Modify the TDB file to put the commands in all uppercase.

Mapping problems

Hello dear Professor Bo Sundman,

I'm having problems to plot a simple binary diagram. I've confirmed that the Gibbs energy of the phases are the same as when I plot the same diagram using other thermodynamic software. Here attached you may find OpenCalphad macro files for reproducing this. Would you have any advice for plotting this diagram or correcting the setup_OCM?

Thank you very much for supporting thermodynamic research!

f_FeTi_OCM.txt
gibbs_plt_OCM.txt
map_OCM.txt
Ukita_TDB.txt

Gibbs-500_OC
Gibbs-500
Ti-H - Diagram_OC
Ti-H - Diagram

Gnuplot plotting

I'm trying to run the macro map1.OCM, and when it tries to plot the phase diagram it's coming back with this error:

set term windows
^
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

WARNING: error during initialization

set terminal qt size 600,500 font "arial,16"

"ocgnu.plt" line 3: unknown or ambiguous terminal type; type just 'set terminal' for a list

What could be the issue?

Waiting time/ Scheil solidification calculation

Dear all,
I am trying to build the Scheil solidification curve.
My system (from iron4cd database) in mole fraction:

Fe → 0.577
C → 0.24
Si → 0.095
Ti → 0.088

Following the steps showed on the OpenCalphad tutorial, in which there are examples, I could not perform that calculation. The message appear:

example_opencalphad

Then, I put more time to run the calculation as the message recommend. In this case, was 3600 seconds. But, the message still appear requesting more waiting time. So, is there an ideal waiting time to put in this kind of calculation?

Greetings

TQ4 parallel-alnipt input file

Hello, I'm having some trouble running the TQ4 example "parallel-alnipt". I've already compiled the sim1 exacutable but I don't know how the input file is made. Could you please provide a input file example?

Makefile for isoC-Sigli in TQ3lib-clean

I recently tried to compile the libraries in https://github.com/sundmanbo/opencalphad/tree/version3/TQ3lib-clean/isoC-Sigli (with an additional liboceq.a library copied from the main OC directory) with the following contents in Makefile:

OBJS=liboctq.o liboctqisoc.o
EXE=Example_TQ  #this is the cpp file name and it was tgintf.cpp on 2015-10-02
LIBS=../..
CC = g++
CFLAGS = -c -Wall

.PHONY : all clean

all:
    make $(EXE)

clean:
    rm -f *.o *.mod $(EXE)

liboctq.o:  liboctq.F90
    gfortran $(CFLAGS) -g -fbounds-check -finit-local-zero -I$(LIBS) liboctq.F90

liboctqisoc.o:  liboctqisoc.F90
    gfortran $(CFLAGS) -g -fbounds-check -finit-local-zero -I$(LIBS) liboctqisoc.F90

$(EXE): $(OBJS)
    $(CC) -o $(EXE) -fopenmp -lstdc++ $(EXE).cpp liboctqisoc.o liboctq.o liboceq.a -lgfortran -lm
    $(CC) $(CFLAGS) -I../.. $(EXE).cpp

The compilation produces " undefined reference to `c_selecteq' ... and so on.

However, the compilation is successful in the isoC-Sigli libraries with the cpp file named tgintf.cpp as on 2015-10-02. Some updates might have required additional settings in the linking with the make command.

Please suggest on what i should add on the above makefile. My operating system is Ubuntu 14.04.

Error in running tests in TQ3lib-clean

Testing F90 test cases in TQ3lib-clean, it seems that many of them are written for the older versions of Open Calphad and they do not work with versions 4 and 5. An example will be compiling 'liboct.F90' in test1 that will raise error

liboctq.F90:638:46:

           call get_phase_name(phcs(n1)%phaseix,phcs(n1)%compset,name)
                                                                   1
Error: ‘phaseix’ at (1) is not a member of the ‘gtp_phasetuple’ structure

Here is the declaration:

  type(gtp_phasetuple), dimension(maxp) :: phcs

looking at the type 'gtp_phasetuple' in models/gtp3.F90, does not have any member 'phaseix'. There is a comment to this type declaration in that file which refers to old code.

! >>>>>>>>>>>> old     integer phaseix,compset,ixphase,lokvares,nextcs

I recommend either to remove these test cases (or a note in a readme file stating these will not work with new version) or these test cases be corrected with the new version.

Calculation of a surrounded single in a diagram.

Dear Professor Bo,

I'm trying to calculate the FeTi phase diagram using the TDB attached. The single phase region appears to be "neglected" even when I set a start equilibrium inside the single phase field and map it separately. I calculated it with our "favorite" thermodynamic software to confirm that we have this phase region. I'm sending both results attached. Would you suggest any way for calculating it with OC?
I wish you all the best and thank you for your hard work for providing a free software for materials thermodynamics

Best wishes
EA

feti.txt
feti_bo-phdia_OC.pdf
Fe-Ti (TC_calc)- feti_bo

Segmentation fault

Hello dear Prof. Bo Sundman

I'm trying to assess a ternary system which includes a ternary Ord-Dis bcc phase and some quasi-stoichiometric phases which have only solubility in interstitial sublattices of interstitial atoms. I had the following error message:

Warning: global minimizer cannot be used for the current set of conditions
Phase change (equil:  19) iteration:    18, phase: -BCC#1
Phase change (equil:  19) iteration:    22, phase: -BCC_AUTO#3
Phase change (equil:  19) iteration:    26, phase: +BCC#1
Phase change (equil:  19) iteration:    33, phase: +BCC_AUTO#3
Phase change (equil:  19) iteration:    37, phase: -BCC#1
Phase change (equil:  19) iteration:    38, phase: +BCC#1
Phase change (equil:  19) iteration:    42, phase: -BCC#1
Phase change (equil:  19) iteration:    44, phase: +BCC#1
Phase change (equil:  19) iteration:    48, phase: -BCC#1
Phase change (equil:  19) iteration:    54, phase: +BCC#1
Phase change (equil:  19) iteration:    58, phase: -BCC#1
Phase change (equil:  19) iteration:    62, phase: -BCC_AUTO#3
Phase change (equil:  19) iteration:    66, phase: +BCC#1
Phase change (equil:  19) iteration:    73, phase: -BCC#1
Phase change (equil:  19) iteration:    81, phase: +BCC_AUTO#3
Phase change (equil:  19) iteration:    85, phase: -BCC_AUTO#3
Phase change (equil:  19) iteration:    87, phase: +BCC_AUTO#3
Phase change (equil:  19) iteration:    91, phase: -BCC_AUTO#3
MM Removing phase:    1   2#1
MM Restoring phase:      1    2  BCC#1
Equilibrium result:  120 its,   3.6431E-02 s,     37 cc, GS= -5.4731928E+04 J/mol
Testing if any gridpoint is below the calculated equilibrium
 3Y could not find gridpoint          683  in phase            2         324
 3Y Failed extract constitution  -219579474
 3Y Equilibrium wrong, gridtest found BCC                     
 3B creates a composition set in all equilibria

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f44f2d1832a
#1  0x7f44f2d17503
#2  0x7f44f1f4703f
#3  0x55bed148eed4
#4  0x55bed14f2647
#5  0x55bed15206b6
#6  0x55bed138d23e
#7  0x55bed1379ddc
#8  0x55bed1379bae
#9  0x7f44f1f29bf6
#10  0x55bed1379be9
#11  0xffffffffffffffff
Segmentation fault (core dumped)

I entered "many_equilibria" . All the equilibria are similiar and most of them cannot be calculated. Some of them show this kind of error and OC crashes.

Would you mind helping me using OC to parametrize these phases?

Thank you very much
Best regards

OCASI compilation failure

Hello, I'm trying to compile OCASI on linux using gfortran. I don't know specifics of different editions of fortran, but i tried all the different -std= keys and still nothing works. Could you please help me to compile it? Pasting here error logs.

gfortran -c -g -O2 -fopenmp -fPIC ./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:49:38:

   49 |         character(c_char) :: eqname*24
      |                                      1
Error: Component ‘eqname’ of BIND(C) type at (1) must have length one
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:50:39:

   50 |         character(c_char) :: comment*72
      |                                       1
Error: Component ‘comment’ of BIND(C) type at (1) must have length one
./examples/TQ4lib/Cpp/Matthias/liboctqisoc.F90:66:39:

   66 |         character(c_char) :: eqextra*80
      |                                       1
Error: Component ‘eqextra’ of BIND(C) type at (1) must have length one
make[1]: *** [Makefile:149: liboctqisoc.o] Error 1
make[1]: Leaving directory '/home/karasyk/hea_compute/opencalphad'
make: *** [Makefile:58: OCASI] Error 2

Problem with TP functions with real powers, and SOLGASMIX converter

I have made a database for my work which the TP functions have terms like T**(0.5) "extended Gibbs terms".
I tried to use OC with those terms (without parenthesis and although wrong, with parenthesis) and I got error. I couldn't find it in OC manual but in thermocalc database manual (which is similar used in OC), it is mentioned:
Page 13, Section 3.14, Paragraph 2, Thermo-Calc Database Guide: The expression is a FORTRAN-like expression and operators +, -, *, = and ** can be used (** only with integer powers)..
I tried to work around it to use EXP and LN combined: EXP(LN(0.5*T))
OC does not provide any error message while reading the TDB file and accept it, however, using oc5p, I set t=1000 and using CALCULATE, I calculated TP functions including the term, which gives wrong result.
I am wondering if OC is capable of receiving term like T**(0.5) or if it is possible to extend the integer capability of power to accept real numbers in parenthesis as well. if not possible, I would be grateful if you provide me a suggest to work around it.

Another point is that if I made a dummy case using a term of EXP(T) in a TP function and convert the TDB file to DAT file, and it will write:
Ag 4 1 1.00 0.00 3000.0000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 1 1.0 0.50
The last line refers to 1 extra term, with coefficient of 1.0 and power of 0.5.(basicly T**(0.5)) which is not correct.

Identifiers or acronyms

Dear All,
Is there any reference material related with OpenCalphad to check the identifiers or acronyms?
For instance:
FCC-A1# (I know just FCC: face-centered cubic)
FCC-A1-AUTO#2
NP
and etc.

Legend/subtitles/set position

Dear All,
I have had some problems to set an ideal position to the legend (or key) of Scheil-Gulliver.
Of course, I'd like to set in a position that this legend does not across the curve. As the figure below.
But, when I try to set a position, it takes outside the graph or change "Equilibrium" legend.
It seems that is not possible to set just one legend.

fig12_mod

I have tried by both OpenCalphad (Tools > Utility for Gnuplot) or directly in Gnuplot without success.
In OpenCalphad I could not plot. Because this "Plot" function stay unavailable.

Any tip?

Error at gtp3.F90:1880 while compiling

/Desktop/oc$ make -f Makefile
gfortran -c -O2 -fopenmp models/gtp3.F90
gtp3E.F90:189.71:
Included at models/gtp3.F90:1880:

     write(*,*)'3E Beware: unused equilibria before the last used,'&
                                                                   1

Error: Syntax error in WRITE statement at (1)

I'm trying to compile using 'make -f Makefile' and i'm getting this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.