位置青岛,中国石油大学(华东),本科生都已经放假回家了,博士和硕士研究生还奋战在科研第一线
发现临近过年,科研效率反而会变高,有种年底冲业绩的感觉
热爱CFD的卡卡
帖子
-
现在高校都放假了么 -
动态边界条件的小问题 -
动态边界条件的小问题错误中的WM_OPTIONS不太清楚是什么。
我把动态压力改变成固定初始压力,运行是没有问题的,可以确定是设置压力随速度变化这一块出的问题,目前是不知道应该怎么改错误。
原例子是下图这个,只改变了压力文件
自己改了各个语句和条件,但是错误不变
-
动态边界条件的小问题 -
动态边界条件的小问题新手求指导
-
动态边界条件的小问题实验过程中驱替压力一直是变化的,受到启发,我想做一个简单的入口压力随时间变化的单管驱替小例子,看看自己能不能做出来
按照模板例子,自己写了一个很简单的初始压力场条件/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { left { // type zeroGradient; type codedFixedValue; value $internalField; redirectType ramp; code #{ scalar t = this->db().time().value(); scalar p_rgh = 0; if(t >= 0 && t <= 0.1) { p_rgh = 450*t; } else { p_rgh = 550*t; } (*this) == p_rgh; #}; } right { type fixedValue; value uniform 0; } "(bottom|top)" { type fixedFluxPressure; } frontAndBack { type empty; } } // ************************************************************************* //
但是运行的时候总是出错,自己还不知道这个错误是什么问题(初学,太难受了)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 PIMPLE: Operating solver in PISO mode Reading field p_rgh --> FOAM FATAL ERROR: Unknown variable name 'WM_OPTIONS' From function Foam::string& Foam::stringOps::inplaceExpand(Foam::string&, bool) in file primitives/strings/stringOps/stringOps.C at line 782. FOAM exiting
自己也看了李老师的OpenFOAM小代码的codedFixedValue相关内容,但是还是不知道哪里出错了,求各位高手们指导一下
-
icoFoam槽道层流流动出口速度剖面异常?这个问题感觉和我前几天提的问题一样,我已经解决了,原因就是低粘度液体在半径大的管道中就会出现这种速度分布的平台状。
解决办法有两个:提高流体的粘度,或者减小管道的半径尺寸。
你看一下两个模型的尺寸设置是不是一样的或者流体粘度设置的是不是一样。 -
在单管泊肃叶流动中与例子不符的问题(新手菜鸟)@东岳 是的,粘度调高也可以出现抛物线,感谢 感谢。我把网格尺度变小了,也能观察到。
-
在单管泊肃叶流动中与例子不符的问题(新手菜鸟)找到错误了,网格尺度与例子不符,因为例子设置的流体粘度偏低,所以只有在毫米尺度的网格观察才会是抛物线,而我的网格是0.1m的,所以看上去就像是一条陡峭的直线。
图中就是网格尺度,我错误写成0.1了。
-
在单管泊肃叶流动中与例子不符的问题(新手菜鸟)@veen 是的,p文件中frontAndBack粘漏了,现在就下载例子,试一试,感谢
-
在单管泊肃叶流动中与例子不符的问题(新手菜鸟)例子用的openfoam3.0,我用的5.0,应该和版本没有问题吧
我自己看曲线的感觉是考虑粘滞力的设置问题,但是不知道在程序中哪一块出了问题, -
在单管泊肃叶流动中与例子不符的问题(新手菜鸟)在网上找了一个学习open foam的算例学习文件,完全按照算例画网格和编写边界条件,最终结果与算例结果有很大的不同,对照例子找了半天没找到原因,希望各位大佬能帮忙看一下,感谢!
自己的曲线结果
!!
例子的曲线
教程图
我的程序文件/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; /*RAS { // Tested with kEpsilon, realizableKE, kOmega, kOmegaSST, v2f, // ShihQuadraticKE, LienCubicKE. RASModel kEpsilon; turbulence on; printCoeffs on; }*/ // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (1 0 0); } outlet { type zeroGradient; } top { type symmetryPlane; } bottom { type fixedValue; value uniform (0 0 0); } frontAndBack { type empty; } } // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } top { type symmetryPlane; } bottom { type zeroGradient; }
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e-06; relTol 0.1; smoother GaussSeidel; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; consistent yes; residualControl { p 1e-5; U 1e-5; } } relaxationFactors { equations { U 0.9; // 0.9 is more stable but 0.95 more convergent ".*" 0.9; // 0.9 is more stable but 0.95 more convergent } } // ************************************************************************* //
-
Daniele Marchisio的CFD Talk登记邮箱:S19020084@s.upc.edu.cn
东岳老师,请求名额一个,期待~,哈哈哈,希望能提高自己的CFD技能水平