转载自:http://blog.sina.com.cn/s/blog_a0b4201d0102v7jt.html

用习惯了FLUENT的操作界面,再使用OpenFOAM就会觉得非常繁琐。遇到的第一个问题就是边界条件的设定。在FLUENT中,例如给定了一个进口边界(质量或者压力或者速度)和一个出口边界(一般是压力),并在进口处设定湍流强度就可以了,不必关心这三个量在求解的各个方程中的分配。而在OpenFOAM中,这个问题就要显得复杂的多,以k-epsl模型求解可压缩流为例为例,要求解质量守恒方程,动量守恒方程和能量守恒方程,湍动能方程以及耗散率方程,分别对应P方程,U方程,T方程,k方程和epsl方程,其中U方程是矢量方程,包含三个标量方程。在求解之前要为每个方程指定边界条件。现在的问题就是:只知道压力进口条件和压力出口回流条件,以及进出口都是室温条件,也就是说只能显式的给定P方程的进口条件和出口回流条件,T方程的进口和出口条件,而U方程的边界条件需要由已知的P方程和T方程的边界条件间接的得到。对于这个问题,OpenFOAM提供了各种各样的边界条件给定方式,多的足够让你眼花缭乱,所以非常有必要深入的扒一扒。先从OpenFOAM在tutorial中给出的例子入手。

以rhoSimplecFoam中的squareBend为例,给出了alphat,epsilon, k, mut, p, T, U 等7个量的初始条件,当然也包括了边界条件。其中alphat指的是turbulence thermal

diffusivity, 例子中给定的壁面边界是

compressible::alphatWallFunction; 进口边界是calculated, value uniform 0;

出口边界是 calculated, value uniform 0; epsilon指的是turbulence

kinetic energy dissipation

rate, k指的是turbulence

kinetic energy,mut指的是turbulence

viscosity,同时alphat, epsilon, k, mut

这个几个参数都是要给定壁面条件模型的。像其他的tutorial例子中给出的也都是速度进口边界条件,跟我的算例所需要的压力进口边界条件不太吻合。

好在OpenFoam给出了各种不同类型的边界条件类型供大家挑选使用,(当然是在不行就只能自己写了,这才是OF最强大的的地方嘛)。具体的不同内容可以查询页面: http://openfoam.org/docs/cpp/

最终我选择的边界条件是:

 

U

p

T

inlet

pressureInletVelocity

totalPressure

inletOutlet

outlet

inletOutlet

totalPressure

inletOutlet

wall

fixedValue

zeroGradient

zeroGradient

k

Epsilon

mut

alpha

inletOutlet

inletOutlet

calculated

calculated

inletOutlet

inletOutlet

calculated

calculated

wallFunction

wallFunction

wallFunction

wallFunction

历经千辛万苦终于能够无报错运行啦

下面是openFoam给出的根据各种进出口条件分类的边界条件:

inlet boundary

conditions:

turbulentInletFvPatchField< Type >: This boundary condition generates a fluctuating inlet condition by adding a random component to a reference (mean) field.

surfaceNormalFixedValueFvPatchVectorField:This boundary condition provides a surface-normal vector boundary condition by its magnitude

outletMappedUniformInletFvPatchField< Type >:This boundary conditon averages the field over the "outlet" patch specified by name "outletPatchName" and applies this as the uniform value of the field over this patch

outletInletFvPatchField< Type >:This boundary condition provides a generic inflow condition, with specified outflow for the case of return flow

freestreamFvPatchField< Type >:This boundary condition provides a free-stream condition. It is a 'mixed' condition derived from the inletOutlet condition, whereby the mode of operation switches between fixed (free stream) value and zero gradient based on the sign of the flux

压力进口条件:

1: fixedPressureCompressibleDensityFvPatchScalarField: This boundary condition calculates a (liquid) compressible density as a function of pressure and fluid properties (这是属于密度进口条件)

2: uniformTotalPressureFvPatchScalarField: This boundary condition provides a time-varying form of the uniform total pressure boundary condition

3: totalPressureFvPatchScalarField: This boundary condition provides a total pressure condition. Four variants are possible:

4:freestreamPressureFvPatchScalarField:This boundary condition provides a free-stream condition for pressure. It is a zero-gradient condition that constrains the flux across the patch based on the free-stream velocity.

速度进口条件:

1: flowRateInletVelocityFvPatchVectorField: This boundary condition provides a velocity boundary condition, derived from the flux (volumetric or mass-based), whose direction is assumed to be normal to the patch.

2:atmBoundaryLayerInletVelocityFvPatchVectorField:This boundary condition specifies a velocity inlet profile appropriate for atmospheric boundary layers (ABL). The profile is derived from the friction velocity, flow direction and the direction of the parabolic co-ordinate z.

3: pressureNormalInletOutletVelocityFvPatchVectorField: This velocity inlet/outlet boundary condition is applied to patches where the pressure is specified. A zero-gradient condition is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the flux with a direction normal to the patch faces.

4:pressureInletVelocityFvPatchVectorField: This velocity inlet boundary condition is applied to patches where the pressure is specified. The inflow velocity is obtained from the flux with a direction normal to the patch faces

5: pressureInletUniformVelocityFvPatchVectorField: This velocity inlet boundary condition is applied to patches where the pressure is specified. The uniform inflow velocity is obtained by averaging the flux over the patch, and then applying it in the direction normal to the patch faces

6:pressureInletOutletParSlipVelocityFvPatchVectorField: This velocity inlet/outlet boundary condition for pressure boundary where the pressure is specified. A zero-gradient is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the flux with the specified inlet direction.

7: pressureDirectedInletVelocityFvPatchVectorField: This velocity inlet boundary condition is applied to patches where the pressure is specified. The inflow velocity is obtained from the flux with the specified inlet direction" direction.

8:pressureDirectedInletOutletVelocityFvPatchVectorField: This velocity inlet/outlet boundary condition is applied to pressure boundaries where the pressure is specified. A zero-gradient condtion is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the flux with the specified inlet direction.

9: flowRateInletVelocityFvPatchVectorField: This boundary condition provides a velocity boundary condition, derived from the flux (volumetric or mass-based), whose direction is assumed to be normal to the patch.

温度进口条件:

1: totalTemperatureFvPatchScalarField: This boundary condition provides a total temperature condition.

耗散率进口条件:epsilon进口条件:

1: turbulentMixingLengthDissipationRateInletFvPatchScalarField:This boundary condition provides a turbulence dissipation, $\epsilon$ (epsilon) inlet condition based on a specified mixing length

2: atmBoundaryLayerInletEpsilonFvPatchScalarField: This boundary condition specifies an inlet value for the turbulence dissipation, $\epsilon$ (epsilon), appropriate for atmospheric boundary layers (ABL), and designed to be used in conjunction with the ABLInletVelocity inlet velocity boundary condition.

3:

湍动能进口条件:

1: turbulentIntensityKineticEnergyInletFvPatchScalarField: This boundary condition provides a turbulent kinetic energy condition, based on user-supplied turbulence intensity, defined as a fraction of the mean velocity:

outlet boundary condition出口边界条件:

freestreamFvPatchField< Type >:This boundary condition provides a free-stream condition. It is a 'mixed' condition derived from the inletOutlet condition, whereby the mode of operation switches between fixed (free stream) value and zero gradient based on the sign of the flux.

inletOutletFvPatchField< Type >:This boundary condition provides a generic outflow condition, with specified inflow for the case of return flow.

uniformInletOutletFvPatchField< Type >:Variant of inletOutlet boundary condition with uniform inletValue.

速度出口条件:

fixedNormalInletOutletVelocityFvPatchVectorField: This velocity inlet/outlet boundary condition combines a fixed normal component obtained from the "normalVelocity" patchField supplied with a fixed or zero-gradiented tangential component depending on the direction of the flow and the setting of "fixTangentialInflow"

fluxCorrectedVelocityFvPatchVectorField: This boundary condition provides a velocity outlet boundary condition for patches where the pressure is specified. The outflow velocity is obtained by "zeroGradient" and then corrected from the flux:

pressureDirectedInletOutletVelocityFvPatchVectorField:This velocity inlet/outlet boundary condition is applied to pressure boundaries where the pressure is specified. A zero-gradient condtion is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the flux with the specified inlet direction.

pressureInletOutletVelocityFvPatchVectorField:This velocity inlet/outlet boundary condition is applied to pressure boundaries where the pressure is specified. A zero-gradient condition is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the patch-face normal component of the internal-cell value

pressureNormalInletOutletVelocityFvPatchVectorField:This velocity inlet/outlet boundary condition is applied to patches where the pressure is specified. A zero-gradient condition is applied for outflow (as defined by the flux); for inflow, the velocity is obtained from the flux with a direction normal to the patch faces.

压力出口条件:

uniformTotalPressureFvPatchScalarField:This boundary condition provides a time-varying form of the uniform total pressure boundary condition.

totalPressureFvPatchScalarField:This boundary condition provides a total pressure condition. Four variants are possible

温度出口条件:

inletOutletTotalTemperatureFvPatchScalarField:This boundary condition provides an outflow condition for total temperature for use with supersonic cases, where a user-specified value is applied in the case of reverse flow

totalTemperatureFvPatchScalarField:This boundary condition provides a total temperature condition.

一般性的边界条件: generic boundary conditions:http://foam.sourceforge.net/docs/cpp/a10590.html

calculatedFvPatchField< Type >:This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via field assignment, and not via a call to e.g. updateCoeffs or evaluate.

directionMixedFvPatchField< Type >:Base class for direction-mixed boundary conditions

fixedGradientFvPatchField< Type >:This boundary condition supplies a fixed gradient condition, such that the patch values are calculated using

fixedValueFvPatchField< Type >: This boundary condition supplies a fixed value constraint, and is the base class for a number of other boundary conditions.

zeroGradientFvPatchField< Type >:This boundary condition applies a zero-gradient condition from the patch internal field onto the patch faces.

oscillatingFixedValueFvPatchField< Type >:This boundary condition provides an oscillating condition in terms of amplitude and frequency.

uniformFixedGradientFvPatchField< Type >:This boundary condition provides a uniform fixed gradient condition.

uniformFixedValueFvPatchField< Type >:This boundary condition provides a uniform fixed value condition

转载于:https://www.cnblogs.com/liusuanyatong/p/11259757.html

OpenFOAM 中边界条件的设定【转载】相关推荐

  1. Webkit中textarea的设定

    使用chrome浏览器或者safari浏览器,经常会发现自己的textarea很奇怪,可以拖动放大缩小,而且还有个奇怪的边.最初我们遇到这类问题的时候,直接给设计交代说那是浏览器的特性,俺们管不着,结 ...

  2. OpenFOAM中slip和noslip介绍(滑移条件无滑移条件)【翻译】

    OpenFOAM中slip和noslip介绍(滑移条件&无滑移条件)[翻译] 翻译自:CFD-online 帖子地址:http://www.cfd-online.com/Forums/open ...

  3. OpenFOAM中:点,线,面,体的概念区别(尤其是face和patch的区别)

    OpenFOAM中:点,线,面,体的概念区别(尤其是face和patch的区别) 个人理解如下: face:有序点(point)的集合,物理面的概念 patch:边界面(face)的集合(非内部面), ...

  4. 在OpenFOAM中标记某些区域自适应加密

    OpenFOAM中自带的自适应加密只支持三维的,这里分两种情况,一种是三维的自适应加密,一种是二维的自适应加密 一.三维情况 1.1 更改求解器 算例 不过这样的加密是三维的,如果是二维的加密看下边 ...

  5. MD5算法在PB中的实现(转载自 - 阿多米 - 博客园)

    MD5算法在PB中的实现(转载自 - 阿多米 - 博客园) 注:转载请写明出处.本文转载自--阿多米,原链接:http://www.cnblogs.com/zzjder/archive/2008/10 ...

  6. OpenFOAM 中的 RTS 机制

    OpenFOAM 中的 RTS 实现,使用了很多宏定义展开,所以不容易理解.不过,也有分析文章,用了简单的例子,分析了编译展开后的代码,应该是说得比较好的. OpenFoam RTS 实现分析,如下: ...

  7. 免费OA系统平台在企业发展中的优势(转载)

    免费OA系统平台在企业发展中的优势(转载) 近年来,随着互联网的高速发展,企业愈加的注重内部信息化建设,免费OA办公系统自然成为不可多得的选择.那么,对于我们而言,免费OA系统平台的实施对企业日常办公 ...

  8. BIOS设置中还原coms设定的操作方法

    CMOS是电脑主机板上一块特殊的RAM芯片,是系统参数存放的地方,而BIOS中系统设置程序是完成参数设置的手段.因此,准确的说法应是通过BIOS设置程序对COMS参数进行设置.但是如果在用U盘安装wi ...

  9. java隐含文本框_Linux_文本框中密码的隐藏与显示, HTML文本框中,如果设定为密 - phpStudy...

    文本框中密码的隐藏与显示 HTML文本框中,如果设定为密码框,则输入的值显示为"*",如果在后台管理中,需要相询密码,则无法及时掌握密码值. 使用Javascrtip控制,则能很快 ...

最新文章

  1. FFmpeg集成到GPU
  2. 小学期学习记录(一)
  3. 外包公司到底值不值去?
  4. 标题: ZZ- Linux 系统裁减指南(LiPS)
  5. basename 从绝对路径中取得文件名
  6. 【算力网络白皮书学习】
  7. Wed Aug 03 19:48:03 +0800 2022这种字符串,怎么转成时间格式年月日
  8. SpringSecurity实现登陆认证并返回token
  9. dwf是什么格式文件
  10. Person Re-identification by Local Maximal Occurrence Representation and Metric Learning(LOMO+XQDA)
  11. noip2014 珠心算测验 (枚举)
  12. 你一念之差,我动情一场:伤感日志
  13. ITILv4 MP认证以及证书展示
  14. 【软件测试】测试大纲编写模板范文
  15. 大数据Hadoop入门教程 | (一)概论
  16. MySQL复制跳过错误--slave_skip_errors、sql_slave_skip_counter、slave_exec_mode
  17. 温度补偿计算公式_热力管道补偿器补偿量计算公式
  18. 2977 生理周期(简单的枚举例子)
  19. 时间复杂度On和空间复杂度O1分别是什么
  20. SUMO利用OSM(OpenStreetMap)导出地图生成路网并生成交通流教程(超详细!!!)

热门文章

  1. CSS--实现照片墙
  2. MyEclipse7.02注册码
  3. k8s本地开发工具telepresence及部署
  4. JTW93501单键触摸调光芯片详细介绍
  5. 2023年的春招,java怎么搞??
  6. MapboxGL系列(一)基础知识介绍
  7. 计算机网络基础感想300字,互联网络观后感300字
  8. hangye5:2345网址导航百万重金求顶尖人才 意在扩展高端用户人群
  9. 上海大厂Android面试经历;华为+小米+映客+抖音
  10. SpringBoot+Vue前后端分离,使用SpringSecurity完美处理权限问题(六)