Skip to content

OpenFOAM

OpenFOAM交流区

5.3k Topics 31.7k Posts
  • Pimple中对速度场的操作

    10
    10 Posts
    4k Views
    R

    感谢老师们!这里确实是多变量的计算,类似于把单个组分场拆分为很多不同的场来计算,但是输入相同的源项,所以会有两种不同的Y在同一个方程里。程序就是在方程这一步出现了错误,我试试各位老师的方法,多输出一些内容看看哪里出问题了。

  • 10 Posts
    2k Views
    A

    @李东岳 还有个问题就是,粒子有时候会分散,有时候就是一坨。李老师有遇到过吗
    f622a0de-4015-453e-93fc-2b952bdd661d-image.png 79a28b41-4d27-4440-84dc-6ccfd84fdf7c-image.png 5d210d73-a556-4130-85d7-016a7bc98fb3-image.png

  • 三相空化计算明渠流动失败

    14
    14 Posts
    3k Views

    @李东岳 LES和laminar都试过,只要把空化核数降一些就不会发散。

  • paraview导入vtk时间group文件错误

    3
    3 Posts
    877 Views
    李东岳

    感谢分享!

  • 3 Posts
    819 Views
    N

    谢谢!。

  • 局部流场数据异常

    2
    2 Posts
    736 Views
    李东岳

    这是算的什么东西?好圆的球。。。

    异常一直存在么?会消失么

  • PINN代码实例-顶盖驱动流问题

    6
    6 Posts
    2k Views
    李东岳

    是个bug,你直接把loss_dataP删了就行,这个应该是我当时要增加数据点用的。目前没有作用了。loss_data可以删了,目前跟loss_pde重复

    怎么样,这部分玩的怎么样,有什么感受。PINN跟FVM是不是大不一样

  • 摩擦雷诺数特征长度取值?

    5
    5 Posts
    1k Views
    东方白杨

    看了各位大佬的评论,我觉得无论是什么样的矩形通道,应该都是用的最小那一边的半槽高度。例如进出口内外均为周期性的平板槽道,它就等价于一个AR=宽/高=无穷的矩形通道,这种情况不可能用水力直径的,应该都是用的最小半槽高度

  • sowfa耦合求解器使用请教

    1
    1 Posts
    602 Views
    H

    目前我正在尝试使用sowfa平台,我参考了网上的编译资料进行了编译,但在后续使用过程中出现了耦合fast过程中的.fst文件中的错误,

    [heyi@litian pisofast3]$ cat log1.pisoFoamTurbine.ALM No protocol specified No protocol specified No protocol specified No protocol specified No protocol specified No protocol specified No protocol specified No protocol specified No protocol specified /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.4.x-2b147f41daf9 Exec : pisoFoamTurbine.ALMAdvancedOpenFAST -parallel Date : Apr 15 2025 Time : 17:09:10 Host : "litian" PID : 33112 Case : /home/heyi/OpenFOAM/SOWFA/run/pisofast3 nProcs : 8 Slaves : 7 ( "litian.33113" "litian.33114" "litian.33115" "litian.33116" "litian.33117" "litian.33118" "litian.33119" ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 10 Reading field, p... Reading field, U... Creating vorticity field, omega... Creating second-invariant of strain-rate tensor field, Q... Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type LESModel Selecting LES turbulence model oneEqEddy Selecting LES delta type cubeRootVol oneEqEddyCoeffs { ce 1.048; ck 0.094; } [0] nFASTSubSteps has to be the same for all turbines [1] nFASTSubSteps has to be the same for all turbines [2] nFASTSubSteps has to be the same for all turbines [4] nFASTSubSteps has to be the same for all turbines [3] nFASTSubSteps has to be the same for all turbines [5] nFASTSubSteps has to be the same for all turbines [6] nFASTSubSteps has to be the same for all turbines [7] nFASTSubSteps has to be the same for all turbines ************************************************************************************************** OpenFAST Copyright (C) 2025 National Renewable Energy Laboratory Copyright (C) 2025 Envision Energy USA LTD This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. See the "LICENSE" file distributed with this software for details. ************************************************************************************************** OpenFAST-HEAD-HASH-NOTFOUND Compile Info: - Compiler: GCC version 9.3.1 20200408 (Red Hat 9.3.1-2) - Architecture: 64 bit - Precision: double - Date: Apr 8 2025 - Time: 15:03:39 Execution Info: - Date: 04/15/2025 - Time: 17:09:11+0800 OpenFAST input file heading: FAST Certification Test #18: NREL 5.0 MW Baseline Wind Turbine (Onshore) Error in FAST_OpFM_Init:FAST_InitializeAll_TFAST_InitializeAll:FAST_Init:FAST_ReadPrimaryFile:Invalid logical input for file "NREL5MWRef.1.fst" occurred while trying to read CalcSteady. FAST_ReadPrimaryFile:ReadNum:Invalid numeric input for file "NREL5MWRef.1.fst". "False" found when trying to read the number, Twr_Kdmp. FAST_ReadPrimaryFile:ReadNum:Invalid numeric input for file "NREL5MWRef.1.fst". "False" found when trying to read the number, Bld_Kdmp. terminate called after throwing an instance of 'std::runtime_error' what(): FAST_InitializeAll:FAST_Init:FAST_ReadPrimaryFile:Invalid logical input for file "NREL5MWRef.1.fst" occurred while trying to read CalcSteady. FAST_ReadPrimaryFile:ReadNum:Invalid numeric input for file "NREL5MWRef.1.fst". "False" found when trying to read the number, Twr_Kdmp. FAST_ReadPrimaryFile:ReadNum:Invalid numeric input for file "NREL5MWRef.1.fst". "False" found when trying to read the number, Bld_Kdmp. [litian:33112] *** Process received signal *** [litian:33112] Signal: Aborted (6) [litian:33112] Signal code: (-6) [litian:33112] [ 0] /lib64/libpthread.so.0(+0xf630)[0x7f8c2552f630] [litian:33112] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x7f8c25187387] [litian:33112] [ 2] /lib64/libc.so.6(abort+0x148)[0x7f8c25188a78] [litian:33112] [ 3] /lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x165)[0x7f8c25cb4a95] [litian:33112] [ 4] /lib64/libstdc++.so.6(+0x5ea06)[0x7f8c25cb2a06] [litian:33112] [ 5] /lib64/libstdc++.so.6(+0x5ea33)[0x7f8c25cb2a33] [litian:33112] [ 6] /lib64/libstdc++.so.6(+0x5ec53)[0x7f8c25cb2c53] [litian:33112] [ 7] /home/heyi/Programs/openfast-2.4.0/install/lib/libopenfastcpplib.so(+0xdd10)[0x7f8c27d57d10] [litian:33112] [ 8] /home/heyi/Programs/openfast-2.4.0/install/lib/libopenfastcpplib.so(_ZN4fast8OpenFAST4initEv+0x4bb)[0x7f8c27d6021b] [litian:33112] [ 9] /home/heyi/OpenFOAM/SOWFA/lib/linux64GccDPOpt/libSOWFATurbineModelsOpenFAST.so(_ZN4Foam13turbineModels37horizontalAxisWindTurbinesALMOpenFAST10initializeEv+0x31)[0x7f8c2be99001] [litian:33112] [10] /home/heyi/OpenFOAM/SOWFA/lib/linux64GccDPOpt/libSOWFATurbineModelsOpenFAST.so(_ZN4Foam13turbineModels37horizontalAxisWindTurbinesALMOpenFASTC1ERKNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEE+0x1d21)[0x7f8c2be9b141] [litian:33112] [11] pisoFoamTurbine.ALMAdvancedOpenFAST[0x429d65] [litian:33112] [12] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f8c25173555] [litian:33112] [13] pisoFoamTurbine.ALMAdvancedOpenFAST[0x430ad4] [litian:33112] *** End of error message *** -------------------------------------------------------------------------- mpirun noticed that process rank 0 with PID 0 on node litian exited on signal 6 (Aborted). --------------------------------------------------------------------------

    错误提示如文,我不知道是我耦合的fast版本不正确还是参数设置还是编译过程有问题?能否有老师指点一下,万分感谢

    NRELOffshrBsline5MW_Onshore_ElastoDyn_Tower.dat NRELOffshrBsline5MW_Blade.dat

  • 4 Posts
    1k Views
    R

    先检查路径,一般入口是inlet,你应该就是拼错名字了(现在是inelt),可能你导出的时候是对的,snappyhexmesh里错了

  • 关于PINN预测建筑群钝体扰流

    1
    1 Posts
    577 Views
    X

    想问一下各位大佬有人做过利用PINN预测建筑群的钝体扰流吗?

  • coalChemistryFoam改写

    1
    1 Posts
    526 Views
    R

    我在对coalChemistryFoam改写,想把它和随机场方程进行结合。简单来说是对于连续相用一系列随机场进行计算,颗粒相不用(单独计算)。但这就遇到了一个问题,我结合着输运方程来说明:

    for(label i=0; i<Y.size(); i++) { { volScalarField Yi = Ysf[nsf][i]; volScalarField Ymean = Y[i]; WienerTermYi = pow(2*gamma,0.5)*( fvc::grad(Yi) & dW_sf); fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff()/Sct, Yi) == coalParcels.SYi(i, Ymean) + combustion->R(Ymean) + fvOptions(rho, Ymean) + (rho*WienerTermYi/deltaT) ); YiEqn.relax(); fvOptions.constrain(YiEqn); YiEqn.solve(mesh.solver("Yi")); YiEqn.solve(); fvOptions.correct(Yi); Yi.max(0.0); Ysf[nsf][i] = Yi; Yt += Yi; } }

    在这个方程里,Yi指的是随机场的组分项(比如名为N2__01),Ymean指的是平均场的组分项(也就是组分场,名为N2)。颗粒的求解不考虑随机场,来自颗粒的源项被输入到每一个随机场中。但这里就会有一个问题,在计算时,会出现类似incompatible fields for operation [N2] + [N2__01]的报错,我的理解是因为这两个名称不同所导致的。这个问题要怎么去解决?我想的是,或许可以把这三项在方程外部导入到一个临时变量,再输入到方程里,但是不知道怎么用代码去实现。求各位大佬指点。

  • openfoam自定义组分源项

    1
    1 Posts
    562 Views
    X

    尝试用openfoam的coded自定义一个cellSet的组分源项,有大佬知道field设置成什么吗?

  • 3 Posts
    4k Views
    范准

    @李东岳 最近在将低版本OF的自定义边界条件移植到高版本OF的时候也发生了这个问题。串行求解没问题,并行求解报错。在不修改自定义边界条件源码的情况下,解决方案如下:1.在decomposePar前,将controlDict中引用的自定义库注释掉,例如

    libs ( "libOpenFOAM.so" //"libUserBC.so" );

    2.执行decomposePar,3.取消注释,4.运行求解器,5.重新注释,6.执行reconstructPar。
    以上,便可解决该报错。

  • Wray-Agarwal湍流模型

    Moved
    21
    21 Posts
    21k Views
    C

    @wangfei9088 感谢大佬:146: :146:

  • 26 Posts
    29k Views
    C

    @LionelXWJ yangli_cfd@sina.com,这是我邮箱,欢迎交流!

  • 用compressibleInterFoam模拟气泡溃灭

    8
    8 Posts
    2k Views

    @学流体的小明 谢谢您哈,能不能加您个联系方式交流一下

  • openfoam官方教程问题

    2
    2 Posts
    873 Views
    R

    问题已解决,y站上没有更新教程,新版本的发行版openfoam会在指定facezone时自动生成主面和从面

  • 10 Posts
    6k Views
    S

    @hachikoi 您好,请问您的问题现在解决了吗?我现在也在做和您相似的双浮体模拟,但是在模拟时出现了第一部就会发散的问题,重叠网格挖的洞数量很大。

  • codedsource源项不收敛

    7
    7 Posts
    2k Views
    1

    然后又去pimpleFoam跑了一下,代码改成这样的:

    momentumSource { type vectorCodedSource; active yes; name sourceTime; vectorCodedSourceCoeffs { selectionMode all; // cellZone pZone; fields (U); codeInclude #{ #}; codeCorrect #{ // Pout<< "**codeCorrect**" << endl; #}; codeAddSup #{ // Pout<< "**codeAddSup**" << endl; // const vectorField& C = mesh_.C(); const scalarField& V = mesh_.V(); vectorField& Usource = eqn.source(); const vectorField& U = mesh().lookupObject<volVectorField>("U"); // const scalarField& Rho = mesh().lookupObject<volScalarField>("rho"); const scalarField& nu = mesh().lookupObject<volScalarField>("nu"); // const scalarField& magU = mag(U); scalar A = 1e2; scalar B = 1e2; // vector C(0,1e4,0); forAll(V,i) { const scalar x = mesh_.C()[i][0]; const scalar y = mesh_.C()[i][1]; if(x < 0.5 && x > 0 && y < 0.5 && y > 0.45) { Usource[i] += (1e-5 * A + mag(U[i])* B * 0.5 ) * U[i]* V[i]; // Usource = (A * U[i] + B * mag(U[i]) * U[i]) * V[i]; // Usource[i] += - C * V[i]; } } // Info << "***codeAddSup***" << nl; #}; codeSetValue #{ // Pout<< "**codeSetValue**" << endl; #}; // Dummy entry. Make dependent on above to trigger recompilation code #{ $codeInclude $codeCorrect $codeAddSup $codeSetValue #}; } sourceTimeCoeffs { $vectorCodedSourceCoeffs; } }

    跑完的速度场是这样:
    pimple.gif

    就完全处于A和B只能在1e2这个数量级,但凡再大一点就直接浮点溢出了。。。完全不知道是咋回事。。