本文简要记录fixedProfile边界条件作为速度入口条件的使用方法,使用OpenFOAM-8做测试。fixedProfile边界的.H文件中有这样一段描述
Description
This boundary condition provides a fixed value profile condition.
Usage
\table
Property | Description | Required | Default value
profile | Profile function | yes |
direction | Direction of the line along which the profile is \\
evaluated | yes |
origin | Origin of the line along which the profile is \\
evaluated | yes |
\endtable
也就是说,这个边界类型给出的是固定的曲线分布,随后给出了一种使用表格文件定义曲线的方法
<patchName>
{
type fixedProfile;
profile tableFile;
profileCoeffs
{
file "UProfile";
format csv;
nHeaderLine 0;
refColumn 0;
componentColumns (1 2 3);
separator ",";
mergeSeparators no;
outOfBounds clamp;
interpolationScheme linear;
}
direction (0 1 0);
origin 0;
}
实际使用的时候,只需要如下简化版本的字典参数
inlet
{
type fixedProfile;
profile tableFile; //可采用dummy测试所有可用的类型
profileCoeffs
{
file "UProfile"; //表格文件名
nHeaderLine 0;
refColumn 0;
componentColumns 3(1 2 3);
mergeSeparators no;
outOfBounds clamp;
interpolationScheme linear;
}
direction (0 1 0);
origin 0;
}
此处尤其需要注意的是表格文件UProfile的格式必须像下面这样:
(
(0.0 (0 0 0))
(0.1 (1 0 0))
(0.2 (2 0 0))
(0.3 (1 0 0))
(0.4 (0 0 0))
)
两对括号,第1列为线坐标,后面3列为速度分量。
Contact me
E-mail: 18810577380@163.com