OpenFOAM

4.5k Topics 26.2k Posts
  • 2 Posts
    1k Views

    还没有专门看过这方面的研究

  • 3 Posts
    1k Views

    康师傅,你也在

  • 7 Posts
    4k Views

    @东岳 “......在计算域内部添加一个吹气孔进行吹气”
    现在是要实现类似的吹气过程,将网格作为温度、质量(化学组分)源项,且网格赋予固定的速度以及压力,求解结果中反查这个网格的速度值和设定值是有偏差的(怀疑和组分浓度扩散相关,扩散系数存在导致网格有一定的附加“扩散速度”),结果的压力值误差更大(大于100%,猜测openfoam中应该用特殊的方式去限定这个压力约束)。

    ......BTW真正关心的问题来了,在fireFoam application源程序中没有找到质量运移的扩散系数D,也没找到施密特数Sc的设定位置(施密特数(Schmidt number, Sc)是一个无量纲的标量,定义为动黏滞系数和扩散系数的比值,用来描述同时有动量扩散及质量扩散的流体。施密特数的命名是为了纪念德国工程师 Ernst Heinrich Wilhelm Schmidt (1892-1975)。)

  • snappyhexmesh可玩性高吗?

    6 Posts
    4k Views

    而且对于稍微复杂一点的结构,边界层经常出错。反正人家重心也不在这上面

  • interPhaseChangeFoam相方程

    7 Posts
    4k Views

    这个问题我之前也琢磨过,

    加vDotcAlpha是因为后面这个项原型应该为(1-alpha)*vDotcAlpha

    其实在湍流模型的k方程里面也有类似的处理,我个人偏向于以下这个结论

    尽量对各项做隐性处理,这样可以保证方程的稳定性,

    在压力方程里面,mass transfer rate 这一项也是做隐性处理的哦

  • 5 Posts
    3k Views

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

  • 超音速出口的边界条件

    3 Posts
    2k Views

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

  • reactingTwoPhaseEulerFoam

    1 Posts
    883 Views

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

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

    4 Posts
    3k Views

    Thank you. That is a great help.

  • 新版本的alphaSuSp.H

    6 Posts
    3k Views

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

  • 3 Posts
    3k Views

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

  • OpenFOAM中的forAll什么意思

    5 Posts
    6k Views

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

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

    3 Posts
    2k Views

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

  • 编译错误,求指正

    3 Posts
    2k Views

    @东岳 Thanks!

  • 3 Posts
    2k Views

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

  • 有关linux磁盘挂载的问题

    3 Posts
    2k Views

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

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

    3 Posts
    2k Views

    @izumi 谢谢:chitang:

  • openFOAM中边界处数值格式

    8 Posts
    4k Views

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

  • 5 Posts
    5k Views

    @东岳
    哇,前辈好~~~

  • 10 Posts
    6k Views

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

  • 大密度比两相流发散

    5 Posts
    2k Views

    @东岳 我对这个期刊也不熟。只是在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 Posts
    2k Views

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

    volScalarField test ( IOobject ( ... ) mesh //如果不写边界条件类型,除了特殊的边界条件,都为calculated,如果计算,就有值。一般情况下,边界条件很重要,要谨慎 scalar(0) );
  • 7 Posts
    5k Views
    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 Posts
    3k Views

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

  • 学术求助

    3 Posts
    2k Views

    谢谢,李哥指导

  • turbulence->divDevReff(U)

    5 Posts
    3k Views

    @izumi 谢谢啦,感激不尽

  • 2 Posts
    1k Views

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

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

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

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

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

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

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

  • pimpleDyMFoam模拟物体运动

    2 Posts
    2k Views

    可以使用cyclicAMI边界条件

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

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

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

    0_1528241930740_无标题.png

  • 速度ODE慎用analytical时间格式

    2 Posts
    2k Views

    下面是在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 Posts
    2k Views

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

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

    3 Posts
    2k Views

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

  • 8 Posts
    7k Views

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

  • 指定温度边界条件

    1 Posts
    1k Views

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

  • 两个求通量操作的区别

    4 Posts
    2k Views

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

  • fixedblended有人用过吗

    2 Posts
    1k Views

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

  • 各种source function的区别

    2 Posts
    2k Views

    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 Posts
    2k Views

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

  • 3 Posts
    2k Views

    @东岳 多谢东岳大神回复。之前可能我没表述清楚我的问题:我想同时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 Posts
    2k Views

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

  • Openfoam重叠网格插值

    3 Posts
    2k Views

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

  • kOmegaSST的边界条件设定

    1 Posts
    1k Views

    湍流模型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 Posts
    3k Views

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

  • 4 Posts
    2k Views

    Have no idea :chigua:

  • 2 Posts
    1k Views

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

  • 5 Posts
    3k Views

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

  • geometricField初始化

    2 Posts
    1k Views

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

  • tensorThird

    3 Posts
    2k Views

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

  • mapFields的原理是什么呢?

    9 Posts
    4k Views

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

  • 和震荡做斗争

    5 Posts
    3k Views

    0_1526709550526_d.png

    震荡吧..

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

    5 Posts
    3k Views

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