phi is your solution variable, so its value will change as the problem evolves. 
Any time a coefficient is dependent on the solution variables, you should 
"sweep" the solution at each time step (or, in your case, for your quasi-static 
solution) until you get convergence. See

  
http://www.ctcms.nist.gov/fipy/documentation/FAQ.html#iterations-timesteps-and-sweeps-oh-my

for more information about sweeping.

> On Apr 22, 2016, at 3:13 PM, Gaury, Benoit H. (IntlAssoc) 
> <benoit.ga...@nist.gov> wrote:
> 
> This is where I don't understand because doing
> 
> ImplicitSourceTerm(coeff=(phi+1))
> 
> is like doing
> 
> ImplicitSourceTerm(coeff=2)
> 
> because I initially defined phi as
> 
> phi = CellVariable(mesh=mesh, value=1)
> 
> How should I define phi so that the source term is not a constant?
> ________________________________________
> From: fipy-boun...@nist.gov <fipy-boun...@nist.gov> on behalf of Guyer, 
> Jonathan E. Dr. (Fed) <jonathan.gu...@nist.gov>
> Sent: Friday, April 22, 2016 1:22:03 PM
> To: FIPY
> Subject: Re: Diffusion equation with additional terms
> 
> -ImplicitSourceTerm(coeff=(phi+1))
> 
> will do it, although you may want to look at
> 
> http://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.simple.html
> 
> for a discussion of the most efficient way to linearize a source.
> 
> 
>> On Apr 22, 2016, at 12:22 PM, Gaury, Benoit H. (IntlAssoc) 
>> <benoit.ga...@nist.gov> wrote:
>> 
>> Hi everyone,
>> 
>> I want to solve an equation of the form
>> 
>> \nabla^2 phi - phi^2 - phi = 0,
>> 
>> where phi is the unknown we solve for. I found out that an additional linear 
>> term can be added do the stationary diffusion equation using 
>> ImplicitSourceTerm(). However I didn't find anything to add phi^2 + phi. Did 
>> I miss something?
>> 
>> Thanks,
>> Benoit
>> 
>> _______________________________________________
>> 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 ]
> 
> _______________________________________________
> 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 ]

Reply via email to