On Tue, Jun 28, 2016 at 12:53 PM, Abhilash Mathews <amath...@uwo.ca> wrote:
>
> eq1 = (TransientTerm(var=N1) == ImplicitSourceTerm(coeff=-2.*E1, var=P2) +
> ImplicitSourceTerm(coeff= -2.*E2, var=P1) + ImplicitSourceTerm(coeff=
> -1./(T1/TR), var=N1))
>
> eq2 = (TransientTerm(var=P1) == ImplicitSourceTerm(coeff=2.*E2, var=N1) +
> ImplicitSourceTerm(coeff= -1./(T2/TR), var=P1))
>
> eq3 = (TransientTerm(var=P1) == ImplicitSourceTerm(coeff=2.*E1, var=N1) +
> ImplicitSourceTerm(coeff= -1./(T2/TR), var=P2))
>
> eq4 = (CentralDifferenceConvectionTerm(coeff = ones, var=E1) ==
> ImplicitSourceTerm(coeff=constant3, var=P2) +
> ImplicitSourceTerm(coeff=-1./Ldiff, var=E1))
>
> eq5 = (CentralDifferenceConvectionTerm(coeff = ones, var=E2) ==
> ImplicitSourceTerm(coeff=constant3, var=P1) +
> ImplicitSourceTerm(coeff=-1./Ldiff, var=E2))

These are not great equations from FiPy's perspective as they are
purely convective. However, if you want to persist with FiPy, you may
want to use some sort of relaxation for the last two equations. One
thing you could do is add in a TransientTerm and DiffusionTerm with
small coefficients. Initially, just use coefficients of 1 to see if
actually having those terms helps the numerical stability. If that
helps, see if you can dial down those coefficients to get a more
physical solution or use other techniques that maintain the correct
physics.



-- 
Daniel Wheeler
_______________________________________________
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