Hey Daniel, Sounds good. I got confused when you said "Try explicit to start and then see if implicit helps any" but you were not talking about the source term anymore. Looking at the coupled diffusion example makes everything clear. If I want to couple the equations I just do neweq=eq1 & eq2. Simple enough. When we talk about checking the convergence, we are just talking about the magnitude of residues after solving the equations, correct? Is there anything wrong with using eq.sweep instead of eq.solve?
Salo On Tue, Jan 29, 2013 at 10:31 AM, Daniel Wheeler <[email protected]>wrote: > On Mon, Jan 28, 2013 at 4:21 PM, Salomon Turgman Cohen <[email protected] > > wrote: > >> Hey Daniel, >> Apologies since this is probably basic stuff, but what do you mean >> with explicit, implicit, and coupled? >> > > This has some explanation > > http://en.wikipedia.org/wiki/Finite_difference_method > > and also this FiPy example > > > http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.mesh1D.html > > In reality it comes down to a balance between the types of iteration > (whether time stepping, linear or non-linear iterations) in order to obtain > the best accuracy for the least effort. > > Coupled refers to whether the equations are solved as independent > equations as far as the linear solutions are concerned or whether the > solution variables are combined into a single variable and solved with a > single call to the linear solver. Often better convergence can be achieved > with coupled solutions and some stability issues can be overcome (at least > in my experience). See > > > http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.coupled.html > > I see in the documentation the implicitsourceterm and I understand how to >> use that one. By explicit you mean just write the equation mathematically? >> > > No. I mean to use an explicit source term. In FiPy that means not using a > term class at all to declare the term, just a variable or float. For > example, > > TranisientTerm() == DiffusionTerm() + 2. > > automatically uses an "_ExplicitSourceTerm" for the "2.". You could write > > TransientTerm() == DiffusiionTerm() + _ExplicitSourceTerm(2.) > > but you don't have to. > > Cheers > > -- > Daniel Wheeler > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > -- Salomon Turgman Cohen Postdoctoral Associate Cornell University (919) 341-9650
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
