0


【OpenFOAM】-olaFlow-算例2- breakwater

算例路径: olaFlow\tutorials\breakwater
算例描述: 波浪对防波堤的作用,堤身为孔隙可渗透结构,堤顶沉箱为不可渗透结构。
学习目标: 渗透模型、可渗结构设置、孔隙材料各项参数设置
算例快照:
在这里插入图片描述
图1 防波堤越浪模拟结果
在这里插入图片描述
图2 算例网格划分
文件结构:

.
├── 0.org 
│   ├── U
│   ├── alpha.water
│   ├── alpha.water.org
│   ├── epsilon
│   ├── k
│   ├── nut
│   ├── omega
│   ├── p_rgh
│   ├── porosityIndex
│   └── porosityIndex.org
├── cleanCase
├── constant
│   ├── g
│   ├── porosityDict
│   ├── transportProperties
│   ├── triSurface
│   ├── turbulenceProperties_keps
│   ├── turbulenceProperties_sst
│   └── waveDict
├── plotSensPres.py
├── plotSensVOF.py
├── postSensPres.py
├── postSensVOF.py
├── runCaseKEpsilon
├── runCaseSST
└── system
    ├── blockMeshDict
    ├── controlDict_OF
    ├── controlDict_OF+
    ├── decomposeParDict
    ├── fvSchemes
    ├── fvSolution
    ├── setFieldsDict
    └── snappyHexMeshDict

算例文件解析:

【0.org\U】
【0.org\p_rgh】
【0.org\alpha.water.org】
参考 【OpenFOAM】-olaFlow-算例1- baseWaveFlume

【0.org\porosityIndex.org】

// 孔隙材料索引值
dimensions      [0000000];
internalField   uniform 0;
boundaryField
{
    inlet
    {
        type            zeroGradient;}
    outlet
    {
        type            zeroGradient;}"wall."{
        type            zeroGradient;}
    caisson
    {
        type            zeroGradient;}
    defaultFaces
    {
        type            empty;}
    atmosphere
    {
        type            zeroGradient;}}

【0.org\k】

// 湍流动能边界条件
dimensions      [02-20000];
internalField   uniform 0.00000001;
boundaryField
{
    inlet
    {
        type            inletOutlet;
        inletValue      uniform 0.00000001;
        value           uniform 0.00000001;}
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.00000001;
        value           uniform 0.00000001;}"wall."{
        type            kqRWallFunction;// kqR 壁面函数边界,该壁面函数实际上就是zeroGradient,适用于高雷诺数情况
        value           uniform 0.00000001;}
    caisson
    {
        type            kqRWallFunction;
        value           uniform 0.00000001;}
    defaultFaces
    {
        type            empty;}
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0.00000001;
        value           uniform 0.00000001;}}

【0.org\nut】

// 湍流粘度边界条件
dimensions      [02-10000];
internalField   uniform 0;
boundaryField
{
    inlet
    {
        type            calculated;
        value           uniform 0;}
    outlet
    {
        type            calculated;
        value           uniform 0;}"wall."{
        type            nutkWallFunction;// nutk 壁面函数边界,基于 k 修正壁面涡黏系数
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0;}
    atmosphere
    {
        type            calculated;
        value           uniform 0;}
    defaultFaces
    {
        type            empty;}
    caisson
    {
        type            nutkWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0;}}

【0.org\omega】

// 湍动能比耗散率
dimensions      [00-10000];
internalField   uniform 0.001;
boundaryField
{
    inlet
    {
        type            inletOutlet;
        inletValue        uniform 0.001;
        value           uniform 0.001;}
    outlet
    {
        type            inletOutlet;
        inletValue        uniform 0.001;
        value           uniform 0.001;}"wall."{
        type            omegaWallFunction;// OpenFOAM仅提供了一种 w 壁面函数。
        value           uniform 0.001;}
    caisson
    {
        type            omegaWallFunction;
        value           uniform 0.001;}
    defaultFaces
    {
        type            empty;}
    atmosphere
    {
        type            inletOutlet;
        inletValue        uniform 0.001;
        value           uniform 0.001;}}

【0.org\epsilon】

// 湍动能耗散率,本算例中不要
dimensions      [02-30000];
internalField   uniform 0.0001;
boundaryField
{
    inlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0001;
        value           uniform 0.0001;}
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0001;
        value           uniform 0.0001;}"wall."{
        type            epsilonWallFunction;// 
        value           uniform 0.0001;}
    caisson
    {
        type            epsilonWallFunction;
        value           uniform 0.0001;}
    defaultFaces
    {
        type            empty;}
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0.0001;
        value           uniform 0.0001;}}

【constant\turbulenceProperties】

simulationType  RAS;// RAS类湍流模型
RAS
{
    RASModel        kOmegaSST;// k-w SST 湍流模型
    turbulence      on;// 湍流模型开关
    printCoeffs     on;// 输出模型系数}

【constant\waveDict】

waveType        regular;// 规则波
waveTheory      cnoidal;// 椭圆余弦波
genAbs          1;// 考虑造波边界的消波性能  1/0
absDir          0.0;// 造波边界的消波方向
nPaddles        1;// 主动消波的Paddles数量设置,是patch被分割的垂直切片的(整数)数量。这个参数在消波和斜向造波中起着重要作用,默认值为1,即整个patch作为一个单独的单元起作用。
waveHeight      0.25;// 波高
wavePeriod      3;// 波周期
waveDir         0.0;// 波向
wavePhase       1.57079633;// 初始相位
tSmooth         0.0;// 平滑时间,秒。在产生不规则波或斜向波时,在造波patch上模拟的起始点会有许多波峰和波谷,初始条件必须tapered,以便在边界上得到更平滑的响应。则波面高度和速度都乘以一个因子,该因子在t = 0s到t = tSmooth时从0到1线性变化。tSmooth的默认值为-1,即不使用。

【constant\porosityDict】

// Materials: clear region, core, secondary armour layer, primary armour layer
a               4(0505050);// 阻力系数
b               4(01.22.00.6);// 阻力系数
c               4(00.340.340.34);// 阻力系数

D50             4(10.010.0350.12);// 孔隙材料中值粒径 D50
porosity        4(10.490.4930.5);// 各种材料的孔隙率

【system\snappyHexMeshDict】
参考 【OpenFOAM】snappyHexMesh

【system\controlDict】

application     olaFlow;// olaFlow求解器
startFrom       latestTime;
startTime       0;
stopAt          endTime;
endTime         60;
deltaT          0.001;// 计算时间步
writeControl    adjustableRunTime;
writeInterval   0.05;// 写出时间步
purgeWrite      0;
writeFormat     ascii;
writePrecision  6;
compression     off;// 是否压缩格式写出,可节约硬盘空间, on/off
timeFormat      general;
timePrecision   6;
runTimeModifiable yes;
adjustTimeStep  yes;// 采用自适应时间步,可能会加速计算,也可能造成时间步极小
maxCo           0.45;// CFL条件的Courant数, 一般<1, 设置一个小值会使计算结果更精确,但也减小了时间步长,增加了计算成本
maxAlphaCo        0.45;// 两相交界面上的最大Courant数
maxDeltaT       0.05;

functions     // 后处理设置{
    gaugesVOF // 用于输出自由水面位置{
        type    sets;libs("libsampling.so");
        writeControl    outputTime;
        writeInterval   1;
        setFormat       raw;
        surfaceFormat   raw;
        interpolationScheme cellPoint;fields( alpha.water );sets(
            GaugeVOF01
            {
                type    lineCellFace;
                axis    xyz;start(0.50.0010);end(0.50.0011.2);} 
            GaugeVOF02
            {
                type    lineCellFace;
                axis    xyz;start(9.250.0010);end(9.250.0011.2);} 
            GaugeVOF03
            {
                type    lineCellFace;
                axis    xyz;start(15.750.0010);end(15.750.0011.2);} 
            GaugeVOF04
            {
                type    lineCellFace;
                axis    xyz;start(17.750.0010);end(17.750.0011.2);} 
            GaugeVOF05
            {
                type    lineCellFace;
                axis    xyz;start(21.10.0010);end(21.10.0011.2);});}
    gaugesP  // 输出点压力{
        type    sets;libs("libsampling.so");
        writeControl    outputTime;
        writeInterval   1;
        setFormat       raw;
        surfaceFormat   raw;
        interpolationScheme cellPointFace;fields( p );sets(
            GaugesP
            {
                type    boundaryPoints;// 边界上的点
                axis    xyz;
                patches 1(caisson);// 测量沉箱面上一些点的波压力points((18.00.010.75)(18.000.010.80)(18.000.010.85)(18.000.010.95)(18.010.010.70)(18.250.010.70)(18.500.010.70)(18.750.010.70));
                maxDistance 0.01;// 根据上述坐标,在 0.01m的范围内搜索几何caisson面上的 points});}}

【system\fvSchemes】
【system\fvSolution】
参考 【OpenFOAM】-olaFlow-算例1- baseWaveFlume

【system\setFieldsDict】

defaultFieldValues(
    volScalarFieldValue alpha.water 0// 设置标量场 alpha 的值
    volScalarFieldValue porosityIndex 0// 设置标量场 porosityIndex 的值);regions(
    boxToCell
    {box(-10-10-10)(500100.8);fieldValues(
            volScalarFieldValue alpha.water 1// box范围内单元的 alpha 值为 1,即水深为 0.8);}

    surfaceToCell
    {
        file            "./constant/triSurface/primLayer.stl";// 通过*.stl几何文件确定孔隙材料范围outsidePoints((0.250.0010.25));// definition of outside
        includeCut      true;// cells cut by surface
        includeInside   true;// cells not on outside of surf
        includeOutside  false;// cells on outside of surf
        nearDistance    -1;// cells with centre near surf// (set to -1 if not used)
        curvature       -100;// cells within nearDistance// and near surf curvature// (set to -100 if not used)fieldValues(
            volScalarFieldValue porosityIndex 3// 孔隙材料索引值 3// 外部水体的“孔隙材料”索引值 0// 分别对应 constant\porosityDict 中的孔隙材料阻力系数);}

    surfaceToCell
    {
        file            "./constant/triSurface/secLayer.stl";outsidePoints((0.250.0010.25));// definition of outside
        includeCut      true;// cells cut by surface
        includeInside   true;// cells not on outside of surf
        includeOutside  false;// cells on outside of surf
        nearDistance    -1;// cells with centre near surf// (set to -1 if not used)
        curvature       -100;// cells within nearDistance// and near surf curvature// (set to -100 if not used)fieldValues(
            volScalarFieldValue porosityIndex 2);}

    surfaceToCell
    {
        file            "./constant/triSurface/core.stl";outsidePoints((0.250.0010.25));// definition of outside
        includeCut      true;// cells cut by surface
        includeInside   true;// cells not on outside of surf
        includeOutside  false;// cells on outside of surf
        nearDistance    -1;// cells with centre near surf// (set to -1 if not used)
        curvature       -100;// cells within nearDistance// and near surf curvature// (set to -100 if not used)fieldValues(
            volScalarFieldValue porosityIndex 1);});
标签: 学习

本文转载自: https://blog.csdn.net/ou_no/article/details/128256175
版权归原作者 ou_no 所有, 如有侵权,请联系我们删除。

“【OpenFOAM】-olaFlow-算例2- breakwater”的评论:

还没有评论