Skip to content
Snippets Groups Projects
Commit b34354e0 authored by Hermann, Benjamin's avatar Hermann, Benjamin
Browse files

revision of notebook

parent b3e5d919
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Kalorimetrie Laborversuch
Author: XXXXX
Datum: XXXXX
Gruppe: XXXXX
%% Cell type:markdown id: tags:
## Forschungsfrage
Formulieren Sie eine oder mehrere Forschungsfragen zu diesem Versuch.
%% Cell type:markdown id: tags:
## Versuchsaufbau und Durchführung
Beschreiben Sie den Versuchsaufbau und die Versuchsdurchführung. Nutzen Sie hier Ihr eigenes Bild.
<img src="image/picture_231010_Beispielbild_Kalorimeter_Pruefstand_Auswertung.jpg" width="800">
%% Cell type:markdown id: tags:
## Versuchsauswertung
%% Cell type:code id: tags:
``` python
import numpy as np
from matplotlib import pyplot as plt
from datetime import datetime
import h5py as h5
import json
import sympy
import utility
import importlib
plt.style.use("../supplements/FST.mplstyle")
```
%% Cell type:markdown id: tags:
### Kalorimeterkonstante
Hinweis: Nutzen Sie die Funktionen *get_ids_from_setup* und *get_json_entry* um auf Metadaten zuzugreifen.
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
datafile_path_const = None
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
sensor_name = ["calorimeter", "environment", "heating_bath"]
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for plot
## DONE ##
```
%% Cell type:markdown id: tags:
#### (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
# Generating plot data by combining data containing uncertainty.
# np.concatenate is called here where each ndarray contained in the tupel is expected to be 2d and have a first dimension of 2.
# The syntax of [None, ...] syntax represents the addition of an extra dimension to the front.
# Therefore the plot_data variable is expected to be a 3d ndarray with the first dimension 3 and the second dimension 2.
# If you got exception hier, make sure the dimensions are correct.
plot_data = np.concatenate(
(
# Add dimension for plot function to work
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...],
)
)
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: plot and save the picture by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# Heat capacity of Water
water_heat_capa = 4.18
water_mass = None
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:code id: tags:
``` python
current = None
heat_time = None
voltage = None
# TODO: Reading heater related data from hdf5 file, please use the same datafile_path_const variable.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_end = None
temperature_start = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (vi) Kalorimeterkonstante bestimmen
%% Cell type:code id: tags:
``` python
calorimeter_const = None
# TODO: Calculate heat capacity of the calorimeter
## DONE ##
calorimeter_const
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: erste Probe
Hinweis: Nutzen Sie die Funktionen *get_ids_from_setup* und *get_json_entry* um auf Metadaten zuzugreifen.
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
datafile_path_prob1 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: zweite Probe
Hinweis: Nutzen Sie die Funktionen *get_ids_from_setup* und *get_json_entry* um auf Metadaten zuzugreifen.
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
datafile_path_prob2 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: dritte Probe
Hinweis: Nutzen Sie die Funktionen *get_ids_from_setup* und *get_json_entry* um auf Metadaten zuzugreifen.
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
datafile_path_prob3 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
## Genutzte Daten und Metadaten
Geben Sie an welche Daten Sie verwenden und wie diese aufgebaut sind. Erklären Sie weiterhin in wenigen Sätzen das genutzte Metadaten-Konzept, sodass eine andere Person Ihre genutzten Daten versteht.
%% Cell type:markdown id: tags:
## Analyse
Analysieren Sie Ihre Ergebnisse aus wissenschaflticher Sicht. Berücksichtigen Sie dabei Ihre oben genannte Forschungsfrage.
Analysieren Sie Ihre Ergebnisse aus wissenschaflticher Sicht. Berücksichtigen Sie dabei Ihre oben genannte Forschungsfrage. Wie wirkt sich die mit der Probe aus dem Heißwasserbad transportierte Wassermenge auf das Ergebnis aus? Welche weiteren Fehlerquellen gibt es?
%% Cell type:markdown id: tags:
## Fazit
Ziehe Sie ein persönliches Fazit zum Versuch.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment