位置: IT常识 - 正文

【OpenFOAM】-olaFlow-算例1- baseWaveFlume(openfoam中文教程)

编辑:rootadmin
【OpenFOAM】-olaFlow-算例1- baseWaveFlume

推荐整理分享【OpenFOAM】-olaFlow-算例1- baseWaveFlume(openfoam中文教程),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:openfoam中文教程,openfoam lbm,open foam,openfoam sample,openfoam sph,openfoam sample,openfoam-a little user-manual,openfoam reconstruct,内容如对您有帮助,希望把文章链接给更多的朋友!

算例路径: olaFlow\tutorials\baseWaveFlume 算例描述: 一个基础的二维波浪水槽 学习目标: olaFlow 求解器的造波、消波方法和算例设置 算例快照:

图1 波浪模拟结果

图2 算例网格

文件结构:

├── 0.org│ ├── U │ ├── alpha.water│ ├── alpha.water.org│ └── p_rgh├── cleanCase├── constant│ ├── dynamicMeshDict│ ├── g│ ├── transportProperties│ ├── turbulenceProperties│ └── waveDict --> 设置波浪要素├── runCase└── system ├── blockMeshDict ├── controlDict ├── decomposeParDict ├── fvSchemes ├── fvSolution └── setFieldsDict --> 设置水深

算例文件解析:

【0.org\U】

dimensions [0 1 -1 0 0 0 0]; // 量纲 m/sinternalField uniform (0 0 0); // 内部速度场 均一场 0 0 0boundaryField //边界场{ inlet // 造波边界 { type waveVelocity; // 波浪速度 waveDictName waveDict; // 读取constant\waveDict中的波浪要素 value uniform (0 0 0); //初值为 0 0 0 } outlet // 消波边界 { type waveAbsorption2DVelocity; // 使用了二维消波理论,olaFlow采用主动消波法 value uniform (0 0 0); } bottom // 底部边界为固壁边界,边界上速度为零 { type fixedValue; value uniform (0 0 0); } atmosphere // 大气边界,允许空气流出和流入 { type pressureInletOutletVelocity; value uniform (0 0 0); } frontAndBack // 前后面,empty指示模型为二维模型 { type empty; }}

【0.org\p_rgh】

// p_rgh = p - rgh,实际压力减去静水压力dimensions [1 -1 -2 0 0 0 0]; // M(1) L(-1) T(-2)internalField uniform 0;boundaryField{ frontAndBack { type empty; } outlet { type fixedFluxPressure; //将压力梯度设置为0,边界上的通量由速度边界条件指定 value uniform 0; } inlet { type fixedFluxPressure; value uniform 0; } bottom { type fixedFluxPressure; value uniform 0; } atmosphere { type totalPressure; //总压条件:流出 p = p0; 流入 p = p0 - 0.5|U|^2 U U; phi phi; rho rho; psi none; gamma 1; p0 uniform 0; value uniform 0; }}【OpenFOAM】-olaFlow-算例1- baseWaveFlume(openfoam中文教程)

【0.org\alpha.water.org】

// 设置流体体积分数dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField{ inlet { type waveAlpha; // 根据波浪条件设置 waveDictName waveDict; value uniform 0; } frontAndBack { type empty; } outlet { type zeroGradient; // 零梯度 } bottom { type zeroGradient; } atmosphere { type inletOutlet; // 当流体流出时,α的梯度为0;如果流入,α为0,100%的空气流入 inletValue uniform 0; value uniform 0; }}

【constant\dynamicMeshDict】

dynamicFvMesh staticFvMesh;

【constant\g】

dimensions [0 1 -2 0 0 0 0];value ( 0 0 -9.81 );

【constant\transportProperties】

phases (water air);water{ transportModel Newtonian; nu [0 2 -1 0 0 0 0] 1e-06; // 流体运动粘度 rho [1 -3 0 0 0 0 0] 1000; // 流体密度}air{ transportModel Newtonian; nu [0 2 -1 0 0 0 0] 1.48e-05; rho [1 -3 0 0 0 0 0] 1;}sigma [1 0 -2 0 0 0 0] 0.07; // 水和空气之间的表面张力参数

【constant\turbulenceProperties】

simulationType laminar; // 设置为层流模型

【constant\waveDict】

waveType regular; // 规则波waveTheory cnoidal; // 椭圆余弦波genAbs 1; // 考虑造波边界的消波性能 1/0absDir 0.0; // 造波边界的消波方向nPaddles 1; // 主动消波的Paddles数量设置waveHeight 0.10; // 波高wavePeriod 3; // 波周期waveDir 0.0; // 波向wavePhase 1.57079633; // 初始相位// Change both entries to true to re-read this dictionary upon restart.rereadAlpha false;rereadU false;

【system\blockMeshDict】

scale 1;vertices ( (0.0 -0.02 0.0) (10.0 -0.02 0.0) (10.0 -0.02 0.7) (0.0 -0.02 0.7) (0.0 0.0 0.0) (10.0 0.0 0.0) (10.0 0.0 0.7) (0.0 0.0 0.7));blocks ( hex (0 1 5 4 3 2 6 7) (500 1 70) simpleGrading (1 1 1));edges ();patches ( patch inlet // 造波边界 ( (0 4 7 3) ) patch outlet // 消波边界 ( (1 5 6 2) ) wall bottom // 水槽底部边界 ( (0 1 5 4) ) patch atmosphere // 大气边界 ( (3 2 6 7) ) empty frontAndBack // 水槽侧面边界 ( (0 1 2 3) (4 5 6 7) ));mergePatchPairs();

【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/offtimeFormat general;timePrecision 6;runTimeModifiable yes;adjustTimeStep yes; // 采用自适应时间步,可能会加速计算,也可能造成时间步极小maxCo 0.5; // CFL条件的Courant数, 一般<1, 设置一个小值会使计算结果更精确,但也减小了时间步长,增加了计算成本maxAlphaCo 0.5; // 两相交界面上的最大Courant数maxDeltaT 0.025;

【system\decomposeParDict】

numberOfSubdomains 2; // 并行区域分解数目method scotch; // 区域分解方法...

【system\fvSchemes】

// 指定控制方程中各项的有限体积法的离散格式ddtSchemes // 指定时间离散格式{ default Euler; // Euler法,一阶精度,条件稳定} gradSchemes // 梯度项离散格式{ default Gauss linear; // 高斯定理,将网格中心的量插值到网格面上}// olaFlow 的算例中给出了几乎所有可能出现的项,具体算例可能不会包含全部项divSchemes // 对流项与散度项的离散格式, 将网格中心的量插值到网格面上,因此实际上选用的是interpolationSchemes{ div(rhoPhi,U) Gauss limitedLinearV 1; // Guass limitedLinear(一种TVD格式,使同时满足精度和有界) V类(采用限制器时考虑了流动方向) div(U) Gauss linear; // 二阶精度,无界 div((rhoPhi|interpolate(porosity)),U) Gauss limitedLinearV 1; div(rhoPhiPor,UPor) Gauss limitedLinearV 1; div(rhoPhi,UPor) Gauss limitedLinearV 1; div(rhoPhiPor,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; // Gauss vanLeer(一种TVD格式,使同时满足精度和有界) div(phirb,alpha) Gauss interfaceCompression; // 界面压缩格式,基于一般限制格式 div((muEff*dev(T(grad(U))))) Gauss linear; div(phi,k) Gauss upwind; // 一阶迎风格式,有界 div(phi,epsilon) Gauss upwind; div((phi|interpolate(porosity)),k) Gauss upwind; div((phi|interpolate(porosity)),epsilon) Gauss upwind; div(phi,omega) Gauss upwind; div((phi|interpolate(porosity)),omega) Gauss upwind;}laplacianSchemes // 拉普拉斯项离散格式{ default Gauss linear corrected; // Guass线性插值,corrected(显式的非正交网格修正)}interpolationSchemes{ default linear; // 线性插值格式}snGradSchemes // 面法向梯度格式{ default corrected;}fluxRequired // { default no; p_rgh; pcorr; alpha.water;}

【system\fvSolution】

// 指定方程组矩阵求解器、残差以及其他算法控制solvers{ "alpha.water.*" { nAlphaCorr 1; // nAlphaSubCycles 2; alphaOuterCorrectors yes; cAlpha 1; MULESCorr no; nLimiterIter 3; solver smoothSolver; // 求解器:光顺求解器。对称和非对称矩阵均适用 smoother symGaussSeidel; // 光顺器:对称Gauss-Seidel方法 tolerance 1e-8; // 标准化残差 relTol 0; // 相对残差,表征残差的递减量 } "pcorr.*" // 压强校正量 { solver PCG; // 求解器:预处理共轭梯度法。仅适用于对称矩阵 preconditioner DIC; // 预处理器:基于对角的不完全Cholesky预处理器 tolerance 1e-5; relTol 0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } p_rghFinal // 在求解p_rgh时可设置较大的残差,在最后一步设置严格的误差 { $p_rgh; relTol 0; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; relTol 0; }}// 离散方程组的分离式解法PIMPLE // SIMPLE 与 PISO 算法的耦合{ momentumPredictor no; nOuterCorrectors 1; // 值不大于1时,算法变为纯PISO算法;若大于1,为非定常SIMPLE算法 nCorrectors 3; nNonOrthogonalCorrectors 0;}relaxationFactors // 松弛方法,为降低数值波动{ fields // 表示需要使用松弛方法(显式)的变量 { } equations // 表示需要使用松弛方法(隐式)的方程 { ".*" 1; }}

【system\setFieldsDict】

defaultFieldValues( volScalarFieldValue alpha.water 0 // 初始化流体体积分数);regions( boxToCell { box (-10 -1 -1) (30 1 0.4); fieldValues ( volScalarFieldValue alpha.water 1 // 将box范围内的流体设置为a = 1的相,即水深 ); });
本文链接地址:https://www.jiuchutong.com/zhishi/300854.html 转载请保留说明!

上一篇:基于OC端的Bridge-API组件化应用(oc底层原理)

下一篇:vue导入处理Excel表格详解(导入vue.js)

  • 小规模纳税人月销售额超过15万
  • 没有提取盈余公积的情况
  • 联通的话费能干吗
  • 电子承兑转出后银行有凭证吗
  • 年末暂估下年怎么入账
  • 增值税专票丢了能补开吗
  • 有限责任公司相关规定
  • 税务1236600短信
  • 建安企业会计处理
  • 价外费用纳税义务发生时间
  • 事业单位如何计提工资
  • 小微企业营业外收入税率是多少
  • 收到跨年的票据怎么做账
  • 企业采购一般应包括什么
  • 住宿费发票开错了可以重新开吗
  • 意外险部分费用怎么算
  • 子公司资不抵债
  • 个体户税务申报流程季度0申报
  • vc_runtimeMinimum_x64.msi 找不到的解决方法
  • win10版本激活码
  • 两免三减半条件
  • php中数组的常用函数及用法
  • 分批供货付款方式
  • 家里有蟑螂怎么找到窝
  • php程序开发范例宝典光盘
  • 加工取得的存货和委托加工的区别
  • 前端静态页面
  • 期末增值税结转账务处理
  • php excel导入数据
  • 前端axios是什么
  • 前端的基础知识
  • vue watch监听localstorage变化
  • vue3中如何使用vuex
  • thinkphp框架结构
  • 认缴制和实缴制的区别
  • 所得税汇算清缴时间期限
  • python自学资料
  • 财务咨询公司能出尽调报告吗
  • 补计提个税分录
  • 个人转帐多少不引起注意
  • 商誉减值每年都要调整吗
  • 新开公司怎么办理税务登记
  • 科目余额表科目
  • 残疾人就业保障金
  • 非货币性资产交换以公允价值为基础进行计量
  • 暂估入库的库存商品转成本吗
  • 事业单位购入
  • 哪些地方中国没有收复
  • 小规模纳税人开专票税率是多少?
  • 暂估出库需要确认收入吗
  • 营业收入就是开票的不含税金额吗
  • 长期应收款是否计提坏账准备
  • 审计测试会计分录怎么做
  • 厂家给的促销费可以退吗
  • 人工成本包括哪些项目
  • 工资的计算方法有几种
  • sqlserver存储过程怎么查看
  • linux如何安装c语言编译器
  • win7系统无法修复怎么办
  • ubuntu touch怎么刷入
  • 查看linux系统日志命令
  • MAC OS X 10.8通知中心无法访问、停止更新怎么重启
  • shell检查语法错误
  • win7架设ftp服务器
  • 脚本添加crontab
  • css使用教程
  • python def用法理解
  • javascript typeof id==='string'?document.getElementById(id):id解释 原创
  • c#中的数组
  • js模块化框架
  • asyncio 的 coroutine对象 与 Future对象使用指南
  • Jquery和BigFileUpload实现大文件上传及进度条显示
  • 税务总局电子申报软件39
  • 计提税金的公式
  • 四川国家税务局官网
  • 税务局上下班路上能穿制服吗
  • 新公司税务登记完后还需要什么流程
  • 营销服务协议书范本
  • 建筑公司材料发票
  • 湖南省地方税务局综合楼项目设计
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设