Skip to content
Snippets Groups Projects
Commit 93c41382 authored by Xia, Ning's avatar Xia, Ning :penguin:
Browse files

updated template

parent d2575e4a
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.
%% Cell type:markdown id: tags:
<img src="figures/kalorimetrie_pruefstand.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
import h5py as h5
import importlib
from functions import m_json
from functions import utility
# Use FST-Style, if you don't like it, you can safely delete this line.
plt.style.use("FST.mplstyle")
```
%% Output
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
c:\Users\bnjhe\Documents\calorimetry_laboratory\ausarbeitung_laborversuch.ipynb Cell 6 line 2
<a href='vscode-notebook-cell:/c%3A/Users/bnjhe/Documents/calorimetry_laboratory/ausarbeitung_laborversuch.ipynb#W5sZmlsZQ%3D%3D?line=0'>1</a> import numpy as np
----> <a href='vscode-notebook-cell:/c%3A/Users/bnjhe/Documents/calorimetry_laboratory/ausarbeitung_laborversuch.ipynb#W5sZmlsZQ%3D%3D?line=1'>2</a> from matplotlib import pyplot as plt
<a href='vscode-notebook-cell:/c%3A/Users/bnjhe/Documents/calorimetry_laboratory/ausarbeitung_laborversuch.ipynb#W5sZmlsZQ%3D%3D?line=2'>3</a> import h5py as h5
<a href='vscode-notebook-cell:/c%3A/Users/bnjhe/Documents/calorimetry_laboratory/ausarbeitung_laborversuch.ipynb#W5sZmlsZQ%3D%3D?line=3'>4</a> import importlib
ModuleNotFoundError: No module named 'matplotlib'
%% Cell type:markdown id: tags:
### Kalorimeterkonstante
Hinweis: Sie können die Funktion *get_json_entry* nutzen um auf Metadaten zuzugreifen.
Für die Messdatenauswertung steht Ihnen bereits ein Modul utility.py zur Verfügung. Ergänzen sie die Funktionen im Modul zwischen TODO und DONE. Sie finden weitere Hinweise im jeweiligen Bereich TODO->DONE.
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
Lesen Sie die Messdaten in ihr Notebook ein.
%% Cell type:code id: tags:
``` python
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
datafile_path_const = None
# DONE #
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Read all experimental data and associated metadata from HDF5 files for data processing.
data_dict = utility.get_plot_data_from_dataset()
# DONE #
```
%% Cell type:code id: tags:
``` python
# TODO: In order to be able to process data from sensors with the same position,
# it is first necessary to obtain the index of the sensors with different positions in the list(np.array).
# it is first necessary to obtain the index of the sensors with different positions in the numpy.ndarray.
# List the index of all calorimeter sensors (index_calorimeter) and
# the environment sensor (index_environment).
# You can use this variables to easily get access to the correct measurement data later.
index_calorimeter = []
index_environment = []
# DONE #
```
%% Cell type:markdown id: tags:
#### (ii) Mittelwert und Standardabweichung für Plots bestimmen
Die Mittelwerte und Standardabweichungen der Messungen werden in der nächsten Sektion geplottet.
Nachdem die Mittelwerte und Standardabweichungen berechnet wurden, können Daten jeder Wärmequelle jeweils in einem numpy.ndarray gespeichert werden.
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculate the average value and standard deviation of the calorimeter sensors and the environment sensor.
# You can use the indices from above.
mean_std_calorimeter = utility.cal_mean_and_standard_deviation()
mean_std_environment = utility.cal_mean_and_standard_deviation()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
Im Kalorimeter befinden sich mehrere Sensoren, deren Mittelwerte sowie Standardabweichungen der Messung an jeden Zeitpunkt bestimmt wurden. Die Messdaten bzw. ihre Mittelwerte sollen in einem Plot eingetragen werden. Die Standardabweichungen der Sensoren sind als Errorbar im Plot zu sehen.
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Use the temperature and time data for plotting
plot_temp_over_time()
utility.plot_temp_over_time()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
Die notwendigen Daten bzw. Metadaten für die Berechnung der Wärmekapazität wird ausgelesen.
%% Cell type:code id: tags:
``` python
# Heat capacity of Water has been given
water_heat_capa = 4.18
# TODO: Read mass of the water from the metadata of the experiment.
water_mass = None
# DONE #
```
%% Cell type:code id: tags:
``` python
# TODO: Reading heater related data from hdf5 file, please use the same datafile_path_const variable for the HDF5 path.
# Hint: Note whether the data is stored as an array or a scalar in the hdf5 dataset.
current = None
heat_time = None
voltage = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
Die Anfangs- und Endwert der Temperatur im Kloriemeter sind notwendig, um die Wärmekapazität zu bestimmen.
Eine Möglichkeit wäre, durch das Maxium bzw. Minium und einen Schwellenwert ist ein Teil der Daten zu entnehmen.
Daraus sind Mittelwerte zu berechnen. Die entsprechenden Mittelwerte können als Anfangs- und Endtemperatur verwendet werden.
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculation of temperature data necessary to determine the specific heat capacity
temperature_end, temperature_start = utility.get_start_end_temperature()
# DONE #
```
%% Cell type:markdown id: tags:
#### (vi) Kalorimeterkonstante bestimmen
$$
C = \frac{UI\Delta t}{(T_2 - T_1)}
$$
%% Cell type:code id: tags:
``` python
# TODO: Calculate heat capacity of the calorimeter
calorimeter_const = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (Vii) Ergebnis
%% Cell type:code id: tags:
``` python
calorimeter_const
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: erste Probe
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
datafile_path_prob1 = None
# DONE #
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Read all experimental data and associated metadata from HDF5 files for data processing.
data_dict = utility.get_plot_data_from_dataset()
# DONE #
```
%% Cell type:code id: tags:
``` python
# TODO: In order to be able to process data from sensors with the same position,
# it is first necessary to obtain the index of the sensors with different positions in the list.
# it is first necessary to obtain the index of the sensors with different positions in the numpy.ndarray.
index_calorimeter = []
index_bath = []
index_env = []
# DONE #
```
%% Cell type:markdown id: tags:
#### (ii) Mittelwert und Standardabweichung für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculate the average value and standard deviation of sensors.
mean_std_calorimeter = utility.cal_mean_and_standard_deviation()
mean_std_environment = utility.cal_mean_and_standard_deviation()
mean_std_heater = utility.cal_mean_and_standard_deviation()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Use the temperature and time data for plotting.
plot_temp_over_time()
utility.plot_temp_over_time()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the sample from the metadata of the experiment.
sample_mass = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
Die Mischungstemperatur und Anfangstemperatur des Kalorimeters sind für die Berechnung relevant.
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculation of temperature data necessary to determine the specific heat capacity
temperature_mix, temperature_start_water = utility.get_start_end_temperature()
# DONE #
```
%% Cell type:code id: tags:
``` python
# 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 temperature-values after the start of the measurement.
temperature_start_sample = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
$$
c_p = \frac{C(T_M-T_1)}{m_p(T_2-T_M)}
$$
%% Cell type:code id: tags:
``` python
# TODO: Calulate specific heat capacity of the sample.
sample_heat_capa = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (Vii) Ergebnis
%% Cell type:code id: tags:
``` python
sample_heat_capa
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: zweite Probe
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
datafile_path_prob2 = None
# DONE #
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Read all experimental data and associated metadata from HDF5 files for data processing.
data_dict = utility.get_plot_data_from_dataset()
# DONE #
```
%% Cell type:code id: tags:
``` python
# TODO: In order to be able to process data from sensors with the same position,
# it is first necessary to obtain the index of the sensors with different positions in the list.
# it is first necessary to obtain the index of the sensors with different positions in the numpy.ndarray.
index_calorimeter = []
index_bath = []
index_env = []
# DONE #
```
%% Cell type:markdown id: tags:
#### (ii) Mittelwert und Standardabweichung für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculate the average value and standard deviation of sensors.
mean_std_calorimeter = utility.cal_mean_and_standard_deviation()
mean_std_environment = utility.cal_mean_and_standard_deviation()
mean_std_heater = utility.cal_mean_and_standard_deviation()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Use the temperature and time data for plotting.
plot_temp_over_time()
utility.plot_temp_over_time()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the sample from the metadata of the experiment.
sample_mass = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculation of temperature data necessary to determine the specific heat capacity
temperature_mix, temperature_start_water = utility.get_start_end_temperature()
# DONE #
```
%% Cell type:code id: tags:
``` python
# 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.
temperature_start_sample = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
# TODO: Calulate specific heat capacity of the sample.
sample_heat_capa = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (Vii) Ergebnis
%% Cell type:code id: tags:
``` python
sample_heat_capa
```
%% Cell type:markdown id: tags:
### spezifische Wärmekapazität: dritte Probe
%% Cell type:markdown id: tags:
#### (i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
datafile_path_prob3 = None
# DONE #
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Read all experimental data and associated metadata from HDF5 files for data processing.
data_dict = utility.get_plot_data_from_dataset()
# DONE #
```
%% Cell type:code id: tags:
``` python
# TODO: In order to be able to process data from sensors with the same position,
# it is first necessary to obtain the index of the sensors with different positions in the list.
# it is first necessary to obtain the index of the sensors with different positions in the numpy.ndarray.
index_calorimeter = []
index_bath = []
index_env = []
# DONE #
```
%% Cell type:markdown id: tags:
#### (ii) Mittelwert und Standardabweichung für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculate the average value and standard deviation of sensors.
mean_std_calorimeter = utility.cal_mean_and_standard_deviation()
mean_std_environment = utility.cal_mean_and_standard_deviation()
mean_std_heater = utility.cal_mean_and_standard_deviation()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iii) Daten ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Use the temperature and time data for plotting.
plot_temp_over_time()
utility.plot_temp_over_time()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the sample from the metadata of the experiment.
sample_mass = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (v) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Calculation of temperature data necessary to determine the specific heat capacity
temperature_mix, temperature_start_water = utility.get_start_end_temperature()
# DONE #
```
%% Cell type:code id: tags:
``` python
# 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.
temperature_start_sample = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (vi) spezifische Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
# TODO: Calulate specific heat capacity of the sample.
sample_heat_capa = None
# DONE #
```
%% Cell type:markdown id: tags:
#### (Vii) Ergebnis
%% Cell type:code id: tags:
``` python
sample_heat_capa
```
%% Cell type:markdown id: tags:
## Diskussion
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