of10下pitzDaily案例调用SIMPLE算法,代码该如何修改?
-
of10下pitzDaily案例默认采用SIMPLEC算法,
consistent
为yes
SIMPLE { nNonOrthogonalCorrectors 0; consistent yes; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega|f|v2)" 1e-3; } }
我想试试用SIMPLE算法,把
consistent
改为no
,simpleFoam求解器里面的pEqn.H文件里有p.relax()
(即已经对压力场进行松弛),运行之后报错Time = 6s smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0894736, No Iterations 7 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0905951, No Iterations 7 #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::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? #5 Foam::GAMGSolver::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&) in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #8 Foam::fvMatrix<double>::solve() in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #9 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #10 ? in "/lib/x86_64-linux-gnu/libc.so.6" #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" 浮点异常 (核心已转储)
-
@李东岳 老师,我改了松弛因子,还是报错
SIMPLE { nNonOrthogonalCorrectors 0; consistent no; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega|f|v2)" 1e-3; } } 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 p 0.9; // } }
Time = 6s smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0894736, No Iterations 7 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0905951, No Iterations 7 #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::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? #5 Foam::GAMGSolver::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&) in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #8 Foam::fvMatrix<double>::solve() in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #9 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #10 ? in "/lib/x86_64-linux-gnu/libc.so.6" #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/simpleFoam" 浮点异常 (核心已转储)
-
这是一个非常入门的问题。你最好系统学一下openfoam:
http://dyfluid.com/openfoam11-2-1.html要不就参加课学一下 http://dyfluid.com/class.html
equations { ".*" 0.7; // 0.9 is more stable but 0.95 more convergent } fields { p 0.3; // }