Skip to content

Profiles

Profile operators are usually placed in the analysis block, run every simulation_analysis_freq steps, or in the checker block, run once at the end.

plot_line_velocity

Description

Extracts the velocity along an axis-aligned line and writes it to a CSV file in <output_directory>/Profile/, with the columns rx ry rz ux uy uz (physical coordinates and velocity components in m/s). The values are gathered with MPI; only the master rank writes the file.

YAML syntax

1
2
3
4
5
6
7
analysis:
  - plot_line_velocity:
     line: [ [0.05, 0.05, 0.0], [0.05, 0.05, 0.1] ]
     dump_file: "line_%010d.csv"

global:
  simulation_analysis_freq: 300
Slot Type Default Description
line AABB optional line end points in physical coordinates [[x0,y0,z0],[x1,y1,z1]]
line_lbm Box3D optional line end points in grid indices [[i0,j0,k0],[i1,j1,k1]]
dump_file string "line_%010d.csv" CSV filename, formatted with the current timestep
output_directory string "hippoLBMOutputDir" base output directory
display_filename bool true print the filename in the log

Note

Exactly one of line or line_lbm must be given. The line must be axis-aligned (two coordinates fixed, one varying).

plane_velocity_profile

Description

For each plane perpendicular to a chosen dimension (X, Y or Z), computes the average, minimum and maximum velocity norm over the fluid nodes, and writes a CSV file with the columns position avg min max.

YAML syntax

1
2
3
4
analysis:
  - plane_velocity_profile:
     dimension: "Z"
     dump_file: "profile_%010d.csv"
Slot Type Default Description
dimension string required "X", "Y" or "Z"
dump_file string "profile_%010d.csv" CSV filename, formatted with the current timestep
output_directory string "hippoLBMOutputDir" base output directory
display_filename bool true print the filename in the log

Post-processing scripts

The hippoLBM repository provides Python scripts in script/profile/ to compare the line profiles with the analytical solutions:

1
2
3
4
# Poiseuille: compared with the transient analytical solution
python3 ../hippoLBM/script/profile/plot_line_poiseuille.py PoiseuilleTestDir/Profile
# Couette
python3 ../hippoLBM/script/profile/plot_line_couette.py CouetteTestDir/Profile --nu 1e-3 --dt 6.666667e-05

See the Poiseuille and Couette tutorials.