Here is my problem:
The diffusion problem is set up in a Cartesian coordinate system (2D). But
due to the singularity behavior at the origin point, we need to solve the
equation in a Polar coordinate system.
So I created two meshes in the code: one is the ordinary Grid2D mesh for
the cartesian system, and the other is a PeriodicTopBottom2D mesh for the
Polar system (x=ln(r),y=theta. During the calculation we need to do some
matrix transformation from Cartesian system to the Polar system:
M(Polar) = O^{T} *M(Cartesian)*O
where
O= [(cos(\theta),sin(\theta))\\(-sin(\theta),cos(\theta))].
Is there an easy way to realize this operation? Since both O and M depend
on position, (We expressed M(Cartesian) and O as functions of r and
\theta, and wanted to get M(Polar).) the numpy.dot does not works while.
best,
Zebo
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]