On Mar 28, 2016, at 3:04 PM, Djoeke Schoonenberg <[email protected]> wrote:
> Hmm, when I do as you suggest: > > xface = mesh.faceCenters[0] > > Eq = TransientTerm(var=S_vap) == \ > ConvectionTerm(coeff=vgas(xface)+p*Dif/xface, var=S_vap)\ > + ImplicitDiffusionTerm(coeff=Dif, var=S_vap)\ > > I get the following error: > VectorCoeffError Traceback (most recent call last) > /Users/Djoeke/Desktop/Planets/ice/fipy_mailinglist.py in <module>() > 43 > 44 Eq_vap = TransientTerm(var=S_vap) == \ > ---> 45 ConvectionTerm(coeff=vgas(xface)+p*Dif/xface, var=S_vap)\ > 46 + ImplicitDiffusionTerm(coeff=Dif, var=S_vap)\ > 47 > > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fipy/terms/abstractConvectionTerm.pyc > in __init__(self, coeff, var) > 106 > 107 if isinstance(coeff, _MeshVariable) and coeff.rank < 1: > --> 108 raise VectorCoeffError > 109 > 110 if isinstance(coeff, CellVariable): > > VectorCoeffError: The coefficient must be a vector value. Which is why I wrote: >> Strictly, you should not pass a scalar coefficient to a ConvectionTerm, >> although it generally works in 1D. (vgas(xface)+p*Dif/xface))*[[1]] should >> give you a proper vector velocity. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
