OpenFOAM

4.5k 主题 26.4k 帖子
  • OpenFOAM辐射算例中辐射属性发射率问题

    5 帖子
    3k 浏览

    这些辐射系数都是和 wavenumber 相关, 在RT E中需要这些带量纲参数.
    Thanks

  • 超音速出口的边界条件

    3 帖子
    2k 浏览

    @kingkong 您好,请问openfoam有自带的根据马赫数是否大于1选择的这种边界条件吗?

  • reactingTwoPhaseEulerFoam

    1 帖子
    901 浏览

    有人能讲解下interface composition的saturated和henry 这两个model吗。。到底怎么设置thermophysical 的文件?

  • 请问大家用过gdb调试openfoam吗?

    4 帖子
    3k 浏览

    Thank you. That is a great help.

  • 新版本的alphaSuSp.H

    6 帖子
    3k 浏览

    看了一下,新版本的VOF算法被提出来了,更加的紧凑,尽可能的减少代码复用。在这种情况下,不同的算法具有不同的显性源项和隐性源项。在interFoam中,源项均为0,因此均初始化为zeroField。对于可压缩VOF,源项则初始化为其他,可参考compressibleInterFoam中的alphaSuSp.H。

  • paraview画矢量图,如何将某速度分量设为0?

    3 帖子
    3k 浏览

    @东岳
    谢谢!用Surface Vectors filter就直接画出来了

  • OpenFOAM中的forAll什么意思

    5 帖子
    6k 浏览

    @mr-h http://www.cfd-china.com/topic/1199 看这个,通过forAll操作边界

  • 平台自由衰减试验设置刚度等

    3 帖子
    2k 浏览

    @向晚正愁余 感谢您的宝贵意见

  • 编译错误,求指正

    3 帖子
    2k 浏览

    @东岳 Thanks!

  • 有遇见过simpleFoam达不到稳态的情况吗?

    3 帖子
    2k 浏览

    @东岳 好的谢谢东岳,我先用一阶迎风格式试试

  • 有关linux磁盘挂载的问题

    3 帖子
    2k 浏览

    @bestucan 嗯,你说的没错,我是用ssh远程连接的,我感觉我这个问题可能出现在那天学校的网络不太好的问题,我重新挂载,在机房本机操作没有问题,然后网络变好之后,远程用到现在也没问题。:mihu:

  • 有关OpenFOAM中k-epsilon方程的问题

    3 帖子
    2k 浏览

    @izumi 谢谢:chitang:

  • openFOAM中边界处数值格式

    8 帖子
    4k 浏览

    @youv 好的,我会去看看书上的内容,谢谢您的指点!

  • OpenFOAM无法调用ParaView的解决办法

    5 帖子
    5k 浏览

    @东岳
    哇,前辈好~~~

  • DPMFoam 设置nParticle 以后发散的问题

    10 帖子
    7k 浏览

    这个我验证过。这个diameter是单个particle的粒径。。不是parcel的

  • 大密度比两相流发散

    5 帖子
    2k 浏览

    @东岳 我对这个期刊也不熟。只是在CFDOnline上看到了这个solver。拿来用一下,结果老是发散。

    Time = 0.0001 MULES: Solving for alpha1 Liquid phase volume fraction = 0.999782 Min(alpha1) = 0 Max(alpha1) = 1 GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 9.17326e-07, No Iterations 32 GAMG: Solving for p_rgh, Initial residual = 4.56128e-07, Final residual = 4.56128e-07, No Iterations 0 time step continuity errors : sum local = 1.15564e-10, global = 4.67937e-12, cumulative = 4.67937e-12 GAMG: Solving for p_rgh, Initial residual = 0.000258322, Final residual = 7.79975e-07, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 7.79882e-07, Final residual = 7.79882e-07, No Iterations 0 time step continuity errors : sum local = 1.96234e-10, global = 4.41825e-12, cumulative = 9.09762e-12 GAMG: Solving for p_rgh, Initial residual = 3.261e-06, Final residual = 6.33275e-07, No Iterations 1 GAMGPCG: Solving for p_rgh, Initial residual = 6.33275e-07, Final residual = 9.32048e-09, No Iterations 5 time step continuity errors : sum local = 3.247e-11, global = -1.80463e-12, cumulative = 7.29299e-12 **** ****Pressure range: 313.455 Pa ****Max velocity: 0.168515 m/s ****Phase change energy: 0 W ****Volume change: 0 m^3/s DILUPBiCG: Solving for H, Initial residual = 0.00100367, Final residual = 7.26908e-09, No Iterations 9 DILUPBiCG: Solving for H, Initial residual = 0.000932397, Final residual = 7.34408e-09, No Iterations 9 DILUPBiCG: Solving for H, Initial residual = 0.000911756, Final residual = 7.5305e-09, No Iterations 9 ExecutionTime = 15.77 s ClockTime = 17 s Courant Number mean: 2.65292e-05 max: 0.283422 Interface Courant Number mean: 0 max: 0 Fourier number mean: 0.00271598 max: 1.81326 Time = 0.0002 MULES: Solving for alpha1 Liquid phase volume fraction = 0.999782 Min(alpha1) = -1.24343e-09 Max(alpha1) = 1 GAMG: Solving for p_rgh, Initial residual = 0.158707, Final residual = 9.59991e-07, No Iterations 33 GAMG: Solving for p_rgh, Initial residual = 9.90688e-07, Final residual = 9.90688e-07, No Iterations 0 time step continuity errors : sum local = 2.63908e-08, global = -1.91596e-08, cumulative = -1.91524e-08 GAMG: Solving for p_rgh, Initial residual = 0.00214601, Final residual = 9.69321e-07, No Iterations 12 GAMG: Solving for p_rgh, Initial residual = 9.70692e-07, Final residual = 9.70692e-07, No Iterations 0 time step continuity errors : sum local = 2.63875e-08, global = -1.9196e-08, cumulative = -3.83484e-08 GAMG: Solving for p_rgh, Initial residual = 0.000147321, Final residual = 6.99269e-07, No Iterations 4 GAMGPCG: Solving for p_rgh, Initial residual = 6.99262e-07, Final residual = 4.28891e-09, No Iterations 6 time step continuity errors : sum local = 2.62568e-08, global = -1.91768e-08, cumulative = -5.75252e-08 **** ****Pressure range: 314.046 Pa ****Max velocity: 0.158209 m/s ****Phase change energy: -0.0533324 W ****Volume change: -4.60434e-10 m^3/s DILUPBiCG: Solving for H, Initial residual = 0.0112104, Final residual = 7.17193e-09, No Iterations 11 DILUPBiCG: Solving for H, Initial residual = 0.0204525, Final residual = 6.41804e-09, No Iterations 11 DILUPBiCG: Solving for H, Initial residual = 0.0172126, Final residual = 4.83197e-09, No Iterations 11 ExecutionTime = 30.71 s ClockTime = 32 s Courant Number mean: 3.50588e-05 max: 0.283714 Interface Courant Number mean: 1.07527e-05 max: 0.225319 Fourier number mean: 0.00259948 max: 1.81296 Time = 0.0003 MULES: Solving for alpha1 Liquid phase volume fraction = 0.999788 Min(alpha1) = -4.86607e-10 Max(alpha1) = 1 GAMG: Solving for p_rgh, Initial residual = 0.248811, Final residual = 8.889e-07, No Iterations 56 GAMG: Solving for p_rgh, Initial residual = 4.8953e-08, Final residual = 4.8953e-08, No Iterations 0 time step continuity errors : sum local = 7.55439e-06, global = -5.52413e-06, cumulative = -5.58166e-06 GAMG: Solving for p_rgh, Initial residual = 0.000592748, Final residual = 8.74594e-07, No Iterations 21 GAMG: Solving for p_rgh, Initial residual = 8.86839e-07, Final residual = 8.86839e-07, No Iterations 0 time step continuity errors : sum local = 7.55687e-06, global = -5.52428e-06, cumulative = -1.11059e-05 GAMG: Solving for p_rgh, Initial residual = 2.6548e-05, Final residual = 6.06255e-07, No Iterations 2 GAMGPCG: Solving for p_rgh, Initial residual = 6.06256e-07, Final residual = 9.35864e-09, No Iterations 5 time step continuity errors : sum local = 7.55429e-06, global = -5.52414e-06, cumulative = -1.66301e-05 **** ****Pressure range: 488.866 Pa ****Max velocity: 0.275259 m/s ****Phase change energy: -15.3631 W ****Volume change: -1.32635e-07 m^3/s DILUPBiCG: Solving for H, Initial residual = 0.048899, Final residual = 9.83152e-09, No Iterations 11 DILUPBiCG: Solving for H, Initial residual = 0.0988781, Final residual = 9.59266e-09, No Iterations 11 DILUPBiCG: Solving for H, Initial residual = 0.0302533, Final residual = 4.60914e-09, No Iterations 11 ExecutionTime = 49.86 s ClockTime = 51 s Courant Number mean: 0.00111238 max: 0.451657 Interface Courant Number mean: 2.23494e-05 max: 0.451657 Fourier number mean: 0.00249786 max: 1.81736 Time = 0.0004 MULES: Solving for alpha1 Liquid phase volume fraction = 0.999796 Min(alpha1) = -0.0745499 Max(alpha1) = 1.0008 GAMG: Solving for p_rgh, Initial residual = 0.0207549, Final residual = 9.63291e-07, No Iterations 41 GAMG: Solving for p_rgh, Initial residual = 3.93396e-06, Final residual = 8.35811e-07, No Iterations 8 time step continuity errors : sum local = 9.83598e-06, global = -6.79663e-06, cumulative = -2.34267e-05 GAMG: Solving for p_rgh, Initial residual = 0.00157222, Final residual = 8.93124e-07, No Iterations 24 GAMG: Solving for p_rgh, Initial residual = 9.05354e-07, Final residual = 9.05354e-07, No Iterations 0 time step continuity errors : sum local = 9.83602e-06, global = -6.79665e-06, cumulative = -3.02234e-05 GAMG: Solving for p_rgh, Initial residual = 0.000103908, Final residual = 5.83835e-07, No Iterations 3 GAMGPCG: Solving for p_rgh, Initial residual = 5.83854e-07, Final residual = 7.0116e-09, No Iterations 5 time step continuity errors : sum local = 9.83541e-06, global = -6.79658e-06, cumulative = -3.70199e-05 **** ****Pressure range: 350.415 Pa ****Max velocity: 0.218803 m/s ****Phase change energy: -18.9019 W ****Volume change: -1.63186e-07 m^3/s DILUPBiCG: Solving for H, Initial residual = 0.1639, Final residual = 9.47499e-09, No Iterations 12 DILUPBiCG: Solving for H, Initial residual = 0.272875, Final residual = 5.27952e-09, No Iterations 12 DILUPBiCG: Solving for H, Initial residual = 0.214969, Final residual = 6.45167e-09, No Iterations 12 ExecutionTime = 68.7 s ClockTime = 70 s Courant Number mean: 0.00134918 max: 0.480577 Interface Courant Number mean: 3.19172e-05 max: 0.404985 Fourier number mean: 0.00247607 max: 1.8178 Time = 0.0005 MULES: Solving for alpha1 Liquid phase volume fraction = 0.999804 Min(alpha1) = -0.251971 Max(alpha1) = 1.04115 [4] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [4] #1 Foam::sigFpe::sigHandler(int) at ??:? [4] #2 in "/lib64/libc.so.6" [4] #3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? [4] #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? [4] #5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? [4] #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? [4] #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? [4] #8 [4] at ??:? [4] #9 __libc_start_main in "/lib64/libc.so.6" [4] #10 [4] at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116 APPLICATION TERMINATED WITH THE EXIT STRING: Floating point exception (signal 8)
  • 两个volScalarField相加的结果?

    3 帖子
    2k 浏览

    在初始化场的时候,比如这种

    volScalarField test ( IOobject ( ... ) mesh //如果不写边界条件类型,除了特殊的边界条件,都为calculated,如果计算,就有值。一般情况下,边界条件很重要,要谨慎 scalar(0) );
  • potentialFOAM代码中的几个问题求解

    7 帖子
    5k 浏览
    if (potentialFlow.finalNonOrthogonalIter()) { phi -= PhiEqn.flux(); }

    这段我觉得倒不是因为phi被初始化了,好像上面求解的Phi方程就不是 http://dyfluid.com/potentialFoam.html 里头的方程(6),而应该是
    ▽(▽P)=▽(U-▽P)
    也就是代码中的phi=(U-▽P),这样子的话也能解释速度边界条件是怎么添加到Phi 方程中的了。但有一点不很明白,就是代码中好像表达的并不完全是phi=(U-▽P)的意思,所以还是有些糊涂。

    另,

    MRF.makeAbsolute(phi);//此处的makeAbsolute按字面意思是取绝对值,那这个对下文中重构速度场不会产生影响么?

    这句话应该不是取绝对值,可能用了多重坐标系,之前有个变换,现在变回来了,但不是很确定是不是这个意思
    @东岳 @张某人
    上面是我的理解,如果有不对的地方还请直接指出来,一起讨论讨论

  • 对流方程求解

    7 帖子
    3k 浏览

    标量够不成自己的隐性方程吧?那就在你的格式里面laplacian里面设定corrected。

  • 学术求助

    3 帖子
    2k 浏览

    谢谢,李哥指导

  • turbulence->divDevReff(U)

    5 帖子
    3k 浏览

    @izumi 谢谢啦,感激不尽

  • 双流体和多流体中各相的直径设定

    2 帖子
    1k 浏览

    双流体和多流体求解器中需要设置的各相的直径对模拟结果有什么影响

    直径直接关系到各种力的计算。是计算耦合力的重要因素。并且对传质至关重要。

    需要以什么样的规则设置?

    直径不能任意给定,需要参考实验值严格给出。

    直径大小的设定好像跟网格尺寸有关,

    http://www.sciencedirect.com/science/article/pii/S1674200117300524

    看这个文章,讨论了直径的限制。目前拉格朗日那面限制的更为严格。但不能反过来说直径的大小设定和网格有关,而是网格的生成应该取决于直径。

  • pimpleDyMFoam模拟物体运动

    2 帖子
    2k 浏览

    可以使用cyclicAMI边界条件

    首先你需要做两套网格,可以要么用第三方网格软件来做,要么用openfoam自带的topoSet之类的来做,两个网格最重要的是,上图中的交界面要有边界。可以是wall,也可以是patch,反正后来要改。

    导入到OpenFOAM之后,要把这个交界面设置为cyclicAMI,这个可以参考pimpleDyMFoam下面的propeller算例的设置过程

    滑移网格是滑移和插值的过程。就不存在网格负体积了。你的运动发散是因为变形过大产生了负体积。

    0_1528241930740_无标题.png

  • 速度ODE慎用analytical时间格式

    2 帖子
    2k 浏览

    下面是在Ansys Fluent理论指南中遇到的部分描述:

    The analytic scheme is very efficient. It can become inaccurate for large steps and in situations where the particles are not in hydrodynamic equilibrium with the continuous flow. The numerical schemes implicit and trapezoidal, in combination with Automated Tracking Scheme Selection, consider most of the changes in the forces acting on the particles and are chosen as default schemes. The runge-kutta scheme is recommended of nondrag force changes along a particle integration step.

    还需要进一步研究。有人见过相关文献么

  • volSymmTensorField分量

    4 帖子
    2k 浏览

    @肖恩曼
    那可能就需要用循环一个个赋值了

  • 三维风力机转矩系数Cm值较大

    3 帖子
    2k 浏览

    请问您用的是哪个求解器对应的算例呢?风机的转速是随入口风速变化吗?

  • 8 帖子
    7k 浏览

    @linhan-ge 嗯嗯好的,谢谢您的回复!

  • 指定温度边界条件

    1 帖子
    1k 浏览

    of里面怎么设定一个壁面的温度沿着壁面方向线性变化啊

  • 两个求通量操作的区别

    4 帖子
    2k 浏览

    @东岳 @dzw05 感谢两位,明白了,那基本一样。

  • fixedblended有人用过吗

    2 帖子
    1k 浏览

    自己回答吧,
    这个跟coblended还不一样,coblended的blendingfactor 得另外定义一个volScalarField。
    但是fixedblended就加个系数就行了。

  • 各种source function的区别

    2 帖子
    2k 浏览

    fvm返回的都是矩阵,矩阵又分为矩阵系数和矩阵源项(右边那一行)。fvm::Su返回矩阵的源项,fvm::Sp返回矩阵系数。fvc返回的都是场,比如标量场。

    你的问题:fvc::Su(T, k)返回T,fvm::Su返回矩阵源项。fvm::Sp返回矩阵系数, fvc::Sp(T, k)返回Tk。fvc::Su(T, k)=T。

  • openfoam developer

    4 帖子
    2k 浏览

    是的。VIM emacs ide等都需要一段时间学习。用自己习惯的就好。虽然我用VIM,但在OKS上我都用gedit,要不然别人不知道你在干什么,哈哈

  • 是否可以同时定义边界alpha和接触角?

    3 帖子
    2k 浏览

    @东岳 多谢东岳大神回复。之前可能我没表述清楚我的问题:我想同时fix液滴与固体表面的接触线和接触角,即壁面处的volume fraction和theta都始终保持t=0时的值,并不随时间而改变。相当于fixed value和constantAlphaContactAngle两个边界条件的结合。如果边界条件设置为constantAlphaContactAngle(zeroGradient也相当于对应theta0=90的constantAlphaContactAngle边界), 在迭代的过程中会计算当前的curvature, 并通过与设置的theta0比较来更新壁面处的受力情况,从而重新计算边界处的volume fraction, 以使计算的theta趋近于所定义的theta0(如后面摘自interfaceProperties中的代码所示),这并不能保证接触线(即volume fraction)的固定。
    我的理解是这样的,不知道对不对:接触角theta与壁面处volume fraction的梯度是相对应的。能否让壁面处的第一层和第二层网格中的volume fraction值都固定,即volume fraction方程在该区域不进行求解而是始终采用t=0时刻的初始值,这样就能实现我前面所说的目的了。不知在openfoam中能否实现。
    期待您答复,谢谢!

    forAll(boundary, patchi) { if (isA<alphaContactAngleFvPatchScalarField>(abf[patchi])) { alphaContactAngleFvPatchScalarField& acap = const_cast<alphaContactAngleFvPatchScalarField&> ( refCast<const alphaContactAngleFvPatchScalarField> ( abf[patchi] ) ); fvsPatchVectorField& nHatp = nHatb[patchi]; const scalarField theta ( convertToRad*acap.theta(U_.boundaryField()[patchi], nHatp) ); const vectorField nf ( boundary[patchi].nf() ); // Reset nHatp to correspond to the contact angle const scalarField a12(nHatp & nf); const scalarField b1(cos(theta)); scalarField b2(nHatp.size()); forAll(b2, facei) { b2[facei] = cos(acos(a12[facei]) - theta[facei]); } const scalarField det(1.0 - a12*a12); scalarField a((b1 - a12*b2)/det); scalarField b((b2 - a12*b1)/det); nHatp = a*nf + b*nHatp; nHatp /= (mag(nHatp) + deltaN_.value()); acap.gradient() = (nf & nHatp)*mag(gradAlphaf[patchi]); acap.evaluate(); } }
  • 求助,执行blockMesh出错

    5 帖子
    3k 浏览

    @东岳 嗯,的确是很麻烦,谢谢李老师,后期准备试试。

  • Openfoam重叠网格插值

    3 帖子
    2k 浏览

    同问,有类似问题 http://cfd-china.com/topic/1575

  • kOmegaSST的边界条件设定

    1 帖子
    1k 浏览

    湍流模型kOmegaSST是低雷诺数模型?在近壁区采用k-omega模型,在湍流区采用k-epsilon模型。
    那在计算的时候应该采用什么样的边界条件?
    我的case是这样的,网格较密,yplus在1附近,雷诺数为7000,存在两个壁面(wall)
    我参考的是researchgate中学者的设定方法,具体方法见链接(https://www.researchgate.net/post/Should_the_RANS_model_kOmegaSST_be_fully_resolved_at_low_Re-number_Is_it_possible_to_use_it_with_a_wall_function)
    方法有一定合理性,但是对于我的算例可能存在一定的问题,不知大家在应用SST模型时,有没有什么经验,如何设定边界条件?

  • 关于提取一个面的温度场

    7 帖子
    3k 浏览

    @东岳 谢谢李老师,依照您的方法我已成功编译,但是log文件内输出的是所有边界的数据(例如icofoam-cavity这个算例输出的是靠近fixedwall和movingwall那一层的网格的速度),有没有方法对只输出靠近fixedwall那一层网格的速度。

  • MPPIC如何用粒子的体积分数对粒子着色?

    4 帖子
    2k 浏览

    Have no idea :chigua:

  • 并行计算突然报错,串行也出了问题

    2 帖子
    1k 浏览

    问题解决了么?是不是已经解决了?..

  • paraview做的一个我比较满意的后处理

    5 帖子
    3k 浏览

    @ge-zhang
    正常的壁面,下个月我会发布算例和代码。
    你的头像很有意思啊。

  • geometricField初始化

    2 帖子
    1k 浏览

    @肖恩曼 有IOobject也可以选择不写出来,但是初始化时必须用这个IOobject。

  • tensorThird

    3 帖子
    2k 浏览

    @东岳 我也没有找到 很奇怪 应该有三阶张量的定义啊

  • mapFields的原理是什么呢?

    9 帖子
    5k 浏览

    @benqing :chouchou: 多谢你啦~我去看看

  • 和震荡做斗争

    5 帖子
    3k 浏览

    0_1526709550526_d.png

    震荡吧..

  • 动态铺层在边界附近解的振荡

    5 帖子
    3k 浏览

    不太方便调试了。 你的网格纵向分辨率、宽高比如何。

  • wmake编译没有反应?

    2 帖子
    1k 浏览

    抱歉,找到原因了,是我忘记wclean了

  • 请问怎么用“速度-位置”数据求雷诺剪切力

    1 帖子
    1k 浏览

    RT,我在做管流的模拟,现在想在一个横截面上做出雷诺剪切力(u'v' VS r/D)的曲线图象。现在用openfoam的sample功能提取了大量的速度-位置数据(100个时间步长, 每个时间步长在该横截面上有360个径向直线,在一共36000组,每组直线取了200个点的速度(u,v,w)的数据,所以现在在MATLAB上得到了一个200×36000的矩阵。现在想根据这个矩阵得到雷诺剪切力的图像,请问怎么操作呀?

  • 做wedge网格做了一个下午

    2 帖子
    1k 浏览

    这个是我画了一下午的wedge网格,先给所需,在这个基础上改吧........

  • 关于开发buoyantPimpleDyMFoam

    3 帖子
    2k 浏览

    @东岳 谢谢大神回答!

  • Ubuntu 18.04 LTS有人尝鲜么

    1 帖子
    955 浏览