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

update

parent 690ff856
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:
%% 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")
```
%% Cell type:markdown id: tags:
%% Output
### Kalorimeterkonstante
Hinweis: Nutzen Sie die Funktionenl *get_json_entry* um auf Metadaten zuzugreifen.
---------------------------------------------------------------------------
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'
Sie sollten Ihr Programm zwischen TODO und DONE implementieren, und versuchen die Anweisung zu verfolgen. Das ist aber nicht erforderlich.
%% Cell type:markdown id: tags:
Das Modul *utility* gibt Hilfsfunktionen vor. Sie können sich dafür entscheiden, ob Sie das Modul implementieren und verwenden.
### Kalorimeterkonstante
Hinweis: Sie können die Funktion *get_json_entry* nutzen um auf Metadaten zuzugreifen.
Die Initialisierung der Variablen in manchen Zellen bient zu den Hinweisen, welche Daten in der Zelle bekommen werden sollten.
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
Messdaten werden in das Notebook eingelesen.
Lesen Sie die Messdaten in ihr Notebook ein.
%% Cell type:code id: tags:
``` python
datafile_path_const = None
# 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)
data_dict = None
# 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
index_calorimeter = []
index_environment = []
# 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 list(np.array).
# 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)
calorimeter_data = np.array([[],[]])
environment_data = np.array([[],[]])
# TODO: Calculate the average value and standard deviation of sensors.
# 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 müssen auf ein Scatter Plot eingetragen werden. Die Standardabweichungen der Sensoren sind als Errorbar im Plot zu sehen.
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()
# 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
water_mass = None
# TODO: Read mass of the water from the metadata of the experiment.
water_mass = None
# 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 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)
temperature_end = None
temperature_start = None
# 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
calorimeter_const = None
# 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
datafile_path_prob1 = None
# 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)
data_dict = None
# 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
index_calorimeter = []
index_bath = []
index_env = []
# 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.
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)
calorimeter_data = np.array([[],[]])
env_data = np.array([[],[]])
heat_data = np.array([[],[]])
# 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()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
sample_mass = None
# 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)
temperature_mix = None
temperature_start_water = None
# 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
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.
# 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
sample_heat_capa = None
# 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
datafile_path_prob2 = None
# 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)
data_dict = None
# 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
index_calorimeter = []
index_bath = []
index_env = []
# 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.
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)
calorimeter_data = np.array([[],[]])
env_data = np.array([[],[]])
heat_data = np.array([[],[]])
# 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()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
sample_mass = None
# 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)
temperature_mix = None
temperature_start_water = None
# 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
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.
temperature_start_sample = None
# 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.
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
datafile_path_prob3 = None
# 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)
data_dict = None
# 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
index_calorimeter = []
index_bath = []
index_env = []
# 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.
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)
calorimeter_data = np.array([[],[]])
env_data = np.array([[],[]])
heat_data = np.array([[],[]])
# 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()
# DONE #
```
%% Cell type:markdown id: tags:
#### (iv) Metadaten auslesen
%% Cell type:code id: tags:
``` python
sample_mass = None
# 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)
temperature_mix = None
temperature_start_water = None
# 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
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.
temperature_start_sample = None
# 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.
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:
## 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:
%% Cell type:markdown id: tags:
## Analyse
## 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:
%% Cell type:markdown id: tags:
## Fazit
Ziehe Sie ein persönliches Fazit zum Versuch.
%% Cell type:markdown id: tags:
......
......@@ -81,13 +81,13 @@ def get_plot_data_from_dataset(
[24.89, 24.92, 24.00, 25.39],
[24.89, 24.92, 24.00, 25.39],
[24.89, 24.92, 24.00, 25.39]
]) -> temperature from each sensor, The first dimension represents the sensor.
]) -> temperature from each sensor, The first dimension(row) represents the sensor.
"timestamp": np.array([
[0.43, 1.60, 3.05, 4.25],
[0.81, 2.13, 3.49, 4.62],
[1.34, 2.60, 3.85, 5.08],
]) -> timestamp for each sensor, The first dimension represents the sensor.
"name": np.ndarray(["sensor_1", "sensor_2", "sensor_3"]) -> name of each sensor should be hier
]) -> timestamp for each sensor, The first dimension(row) represents the sensor.
"name": np.array(["sensor_1", "sensor_2", "sensor_3"]) -> name of each sensor should be hier
}
"""
......@@ -127,7 +127,7 @@ def get_plot_data_from_dataset(
# DONE #
for subgroup in subgroups:
# TODO: Save data in to the lists temperature, time and mame.
# TODO: Save data in to the lists temperature, time and name.
# Data for each sensor must have the same length because of np.ndarray will be use in the output.
raise NotImplementedError(
......
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