Skip to content

OpenFOAM

OpenFOAM交流区

5.3k 主题 31.5k 帖子
  • pimple算法的流程图

    2020年5月7日 08:32
    18 帖子
    13k 浏览

    @qingdong_wang 还有这个pimple算法这,按我理解不应该是速度预测,压力修正,速度修正,迭代不足回到压力修正这种?为什么您这个是速度直接求出来了,然后直接就压力值了,迭代不成功回压力修正

  • 2 帖子
    885 浏览

    @sxz0823 似乎没有自带的,只能自己编写,这难度不小

  • 2 帖子
    2k 浏览

    大佬做过粒径或者浓度不同高度注射吗

  • 13 帖子
    5k 浏览

    @李东岳 在 不使用湍流模型,而是直接求解器中实现湍流计算 中说:

    有一些代码不知道有啥作用,那就留着,留着总比删了更保险。

    好像是的,对结果不影响的都会跟着作者留下来了。:papa:

    @李东岳 在 不使用湍流模型,而是直接求解器中实现湍流计算 中说:

    这个在extend那面很常见。

    extend我只是听过,但没有用过。现在我常使用的版本一个是Org 6.0的,另外一个是ESI v2312的。

  • 5 帖子
    2k 浏览

    @chenboyao 在 寻求帮忙看看采用重叠网格对平台做自由衰减后自由衰减曲线不符合衰减曲线的原因 中说:

    我采用重叠网格对浮式平台做自由衰减,结果自由衰减的数据曲线到最后不符合自由衰减的趋势,而是还向下偏移了,不知道是什么情况造成的,希望有人帮我看看一下,为什么会出现这种情况。
    Screenshot from 2024-06-17 09-20-41.png

    您好,请问您的自由衰减实验做成功了嘛?我现在也在做浮式平台的自由衰减实验,也遇到过类似的问题,想很您交流一下:chouchou:

  • 2 帖子
    748 浏览

    这个是当我把水的物性从常数改为多项式后遇到的问题
    Courant Number mean: 0.134868655 max: 0.237479859
    deltaT = 3.4820232e-06
    Time = 0.00378807

    PIMPLE: iteration 1
    MULES: Solving for alpha.gas
    MULES: Solving for alpha.liquid
    gas fraction, min, max = 0.00155200072 1e-15 0.0672465558
    liquid fraction, min, max = 0.998447999 0.932753444 1
    Phase-sum volume fraction, min, max = 1 0.999994574 1.00026614
    MULES: Solving for alpha.gas
    MULES: Solving for alpha.liquid
    gas fraction, min, max = 0.00155951826 1e-15 0.0674835707
    liquid fraction, min, max = 0.998440482 0.932516429 1
    Phase-sum volume fraction, min, max = 1 0.999994794 1.00025528
    MULES: Solving for alpha.gas
    MULES: Solving for alpha.liquid
    gas fraction, min, max = 0.00156703579 1e-15 0.0677203557
    liquid fraction, min, max = 0.998432964 0.932279644 1
    Phase-sum volume fraction, min, max = 1 0.999995014 1.00025493
    Constructing momentum equations
    Tf.gasAndLiquid: min = 350.131001, mean = 456.035361, max = 549.778465
    iDmdt.gasAndLiquid: min = -0.959612341, mean = 11.8287784, max = 447.419943, integral = 0.000182163188
    wDmdt.gasAndLiquid: min = 0, mean = 138.094307, max = 5727.35791, integral = 0.00212665234
    smoothSolver: Solving for e.gas, Initial residual = 0.104953394, Final residual = 1.40390231e-09, No Iterations 2
    smoothSolver: Solving for e.liquid, Initial residual = 0.282448508, Final residual = 6.30884149e-18, No Iterations 2
    [stack trace]

    #1 Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    #2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
    #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
    #4 void Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
    #5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
    #6 Foam::heatTransferModels::RanzMarshall::K(double) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libreactingMultiphaseSystem.so
    #7 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::BlendedInterfacialModelFoam::heatTransferModel::evaluate<double, Foam::fvPatchField, Foam::volMesh, double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > (Foam::heatTransferModel::*)(double) const, Foam::word const&, Foam::dimensionSet const&, bool, double) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libreactingMultiphaseSystem.so
    #8 Foam::BlendedInterfacialModelFoam::heatTransferModel::K(double) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libreactingMultiphaseSystem.so
    #9 Foam::ThermalPhaseChangePhaseSystem<Foam::PhaseTransferPhaseSystem<Foam::TwoResistanceHeatTransferPhaseSystem<Foam::MomentumTransferPhaseSystemFoam::multiphaseSystem > > >::correctInterfaceThermo() in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libreactingMultiphaseSystem.so
    #10 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam
    #11 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
    #12 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam

  • 3 帖子
    840 浏览

    @coolhhh 存在的,每个保存的时刻里面都有Qdot

  • 6 帖子
    2k 浏览

    李老师,今天问题解决了,原算例的初始场是用mapFields从另一个静态网格的中间时刻得到的,如果不用mapFields设置初始场似乎就一切正常了,不过我确实想不明白为什么mapFields会产生这样的影响……

  • 13 帖子
    5k 浏览

    @李东岳 在 关于进行瞬态计算矩阵迭代过程的数据操作 中说:

    是要改很多私有成员变量啥的,来回嵌套。我想想有没有什么好办法。

    谢谢李老师关注,确实我本来也以为改一改矩阵求解器就行,结果发现OF里嵌套继承的类太多了,越改越麻,所以才来提问,希望有更好的方法。

  • 9 帖子
    4k 浏览

    kOmega模型是高雷诺数湍流模型。如果做了壁面解析,需要保证在1左右,如果使用壁面函数,可以在30以上。

  • OpenFOAM 粗糙度

    2016年8月23日 15:55
    13 帖子
    13k 浏览

    @Regina roughnessHeight是粗糙度高度,不同的材料有着不同的参数,roughnessConstant是粗糙度常数的意思,fluent默认0.5;其他的就不清楚了,抱歉

  • 3 帖子
    2k 浏览

    @chapaofan 非常感谢老师提供思路!

  • 1 帖子
    582 浏览

    计算火焰对铜管的加热,火焰仿真已经解决,现在需要考虑流固耦合对流换热和铜的热传导。
    方案1.网格目前只考虑流体网格,暂时不考虑固体网格。已知fluent中有类似的薄壳边界可以实现,openfoam中pyrolysisZones貌似能实现。
    方案1存在问题:1)设置指导;2)pyrolysisZones能考虑三维传热吗?还是只能一维径向?
    方案2.划分流体区域和固体区域,耦合计算。
    方案2存在问题:固体部分不熟悉,网格耦合和区域划分设置求指导还有就是tut参照。:140:

  • 4 帖子
    2k 浏览

    @Kong action用的是delete也不行,或者🧵new建立一个obstacal然后再invert也没有成功删除

  • 2 帖子
    1k 浏览

    你的求解器某个模型需要调用phi,但是这个求解器里面的phi叫做phi.air或者phi.water啥的,你得看看你的哪个设置调用了phi

  • 4 帖子
    2k 浏览

    时隔一个月说一下结果,这样做不会报错,不过liggghts运算显示的是1×1×4(假设分成四个processor),但是of里的确是scotch划分的,不知道liggghts有没有自动识别:136:

  • 2 帖子
    1k 浏览

    各位大佬好,目前我在用OpenFOAM做多浮体在波浪作用下的数值模拟。有些问题想要请教:
    1、在constant文件夹中有dynamicMeshDict文件,在之前的学习过程中我主要接触到的是sixDoFRigidBodyMotion和rigidBodyMotion这两类求解器。据我目前了解,前者只可以用来模拟单物体,后者可以模拟多物体。不知我理解的是否正确?
    2、在学习过程中,我对一些算例进行sixDoFRigidBodyMotion和rigidBodyMotion这两类求解器的计算结果比较,目前是找到了两个算例,分别是OpenFOAM中tutorials/multiphase/interFoam/RAS/floatingObject以及foamMooring中关于overset的算例,连接如下:https://gitlab.com/hfchen20/foamMooring/-/tree/master/tutorial/rgb_overset?ref_type=heads
    我对这两个算例都分别使用采用sixDoFRigidBodyMotion和rigidBodyMotion的dynamicMeshDict进行了试算比较。然后发现计算得到的结果,如物体的位移、旋转的角度时程曲线基本一致。但是当我在此基础上新设算例,就是在dynamicMeshDict中加入一个linearAxialAngularSpring后,再计算出来的结果就会出现较大不同,这可能是哪些原因导致的呢?
    以下是我整理后画出来的时程图:

    floatingObject算例
    微信图片_20240829202727.png 微信图片_20240829202740.png 微信图片_20240829202756.png 微信图片_20240829202807.png 微信图片_20240829202816.png
    上面是没有加linearAxialAngularSpring,下面是加了之后的:
    微信图片_20240829203048.png 微信图片_20240829203056.png 微信图片_20240829203102.png 微信图片_20240829203109.png 微信图片_20240829203117.png

    这是dynamicMeshDict代码对比:

    /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs (rigidBodyMeshMotion); motionSolver rigidBodyMotion; rigidBodyMotionCoeffs { report on; solver { type Newmark; } accelerationRelaxation 0.7; bodies { floatingObject { type cuboid; parent root; // Cuboid dimensions Lx 0.3; Ly 0.2; Lz 0.5; // Density of the cuboid rho 500; // Cuboid mass mass #eval{ $rho*$Lx*$Ly*$Lz }; L ($Lx $Ly $Lz); centreOfMass (0 0 0.25); transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1); joint { type composite; joints ( { type Py; } { type Ry; } ); } patches (floatingObject); innerDistance 0.05; outerDistance 0.35; } } restraints { /*axialSpring { type linearAxialAngularSpring; body floatingObject; axis (0 1 0); stiffness 10; damping 0; referenceOrientation (1 0 0 0 1 0 0 0 1); }*/ } } // ************************************************************************* // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs (sixDoFRigidBodyMotion); motionSolver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (floatingObject); innerDistance 0.05; outerDistance 0.35; centreOfMass (0.5 0.45 0.35); // Cuboid dimensions Lx 0.3; Ly 0.2; Lz 0.5; // Density of the solid rhoSolid 500; // Cuboid mass mass #eval{ $rhoSolid*$Lx*$Ly*$Lz }; // Cuboid moment of inertia about the centre of mass momentOfInertia #codeStream { codeInclude #{ #include "diagTensor.H" #}; code #{ scalar sqrLx = sqr($Lx); scalar sqrLy = sqr($Ly); scalar sqrLz = sqr($Lz); os << $mass *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0; #}; }; report on; accelerationRelaxation 0.7; //accelerationDamping 0; solver { type Newmark; } constraints { // fixedPoint // { // sixDoFRigidBodyMotionConstraint point; // centreOfRotation (0.5 0.45 0.1); // } fixedLine { sixDoFRigidBodyMotionConstraint line; centreOfRotation (0.5 0.45 0.1); direction (0 1 0); } fixedAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 1 0); } } /*restraints { axialSpring { sixDoFRigidBodyMotionRestraint linearAxialAngularSpring; axis (0 1 0); stiffness 10; damping 0; referenceOrientation (1 0 0 0 1 0 0 0 1); } }*/ } // ************************************************************************* //

    3.为了搞清楚linearAxialAngularSpring,我还试着对tutorials/incompressible/pimpleFoam/RAS/wingMotion进行改写。因为这个算例中的dynamicMeshDict文件里使用了linearAxialAngularSpring。但是在原版的算例中,其使用的是sixDoFRigidBodyMotion,我想要将他改成rigidBodyMotion,但是我改后的算例只能算0.20s左右就会发散。在此我想请教一下有没有人做过类似的工作,能不能请教一下经验。
    下面是我改的dynamicMeshDict文件:

    /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("librigidBodyMeshMotion.so"); motionSolver rigidBodyMotion; //accelerationRelaxation 0.4; updateControl timeStep; updateInterval 1; rho rhoInf; rhoInf 1; rigidBodyMotionCoeffs { report on; solver { type symplectic; } rho rhoInf; rhoInf 1; bodies { wing { type rigidBody; parent root; mass 22.9; centreOfMass (0.2474612746 -0.02371895744 0); inertia (1.958864357 0 0 3.920839234 0 2.057121362); // Transformation tensor and centre of rotation transform (0.9953705935 0.09611129781 0 -0.09611129781 0.9953705935 0 0 0 1) (0.25 0.007 0.125); angularMomentum (0 0 -2); joint { type composite; joints ( { type Py; } { type Rz; } ); } patches (wing); innerDistance 0.3; outerDistance 1; } } restraints { verticalSpring { type linearSpring; body wing; anchor (0.25 0.007 0.125); refAttachmentPt (0 0 0); stiffness 4000; damping 2; restLength 0; } axialSpring { type linearAxialAngularSpring; body wing; axis (0 0 1); stiffness 700; damping 0.5; referenceOrientation (0.9953705935 0.09611129781 0 -0.09611129781 0.9953705935 0 0 0 1); } } } // ************************************************************************* //
  • 5 帖子
    2k 浏览

    @李东岳 在 波物作用of仿真:用k-omega SST湍流模型,k和omega初始时刻的值如何设置? 中说:

    瞬态流场的模拟,internalField对结果没有影响,只会影响最初的收敛性。internalField直接取0

    哦哦,老师,那入口处呢?

  • 6 帖子
    5k 浏览

    yes ,i do and it solve.thank you .

  • 9 帖子
    4k 浏览

    :146: :146: :146:

    是的,对算法的理解影响到算例