Re: Question about Diffusion Under Temperature Gradient

2014-04-29 Thread Daniel Wheeler
On Mon, Apr 28, 2014 at 7:00 PM, Johnson, Luke A
lukejohn...@neo.tamu.edu wrote:
 Hello,
 I am trying to create a relatively simple thermomigration model in FiPy for
 a final project in my Kinetics class and have been using a paper titled
 Diffusion Under Temperature Gradient as a reference. I can get my system to
 converge and segregate if I assume constant values for the Chemical Mobility
 and Mobility of Thermotransport but am having convergence problems when the
 mobilities become functions of temperature and composition. I think my code
 is right but the problem is that I am using unrealistic values for the
 parameters not explicitly listed in the paper. Could you provide the
 thermodynamic system parameters you used and maybe a workflow for the code
 so I can check with my work?

Unfortunately, I am not sure what you're referring to. Which code /
example are you asking about?

-- 
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


Re: Question about Diffusion Under Temperature Gradient

2014-04-29 Thread Johnson, Luke A
Daniel, 
The code I was referring to is the code used in the paper titled  Diffusion 
under temperature gradient: A phase-field model study  by Mohanty, Guyer and 
Sohn. I found an archived conversation from this mailing list  
http://article.gmane.org/gmane.comp.python.fipy/3064/match=thermal+gradient  
where Jonathan Guyer mentioned digging up the FiPy code used for the paper and 
was wondering if that would still be possible. 


I have attached my code as well, in response to your other email. The code is 
quite temperamental as I have combined elements from quite a few sources but it 
should converge to a solution as it is written right now, albeit an unphysical 
one. 


Thank you for your time and interest, 
Luke Johnson 

- Original Message -

From: Daniel Wheeler daniel.wheel...@gmail.com 
To: Multiple recipients of list fipy@nist.gov 
Sent: Tuesday, April 29, 2014 2:52:29 PM 
Subject: Re: Question about Diffusion Under Temperature Gradient 

On Mon, Apr 28, 2014 at 7:00 PM, Johnson, Luke A 
lukejohn...@neo.tamu.edu wrote: 


Hello, 
I am trying to create a relatively simple thermomigration model in FiPy for 
a final project in my Kinetics class and have been using a paper titled 
Diffusion Under Temperature Gradient as a reference. I can get my system to 
converge and segregate if I assume constant values for the Chemical Mobility 
and Mobility of Thermotransport but am having convergence problems when the 
mobilities become functions of temperature and composition. I think my code 
is right but the problem is that I am using unrealistic values for the 
parameters not explicitly listed in the paper. Could you provide the 
thermodynamic system parameters you used and maybe a workflow for the code 
so I can check with my work? 

Unfortunately, I am not sure what you're referring to. Which code / 


example are you asking about? 

-- 
Daniel Wheeler 
___ 
fipy mailing list 
fipy@nist.gov 
http://www.ctcms.nist.gov/fipy 
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] 
### Summary: This script will create a model with which we can study thermal migration in single and double phase binary alloys. The thermal term is coupled to the equation via deGroot. The most important factors are initial composition, atomic mobility and heat of transport.
### Context: Should be a fully contained script with few imported modules.
###		phi = phase variable
###		psi = transformation variable necessary to write coupled equation
###		T = temperature variable
### DATE MODIFIED: 4/22/2014

#=
### STATE OF THE CODE: Grid has been drawn and the variables have been laid out over it. Temperature dependent thermo and chemical mobilities are coded, just need values to make it realistic. Boundary conditions for temperature and mass have just been introduced as well. Phase Field equations are coded and the variables are initialized as repeating zeros. Not sure if the 3rd equation is correct (because it changes the temperature profile, which should be an imposed part of the problem) but introducing it allowed the solver to at least try to solve the problem and plot some results.

### WORK ON NEXT:
###		-input reasonable variable for comparison to Tunde's paper (added: Apr 21)
#=


from fipy import *

# boilerplate initialization function which also sets the number of cells
#=
if __name__ == __main__:
nx = ny = 50
else:
nx = ny = 50


# setting up the mesh and laying necassary variables over that mesh (T variable may not be necessary)
#=
dx=.1
dy=.1
mesh = Grid2D(nx=nx, ny=ny, dx=dx, dy=dy)
phi = CellVariable(name=r$\phi$, mesh=mesh) # concentration_b
psi = CellVariable(name=r$\psi$, mesh=mesh) # intermediate variable for use in CahnHilliard equation implementation
T = CellVariable(name=r$T$, mesh=mesh) # temperature

#Setting the temperature across the mesh to have a linear gradient in the x direction
T_hot=1500.
T_cold=1000.
T_gradient=(T_hot-T_cold)/(nx-1)
for height in range(0,ny):
  index=height*nx
  T[index]=T_cold
  for dist in range(1,nx):
T[index+dist]=T[index+dist-1] + T_gradient
#T[:]=900
phi[:] = GaussianNoiseVariable(mesh=mesh, mean=0.5, variance=0.1).value

if __name__ == __main__:
  viewer = Viewer(vars=(phi)) # , datamin=0., datamax=1.)


# Setting up equations for chemical mobility and  mobility of thermotransport respectively (THESE ONLY NEED TO BE SWITCHED ON IF WE'RE LOOKING AT TWO PHASE ALLOYS, SINGLE PHASE CAN BE APPROXIMATED AS CONSTANT ATOMIC MOBILITY AND HEAT OF TRANSPORT)
#=
Vm = 10

Re: Question about Diffusion Under Temperature Gradient

2014-04-29 Thread Guyer, Jonathan E. Dr.
I apologize. I apparently never hit send in reply to your email to me on 
Friday. I've replied to you now and will look at your attached code when I get 
the chance.

I did not write the code in that paper, but advised the lead author in 
formulating the code and debugging it. If I've got a copy, I can't find it. 
I've sent you a current address for the lead author; he may be able to provide 
you with a script.


On Apr 29, 2014, at 4:17 PM, Johnson, Luke A lukejohn...@neo.tamu.edu wrote:

 Daniel,
 The code I was referring to is the code used in the paper titled Diffusion 
 under temperature gradient: A phase-field model study by Mohanty, Guyer and 
 Sohn. I found an archived conversation from this mailing list 
 http://article.gmane.org/gmane.comp.python.fipy/3064/match=thermal+gradient; 
 where Jonathan Guyer mentioned digging up the FiPy code used for the paper 
 and was wondering if that would still be possible.
 
 I have attached my code as well, in response to your other email. The code is 
 quite temperamental as I have combined elements from quite a few sources but 
 it should converge to a solution as it is written right now, albeit an 
 unphysical one.
 
 Thank you for your time and interest,
 Luke Johnson
 
 
 From: Daniel Wheeler daniel.wheel...@gmail.com
 To: Multiple recipients of list fipy@nist.gov
 Sent: Tuesday, April 29, 2014 2:52:29 PM
 Subject: Re: Question about Diffusion Under Temperature Gradient
 
 On Mon, Apr 28, 2014 at 7:00 PM, Johnson, Luke A
 lukejohn...@neo.tamu.edu wrote:
 Hello,
  I am trying to create a relatively simple thermomigration model in FiPy for
  a final project in my Kinetics class and have been using a paper titled
  Diffusion Under Temperature Gradient as a reference. I can get my system to
  converge and segregate if I assume constant values for the Chemical Mobility
  and Mobility of Thermotransport but am having convergence problems when the
  mobilities become functions of temperature and composition. I think my code
  is right but the problem is that I am using unrealistic values for the
  parameters not explicitly listed in the paper. Could you provide the
  thermodynamic system parameters you used and maybe a workflow for the code
  so I can check with my work?
 
 Unfortunately, I am not sure what you're referring to. Which code /
 
 example are you asking about?
 
 -- 
 Daniel Wheeler
 ___
 fipy mailing list
 fipy@nist.gov
 http://www.ctcms.nist.gov/fipy
   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
 finalproject_dimension.py___
 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 ]


Re: Question about Diffusion Under Temperature Gradient

2014-04-28 Thread Raymundo Arroyave
Send them your code

Raymundo Arroyave

Sent from my iPhone

 On Apr 28, 2014, at 6:00 PM, Johnson, Luke A lukejohn...@neo.tamu.edu 
 wrote:
 
 Hello,
 I am trying to create a relatively simple thermomigration model in FiPy for a 
 final project in my Kinetics class and have been using a paper titled 
 Diffusion Under Temperature Gradient as a reference. I can get my system to 
 converge and segregate if I assume constant values for the Chemical Mobility 
 and Mobility of Thermotransport but am having convergence problems when the 
 mobilities become functions of temperature and composition. I think my code 
 is right but the problem is that I am using unrealistic values for the 
 parameters not explicitly listed in the paper. Could you provide the 
 thermodynamic system parameters you used and maybe a workflow for the code so 
 I can check with my work? Any help would be greatly appreciated and thank you 
 in advance for your response.
 
 Regards,
 Luke Johnson
 ___
 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 ]