# 4.6: Relative Plate Velocity Jupyter Notebook

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

Instructions

• To use this page, read the text between each of the python code windows, then press RUN to execute the code in the box.
• It is necessary to run each of the boxes in order.
• Don't click restart in the cells unless you come back to the top of the page and start over.
• If you modify the code, this modification will not remain after you leave or refresh this page.
• You must run simulations/cells that require user input to completion. Make sure you see the Message informing you a cell is complete before continuing to the next cell. Here's why you must do this:
• These cells may not be re-run until the simulation is completed, otherwise no output will be generated.
• All following cells will not run until the user input cell is completed.
• For Dropdown Menus: You do not need to rerun the cells with the menu to change your selection. However, you must rerun all of the following cells to implement the change.

Be patient, some times it can take 1-2 minutes for the juypter kernel to start.

An example about relative plate velocities.

Holding Plate A fixed:

• What is the plate boundary type between Plates A and B?
• What is the relative velocity of Plate B with respect to Plate A?

Holding Plate B fixed:

• Has the plate boundary type changed?
• What is the relative velocity of Plate A with respect to Plate B?

First, let's import the necessary libraries.

import numpy as np
import matplotlib.pyplot as plt

print('The libraries are imported')

Now let's plot our plates. The first portion of this code will ask you for the plate velocities and their directions. Directions are given in azimuth in degrees measured clockwise from north (e.g., south is 180). Then it fills in the two plates and plots your chosen velocity as vectors. At the bottom of the graph is the list of velocity components, you will need these for the key questions. Run this cell, and answer the key questions.

print('Please enter the absolute plate velocity for plate A between 0 and 10 cm/yr:')
va = float(input())
while va <= 0 or va > 10:
print('Invalid Velocity, please enter a velocity between 0 and 10 cm/yr:')
va = float(input())

print('Please enter the azimuth of the plate velocity between 0 and 360 degrees:')
aza = float(input())
while aza < 0 or aza > 360:
print('Invalid Azimuth: please enter a value between 0 and 360 degrees')
aza = float(input())

print('Please enter the absolute plate velocity for plate B between 0 and 10 cm/yr:')
vb = float(input())
while vb <= 0 or vb > 10:
print('Invalid Velocity, please enter a velocity between 0 and 10 cm/yr:')
vb = float(input())

print('Please enter the azimuth of the plate velocity between 0 and 360 degrees:')
azb = float(input())
while azb < 0 or azb > 360:
print('Invalid Azimuth: please enter a value between 0 and 360 degrees')
azb = float(input())

x0 = np.arange(0.5,10.5,2.5)
x1 = np.arange(10.5,20.5,2.5)
X0,Y0 = np.meshgrid(x0,x0)
X1,Y1 = np.meshgrid(x1,x0)

bbox = dict(boxstyle ="round", fc = '1')

fig, ax = plt.subplots(figsize=(14,7))
ax.fill_betweenx((0,10),0,10,color = 'yellow')
ax.fill_betweenx((0,10),10,20,color = 'lightsteelblue')
ax.vlines(10,0,10,color='red')
ax.set_xlim(0,20)
ax.set_ylim(0,10)
ax.set_title('Plate Motions')
ax.axis('off')
ax.annotate('Plate A',(.5,9.5),bbox=bbox,fontsize=13)
ax.annotate('Plate B',(10.5,9.5),bbox=bbox,fontsize=13)
ax.text(0,-1,'Velocity Components (cm/yr): Va_x = '+'{:.3f}'.format(V1X) +', Va_y = '+'{:.3f}'.format(V1Y)+', Vb_x = '+'{:.3f}'.format(V2X)+', Vb_y = '+'{:.3f}'.format(V2Y),bbox=bbox,fontsize=13)
plt.show()

print('The simulation is complete, please answer the key questions')

Holding Plate A fixed:

• What is the plate boundary type between Plates A and B?
• What is the relative velocity of Plate B with respect to Plate A?

Holding Plate B fixed:

• Has the plate boundary type changed?
• What is the relative velocity of Plate A with respect to Plate B?

4.6: Relative Plate Velocity Jupyter Notebook is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.