diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2025-11-17 16:42:04 -0700 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2025-11-17 16:42:04 -0700 |
| commit | 7a713b1e67a255c285eef45d172ba0a1286987c3 (patch) | |
| tree | e73f76f0940e4946c2c75f89d67e3b815bc29d76 /tutorials/module_4/schlieren/schlieren.py | |
| parent | 922e5d874d4ae522fd9e5090b4f4f949b532b8e5 (diff) | |
Started working on schlieren imaging example (CFD)
Diffstat (limited to 'tutorials/module_4/schlieren/schlieren.py')
| -rw-r--r-- | tutorials/module_4/schlieren/schlieren.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tutorials/module_4/schlieren/schlieren.py b/tutorials/module_4/schlieren/schlieren.py new file mode 100644 index 0000000..45eda4e --- /dev/null +++ b/tutorials/module_4/schlieren/schlieren.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Mon Nov 17 11:56:51 2025 + +Title: Schlieren Imagery Animation +@author: christian +""" + + + +import numpy as np +import matplotlib.pyplot as plt +from matplotlib import colormaps + + +# Load data +frames = np.arange(1,11) +density = [] + +for f in frames: + file = f"data/density{f:04d}.txt" + data = np.loadtxt(file) + print("loaded:", file, np.shape(data)) + density.append(data) + +mdm = np.stack(density) + +print(mdm) + + +""" +frame = np.loadtxt("density*.txt") +print(frame.shape) + +for i in frame: + np.loadtxt( + +x = np.linspace(0,10*np.pi,1000) +y = np.sin(x) + +plt.pcolormesh(x,y) +plt.show() +""" |
