OpenFOAM

4.5k 主题 26.4k 帖子
  • 关于openfoam中使用的双流体模型

    1 帖子
    429 浏览

    在看《Computational Fluid Dynamics of Dispersed Two-Phase Flows at High Phase Fractions》的时候碰到一个不太理解的地方。
    一般的相间动量传递可以写成方程(3.10)
    1.png
    为了模拟phase inversion, 方程(3.11)加入了b相变成离散相时的曳力、升力等。
    但对于方程(3.11)的曳力相,如果仍然是a相为离散相的情况,$\alpha_a$→0 ,$ f_a$→0,
    那曳力相前面的部分不就变成$3/4\alpha_a\alpha_b(f_b\frac{C_{db}\rho_a}{d_b})$,和(3.10)里的不一样,b相变成分散相时候应该才是这个形式,虚拟质量力也是一样的情况。 升力也对不上。

    2.png

  • pimple算法的流程图

    15 帖子
    3k 浏览

    @samuel-tu 为什么感觉PIMPLE才是真正的PISO算法,而PISO算法只是进行了多次压力和速度修正,在OpenFOAM中并没有判断一个时间步内收敛与否。从流程图上看也没有区别,https://marinecfd.xyz/post/piso-algorithm/ 这个帖子还对PISO的细节进行了分析。

  • 网格变细后液面不正常

    17 帖子
    3k 浏览

    突然想到这个帖子,通过调整边界层厚度可以达到收敛了。

  • 场计算类型的问题

    9 帖子
    2k 浏览
  • 关于interFoam或interMixingFoam空气密度的影响

    3 帖子
    782 浏览

    @李东岳 李老师好,空气密度设为1000的情况流场数据在0.0489范围之内,虽然顶部看起来不好看。
    相分数初始场:

    #include "../include/initialConditions" defaultFieldValues ( volScalarFieldValue alpha.air 0 volScalarFieldValue alpha.saltwater 1 volScalarFieldValue alpha.water 0 ); regions ( boxToCell { box ($xyz_min 0.1 $xyz_min) ($xyz_max $xyz_max $xyz_max); fieldValues ( volScalarFieldValue alpha.air 1 volScalarFieldValue alpha.saltwater 0 ); } boxToCell { box ($xyz_min 0 $xyz_min) ($xyz_max 0.1 $xyz_max); fieldValues ( volScalarFieldValue alpha.saltwater 0 volScalarFieldValue alpha.water 1 ); } );

    速度场

    #include "../include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform ($velocity 0 0); boundaryField { inlet { type fixedValue; value uniform ($velocity 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } atmosphere { type pressureInletOutletVelocity; value uniform ($velocity 0 0); } bottom { type slip; } front { type symmetryPlane; } back { type symmetryPlane; } }

    压力场

    dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedFluxPressure; value uniform 0; } outlet { type zeroGradient; } atmosphere { type prghPressure; rho rho; p uniform 0; value uniform 0; // optional initial value } bottom { type fixedFluxPressure; value uniform 0; } front { type symmetryPlane; } back { type symmetryPlane; } }

    这个问题卡住好久了,但没有思路调整哪些参数,希望李老师能指点一下

  • 16 帖子
    4k 浏览

    @李东岳 , 李老师您好,我已经在chtMultiRegionFoam中植入了第一张图所示的拉普拉斯及泊松方程,

    QQ截图20210619102650.jpg

    QQ截图20210619102636.jpg

    实现了对电势在流固区域的耦合求解,但电荷的求解似乎不对,然后电场力的求解结果也和参考文章里面差的太多,但我边界设置理论上是符合文章要求的,第二张图和第三张图是我和参考文章计算结果的对比。参考文章及我的算例和编译的求解器链接放在这里:https://pan.baidu.com/s/1U8NBBon8CFVvDoF9Fsi9UA 提取码:mppz
    麻烦李老师能抽空看一下,检查一下问题,不胜感激。一个头俩大:136: :136:

    QQ截图20210619095212.jpg QQ截图20210619095249.jpg

  • 气泡在静水中旋转上升

    2 帖子
    703 浏览

    @conghongchuan 提高一下热度,我可不可以理解成:把气泡替换成旋转机械,就是旋转速度了。

  • 有没有大佬做CFDEM Coupling的交流一下

    1 帖子
    415 浏览

    关于网格尺度小了以后interpolation和mapping的问题

  • 8 帖子
    2k 浏览

    这个算例太酷炫了 小液滴都算出来了 还特别圆

  • 关于codedFixedValue使用

    3 帖子
    1k 浏览

    @chengan-wang关于codedFixedValue使用 中说:

    我定义了ymax,之后如果我使用if ( Cf[faceI].y() > ymax ) 设置相分数,时间步长越来越小。但如果改成if ( Cf[faceI].y() > 0.1 ) 一个具体数值,情况就好很多。我的使用方法是否有问题呢?

    理论上不应该有任何问题 :jingya:

  • 使用foamDictionary修改参数的问题

    3 帖子
    959 浏览

    @浪迹天大 这样嘛。。。好的,谢谢!

  • 1 帖子
    470 浏览

    如题,想用Foam-extend里的浸没边界法(Immersed Boundary Method)求解器,解决水与弹性杆的流固耦合数值模拟,有人有这方面经验吗?

  • 4 帖子
    2k 浏览

    @static 你好,我最近也在做三维飞机的相关数值模拟,可否给个联系方式,请教一些问题。谢谢,这是我的qq:3310792254

  • CFDEM虚拟机

    3 帖子
    955 浏览

    @李东岳 很抱歉才看到老师的回复。感谢老师,我已经自己解决啦:xinxin:

  • 关于paraview显示分辨率的问题

    2 帖子
    810 浏览

    图挂了

  • OF计算动网格的问题

    3 帖子
    944 浏览

    @李东岳 东岳老师,我在dynamicMeshDict里设置了constrints和restraints两个条目,控制圆柱仅在y方向移动,不转动,如下:

    constraints { yLine { sixDoFRigidBodyMotionConstraint line; centreOfRotation (0 0 0.5); direction (0 1 0); } noRotation { sixDoFRigidBodyMotionConstraint orientation; } } restraints { verticalSpring { sixDoFRigidBodyMotionRestraint linearSpring; anchor (0 0 0.5); refAttachmentPt (0 0 0.5); stiffness 2.1055; damping 0; restLength 0; } }

    不知道您说的是不是这个意思?

  • 压力泊松方程植入问题

    3 帖子
    807 浏览

    @李东岳 感谢李老师百忙之中指点!这么来看correction(fvm::ddt(p))就代表前后时间步压力差值的时间变化率啦

  • 1 帖子
    2k 浏览

    The objective of this link is to provide a resource for CFD developers to:

    obtain different gas-liquid benchmark test cases for validation and verification, verify related CFD models are implemented correctly.

    This latter capability is made possible through benchmark cases. This site provides simple test cases and grids, along with sample results from experiments which are mainly reported in previous published works. All the test cases are prepared as standard cases for open-source code OpenFOAM-8. It can be run by the following command in the terminal:./Allrun

    The site should also help CFD code users to understand and compare the predictions of a variety of models on the fundamental flow problems in the validation database. It also helps developers to disseminate new models to the CFD community.

    It is anticipated that this word will be updated regularly as new models and/or verification/validation cases are incorporated and tested. If you have any questions or comments, please contact one of the authors: Dongyue Li (li.dy@dyfluid.com)

    1. Diaz et al. 2008

    Features: This test case is a laboratory rectangle turbulent bubble column. The gas was injected in the middle of the bottom, which implies the geometry is quite symmetric. Nonetheless, it was also shown that the dynamic periodic liquid circulation can be founded in experiments. Simulations should be able to predict such periodic bubble plume with only the drag model. In addition, the authors also investigated the role of lift force and virtual mass force. The geometry is simple and settings are clear. This test case is suitable for investigate numerical algorithm. It should be noted here that the mean Sauter diameter data was also provided, although not in detail.

    Keywords: Unsteady, Rectangle bubble column, Mean Sauter diameter, Bubble plume,

    Reference: Díaz et al. "Numerical simulation of the gas–liquid flow in a laboratory scale bubble column: influence of bubble size distribution and non-drag forces." Chemical Engineering Journal 139.2 (2008): 363-379.

    bubbleFlow_diaz.jpg

    2. Gemello et al. 2018

    Features: This test case focuses on the unsteady 3D bubble column operated under high phase fration. Different swarm models were studied and a new swarm model was developed. The diameter of the bubble column ranges from 0.4m to 1m. Different superficial velocities from 0.03 m/s to 0.35 m/s were employed. This test case is suitable for investigate the swarm model correction based on different operating conditions.

    Keywords: Unsteady, 3D bubble column, Swarm effect, High phase fraction,

    Reference: Gemello et al. "CFD-based scale-up of hydrodynamics and mixing in bubble columns." Chemical Engineering Research and Design 136 (2018): 846-858.

    bubbleFlow_Gemello.jpg

    3. Lucas et al. 2007

    Features: In the work of Lucas et al., bubbly flow in a high aspect ratio column (Column width ~ 0.05 m, Column height ~ 4 m) was investigated. Bubbles and liquid are injected from the bottom. They move upward and at a certain level a fully developed flow pattern is formed. In both experiments and simulations, a quite steady state can be reached at the top of the column. These bubbly flows are operated at relative low phase fraction (~ 3%). The most important feature of the test cases by Lucas et al. is that the momentum exchange interfacial terms play an important role. It was observed in the experiments that the small bubbles tend to move towards to wall. Therefore, a wall peak of the phase fraction should be predicted in simulations. It should be noted here that the lift force, wall lubrication force and turbulent dispersion force should be included.

    Keywords: Steady, Bubbly flow, Lift force, Wall forces

    Reference: Lucas et al., "Use of models for lift, wall and turbulent dispersion forces acting on bubbles for poly-disperse flows." Chemical Engineering Science 62.15 (2007): 4146-4157.

    bubbleFlow_Lucas.jpg

    4. Yuan et al. 2014

    Features: In the work of Yuan et al., an experimantal quasi-2D bubble column was investigated. In the simulations, 2D computational domain was employed. The bubbles are injected from the bottom of the column with different patterns. Overall 5 patterns were studied. Due to the high superficial velocity, simulations are highly transient. In this work, the QBMM was used to predict bubble diameter. However, the experimental diameter data was not reported. The bubble number density function was also reconstructed by EQMOM. It should be noted here that the experimental data reported in Yuan et al. comes from the PhD thesis of Harteveld, see ref (8) in Yuan et al.

    Keywords: Unsteady, Bubble column, 2D simulation

    Reference: Yuan et al., "An extended quadrature‐based mass‐velocity moment model for polydisperse bubbly flows." The Canadian Journal of Chemical Engineering 92.12 (2014): 2053-2066.

    bubbleFlow_Yuan.jpg

    5. Schafer et al. 2019

    Features: In the work of Schafer et al., a 3D transient bubble column was studied by experiments and simulations. The geometry used in this work is similar with that used by Diaz et al. The unique feature of this work is that the bubble orientation angle data was provided. It can be used as a benchmark test case for multiphase DNS. Besides that, the bubble diameter NDF was also provided both in experiments and simulations. The so-called SQMOM, as a kind of QBMM, was used predict the bubble NDF at different locations and it was compared with experiments.

    Keywords: Unsteady, 3D simulation, NDF reconstruction, SQMOM, Bubble orientation angle

    Reference: Schäfer et al., "Experimental investigation of local bubble properties: Comparison to the sectional quadrature method of moments." AIChE Journal 65.10 (2019): e16694.

    bubbleFlow_Schafer.jpg

    6. Li et al. 2021

    Features: In the work of Li et al., three 3D transient bubble column was studied to verify the algorithm. One of test case was reported in Diaz et al. The other one consists of a similar partially aerated rectangle bubble column which was investigated experimentally by Becker et al. in 1994. The left one is an airlift bubble column investigated by Mandalahalli et al. Li et al. developed a new algorithm which is much faster than the traditional Eulerian-Eulerian method and used it to simulate three different bubbly flows as mentioned above. Only drag force needs to be included (the last airlift bubble column also needs the turbulent dispersion force). These test cases are suitable to validate new developed algorithms.

    Keywords: Unsteady, 3D simulation, Airlift bubble column, Particlly aerated

    Reference: Li et al. "QEEFoam: A Quasi-Eulerian-Eulerian model for polydisperse turbulent gas-liquid flows. Implementation in OpenFOAM, verification and validation." International Journal of Multiphase Flow 136 (2021): 103544.

    bubbleFlow_Li.jpg

    7. Besbes et al. 2015

    Features: In the work of Besbes et al., a needle sparger rectangular bubble column operated at low flow rates was investigated using PIV measurements and Eulerian-Lagrangian simulations. Time-averaged liquid velocity fields from PIV measurements for different flow rate were provided. Snapshots of PIV and Eulerian-Lagrangian simulation of oscillating bubble plume were also supplied. Due to the small flow rate and the usage of a needle sparger, the diameter of bubbles is very homogeneous. The oscillatory movement of bubble plume, as that observed in Diaz et al., was also formed for slightly large flow rate (Q = 0.2 l/min).

    Keywords: Needle sparger, Eulerian-Largrangian, PIV

    Reference: Besbes et al., "PIV measurements and Eulerian–Lagrangian simulations of the unsteady gas–liquid flow in a needle sparger rectangular bubble column." Chemical Engineering Science 126 (2015): 560-572.

    bubbleFlow_Besbes.jpg

    8. Darmana et al. 2007

    Features: In this work, a rectangle laboratory bubble column was used to study the bubble flow with reactions. A pseudo-2D geometry is chosen to enable visualization of the flow structures by CCD camera and PIV. Lagrangian simulations were also launched. Averaged velocities, bubble plume period, gas holdup and global mean Sauter diameter were also compared with experiments. The species's concentration and Ph value were also provided.

    Keywords: Reaction bubble column, Mass transfer, mean Sauter diameter

    Reference: Darmana et al. "Detailed modelling of hydrodynamics, mass transfer and chemical reactions in a bubble column using a discrete bubble model: Chemisorption of CO2 into NaOH solution, numerical and experimental study." Chemical Engineering Science 62.9 (2007): 2556-2575.

    bubbleFlow_Darmana.jpg

    9. Besbes et al. 2020

    Features: In this work, the authors employ PIV technique to study the liquid phase flow driven by a chain of air bubbles in a rectangular bubble column. The flow rate is very low that each bubble move upward separately by buoyancy force. Not only water, but also the glycerin solution with high viscosity was studied to understand the liquid flow structure. Bubble terminal velocity and shape were also provided.

    Keywords: PIV, Bubble driven flow, High viscosity

    Reference: Besbes et al., "Effect of bubble plume on liquid phase flow structures using PIV." Particulate Science and Technology 38.8 (2020): 963-972.

    bubbleFlow_Besbes2.jpg

    Test Case Diaz et al. 2004 Gemello et al. 2018 Yuan et al. 2014 Lucas et al. 2007 Schafer et al. 2019 Li et al. 2021 Besbes et al. 2015 Darmana et al. 2007 Besbes et al. 2020 Experiments - - - - - - - - - Global holdup - - - - - - - - - Local holdup - - - - - - - - - Liquid velocity - - - - - - - - - Wall effects - - - - - - - - - Turbulent kinetic energy - - - - - - - - - Turbulent dissipation rate - - - - - - - - - Global Sauter diameter - - - - - - - - - Local diameter distribution - - - - - - - - - Local Sauter diameter - - - - - - - - - Reactions - - - - - - - - - Heat transfer - - - - - - - - -
  • 关于显示物体质量的问题

    1 帖子
    404 浏览

    各位大佬好,想请教一下,我想显示一个密度、体积不断变化的物体的质量,请问大家有什么好办法吗?

  • interPhaseChangeFoam求解器中的一些疑问?

    13 帖子
    8k 浏览

    屏幕截图 2021-06-05 161820.png openfoam自带案例interPhaseChangeFoam求解器下的cavitatingBullet,该图为我跑完0.05s后的水相分布,和0s时没啥变化,请问我哪里错了吗?

  • 边界条件设置

    3 帖子
    891 浏览

    @李东岳 感谢李老师回复,我先试下

  • 关于移动硬盘!

    21 帖子
    5k 浏览

    @李东岳

    我用下面的命令解决了 ,具体为啥不清楚..

    sudo ntfsfix /dev/sdXY

    https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation

  • 振荡流动结果的收敛和周期问题

    9 帖子
    2k 浏览

    @李东岳 好的李老师,我明白了,特别感谢您!!

  • 关于边界条件的几个小问题

    3 帖子
    996 浏览

    @李东岳 谢谢老师的回复!

  • Particles size in MPPICFoam

    6 帖子
    2k 浏览

    @鲸落 其实也不是只显示一层。我想你跟我当时一样,感觉摄入粒子很多,其实由于体积太小,所占的相分数其实不大。那么最后就会只有一层。如果有很多粒子的话,最后会形成很多层,因为只要满足你预设的最大相分数,它就不会再允许粒子进入,那么就会在其上方的网格中开始堆积。

  • OpenFOAM中能量方程的疑问

    7 帖子
    2k 浏览

    @tens 学到了,感谢老师的指点!:chitang:

  • compressibleInterFoam pEqn.H

    2 帖子
    666 浏览
  • 请问如何把pbm耦合气液多相流算例中?

    14 帖子
    3k 浏览

    @李东岳请问如何把pbm耦合气液多相流算例中? 中说:

    博士论文方向是做搅拌釜内的气液两相流,由于版权问题只能用openfoam来做了,由于课题组之前在fluent有一定pbm基础,所以还是想用pbm来模拟,具体方向主要是反应器的设计的实验研究,把实验结果通过模拟对比一下,不是openfoam的攻坚:chouchou: 所以暂时还是追求着能用就行的原则来,后面可能对模拟精度要求高了,就要自己深入研究算法了:135:

  • 求解器编译问题!

    6 帖子
    1k 浏览

    @李东岳 好的,谢谢李老师

  • 6 帖子
    1k 浏览

    @zhouxu 如果是h的传输方程,就不能有calculated边界条件。你可以把你的温度边界赋值给h,类似;

    volScalarField h ( ( ). mesh, T.boundaryField().types() );
  • 请问高阶格式的矩阵还能用LDU格式存储吗?

    4 帖子
    1k 浏览

    @bestucan 太感谢了,非常有针对性的网址,谢谢!

  • 2 帖子
    883 浏览
  • 安装时出现权限不够与找不到命令

    2 帖子
    704 浏览

    权限不够是下载的源代码权限设置有问题。用chmod修改权限。

  • 1 帖子
    352 浏览

    各位大佬,如果我想在openfoam里自己新建个固体结构,由散点组成,上面的物理量要插值给附近的流体cell,但是并行时候,因为docompose了计算域,会可能出现一个散点周围的流体cell不在一个domain,那这种情况怎么处理呢?

  • LiftForce.C中的异或运算符"^"和curl怎么理解?

    4 帖子
    956 浏览

    @hotairballon1997
    kinematicParcel中先看move部分,

    初始化各个参数,计算lagrangian 步长。 更新参数,setCellValues,计算dispersion,然后calc方程 在calcVelocity中得到新parcel速度,新parcel速度calcVelocity部分中计算parcel受力得到新的parcel速度,返回到calc中,然后在calc中,根据 1-way 2-way 计算parcel是否对流场产生影响 然后返回到move中。。

    https://openfoam.top/sprayVelocity/

    所以Q1 在你不说你的模拟是1way 还是2way 是无法解释的
    Q2 在上面的链接一定程度上可以解释一些

    Explicit contribution, Su specified as a force Implicit coefficient, Sp specified as force/velocity
  • 12 帖子
    5k 浏览

    @baojd42 想请教下您,最后成功了吗?RapidCFD可以在GPU上完美运行吗...谢谢了

  • 湍动能和Reynolds shear stress如何求

    4 帖子
    2k 浏览

    @calf-z-dns 你解决了吗?

    我也在查 Reynolds Shear Stress, 和 Reynolds stress 有点分不太清楚.
    http://brennen.caltech.edu/fluidbook/basicfluiddynamics/turbulence/reynoldsstresses.pdf (http://brennen.caltech.edu/fluidbook 公式的索引)
    这篇上还有个 Reynolds normal stress ...

  • 阿里云ECS初体验

    19 帖子
    4k 浏览

    @samuel-tu 是的,超算还是划算些。昨天跟阿里云销售确认了下,他们的vCPU除以2是物理核心数,按他的说法是ECS所有服务器都是这样的。

  • bluecfd编译巨慢

    2 帖子
    769 浏览

    @samuel-tubluecfd编译巨慢 中说:

    没办法windows系统上word,ppt需要用的太多了,用同一个系统比较方便。。

    我也没解决办法。ubuntu开虚拟机开word、ppt比较卡。用libreoffice、wps一大堆的格式问题。因为我这面处理的都是小文件,不需要写基金本子,所以还是ubuntu系统了

  • 在openfoam中如何查看yplus?

    5 帖子
    2k 浏览

    @李东岳 谢谢老师的指导,用interFoam -postProcess -func yPlus成功了。

  • compressibleInterFoam alphaEqn.H

    5 帖子
    1k 浏览

    @李东岳 谢谢老师~希望以后有机会能读到老师对这部分的分析

  • boundaryMesh().mesh().objectRegistry::template?

    3 帖子
    888 浏览

    @blookcfd 感谢您的回复,
    请问这种语法比较常见吗?
    这个objectRegistry::template是指代的 Type类型吗?

  • OpenFOAM中重叠网格问题Suggar++?

    3 帖子
    815 浏览

    Any information would be extremely helpful!

  • 11 帖子
    3k 浏览

    @李东岳 东岳老师,从下面几个式子看,固相黏度应该都是半经验表达式,所以0.5可能是个实验获得的参数:
    d7cd3790-cd15-45c3-bad9-6dcba069f6f6-image.png (JJ)
    bcc611d5-bc11-49c6-beb6-73d08b8496ad-image.png (Schaeffer)
    a5a9446d-2284-45ea-b94d-84d8125963b2-image.png (Princeton)

    此外,princeton中摩擦应力计算如下:
    b334a3b1-6081-4a12-bb32-5f3c04cca839-image.png
    3e038a48-fde7-41ec-9125-df2a1283aecb-image.png

    对通量的处理:

    const volVectorField& U = phase.U(); surfaceScalarField phiU = fvc::interpolate(U) & U.mesh().Sf(); volScalarField Ud = fvc::div(phiU);

    对压力计算:

    const volScalarField pc = Fr_*pow(max(alpha - alphaMinFriction, scalar(0)), eta_) /pow(max(alphaMax - alpha, alphaDeltaMin_), p_); ...... //对体 forAll(n,celli) { if (Ud[celli] < 0.0) { n[celli] = 1.03; } else { n[celli] = 0.5*sqrt(3.0)*sin(phi_.value()); } m[celli] = n[celli]-1; //..No negative base. 对不对? pt[celli] = 1.0-Ud[celli]/( n[celli]*sqrt(2.0)*sin(phi_.value())* (sqrt(Us[celli]) + small) ); if (!(pt[celli] > 0.0)) { pt[celli] = small; } //..No negative exponent. if (m[celli] > 0) { //n-1 power pt[celli] = pc[celli]*pow(pt[celli], m[celli]); } else { pt[celli] = pc[celli]*pow(1/pt[celli], mag(m[celli])); } } ...... //对面 forAll(currPatch,facei) { if(UdBf[patchi][facei] < 0.0) { nBf[patchi][facei] = 1.03; } else { nBf[patchi][facei] = 0.5*sqrt(3.0)*sin(phi_.value()); } mBf[patchi][facei] = nBf[patchi][facei]-1; ptBf[patchi][facei] = 1.0-UdBf[patchi][facei]/( nBf[patchi][facei]*sqrt(2.0)*sin(phi_.value())* (sqrt(UsBf[patchi][facei]) + small) ); if (!(ptBf[patchi][facei] > 0.0)) { ptBf[patchi][facei] = small; } //..No negative exponent. if (mBf[patchi][facei] > 0) { ptBf[patchi][facei] = pcBf[patchi][facei]*pow(ptBf[patchi][facei], mBf[patchi][facei]); } else { ptBf[patchi][facei] = pcBf[patchi][facei]*pow(1/ptBf[patchi][facei], mag(mBf[patchi][facei])); } } } // Correct BCs pt.correctBoundaryConditions(); Us.correctBoundaryConditions(); Ud.correctBoundaryConditions();

    黏度计算:

    //对体 forAll(Ud,celli) { if (Ud[celli] < 0) { n[celli] = 1.03; } else { n[celli] = 0.5*sqrt(3.0)*sin(phi_.value()); } m[celli] = n[celli]-1; if (!(pc[celli] > 0)) { pc[celli] = small; } //..pf is a const. //calculation of nu if (m[celli] > 0) { nu[celli] = sqrt(2.0)*pf[celli]*sin(phi_.value())* ( n[celli]-(n[celli]-1.0)*pow(pf[celli]/(pc[celli]), 1/m[celli]) ) /(sqrt(Us[celli]) + small); } else { nu[celli] = sqrt(2.0)*pf[celli]*sin(phi_.value())* ( n[celli]-(n[celli]-1.0)*pow(pc[celli]/(pf[celli]+small), mag(1/m[celli])) ) /(sqrt(Us[celli]) + small); } } ...... //对面 forAll(patches, patchi) { if (!patches[patchi].coupled()) { const fvPatch& currPatch = patches[patchi]; forAll(currPatch,facei) { if(UdBf[patchi][facei] < 0.0) { nBf[patchi][facei] = 1.03; } else { nBf[patchi][facei] = 0.5*sqrt(3.0)*sin(phi_.value()); } mBf[patchi][facei] = nBf[patchi][facei]-1; if (!(pcBf[patchi][facei] > 0.0)) { pcBf[patchi][facei] = small; } if (mBf[patchi][facei] > 0) { nuBf[patchi][facei] = sqrt(2.0)*pf.boundaryField()[patchi][facei]*sin(phi_.value())* ( nBf[patchi][facei]-(nBf[patchi][facei]-1.0)*pow(pfBf[patchi][facei]/pcBf[patchi][facei], 1/mBf[patchi][facei]) ) /(sqrt(UsBf[patchi][facei]) + small); } else { nuBf[patchi][facei] = sqrt(2.0)*pf.boundaryField()[patchi][facei]*sin(phi_.value())* ( nBf[patchi][facei]-(nBf[patchi][facei]-1.0)*pow(pcBf[patchi][facei]/(pfBf[patchi][facei]+small), mag(1/mBf[patchi][facei])) ) /(sqrt(UsBf[patchi][facei]) + small); } } } } nu.correctBoundaryConditions(); Us.correctBoundaryConditions(); pc.correctBoundaryConditions(); Ud.correctBoundaryConditions();

    结果在相分数0.5左右(摩擦黏度产生处)报错:
    149e14c3-5f93-4325-980c-2e15732c8f04-image.png
    36f75fde-3108-44a1-88ee-ba7eee7d1aa7-image.png

    相分数出现突变,而且无法增大(继续堆积),增大就会报错,不知道是哪个地方的处理有问题,还请东岳老师和其他前辈能解答一二!

  • 1 帖子
    410 浏览

    如题,求帮助,:chouchou: 感谢各位的指导!

  • 请问如何根据stl文件创建边界?(SHM除外)

    3 帖子
    907 浏览

    @blookcfd
    你好,感谢回复。

    我发现我的问题可能是由于snappyHexMesh选定的区域与重叠区域重合导致的,现在已经解决了。

    但是也有没解决的部分,我自己在原来overset网格的基础上加了一点东西,自己编译了另一个lib,这个lib与SHM还是有点冲突,运行的时候会报错,但实际上SHM执行了,网格也能用,所以我下一步好好看看我自己编的lib哪里有问题。

    当用toposet + createPatch时,提示找不到stl文件,但是我的stl文件就在对应文件夹下放着,所以这个问题我还没找到原因。

    我还在找寻替代方法,如果您知道其他方法能把stl放入计算域中,请不吝赐教,谢谢。

  • 1 帖子
    617 浏览

    请教各位大佬

    问题:OpenFOAM中重叠网格,六自由度运动。关于物体属性设置请教

    算例:我算六自由度运动,想定义模型上面1和下面2,两部分密度不同。(就是材料不同)

    目前问题:我试过分开给属性,就变成2个模型了啊,但是我想让模型是一个整体啊。这个咋定义呢?感谢

    23423432.png

  • blueCFD并行计算

    8 帖子
    2k 浏览

    @samuel-tu 用Ubuntu系统,四个物理核心,8个超线程。开四核并行计算的时候,cpu利用率是50%,开8核并行的时候,CPU利用率是96%。但是八核比四核还慢了一点点。。。搞不懂了。。

  • 1 帖子
    493 浏览

    本算例采用的是气液两相流,想要给空气相加一个速度边界条件,而水相不加这个边界条件,下面给出的这个边界条件是空气相的,是依时的边界条件,按照网站上相似的做法编了以下,但是始终出现如下错误。请各位老师同学有时间帮忙解答一下,非常感谢!
    下面是边界条件:

    afInlet { type codedFixedValue; value $internalField; redirectType ramp; name sinewave; code #{ #include <math.h> scalar t = this->db().time().value(); fvPatchField<vector> u ( patch().lookupPatchField<volVectorField,vector>("U.air") ); u[t] = vector(0,0,2*3.1416*10/1000/0.77*1*sin(2*3.1416*1*t)); (*this) == u; #};

    下面是报错的内容:

    --> FOAM FATAL ERROR: request for volVectorField U from objectRegistry region0 failed available objects of type volVectorField are 8 ( HbyA.air U.air U.water U.air_0 KdUByA.air U.water_0 KdUByA.water HbyA.water ) From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>] in file /home/dyfluid/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #3 Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:? #4 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #5 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" Aborted (core dumped)
  • foam-extend的fsiFoam并行效率问题

    7 帖子
    2k 浏览

    @number44foam-extend的fsiFoam并行效率问题 中说:

    foam-extend的icoFsiFoam

    您好,请问下,下面两者有什么区别呢?
    foam-extend中自带的icoFsiFoam

    单独的fsiFoam