Hello Daniel, Thank you for the links and the comments. Because the interface was so elegant I had assumed that you had off loaded the application of the boundary conditions to some equally elegant mathematical trick that I wasn't aware of! I assume that you must be going into the different matrices and vectors and changing the values of those terms to implement the constraints. I imagine which is what those 'mask' objects are doing.
Thanks' for the compliment on the notes, I found that without making detailed notes I got completely lost in complexity, so they are a means to an end! Could you send me the URL of the tweet I would like to retweet (can send to personal email so as not to spam the list) :) Best wishes, Dan On 4 September 2013 00:35, Daniel Wheeler <[email protected]> wrote: > On Tue, Sep 3, 2013 at 6:38 AM, Daniel Farrell <[email protected]>wrote: > >> Dear list, >> >> The constraints system is extremely elegant way of applying boundary >> conditions to a problem. I was just wondering if there is any background >> information (notes, a paper or thesis) that covers how this is implemented? >> > > I found two entries on the blog/wiki > > http://matforge.org/fipy/wiki/BoundaryConditions > http://matforge.org/fipy/blog/BoundaryConditions > > Not that either of these will be much help. Maybe the table will be a > little helpful. The robin boundary condition example might also be helpful > > > http://www.ctcms.nist.gov/fipy/examples/convection/generated/examples.convection.robin.html > > However we don't have any explanation of how the constraints really work, > but there isn't anything magical about them. While the interface is > seemingly elegant, the implementation is not at all elegant. In fact I'm > not aware of what I would describe as an elegant way to include boundary > conditions in FiPy. > > > >> I have been solving advection-diffusion-reaction type problems using the >> finite volume method (see my online notes here, >> http://danieljfarrell.github.io/FVM) and have found a elegant way of >> adding general boundary conditions to this equation. See here, >> http://danieljfarrell.github.io/FVM/advection_diffusion_boundary_conditions.html#general-matrix-form >> > > > Really nice notes. In fact I just tweeted the link. > > Just glancing at it, I can't tell if it relates directly to the way we > have implemented the boundary conditions, but it might be a more elegant > way. > > >> >> But this only really works when there is a transient term. As soon as the >> equation changes form then a I need to rethink how to apply the boundary >> conditions. The Fipy system seems to get round this problem I just wondered >> how it is working. I have read the source code and noticed the use of >> "masks" but I couldn't really glean much more than that. >> > > I would have to spend some time reconciling your approach with FiPy. When > I have a moment I will give it a go. > > > >> >> If possible I wish to implement a Fipy like constraints system in my >> code, but I want to stay in semi-discrete form so that I can used the >> method of lines. Can the constraints system be applied to the semi-discrete >> form? >> > > When you say the semi-discrete form, I assume you mean that the equations > are only discretized in space, but not yet in time. If this is in fact your > question, I imagine that FiPy makes implicit assumptions regarding the time > stepping when implementing the boundary conditions, but I am not entirely > sure. > > Cheers. > > -- > Daniel Wheeler > > _______________________________________________ > 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 ]
