Hi Anders,
Your interpretation is correct: when $\phi = 1$, $c = c_S$; and when $\phi = 0$, $c = c_L$. The lookup-table visualization does show $c_S=c_L=0$ when $\phi=0$ and $c_S=c_L=1$ when $\phi=1$, which is not correct. Looking at the linescan plots further down in the ipynb file, when $phi=0$, $c\neq 0$ and when $\phi=1$, $c\neq 1$, so something inconsistent is going on -- hopefully in the visualization. I will take a closer look: thank you for bringing this discrepancy to my attention. Trevor ________________________________ From: fipy-boun...@nist.gov <fipy-boun...@nist.gov> on behalf of Anders Ericsson <anders.erics...@solid.lth.se> Sent: Thursday, September 14, 2017 11:02:16 AM To: FIPY Subject: Re: Implementation of KKS-model in FiPy Hi Trevor, I have a question regarding the LookupTable that is being generated from the code in https://github.com/tkphd/KKS-binary-solidification. The code is generated from the conditions that $c = h(\phi)c_S + (1 - h(\phi))c_L$ and $\frac{\partial f_L}{\partial c_L} = \frac{\partial f_S}{\partial c_S}$, which implies that $c = c_S$ when $\phi = 1$ and $c = c_L$ when $\phi = 0$. But in the generated table it seems like $c_S = c_L = 0$ (blue contour) when $\phi = 0$, while $c$ varies between 0 to 1. The same thing happens on the opposite side of the plots, when $\phi = 1$ and $c_S = c_L = 1$ (red contour) while $c$ varies between 0 to 1. Is this wrong or am I interpreting the table in a wrong way? I have attached an image of the plots for convenience. Thank you and best regards, Anders ________________________________ From: fipy-boun...@nist.gov <fipy-boun...@nist.gov> on behalf of Anders Ericsson <anders.erics...@solid.lth.se> Sent: Monday, September 11, 2017 11:08:57 AM To: FIPY Subject: Re: Implementation of KKS-model in FiPy Hi Trevor and Daniel, Thank you for your answers, It's very much appreciated. I will have a deeper look at the references you sent me and get back to you in case I have any further questions. Best regards, Anders ________________________________ From: fipy-boun...@nist.gov <fipy-boun...@nist.gov> on behalf of Keller, Trevor (Fed) <trevor.kel...@nist.gov> Sent: Friday, September 8, 2017 9:09:35 PM To: FIPY Subject: Re: Implementation of KKS-model in FiPy Hi Anders, I have an implementation of the binary KKS solidification model written up in a repository, https://github.com/tkphd/KKS-binary-solidification. It's based on Phase-Field Methods in Materials Science and Engineering by Provatas and Elder, chapter 6.9 and appendix C.3. It's a good introduction to the numerical approach. A more involved KKS model (ternary alloy with three phases) is written up in another repository, https://github.com/usnistgov/phasefield-precipitate-aging, but the implementation does not involve FiPy. As Daniel mentioned, the equations of motion $\frac{\partial c}{\partial t}$ and $\frac{\partial \phi_i}{\partial t}$ depend on the fictitious compositions $c_j$ in each phase, but since the $c_j$ are equilibrium values, their solution is time-independent. Therefore, the standard approach presented by Provatas and Elder is to use a Newton-Raphson solver that takes $c$ and $\phi_i$ as constant inputs, and iteratively solves for the $c_j$ that satisfy the constraints on $c$ and $\mu$. For relatively well-behaved systems, as in the binary KKS repository, you can build a lookup table before launching the simulation and simply interpolate between known values instead of actually solving the constrained equilibrium at each point during the simulation. For your model, such a lookup table would be a vector-valued 2D matrix with n+1 fictitious compositions per entry. Building it may take some time, but the runtime performance can be quite good with this approach. I hope that helps. Jon Guyer may be able to comment more clearly on the FiPy implementation details. Best regards, Trevor Trevor Keller, Ph.D. Materials Science and Engineering Division National Institute of Standards and Technology 100 Bureau Dr. MS 8550; Gaithersburg, MD 20899 Office: 223/A131 or (301) 975-2889 ________________________________ From: fipy-boun...@nist.gov <fipy-boun...@nist.gov> on behalf of Daniel Wheeler <daniel.wheel...@gmail.com> Sent: Friday, September 8, 2017 11:37:20 AM To: FIPY Subject: Re: Implementation of KKS-model in FiPy Hi Anders, Just to simplify this, would the following help. Let's consider \frac{\partial c_1}{\partial t} = F(c_1, c_2, c_3) \\ \frac{\partial c_2}{\partial t} = G(c_1, c_2, c_3) \\ c_3 = H(c_1, c_2) Basically, you have two variables solved by PDEs and a third solved by an equation that is independent of time. Would understanding that help you with the larger problem? Cheers, Daniel On Thu, Sep 7, 2017 at 9:56 AM, Anders Ericsson <anders.erics...@solid.lth.se> wrote: > Dear all, > > > I currently am working on a phase-field model to simulate solidification in > the binary Zr-Cu system. I have been using FiPy for approximately a year now -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]