The Coordinates Section

<< Click to Display Table of Contents >>

Navigation:  Problem Descriptor Reference > The Sections of a Descriptor >

The Coordinates Section

Previous pageReturn to chapter overviewNext page

The optional COORDINATES section defines the coordinate geometry of the problem.

Each geometry selection has an implied three-dimensional coordinate structure.  In 2D and 1D geometries, the solution if the PDE system is assumed to have no variation in one or two of the coordinate directions.  The finite element mesh is therefore constructed in the remaining space, and derivatives in the absent coordinates are assumed to be zero.

In 3D geometry the X & Y coordinates are the projection plane in which a figure is constructed, and the Z coordinate is the direction of extrusion.

The first coordinate in the order of listing is used as the horizontal axis in graphical output, while the second is used as the vertical axis.

The basic form of the COORDINATES section is:



where geometry may be any of the following:




Coordinate system

Modeled Coordinates


Cartesian (X,Y,Z)



Cylindrical (R,Phi,Z)



Spherical (R,Theta,Phi)



Cartesian (X,Y,Z)



Cylindrical (Z,R,Phi)



Cylindrical (R,Z,Phi)



Cartesian (X,Y,Z)



If no COORDINATES section is specified, a CARTESIAN2 coordinate system is assumed.


Renaming Coordinates

A second form of the COORDINATES section allows renaming (aliasing) of the coordinates:

COORDINATES  geometry ( 'Xname'  [,'Yname'  [,'Zname'] ])


In this case, the 'Xname' argument renames the coordinate lying along the horizontal plot axis, and 'Yname' renames the coordinate lying along the vertical plot axis. 'Zname' renames the extrusion coordinate. Names may be quoted strings or unquoted names.  Renaming coordinates does not change the fundamental nature of the coordinate system.  In cylindrical geometries, for example, the radial coordinate will continue to be the radial coordinate, even if you name it "Z".

In time-dependent problems, the time coordinate may be renamed using TIME ('Tname') in the COORDINATES section :

COORDINATES  geometry TIME ('Tname')


This may be used in conjunction with the renaming of spatial coordinates.


Differential Operators

Renaming coordinates causes a redefinition of the differential operators.  DX becomes D<Xname>, etc.


The DIV, GRAD, and CURL operators are expanded correctly for the designated geometry.  Use of these operators in the EQUATIONS section can considerably simplify problem specification.

Other Geometries

Since FlexPDE accepts arbitrary mathematical forms for equations, it is always possible to construct equations appropriate to an arbitrary geometry.


For example, using the CARTESIAN2 coordinate system and renaming coordinates, one can write the heat equation for cylindrical geometry as


COORDINATES cartesian2("R","Z")




u:  dr(k*r*dr(u)) + r*dz(k*dz(u)) + r*source = 0


This equation derives from expanding the DIV and GRAD operators in cylindrical coordinates and multiplying by the volume weighting factor "r", and is the same as the equation that FlexPDE itself will construct in XCYLINDER geometry.


Coordinate Transformations


The function definition facility of FlexPDE can be used to simplify the transformation of arbitrary coordinates to Cartesian (X,Y,Z) coordinates.  


The example problem "Samples | Usage | polar_coordinates.pde"  uses this facility to pose equations in polar coordinates:



    dr(f) = (x/r)*dx(f) + (y/r)*dy(f)            { functional definition of polar derivatives... }

    dphi(f) = (-y)*dx(f) + x*dy(f)            {... in cartesian coordinates }


EQUATIONS                                { equation expressed in polar coordinates }

                                             { (and Multiplied by r^2 to clear the r=0 singularity) }

U:    r*dr(r*dr(u)) + dphi(dphi(u)) + r*r*s = 0  


Graphic output using this procedure is always mapped to the fundamental Cartesian coordinate system.