--> FOAM FATAL IO ERROR:
size 12225 is not equal to the given value of 21
file: /home/zcy/OpenFOAM/anli/pitzDaily/0/U from line 18 to line 12272.
From function Foam::Field<Type>::Field(const Foam::word&, const Foam::dictionary&, Foam::label) [with Type = Foam::Vector<double>; Foam::label = int]
in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/Field.C at line 302.
FOAM exiting
Segmentation fault (core dumped)
郑澄远
帖子
-
-
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.1; vertices ( (-6 0 -1) (-6 1 -1) (0 -1 -1) (0 0 -1) (0 1 -1) (18 -1 -1) (18 0 -1) (18 1 -1) (-6 0 1) (-6 1 1) (0 -1 1) (0 0 1) (0 1 1) (18 -1 1) (18 0 1) (18 1 1) ); blocks ( hex (0 3 4 1 8 11 12 9) (3 1 1) simpleGrading (1 1 1) hex (2 5 6 3 10 13 14 11) (9 1 1) simpleGrading (1 1 1) hex (3 6 7 4 11 14 15 12) (9 1 1) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (0 1 9 8) ); } outlet { type patch; faces ( (5 6 14 13) (6 7 15 14) ); } upperWall { type wall; faces ( (1 4 12 9) (4 7 15 12) ); } lowerWall { type wall; faces ( (0 3 11 8) (3 2 10 11) (2 5 13 10) ); } frontAndBack { type empty; faces ( (0 3 4 1) (2 5 6 3) (3 6 7 4) (8 11 12 9) (10 13 14 11) (11 14 15 12) ); } ); // ************************************************************************* // 报错 Created temporary 'pitzDaily.OpenFOAM' I/O : uncollated ********************************************************** ParaView failed to open using available graphics hardware. Trying fallback to software rendering using MESA. ********************************************************** I/O : uncollated
-
我只能画成 -
@东岳 把网格加密后80*80算到time=0.05时就显示
#3 Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:? #4 Foam::GaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:? #5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #8 Foam::fvMatrix<double>::solve() at ??:? #9 Foam::SolverPerformance<double> Foam::solve<double>(Foam::tmp<Foam::fvMatrix<double> > const&) at ??:? #10 Foam::RASModels::kEpsilon<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correct() at ??:? #11 ? at ??:? #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? at ??:? 浮点数例外 (核心已转储)
-
该怎么解决呢 -
按照文献中的案例模拟了一个三维方腔流
我的垂直速度曲线图和水平速度曲线图
和实验结果不一样
是什么原因造成的? -
我想把数据导出来画速度分量时间平均分布
-
在pimpleFoam中算例的后台阶,请问一下,openfoam案例里面二维后台阶模型改成三维是不是只要把边界条件和blockMeshDict改一下就可以了
-
@东岳 在编译openfoam6时是输入./Allwmake进行编译,此时终端会输出:
Allwmake /home/zcy/OpenFOAM/OpenFOAM-6 gcc -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3 -fPIC dirToString.c -o /home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc/dirToString flex wmkdep.l; \ gcc -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3 -fPIC lex.yy.c -o /home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc/wmkdep lex.yy.c:1264:17: warning: ‘yyunput’ defined but not used [-Wunused-function] static void yyunput (int c, char * yy_bp ) ^ lex.yy.c:1307:16: warning: ‘input’ defined but not used [-Wunused-function] static int input (void) ^ Allwmake: no ThirdParty directory found - skipping Allwmake src
这个时候dirToString和wmkdep应该已经编译好了,我想知道能不能在编译而不是复制这两个,给上Allwmake脚本内容
#!/bin/sh cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . wmake/scripts/AllwmakeParseArguments # Perform various checks wmakeCheckPwd "$WM_PROJECT_DIR" || { echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR" echo " The environment variables are inconsistent with the installation." echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 } [ -n "$FOAM_EXT_LIBBIN" ] || { echo "Allwmake error: FOAM_EXT_LIBBIN not set" echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 } # Compile wmake support applications (cd wmake/src && make) # Compile ThirdParty libraries and applications if [ -d "$WM_THIRD_PARTY_DIR" ] then $WM_THIRD_PARTY_DIR/Allwmake else echo "Allwmake: no ThirdParty directory found - skipping" fi # Compile OpenFOAM libraries and applications src/Allwmake $targetType $* # Compile OpenFOAM libraries and applications applications/Allwmake $targetType $*
-
路径是home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc
在其他虚拟机中OpenFOAM显示的样子
-
@星星星星晴 pisoFoam
-
@东岳 我做一个简单的渠道流,
U: internalField uniform (0.0335 0 0); boundaryField { IN { type fixedValue; value uniform (10 0 0); } OUT { type zeroGradient; } WALL { type noSlip; } } P: dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { IN { type zeroGradient; } OUT { type fixedValue; value uniform 0; } WALL { type zeroGradient; } }
没有发现错误
-
运算时报错,应该怎么修改呢
--> FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Total flux : 1.19645e-07 Specified mass inflow : 0.0032961 Specified mass outflow : 0.00261459 Adjustable mass outflow : 0
-
我在controlDict里面出现添加了
#includeFunc mag(U)
用pisoFoam运行后输入postProcess -func "mag(U)"
,出现functionObjects::mag mag(U) cannot find required object U of type volScalarField
这该怎么解决
-
@东岳 成功了,谢谢东岳老师了
-
我将算例cavity网格(20 20 1)变为(20 20 20)的情况icoFoam会算不出来
以前没有研究过不太清楚Time = 0.065 Courant Number mean: 31.0395 max: 154.167 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:? #4 Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:? #5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 ? at ??:? #7 ? at ??:? #8 ? at ??:? #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? at ??:? 浮点数例外 (核心已转储)
-
这是我的options:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -L</home/zcy/OpenFOAM/zcy-6/platforms/linux64GccDPInt32Opt/lib> \ -l<myfiniteVolume> \ -lmeshTools
我用wmake编译时生成文件Make/linux64GccDPInt32Opt时出现
Make/linux64GccDPInt32Opt/options:55: *** missing separator。
停止。
请问我该怎么修改呢 -
我自己编写了一个小型数据库fin,里面有cfdTools finiteVolume fvMesh lnInclude surfaceMesh fields fvMatrices interpolation Make volMesh。其中wmake文件最后一句写成LIB = $(FOAM_USUER_LIBBIN)/libmyfiniteVolume,现在我想把库链接到icoFoam
中,请问他的options我该怎么修改呢
icoFoam的options文件
EXE_INC =
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/meshTools/lnIncludeEXE_LIBS =
-lfiniteVolume
-lmeshTools -
@sibo fin文件里面有一个lnInclude文件,不是在finiteVolume中
-
EXE_INC = \ -I$/home/zcy/openfoam/fin/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lmyfiniteVolume \ -lmeshTools
这是我的InInclude
-
icoFoam.C:32:19: fatal error: fvCFD.H: 没有那个文件或目录 compilation terminated. /opt/openfoam6/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/icoFoam.o' failed make: *** [Make/linux64GccDPInt32Opt/icoFoam.o] Error 1
是不是没有把文件
fvCFD.H
编译到库中,因该怎么办呢 -
wmakeLnInclude: linking include files to ./lnInclude mkdir: 无法创建目录"": 没有那个文件或目录 /opt/openfoam6/wmake/makefiles/general:167: recipe for target '/libfiniteVolume.so' failed make: *** [/libfiniteVolume.so] Error 1
-
@东岳 是的,老师
-
李老师,我按照手册上还没有进行改动,只把kEpsilon改成mykEpsilon,但是编译就报错了,不知道是不是和of5.0有关
-
我用of5.0版本,想添加mykEpsilon模型,用sed语句修改kEpsilon,mykEpsilon.C代码如下
namespace Foam { namespace RASModels { // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class BasicTurbulenceModel> void mykEpsilon<BasicTurbulenceModel>::correctNut() { this->nut_ = Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); fv::options::New(this->mesh_).correct(this->nut_); BasicTurbulenceModel::correctNut(); } template<class BasicTurbulenceModel> tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::kSource() const { return tmp<fvScalarMatrix> ( new fvScalarMatrix ( k_, dimVolume*this->rho_.dimensions()*k_.dimensions() /dimTime ) ); } template<class BasicTurbulenceModel> tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::epsilonSource() const { return tmp<fvScalarMatrix> ( new fvScalarMatrix ( epsilon_, dimVolume*this->rho_.dimensions()*epsilon_.dimensions() /dimTime ) ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class BasicTurbulenceModel> mykEpsilon<BasicTurbulenceModel>::mykEpsilon ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, const word& type ) : eddyViscosity<RASModel<BasicTurbulenceModel>> ( type, alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName ), Cmu_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cmu", this->coeffDict_, 0.09 ) ), C1_ ( dimensioned<scalar>::lookupOrAddToDict ( "C1", this->coeffDict_, 1.44 ) ), C2_ ( dimensioned<scalar>::lookupOrAddToDict ( "C2", this->coeffDict_, 1.92 ) ), C3_ ( dimensioned<scalar>::lookupOrAddToDict ( "C3", this->coeffDict_, 0 ) ), sigmak_ ( dimensioned<scalar>::lookupOrAddToDict ( "sigmak", this->coeffDict_, 1.0 ) ), sigmaEps_ ( dimensioned<scalar>::lookupOrAddToDict ( "sigmaEps", this->coeffDict_, 1.3 ) ), k_ ( IOobject ( IOobject::groupName("k", U.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ), epsilon_ ( IOobject ( IOobject::groupName("epsilon", U.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ) { bound(k_, this->kMin_); bound(epsilon_, this->epsilonMin_); if (type == typeName) { this->printCoeffs(type); } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class BasicTurbulenceModel> bool mykEpsilon<BasicTurbulenceModel>::read() { if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read()) { Cmu_.readIfPresent(this->coeffDict()); C1_.readIfPresent(this->coeffDict()); C2_.readIfPresent(this->coeffDict()); C3_.readIfPresent(this->coeffDict()); sigmak_.readIfPresent(this->coeffDict()); sigmaEps_.readIfPresent(this->coeffDict()); return true; } else { return false; } } template<class BasicTurbulenceModel> void mykEpsilon<BasicTurbulenceModel>::correct() { if (!this->turbulence_) { return; } // Local references const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volScalarField& nut = this->nut_; fv::options& fvOptions(fv::options::New(this->mesh_)); eddyViscosity<RASModel<BasicTurbulenceModel>>::correct(); volScalarField::Internal divU ( fvc::div(fvc::absolute(this->phi(), U))().v() ); tmp<volTensorField> tgradU = fvc::grad(U); volScalarField::Internal G ( this->GName(), nut.v()*(dev(twoSymm(tgradU().v())) && tgradU().v()) ); tgradU.clear(); // Update epsilon and G at the wall epsilon_.boundaryFieldRef().updateCoeffs(); // Dissipation equation tmp<fvScalarMatrix> epsEqn ( fvm::ddt(alpha, rho, epsilon_) + fvm::div(alphaRhoPhi, epsilon_) - fvm::laplacian(alpha*rho*DepsilonEff(), epsilon_) == C1_*alpha()*rho()*G*epsilon_()/k_() - fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha()*rho()*divU, epsilon_) - fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_) + epsilonSource() + fvOptions(alpha, rho, epsilon_) ); epsEqn.ref().relax(); fvOptions.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); fvOptions.correct(epsilon_); bound(epsilon_, this->epsilonMin_); // Turbulent kinetic energy equation tmp<fvScalarMatrix> kEqn ( fvm::ddt(alpha, rho, k_) + fvm::div(alphaRhoPhi, k_) - fvm::laplacian(alpha*rho*DkEff(), k_) == alpha()*rho()*G - fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_) - fvm::Sp(alpha()*rho()*epsilon_()/k_(), k_) + kSource() + fvOptions(alpha, rho, k_) ); kEqn.ref().relax(); fvOptions.constrain(kEqn.ref()); solve(kEqn); fvOptions.correct(k_); bound(k_, this->kMin_); correctNut(); }
用wmake libso编译出现错误
有谁知道是怎么回事吗?
请问下为什么blockMesh运行paraview打不开
请问下为什么blockMesh运行paraview打不开
请问用户指南的这个图是怎么画出来的
为什么二维方腔流用pisFoam算出的流线与下方没有涡
为什么二维方腔流用pisFoam算出的流线与下方没有涡
请教一个问题,为什么用pisoFoam算的三维方腔流和实验数据不同
请问有谁知道在OpenFOAM三维案列中怎么提取面(z=0)的所有速度的数据
后台阶二维怎么改成三维的
我openfoam6中的dirToString和wmkdep被误删了,请问这两个该怎么编译
我openfoam6中的dirToString和wmkdep被误删了,请问这两个该怎么编译
这是什么问题导致的?
这是什么问题导致的?
这是什么问题导致的?
postProcess工具
请问下三维方腔流可以用icoFoam求解吗
请问下三维方腔流可以用icoFoam求解吗
Make/linux64GccDPInt32Opt/options:55: *** missing separator。 停止。
请问一下这种情况该怎么写options
编译icoFoam时出现没有发现fvCFD.H
编译icoFoam时出现没有发现fvCFD.H
编译icoFoam时出现没有发现fvCFD.H
编译库文件出现无法创建目录可能是哪里出错了
添加湍流模型遇到问题(重发)
添加湍流模型遇到问题(重发)
添加湍流模型遇到问题(重发)