Getting started
PhysicsGo runs in the browser (Chrome, Edge, Firefox or Safari), without installing anything. There is also a desktop app for macOS, Windows and Linux; the home page has the download. Sensors over USB or Bluetooth need Chrome or Edge.
Nobody chooses who they are when logging in: there's one box for an email address or a code, and the code says what it's for. Type it in Log in with your code at the top of this website, or on PhysicsGo's own sign-in page.
- Students type their school's student code (12 letters and digits), then their username. The first time, they type their first name instead and get an account with a username like
vera-k7m2. They don't need an email address or a password. - Teachers and administrators make their account once with their school's code for teachers or for administrators: how students address them (Mr., Ms. or Mx.), their name, email address and a password. After that they log in with their email address and password.
- A class has its own code of 6 digits. Students join the class with it once they have an account; typed at login, the class is joined right after logging in.
The school's administration finds all three codes, and every class's code, in the school account on this website.
How a model works
A text model has two parts, each in its own editor:
- Start values run once, before the first step. Give every quantity its value at the start, and the time step
dt. - Model rules run every step, from top to bottom. After each step the time
tgoes up bydt.
The model stops at a stop if rule, or after the number of steps next to the run button. Each step is one row of results, in the graph and the table. Run it with the run button, or Ctrl+Enter (⌘+Enter on a Mac). A falling ball, for example:
t = 0 // s
dt = 0.01 // s
g = 9.81 // m/s²
h = 20 // m
v = 0 // m/s
a = -g
v = v + a * dt
h = h + v * dt
stop if h <= 0
A smaller dt makes the result more precise, but takes more steps.
Writing rules
- One rule per line: a name,
=, and a calculation, likev = v + a * dt. A rule uses the values as they are at that moment, so the order of the rules matters. +=,-=,*=and/=change a value:t += dtmeanst = t + dt.- Names are letters, digits and
_, starting with a letter or_. Capitals count:Vandvare different quantities. - Numbers use a decimal point:
0.5. Powers of ten are written with e:6.674e-11is 6.674 × 10⁻¹¹. - Everything after
//is a comment. A unit in the comment, likeh = 10 // m, goes on the graph's axes and the table.
| Operator | Meaning | Example |
|---|---|---|
+ - | add, subtract | v + a * dt |
* / | multiply, divide | m * g, F / m |
^ | to the power | v^2 is v² |
( ) | work this out first | 0.5 * (v1 + v2) |
^ goes before * and /, and those before + and -, as in maths: -2^2 is −4.
Conditions
With if, rules only apply in some steps. End the line with a colon and indent the rules that belong to it:
if h <= 0:
v = -0.8 * v // bounces back
else if v < -30:
v = -30
else:
v = v - g * dt
Compare with <, <=, >, >=, == (equal to) and != (not equal to), and combine conditions with and, or and not: if not (h > 0 or v > 0):. stop if t >= 10 ends the model after the step in which the condition holds.
Functions and constants
Angles are in radians: the sine of 30° is sin(30 * pi / 180).
| Function | What it does |
|---|---|
sin(x) cos(x) tan(x) | Sine, cosine and tangent of the angle x |
asin(x) acos(x) atan(x) | The angle whose sine, cosine or tangent is x |
atan2(y, x) | The direction of the point (x, y), in the right quadrant (y comes first) |
sqrt(x) | Square root |
abs(x) | x without its minus sign |
exp(x) ln(x) log(x) | e to the power x, the natural logarithm, the logarithm with base 10 |
min(a, b, …) max(a, b, …) | The smallest or largest of the values |
round(x) floor(x) ceil(x) | Rounded to a whole number: to the nearest, down, up |
sign(x) | 1, −1 or 0 |
hypot(x, y) | The length of the vector (x, y) |
The constants are pi (3.14159…) and e (2.71828…). A model that gives e a value itself, such as e = 1.6e-19, uses its own.
Equations and diagrams
Above the code you choose how the model is written: as text (start values and rules, as above), as equations, or as a stock-and-flow diagram. The graphs, sliders and animations work with all three.
- Equations: the start values, then how fast each quantity changes, such as
dx/dt = vanddv/dt = F / m, with the other quantities as formulas. The order doesn't matter. Choose Runge-Kutta 4 (precise) or Euler. - Diagram: stocks (boxes) hold a quantity, flows fill or empty them, and auxiliaries and constants are worked out from formulas. Write as equations shows what a diagram means.
- Sliders change a start value and run the model again straight away. Animations move circles, blocks, arrows, springs and values along with the run.
Measuring
Measurements become quantities in the model, so a rule like difference = h - y_video1 compares the model with the experiment.
- Video: add a video, or record one with the camera, and click the object in each frame, or let Track follow it. Several objects, a scale, a camera at an angle and a moving origin are all possible. The points become
x_video1andy_video1. - A data logger's file: a CSV or text file from Coach, VinciLab or MoLab, a phyphox export or a spreadsheet (also .xlsx). Every column is a quantity, such as
U_data1. - Live sensors: a phone's motion sensors, microphone and GPS; an Arduino or micro:bit over USB; Vernier Go Direct; phyphox's remote access. Start straight away or on a trigger.
- Controlling hardware: while measuring, a model can switch an Arduino's pins (on/off, PWM, servos), send commands to a program of your own, or play a tone: a thermostat or traffic light in a lesson.
- Spectrometer: a camera and a diffraction grating (a piece of CD works) measure a spectrum, with wavelength calibration, element lines, transmittance and absorbance.
Graphs and analysis
- Choose what to plot in a graph's settings (⚙): the model's values are lines, measured points are dots. A second axis on the right takes quantities of a different size.
- Fits: proportional, linear, quadratic, exponential, power, sine or a smooth spline, with the formula found and R².
- Analysis: the slope of a tangent, the area under the graph, statistics, a frequency spectrum (FFT) and a histogram.
- Calculated quantities: a formula such as
0.5 * m * v^2, a derivative, an integral or a smoothed version of a quantity, plotted like any other. - Export saves the values as an Excel or CSV file, or the graph as an image.
For teachers
Getting a class going takes four steps, and the dashboard shows them as a checklist until they're done:
- Create a class and add your students: they join with the class's 6-digit code, or you type their names and they get a username.
- Print their login cards, with the student code, their username and a QR code.
- Publish an assignment: one from the Library of havo and vwo activities, a copy you changed, or your own with an explanation, questions and a model. Per class you set when it opens, when it's due and instructions.
- Review what's handed in: To review on the dashboard lists every hand-in waiting for you. Give a mark and a comment, then Approve or Return for revision; Next to review goes on to the next student.
Multiple-choice and numerical questions are marked automatically. You choose per class whether students can check their answers, and whether you see how many tries each answer took (students are told). School administrators also have the School page, for the school's codes, teachers and classes.
For students
- Your assignments are under To Do on the dashboard, with when they're due and where your work stands: Not started, Working, Handed in, Returned or Approved.
- Your work is saved as you go, also offline: it's sent once you're online again.
- Hand in sends your work as it is now. You can keep working; Hand in again replaces it. Until your teacher has given feedback, you can take a hand-in back.
- Your teacher's feedback is above the explanation. Returned for revision: improve it and hand it in again.
Dutch and English
Code works in Dutch and in English, even mixed. The editors show the words in the language chosen in Settings, and translate code already written when you change it; names, numbers and comments stay as they are.
| Dutch | English |
|---|---|
als …: anders als …: anders: | if …: else if …: else: |
stop als … | stop if … |
en of niet | and or not |
wortel afronden entier plafond teken | sqrt round floor ceil sign |
arcsin arccos arctan arctan2 | asin acos atan atan2 |
Everything here, and more, is on the help page inside PhysicsGo (the ? in its top bar), in English and Dutch. Still stuck? Contact us.