Skip to content

Commit cbc3923

Browse files
committed
update DFSEM example
1 parent d31cf4e commit cbc3923

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

examples/advanced/generateDFSEMdata.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
profiles for verification.
88
"""
99

10+
###############################################################################
11+
# First create a 1dprofilDFSEM with create1dprofilDFSEM
12+
# -----------------------------------------------------
13+
#
14+
#
15+
1016
from fluidfoam import create1dprofilDFSEM, read1dprofilDFSEM
1117
import os
1218

13-
basepath = "../../output_samples//DFSEM/"
19+
basepath = "../../output_samples/DFSEM/"
1420

1521
case3d = "3D/"
1622
case1d = "1D/"
@@ -29,11 +35,16 @@
2935

3036
Y, U, L, R, ny = read1dprofilDFSEM(sol3d, boundary_name, "0", axis)
3137

38+
39+
###############################################################################
40+
# Now plot the profiles of the fields
41+
# -----------------------------------
42+
#
43+
3244
import matplotlib.pyplot as plt
3345

34-
dummy, axarr = plt.subplots(1, 3, sharey=True)
46+
fig, axarr = plt.subplots(figsize = (1, 3), sharey=True)
3547
axarr[0].set_ylabel("Y (m)")
36-
3748
axarr[0].plot(U[:], Y)
3849
axarr[0].set_title("U")
3950
axarr[0].set_xlabel("U (m/s)")

0 commit comments

Comments
 (0)