Amazing! Changing T to a FaceVariable it really improved my results! However, they still have a considerable gap from the optimal, I use scipy LinearLUSolver, is there anything else I could do?
Thank you very much for your help! Best regards, John On Tue, Sep 9, 2014 at 6:49 PM, Guyer, Jonathan E. Dr. < jonathan.gu...@nist.gov> wrote: > > On Sep 9, 2014, at 10:00 AM, John Assael <iass...@gmail.com> wrote: > > > I believe the problem is that all my variables are cell variables. > However, I read in the FAQ that diffusion terms have to be FaceVariables. > > Coefficients to DiffusionTerms can be supplied as a CellVariable, but they > will be linearly interpolated to a FaceVariable. This can be a source of > discrepancy against other methods and/or expectations. > > > And then I go to the areas I have defined and set the values. Here is an > example of two of them. > > > > x, y = mesh.cellCenters > > > > meshW = (x ** 2 + y ** 2 <= properties['r'] ** 2) > > Q.setValue(properties['Q'], where= meshW) > > T.setValue(properties['T'], where= meshW) > > D.setValue(properties['D'], where= meshW) > > > > However, when I do that I get an error for the face variable for every > single one I try to change. > > You cannot assign the values of a FaceVariable T using cellCenter > locations. You need to use faceCenter locations: > > >>> X, Y = mesh.faceCenters > > >>> T.setValue(properties['T'], where=X**2 + Y**2 <= properties['r']**2) > > > > Would sweeps instead of solve help me solve the problem? > > Sweeps are to address non-linearity in your equations. T is not a function > of dT, so non-linearity is not your problem. > > > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > -- ..:: ic3man.gr ::.. software | design | development _/_/_/ email : iass...@gmail.com _/_/_/ www : http://www.ic3man.gr ------------------------------------------------------------------ This e-mail and any attachments are confidential. You may not copy or disseminate any information contained in them to anyone other than the intended recipient. If you are not the intended recipient please contact the sender by reply e-mail and destroy all copies of the original message immediately. ------------------------------------------------------------------
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]