Skip to content

OpenFOAM

OpenFOAM交流区

5.1k 主题 29.9k 帖子
  • 合集:OpenFOAM安装准备工作贴

    已固定
    24
    24 帖子
    27k 浏览
    S

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

  • OpenFOAM教程 初级入门建议

    已固定
    55
    55 帖子
    139k 浏览
    李东岳

    新版的transportProperties改成了physicalProperties,你改个名

  • 2 帖子
    16 浏览
    学流体的小明

    取一个或多个平行于壁面的面(Kim的图也是不同高度的,y^+=5.39和149.23),使用surfaces工具输出这个面上的速度,然后每个面计算速度的展向、流向空间相关函数就行了。
    可以直接计算二维的相关。
    也可以固定z坐标,一条线一条线地计算流向的相关函数,再做个平均。

  • 量纲不匹配

    5
    5 帖子
    50 浏览
    学流体的小明

    @bcp 我搞错了,之前没看对你计算rField的公式。我以为是你rField的计算公式不对。

    你把报错代码发一下。
    debug,分别输出rho、U、rField的量纲看一看

  • foam-extend-4.1安装出错

    1
    1 帖子
    9 浏览

    在ubuntu20.04中按照教程安装时出现以下问题:

    SOURCE=db/dictionary/dictionaryEntry/dictionaryEntry.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -DOMPI_SKIP_MPICXX -I/include -I/home/ad/foam/foam-extend-4.1/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/dictionaryEntry.o db/IOstreams/Pstreams/IPread.C:29:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/OPwrite.C:29:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/PstreamReduceOps.C:26:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ db/IOstreams/Pstreams/Pstream.C:26:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ compilation terminated. compilation terminated. compilation terminated. compilation terminated. In file included from db/IOstreams/Pstreams/PstreamGlobals.C:26:0: db/IOstreams/Pstreams/PstreamGlobals.H:39:10: fatal error: mpi.h: No such file or directory #include "mpi.h" ^~~~~~~ compilation terminated. make: *** [db/IOstreams/Pstreams/Pstream.dep:170: Make/linux64GccDPInt32Opt/Pstream.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [db/IOstreams/Pstreams/PstreamReduceOps.dep:148: Make/linux64GccDPInt32Opt/PstreamReduceOps.o] Error 1 make: *** [db/IOstreams/Pstreams/PstreamGlobals.dep:114: Make/linux64GccDPInt32Opt/PstreamGlobals.o] Error 1 make: *** [db/IOstreams/Pstreams/IPread.dep:136: Make/linux64GccDPInt32Opt/IPread.o] Error 1 make: *** [db/IOstreams/Pstreams/OPwrite.dep:136: Make/linux64GccDPInt32Opt/OPwrite.o] Error 1 + decompositionMethods/AllwmakeLnInclude + wmakeLnInclude decomposeReconstruct + wmakeLnInclude decompositionMethods + wmakeLnInclude metisDecomp + wmakeLnInclude parMetisDecomp + wmakeLnInclude scotchDecomp + decompositionMethods/Allwmake + wmakeLnInclude decompositionMethods + wmake libso decompositionMethods '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdecompositionMethods.so' is up to date. + wmake libso metisDecomp SOURCE=metisDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/metisDecomp.o In file included from metisDecomp.C:26:0: metisDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [metisDecomp.dep:342: Make/linux64GccDPInt32Opt/metisDecomp.o] Error 1 + wmake libso parMetisDecomp SOURCE=parMetisDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -DOMPI_SKIP_MPICXX -I/include -I -I../decompositionMethods/lnInclude -I../metisDecomp/lnInclude -I../scotchDecomp/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/parMetisDecomp.o In file included from parMetisDecomp.C:26:0: parMetisDecomp.H:37:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [parMetisDecomp.dep:362: Make/linux64GccDPInt32Opt/parMetisDecomp.o] Error 1 + wmake libso scotchDecomp SOURCE=scotchDecomp/scotchDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/scotchDecomp.o SOURCE=engineScotchDecomp/engineScotchDecomp.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I../decompositionMethods/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/engineScotchDecomp.o In file included from scotchDecomp/scotchDecomp.C:107:0: scotchDecomp/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ In file included from engineScotchDecomp/engineScotchDecomp.H:49:0, from engineScotchDecomp/engineScotchDecomp.C:26: lnInclude/scotchDecomp.H:38:10: fatal error: decompositionMethod.H: No such file or directory #include "decompositionMethod.H" ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. compilation terminated. make: *** [engineScotchDecomp/engineScotchDecomp.dep:343: Make/linux64GccDPInt32Opt/engineScotchDecomp.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [scotchDecomp/scotchDecomp.dep:342: Make/linux64GccDPInt32Opt/scotchDecomp.o] Error 1 + wmake libso lagrangian/basic '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/liblagrangian.so' is up to date. + wmake libso edgeMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libedgeMesh.so' is up to date. + wmake libso surfMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libsurfMesh.so' is up to date. + wmake libso meshTools '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libmeshTools.so' is up to date. + wmake libso finiteVolume '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfiniteVolume.so' is up to date. + wmake libso finiteArea '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfiniteArea.so' is up to date. + conversion/Allwmake + wmake libso '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libconversion.so' is up to date. + wmake libso lduSolvers '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/liblduSolvers.so' is up to date. + wmake libso tetFiniteElement '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libtetFiniteElement.so' is up to date. + wmake libso decompositionMethods/decomposeReconstruct '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdecomposeReconstruct.so' is up to date. + dynamicMesh/AllwmakeLnInclude + wmakeLnInclude dynamicMesh + wmakeLnInclude dynamicFvMesh + wmakeLnInclude topoChangerFvMesh + meshMotion/AllwmakeLnInclude + wmakeLnInclude solidBodyMotion + wmakeLnInclude fvMotionSolver + wmakeLnInclude RBFMotionSolver + wmakeLnInclude mesquiteMotionSolver + dynamicMesh/Allwmake + wmake libso dynamicMesh '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libdynamicMesh.so' is up to date. + meshMotion/Allwmake + wmake libso solidBodyMotion '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libsolidBodyMotion.so' is up to date. + wmake libso fvMotionSolver '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libfvMotionSolver.so' is up to date. + wmake libso RBFMotionSolver '/home/ad/foam/foam-extend-4.1/lib/linux64GccDPInt32Opt/libRBFMotionSolver.so' is up to date. + wmake libso mesquiteMotionSolver SOURCE=mesquiteMotionSolver.C ; g++-7 -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I -I/home/ad/foam/foam-extend-4.1/src/meshTools/lnInclude -I/home/ad/foam/foam-extend-4.1/src/dynamicMesh/dynamicMesh/lnInclude -IlnInclude -I. -I/home/ad/foam/foam-extend-4.1/src/foam/lnInclude -I/home/ad/foam/foam-extend-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPInt32Opt/mesquiteMotionSolver.o In file included from mesquiteMotionSolver.H:39:0, from mesquiteMotionSolver.C:26: /home/ad/foam/foam-extend-4.1/src/dynamicMesh/dynamicMesh/lnInclude/motionSolver.H:42:10: fatal error: twoDPointCorrector.H: No such file or directory #include "twoDPointCorrector.H" ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated.

    貌似是无法找到mpi.h文件、decompositionMethod.H文件以及twoDPointCorrector.H文件,我是应该自己添加这些文件然后重新编译吗?

  • starccm添加oversetPatch导入到OpenFOAM

    1
    1 帖子
    8 浏览
    Z

    963df654ce25372fc5621513b9fe905.png 如图是blockMesh中创建的oversetPatch,用于触发在任何其他边界条件之前进行重叠(overset)插值。ccmTo.png 这张图的polyMesh是利用ccmToFoam,将starccm网格导入到OpenFoam的,请问如何在starccm里面加上图1中的oversetPatch呢。@李东岳

  • 1 帖子
    7 浏览
    Z

    如图,在做有关雾化的课题,但是在paraview中不知道怎么复现前辈的论文输出某截面的液相分数微信图片_20241221153039.png 微信图片_20241221153346.png 图片1.png

  • openFoam与Fluent模拟简单的Laval蒸汽喷管

    37
    37 帖子
    14k 浏览
    李东岳

    我在找bug的时候,在《无痛笔记》更新了一下openfoam无反射边界条件,目前来看植入的没有问题。bug应该不在这里。

  • 拉格朗日边界问题

    2
    2 帖子
    51 浏览
    李东岳

    是不是边界的名重复了呢

  • 四面体interFoam怎么设置离散格式啊

    3
    3 帖子
    29 浏览
    李东岳

    算出来的最低温度一直在降

    数值扩散掉了

  • 4 帖子
    70 浏览
    李东岳

    是不是有什么障碍物之类的那一块没有网格。

    paraview也可以提取,直接花plot over line,然后右边看sheet,export

  • 17 帖子
    3k 浏览
    S

    @Jimmy-Yao 楼主最开始的是四面体网格吗?

  • phiHbyA边界问题

    12
    12 帖子
    2k 浏览
    李东岳

    是的,你试试

  • 求助:在codedict中读取求解器中定义的标量

    8
    8 帖子
    87 浏览
    1

    @1064168551 在 求助:在codedict中读取求解器中定义的标量 中说:

    @李东岳 a6bccb55-b62e-4688-bc61-dc2f9e6911e5-image.png 东岳老师,抱歉再打扰您,我现在改成这个样子,还是会报错,dimensionedScalar好像还是无法lookup

    报错在这里,就还是这行const dimensionedScalar vv = mesh.lookupObject<dimensionedScalar>("vv");有问题
    56be09a2-6412-49a3-9c59-598dfb8ef235-image.png

  • 12 帖子
    5k 浏览
    A

    遇到了类似的问题,就是水平集模拟两相流时,怎么样利用水平集计算的相界面把一个对流扩散方程隔离开,只在一个相内求解对流扩散方程。

  • fvsolution文件报错

    4
    4 帖子
    93 浏览
    李东岳

    发散的话就是发散了,问题就很多,需要你详细的debug

  • scalarTransport求解负温问题

    4
    4 帖子
    61 浏览
    S

    好像是因为我没缩放网格

  • 7 帖子
    3k 浏览
    zzkluckZ

    这其实是个常见问题。按我的理解,不是Courant Number突然变大很多倍导致模拟发散,而是速度求解先崩掉了导致Courant Number跟着增大,然后速度就更崩了,然后恶行循环。从崩溃的时间步往前看日志,应该能观察到Courant Number持续增大。

  • buoyantPimpleFoam计算问题

    21
    21 帖子
    719 浏览
    A

    @李东岳 东岳老师我试了下fixedMean 值给的101325跟其他边界和内部场一样 还是不行

  • 流固耦合、气膜冷却

    1
    1 帖子
    28 浏览
    W

    请问有前辈用 OpenFOAM 计算过叶片冷却、气膜冷却吗,想交流一下
    图片1.png