On Tue, Sep 25, 2012 at 9:47 PM, Oliver Maclaren <[email protected]> wrote: > Hi, > I'm new to FiPy and first just want to say thanks for all the time and > effort put into this, it looks like a great learning and research > tool! > > I also have a comment and question about the simple > convection-with-source example at: > http://www.ctcms.nist.gov/fipy/examples/convection/generated/examples.convection.source.html > > The (very minor!) comment is that the equation to be solved is stated > in the text of the example as: > > d(phi)/dx - alpha*phi = 0 > > but the equation solved is: > > d(phi)/dx + alpha*phi = 0 > > which gives the negative gradient of the solution (also in the code > the equation is specified by eq = PowerLawConvectionTerm((1,)) + > ImplicitSourceTerm(alpha)).
Thanks for that. I'll change it around. > My question is about the part of the description reading "The boundary > condition at x = L will require the implementation of an outflow > boundary condition, which is not currently implemented in FiPy. An > ImplicitSourceTerm object will be used to represent this term." This isn't strictly true any more now that we are using constraints. As long as any constraint is applied to an exterior surface then the boundary conditions is an outflow condition. The reason for this requirement is backwards compatibility due to our bad choices int the past. The "phi.faceGrad.constrain([0], mesh.facesRight)" basically enables an outflow boundary condition otherwise the natural condition is applied which is zero velocity. > I'm not expert in well-posedness and requirements of numerical > formulations, but since there is a boundary condition given at x=0 and > the equation is first order, why is a boundary condition at x=L > required? I tried taking the condition at x=L out and the code still > works, but perhaps there is a default Neumann condition implemented > anyway? Obviously, it depends on the direction of the flow, but yes you are right. I'll try and modify the text in the example so it makes more sense. Thanks! -- Daniel Wheeler _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
