はじめに
OpenFOAMでの壁面せん断応力(wallShearStress)の算出方法を以下にまとめます。
計算方法
壁面せん断応力は、壁面境界上での応力テンソルと法線方向ベクトルとの積で求められます。
\tau = {\bf R} \cdot {\bf n}
ここで、
$\tau$ | wall shear stress [m$^2$/s$^2$] |
R | shear stress symmetric tensor (retrieved from turbulence model) |
n | patch normal vector (into domain) |
となります。
ターミナルでOFのresultファイルがあるディレクトリに移動し、
<solver> -postProcessing -func wallShearStress
とすれば時間ディレクトリ以下にwallShearStressというファイルが追加されています。
functionObjectで読み出す場合は、system/controlDict
に
wallShearStress1
{
// Mandatory entries (unmodifiable)
type wallShearStress;
libs (fieldFunctionObjects);
// Optional entries (runtime modifiable)
patches (<patch1> ... <patchN>); // (wall1 "(wall2|wall3)");
// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval 1;
}
を加筆することになります。
ここでpatchesで、対象壁面を指定することができます(先の計算ではすべての面についてのwall shearが計算されます)。
あとは、paraviewなどで壁面せん断応力の分布などを表示すればよいです。
おわりに
簡単ですが、以上になります。