About
Two dimensional vector fields
This simulation shows 2 dimensional vector fields, more specifically the xy cross section of a 3 dimensional vector field constant in z direction (as with a cylinder of infinite extension).
Shown are flow fields characterized by local velocity components a_x in the x direction and a_y in the y direction. Arrows with uniform length display the direction of the resulting flow vector. The size of the vector is indicated qualitatively by color gradation.
When opening the simulation, a field with two vortices is demonstrated. Two white text fields show the formulas of its vector components. A blue text field shows the divergence of the field, a brown field the 3D coordinates of its rotation vector.
In a combobox one can choose among many predefined fields. The type of field and the components of its vectors are stated. The second case is empty for your own data insertions. Alternatively you can edit data of predefined cases in the a_x and a_y text fields (do not forget to press the Enter button after changes!)
Changing to another predefined function erases old data. If you want to preserve the result of your own changes, fabricate a picture, (most simply by pressing the Print button of your keyboard to transfer the window data into the temporary store; then paste them into a suitable document. A more comfortable way is to use a screenshot reader).
A red test object lies in the vector field that will follow the flow vector both in direction and value once the start button is activated. It jumps back to its initial position when it crosses the limits of the field. Step causes one step of movement.
You can draw the object with the mouse, and test the field at every position that way. This gives an impression of direction and value within the whole field.
You can turn off the vector arrows with an option switch and try to understand the field just from the movement of the test body.
The zoom slider changes the scale of coordinates. As the number of arrows shown is constant, this helps to recognize details. The default case with two vortices is a good example.
The arrow length slider changes the length of arrows, init resets all parameters , reset_point resets the test object to the default position.
Vector Algebra
In this simulation the z component of the velocity vector is zero. The vector lies in the xy-plane. The rotation vector is perpendicular to the xy-plane; it has just a z component.
This results in:
a = (ax , ay, 0)
div a = ∂ax/∂x + ∂ay/∂y + 0 = ∂ax/∂x + ∂ay/∂y
rot v = (0, 0, ∂ay/∂x -∂ax/∂y)
When is the field without vortex: rotation = 0 ?
∂vy/∂x -∂vx/∂y = 0
This holds when ax = a(x) and ay = a(y); the components are functions of their own coordinates only (e.g. ax = x2+3x-1, ay = y3-y2). This includes the case of both components being constants, whose derivative is zero (e.g. ax = 1, ay = -4).
If one component is a function of the other coordinate, then in general the field will have vortices, except when the partial derivatives just compensate, as for
rot (ax = y, ay = x) = (0, 0, 1 - 1) = (0, 0, 0 ) = 0
When is the field without source: divergence = 0?
∂ax/∂x = - ∂ay/∂y
The partial derivatives must be equal in absolute value, with opposite sign (sum = zero).
The movement of the test object is determined and calculated by two simple ordinary differential equations:
dx/dt = ax
dy/dt = ay
E 1: Study the default case of the twin vortices. Calculate rotation and divergence yourself by partial derivation of the formulas of the components (the "other" coordinate is treated as a constant).
E 2: Change the scale with the zoom slider and observe how the visual impression of the field changes with scale.
E 3: Start the test object and follow its path concerning direction and velocity. Try to understand this by studying the formulas.
E 4: Draw the test object to other points in the field and test its quantitative structure by the object´s movement.
E 5: Choose fields that have constants as components. Change numbers and understand how this influences the field. Start the test object. Does it change its velocity?
E 6: Choose fields with components linear in coordinates. Try to understand the context. Why are divergences not quoted? (localized limits may occur at sources).
E 6: How does the test object move now? Which terms in the formulas lead to acceleration?
E 7: Choose the two corresponding last cases of twin sources and twin vortices and study the differences.
E 8: Invent your own formulas for fields, calculate divergence and rotation, describe the characteristics.
Translations
Code | Language | Translator | Run | |
---|---|---|---|---|
![]() |
Credits
Dieter Roess - WEH- Foundation; Fremont Teng; Loo Kang Wee
Sample Learning Goals
[text]
For Teachers
Two Dimensional Vector Fields JavaScript Simulation Applet HTML5
Instructions
Function Combo Box
Arrow Size Slider
Draggable Red Ball
Toggling Full Screen
Play/Pause and Reset Buttons
Research
[text]
Video
[text]
Version:
Other Resources
[text]
Frequently Asked Questions: Two Dimensional Vector Fields Simulation
What is a two-dimensional vector field as shown in this simulation?
This simulation visualizes a two-dimensional vector field, which can be thought of as representing the xy-cross section of a three-dimensional field that remains constant in the z direction (similar to an infinitely long cylinder). It displays flow fields where each point in the xy-plane is associated with a velocity vector having components in the x (ax) and y (ay) directions. The direction of the flow is indicated by arrows of uniform length, while the magnitude (size) of the vector is represented by color gradation.
What can I observe and learn from this simulation?
You can observe various predefined vector fields, such as those with vortices, constant flows, or radial patterns. By examining the arrows and the movement of a red test object, you can gain an intuitive understanding of the field's direction and magnitude at different locations. The simulation also allows you to see the mathematical formulas for the vector components, the divergence (source/sink strength), and the z-component of the rotation (vorticity) of the field. This helps connect the visual representation to the underlying mathematical concepts.
How can I interact with the simulation?
The simulation offers several interactive features. You can select from various predefined vector fields using a combobox. You can also directly edit the formulas for the x and y components of the vector field in the white text fields and observe the resulting changes. A red test object can be started to follow the flow, stepped forward incrementally, or dragged with the mouse to explore the field. Sliders allow you to adjust the zoom level (scale of coordinates) and the arrow length. Buttons are available to start/pause the motion, perform a single step, reset all parameters to their initial values, and reset the point to its starting position.
What is divergence and rotation in the context of this 2D vector field?
Divergence (∇⋅a=∂ax∂x+∂ay∂y) in this simulation indicates the source or sink strength of the vector field at a given point. A positive divergence suggests a source (flow emanating outwards), while a negative divergence suggests a sink (flow converging inwards). The rotation (curl in 2D, specifically the z-component ∂ay∂x−∂ax∂y) indicates the local rotational tendency or vorticity of the field. A non-zero rotation implies the presence of vortices or swirling motion.
When is a vector field considered "without vortex" or "without source"?
A vector field is without vortex (irrotational) when its rotation is zero (∂ay∂x−∂ax∂y=0). This condition is satisfied if the x-component (ax) is solely a function of x, and the y-component (ay) is solely a function of y. A field is without source (incompressible or solenoidal) when its divergence is zero (∂ax∂x+∂ay∂y=0). This requires that the partial derivatives of the components with respect to their corresponding coordinates are equal in magnitude but opposite in sign.
How does the red test object move, and what can I learn from its movement?
When the start button is activated, the red test object moves according to the local velocity vector at its current position. Its movement is governed by the differential equations dxdt=ax and dydt=ay. By observing the path and speed of the test object, you can qualitatively understand the direction and magnitude of the vector field in different regions. Dragging the object allows you to probe the field at various points and see how the flow would affect a particle placed there.
Can I create and analyze my own vector fields using this simulation?
Yes, the simulation allows you to create your own vector fields. You can select the empty case in the combobox or edit the formulas in the ax and ay text fields. After entering your formulas and pressing Enter, the simulation will display the corresponding vector field. You can then calculate the divergence and rotation of your field using partial derivatives and observe its characteristics using the test object and other interactive tools.
Why are divergences sometimes not quoted for linear fields, and what causes acceleration of the test object?
Divergences might not be explicitly quoted for fields with linear components because they can sometimes lead to localized limits or singularities at "sources" or "sinks." The acceleration of the test object occurs when the velocity components ax and ay are not constant but change with position (x and y). According to the governing differential equations, the rate of change of velocity (acceleration) depends on how the vector components themselves vary across the field. For example, if ax depends on x, then daxdt=∂ax∂xdxdt=∂ax∂xax, indicating acceleration in the x direction if ∂ax∂x≠0.
- Details
- Written by Fremont
- Parent Category: Pure Mathematics
- Category: 3 Vectors
- Hits: 6671