Problem Descriptor Reference > The Sections of a Descriptor > Variables > Vector Variables

Vector Variables

<< Click to Display Table of Contents >>

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

Vector Variables

Previous pageReturn to chapter overviewNext page

You may declare that a VARIABLE name represents a vector quantity.  The format of a vector declaration is:

variable_name = VECTOR ( component1 )

variable_name = VECTOR ( component1 , component2 )

variable_name = VECTOR ( component1 , component2 ,component3 )

 

This declaration tells FlexPDE that variable_name represents a vector quantity, and assigns the component names to the geometric components of variable_name.  You may subsequently assign EQUATIONS and boundary conditions either to the variable_name, or to its components individually.  Similarly, you can perform arithmetic operations or request graphical output of either the variable_name itself, or its components individually.

 

The three component names correspond to the coordinate directions as implied in the COORDINATES section of the problem descriptor.  You can declare any or all of the three component directions, even if the model domain treats only one or two.

 

Any of the component names can be replace by "0" to indicate that this component of the vector is not to be modeled by FlexPDE, but is to be assumed zero.  Similarly, omitted names cause the corresponding vector components to be assumed zero.

 

Example:

In XCYLINDER geometry, which has coordinates (Z,R,Phi), you can tell FlexPDE to model only the Phi component of a vector quantity as follows:

 

VARIABLES

   A = Vector(0,0,Aphi)

 

See example problems:

Samples | Usage | Variable_Types | Vector_Variables.pde

Samples | Applications | Fluids | 3d_Flowbox.pde

Samples | Applications | Fluids | Swirl.pde

Samples | Applications | Magnetism | 3D_Vector_Magnetron.pde