On Mon, Oct 1, 2012 at 6:04 AM, Guru Venkat <[email protected]> wrote: > Hi all, > > I am a newbie to FiPy and am finding it to be very interesting. > > I basically want to use FiPy for solving Maxwell's equations for a variety > of configurations. I tried out the solution of Poisson's equation and it > worked like a charm. I extended it to a 2 dimensional case with a constant > permittivity (which was defined as a scalar) and it worked. I now want to > change the permittivity profile in a certain part of the simulation domain > and would like to see the solution. I tried by giving the permittivity as a > matrix (tensor) quantity to the equation (This is for the case when the > variation is permittivity is not complicated; say along straight lines). > However, it did not work and I got the error:
If you want a spatially varying permittivity it doesn't necessarily need to be a tensor. It could be a tensor (depending on the physics), but it isn't required. > "diffusion coefficent tensor is not an appropriate shape for this mesh". Generally, the shape of the diffusion tensor should be (M, M, N) where M is the spatial dimension and N is the number of grid points given that a regular non-tensorial diffusion coefficient has shape (N,). The error message should really state this. > Can somebody suggest a way to do this? I did take a look at the second FAQ > here. However, I don't think that changing the permittivity is making a > change to the equation. I thought the script was throwing an error or is this a different script from the one that throws the error? -- Daniel Wheeler _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
