2010/1/15 Igor <[email protected]>: > Dear FiPy community, > sorry for doubling the post, but this time it has a subject > > I have a number of questions to you: > > 1.I have a dependent variable phi(x,y,t). Is it possible to solve the below > type of equation for this variable: > > TransientTerm == DiffusionTerm_x + ConvectionTerm_x + DiffusionTerm_y + > ConvectionTerm_y,
Use "DiffusionTerm( [ (a, 0), (0, b) ] )" and "ConvectionTerm((c, d))". There is FAQ in the manual that addresses this. > 2.If the above is possible, could you give me a hint how to do it? In > principle, I doubt to use anisotropic diffusion coefficient, besides how to > split the components of the ConvectionTerm. The convection term takes a rank 1 variable by definition as the diffusion term takes a rank 2 variable (or rank 1 or rank 0, rank 1 is just the diagonal of the anisotropic coeff). You can populate these variables any way you wish based on space or constructed from other variables. > 3.Is it possible to define the "Terms"(Diffusion, Convection) "by hands" > using .getDivergence() and .getGrad() methods (using the desired component)? Yes, if you don't mind them being explicit. The regular diffusion terms and convection term are implicit. > 4.Is it possible to supply the "Terms"(i.e. Diffusion) with exterior > coefficients so that nabla operator was not applied to them? Yes. Just do "cellVar * DiffusionTerm(coeff)". cellVar must be a cellVar. Generally, you can reformulate equations so that everything is inside the derivatives and this is often preferable. -- Daniel Wheeler
