Skip to content

OpenFOAM

OpenFOAM交流区

5.3k 主题 31.3k 帖子
  • sowfa耦合求解器使用请教

    1
    1 帖子
    225 浏览
    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 帖子
    427 浏览
    R

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

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

    1
    1 帖子
    249 浏览
    X

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

  • coalChemistryFoam改写

    1
    1 帖子
    202 浏览
    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 帖子
    238 浏览
    X

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

  • 圆柱绕流 高雷诺数10e5

    5
    5 帖子
    682 浏览
    L

    感谢李老师,我再试试

  • request for volScalarField from objectRegistry failed

    3
    3 帖子
    4k 浏览
    范准

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

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

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

  • Wray-Agarwal湍流模型

    已移动
    21
    21 帖子
    16k 浏览
    C

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

  • 分享CFDEM+OpenFOAM+LIGGGHTS初次编译安装过程

    26
    26 帖子
    20k 浏览
    C

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

  • 用compressibleInterFoam模拟气泡溃灭

    8
    8 帖子
    571 浏览

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

  • openfoam官方教程问题

    2
    2 帖子
    395 浏览
    R

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

  • overset 小间隙-多浮体算例 计算结果明显有误

    10
    10 帖子
    5k 浏览
    S

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

  • codedsource源项不收敛

    7
    7 帖子
    701 浏览
    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这个数量级,但凡再大一点就直接浮点溢出了。。。完全不知道是咋回事。。

  • 使用mapFields 操作更改网格计算出错

    5
    5 帖子
    527 浏览
    S

    @biaowai 在 使用mapFields 操作更改网格计算出错 中说:

    印象可以修改差值方式或者用mapFieldsPar试试

    我用的1706版本,尝试过修改差值方式还是不行。去试试mapFieldsPar。

  • openfoam化学反应速率

    3
    3 帖子
    462 浏览
    X

    @wjllll reactingFoam,用的是of的标准燃烧模型

  • OpenFOAM如何将点坐标与速度结果合成矩阵

    6
    6 帖子
    1k 浏览

    @Amadeus openfoam本身有没有什么api或者怎么设置能够实现从体心速度插值到网格点上,我也在寻找实现方法。

  • CFD与机器学习基本概念入门

    16
    16 帖子
    11k 浏览

    @allanZhong 在某个方向还没有成熟的时候,总会有一些人顶着大佬的帽子来抨击方向的不成熟性,铸造自己的护城河,阻碍技术的发展。就像NLP、CV,发展初期一样有质疑、有诋毁,但是都一点点发展过来,颠覆了传统的认知,再到现在的大模型、deepseek甚至是AGI,都是颠覆传统认知的创新技术。
    我们更应该充满信心,随着技术的发展,更多的研究成果的产出,终是会有颠覆性发展的一天的。

  • OpenFOAM python PINN tensorflow gpu (小白,莫笑)

    11
    11 帖子
    6k 浏览

    @李东岳 李老师,deepxde库属于基于pytorch tensorflow做了封包,形成的高级科学计算库,把计算物理方程的部分模块化掉了,在计算性能方面可能有做过优化,但是降低了自定义的灵活性。还有jax,这个会更加完善,我习惯用pytorch,用jax不太习惯,jax的风格有类似于tensorflow吧(具体不太了解)。国内的有百度系的paddle science和华为系的MindSpore 的MindSpore Flow。

  • OpenFoam能否实现将PINNs嵌入求解器

    12
    12 帖子
    2k 浏览

    @cdc123 现在有看到论文里面会写,用数据辅助pinn训练,可以提升训练速度。

  • OpenFOAM与libtorch的数据对应

    10
    10 帖子
    4k 浏览

    我用的python,用fulidFOAM库和自己写的代码,可以读openfoam网格,可以带编号。然后用pyg的graph存,也能保存网格与网格之间的连通属性。是可以 迁移到C++上面,达到想要的效果的。