HI,

 Thank you so much for reply. BTW, is "fp.numerix" typo?
And for the second method, it does not works well. Because, here LVV is a
matrix depends on position, instead of a scalar. The problem comes out when
doing the product of a Matrix and a vector: When I use:
LVV*(alphaV*epsilon).faceGrad, it shows: "TypeError: unsupported operand
type(s) for *: 'binOp' and '_FaceGradVariable'". ; and If I use:
LVV*(alphaV*epsilon).grad, or LVV*v (v=the gradient of (alphaV*epsilon) by
derive it explicitly.), it shows: "IndexError: id1 does not have the same
size as b".

best,
Zebo


2014-05-06 9:20 GMT-05:00 Guyer, Jonathan E. Dr. <[email protected]>:

>
> On May 5, 2014, at 6:53 PM, Zebo LI <[email protected]> wrote:
>
> > Thank you so much. I have fixed the boundary condition problem by
> introduce an implicit source term, and the code works well.
> > However, now I am thinking to write a fipy script with 4 equations, two
> of them are ordinary diffusion equations, and the other two
> > are not differential equation. But, I don't know how to deal with those
> non-differential equations in fipy. The detailed things are shown
> > in the attached file.
>
> I suppose you would write these terms essentially as they appear, e.g,
>
>   eq3 = ImplicitSourceTerm(coeff=1., var=muV) == alphaV * epsilon + kB * T
> * fp.numerix.log(CV)
>
> I don't recommend you do this, though, as there is no way to implicitly
> relate muV with CV when you do this. By that, I mean that $k_B T \ln(C_V)$
> cannot be expressed as a matrix operating on $C_V$.
>
> You are better off carrying the derivatives through to get DiffusionTerms
> in CV and in epsilon. If you aren't solving your elastic strain equations,
> you can just write the strain part as (LVV * (alphaV *
> epsilon).faceGrad).divergence.
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to