可压流计算发散,出现Negative Initial Temperature 问题如何处理?
-
文件太大,传不上来。
截个图,有个球(wall),前(inlet)后(outlet)周围(far)——一组freestream。
就这么简单。。。
其他几个即把球换成cube/auger。。。其他一样。 -
可能的原因太多了,先检查boundary conditions,你可以把case上传来看一下。
假如试了不同的BCs, 还是有问题。可以先做一些简单尝试。
rhoC 在做高mach number时候,出现这个错误,可以尝试把第一步dt降低很多。
rhoS 可能和simple算法有关,你可以在fvOption里面加个限制温度的:limitTemperature { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; Tmin 300; Tmax 400; } }
感觉你的thermo设定可能也有问题,你可以把file放上来看看。
还有mesh,checkMesh结果怎么样? -
@sibo 好的,不过验证下来,限制器是没用的,很迷。。
thermo是根据翼型算例里的,应该是标准气体。FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } mixture // air at room temperature (293 K) { specie { molWeight 28.9; } thermodynamics { Cp 1005; Hf 0; } transport { mu 1.82e-05; Pr 0.71; } }
球文件压不到500k,我看看cube的,或者分开传一下。
-
我在functions中添加了minMax函数,监视了全流场的问题,发现并没有出现负温度。
# Field minima and maxima # Time field min location(min) max location(max) 1.2e-07 T 2.696479e+02 (8.215994e-03 5.250372e-03 2.435636e-03) 4.495993e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 2.20464e-07 T 2.694329e+02 (8.215994e-03 5.250372e-03 2.435636e-03) 5.149109e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 3.19452e-07 T 2.686871e+02 (-4.566989e-03 -8.019550e-03 -3.996615e-03) 5.535878e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 4.09167e-07 T 2.671276e+02 (-4.566989e-03 -8.019550e-03 -3.996615e-03) 5.876730e+02 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 4.93006e-07 T 2.666568e+02 (-4.566989e-03 -8.019550e-03 -3.996615e-03) 6.216799e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 5.72842e-07 T 2.661139e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 6.627089e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 6.49727e-07 T 2.651325e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 7.059861e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 7.24235e-07 T 2.642410e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 7.499664e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 7.96689e-07 T 2.634214e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 7.918172e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 8.6744e-07 T 2.626692e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 8.301858e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 9.36681e-07 T 2.619985e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 8.650293e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.00439e-06 T 2.614332e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 8.981848e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.07061e-06 T 2.609977e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 9.314664e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.13543e-06 T 2.606904e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 9.654756e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.19901e-06 T 2.604919e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 9.995595e+02 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.26153e-06 T 2.603746e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.032485e+03 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.32317e-06 T 2.603055e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.063088e+03 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.38406e-06 T 2.602539e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.090833e+03 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.44424e-06 T 2.601999e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.115950e+03 (9.916511e-03 1.748913e-03 -5.809184e-05) 1.50377e-06 T 2.601390e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.146849e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.56264e-06 T 2.600686e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.184469e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.62088e-06 T 2.599937e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.223112e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.67851e-06 T 2.599313e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.262965e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.73554e-06 T 2.599109e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.304196e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.79202e-06 T 2.599541e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.346820e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.84798e-06 T 2.600679e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.390685e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.90342e-06 T 2.602450e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.435474e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 1.95831e-06 T 2.604679e+02 (1.893625e-03 -2.021107e-03 9.696002e-03) 1.480803e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.01266e-06 T 2.604930e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.526320e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.06651e-06 T 2.594643e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.571781e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.11988e-06 T 2.582964e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.617080e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.17283e-06 T 2.570010e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.662265e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.22544e-06 T 2.556032e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.707489e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.27762e-06 T 2.541266e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.752686e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.32941e-06 T 2.525931e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.797121e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.3808e-06 T 2.510305e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.840190e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.43172e-06 T 2.494642e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.881550e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.48221e-06 T 2.479078e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.921795e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.53229e-06 T 2.463724e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.961208e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.58197e-06 T 2.448671e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 1.999808e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.63126e-06 T 2.433945e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.037475e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.68016e-06 T 2.419388e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.074062e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.72869e-06 T 2.404851e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.109503e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.77683e-06 T 2.390233e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.143836e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.82461e-06 T 2.375487e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.177186e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.87201e-06 T 2.360618e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.209711e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.91903e-06 T 2.345656e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.241571e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 2.96567e-06 T 2.330655e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.272895e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.01194e-06 T 2.315676e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.303771e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.05785e-06 T 2.300780e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.334254e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.1034e-06 T 2.286014e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.364381e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.14862e-06 T 2.271408e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.394175e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.19349e-06 T 2.256986e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.423653e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.23803e-06 T 2.242881e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.452803e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.28223e-06 T 2.229222e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.481638e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.32611e-06 T 2.216107e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.510185e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.36968e-06 T 2.203596e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.538467e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.41296e-06 T 2.191721e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.566500e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.45594e-06 T 2.180492e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.594293e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.49864e-06 T 2.169918e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.621849e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.54106e-06 T 2.160029e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.649166e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.58321e-06 T 2.150895e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.676222e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.6251e-06 T 2.142638e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.703003e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.66673e-06 T 2.135495e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.729486e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.7081e-06 T 2.130327e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.755586e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.74922e-06 T 2.127382e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.781383e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.79009e-06 T 2.125651e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.806984e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.83071e-06 T 2.125015e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.832461e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.87005e-06 T 2.125518e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.857208e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.90524e-06 T 2.127180e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 2.879415e+03 (-1.000665e-02 -2.174274e-04 -1.385346e-03) 3.93612e-06 T 2.129961e+02 (7.378156e-03 -6.804851e-03 9.365358e-04) 7.343916e+03 (2.644925e-03 -9.205346e-05 -9.943070e-03)
这个Negative Initial Temperature好像是最后一次迭代中对应initial residual出现的。。。
@sibo -
这是最后一步计算后出现的报错。
deltaT = 2.51006e-08 Mean and max Courant Numbers = 0.00325402 0.556524 Time = 3.96122e-06 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 7.83279e-08, Final residual = 2.39049e-06, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 1.35404e-07, Final residual = 1.61978e-06, No Iterations 1000 smoothSolver: Solving for Uz, Initial residual = 1.24936e-07, Final residual = 1.71417e-06, No Iterations 1000 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for e, Initial residual = 1.26486e-08, Final residual = 1.47147e-05, No Iterations 1000 --> FOAM FATAL ERROR: Negative initial temperature T0: -26044 From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const, bool) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>] in file /home/rebel/OpenFOAM/OpenFOAM-7/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const at ??:? #3 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:? #4 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? #5 ? in "/home/rebel/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 ? in "/home/rebel/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam"
-
残差监视,也没有过高量级的残差。。。
# Residuals # Time rho Ux Uy Uz rhoUx rhoUy rhoUz e rhoE 1.2e-07 0.000000e+00 9.999998e-01 9.999987e-01 9.999987e-01 0.000000e+00 0.000000e+00 0.000000e+00 7.969064e-06 0.000000e+00 2.20464e-07 0.000000e+00 2.111891e-06 1.380125e-05 4.022545e-06 0.000000e+00 0.000000e+00 0.000000e+00 1.313458e-07 0.000000e+00 3.19452e-07 0.000000e+00 1.264645e-06 1.060253e-05 3.560864e-06 0.000000e+00 0.000000e+00 0.000000e+00 1.072603e-07 0.000000e+00 4.09167e-07 0.000000e+00 8.909982e-07 7.791157e-06 3.130739e-06 0.000000e+00 0.000000e+00 0.000000e+00 8.653875e-08 0.000000e+00 4.93006e-07 0.000000e+00 6.980943e-07 6.014070e-06 2.919484e-06 0.000000e+00 0.000000e+00 0.000000e+00 7.321404e-08 0.000000e+00 5.72842e-07 0.000000e+00 5.830812e-07 4.767039e-06 2.802532e-06 0.000000e+00 0.000000e+00 0.000000e+00 6.407240e-08 0.000000e+00 6.49727e-07 0.000000e+00 5.076418e-07 3.877868e-06 2.757184e-06 0.000000e+00 0.000000e+00 0.000000e+00 5.741409e-08 0.000000e+00 7.24235e-07 0.000000e+00 4.533701e-07 3.258493e-06 2.747260e-06 0.000000e+00 0.000000e+00 0.000000e+00 5.230926e-08 0.000000e+00 7.96689e-07 0.000000e+00 4.120860e-07 2.797531e-06 2.719957e-06 0.000000e+00 0.000000e+00 0.000000e+00 4.823362e-08 0.000000e+00 8.6744e-07 0.000000e+00 3.798487e-07 2.445596e-06 2.661090e-06 0.000000e+00 0.000000e+00 0.000000e+00 4.496448e-08 0.000000e+00 9.36681e-07 0.000000e+00 3.528057e-07 2.173716e-06 2.574432e-06 0.000000e+00 0.000000e+00 0.000000e+00 4.225028e-08 0.000000e+00 1.00439e-06 0.000000e+00 3.283802e-07 1.954853e-06 2.469235e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.986102e-08 0.000000e+00 1.07061e-06 0.000000e+00 3.059676e-07 1.783138e-06 2.365464e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.775424e-08 0.000000e+00 1.13543e-06 0.000000e+00 2.856882e-07 1.649840e-06 2.271488e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.591306e-08 0.000000e+00 1.19901e-06 0.000000e+00 2.679408e-07 1.542351e-06 2.183317e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.432737e-08 0.000000e+00 1.26153e-06 0.000000e+00 2.527546e-07 1.454461e-06 2.101230e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.297916e-08 0.000000e+00 1.32317e-06 0.000000e+00 2.397965e-07 1.381828e-06 2.032610e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.182791e-08 0.000000e+00 1.38406e-06 0.000000e+00 2.287559e-07 1.318413e-06 1.970739e-06 0.000000e+00 0.000000e+00 0.000000e+00 3.082433e-08 0.000000e+00 1.44424e-06 0.000000e+00 2.191165e-07 1.260639e-06 1.915664e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.992920e-08 0.000000e+00 1.50377e-06 0.000000e+00 2.106629e-07 1.207516e-06 1.863491e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.911098e-08 0.000000e+00 1.56264e-06 0.000000e+00 2.031014e-07 1.158085e-06 1.805849e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.835210e-08 0.000000e+00 1.62088e-06 0.000000e+00 1.962955e-07 1.112931e-06 1.741463e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.764534e-08 0.000000e+00 1.67851e-06 0.000000e+00 1.900939e-07 1.072154e-06 1.669848e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.698383e-08 0.000000e+00 1.73554e-06 0.000000e+00 1.844539e-07 1.034941e-06 1.592339e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.636862e-08 0.000000e+00 1.79202e-06 0.000000e+00 1.793699e-07 1.000207e-06 1.511384e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.580314e-08 0.000000e+00 1.84798e-06 0.000000e+00 1.747606e-07 9.661514e-07 1.428961e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.527796e-08 0.000000e+00 1.90342e-06 0.000000e+00 1.704691e-07 9.317723e-07 1.346577e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.477445e-08 0.000000e+00 1.95831e-06 0.000000e+00 1.664211e-07 8.963859e-07 1.267936e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.428668e-08 0.000000e+00 2.01266e-06 0.000000e+00 1.626056e-07 8.606177e-07 1.194401e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.382032e-08 0.000000e+00 2.06651e-06 0.000000e+00 1.590113e-07 8.257931e-07 1.128202e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.338027e-08 0.000000e+00 2.11988e-06 0.000000e+00 1.556542e-07 7.923155e-07 1.069886e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.297143e-08 0.000000e+00 2.17283e-06 0.000000e+00 1.525269e-07 7.609180e-07 1.017447e-06 0.000000e+00 0.000000e+00 0.000000e+00 2.259820e-08 0.000000e+00 2.22544e-06 0.000000e+00 1.496164e-07 7.324782e-07 9.736410e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.226887e-08 0.000000e+00 2.27762e-06 0.000000e+00 1.465346e-07 7.066297e-07 9.352919e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.191912e-08 0.000000e+00 2.32941e-06 0.000000e+00 1.434877e-07 6.848880e-07 8.998991e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.158714e-08 0.000000e+00 2.3808e-06 0.000000e+00 1.405301e-07 6.660989e-07 8.692597e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.126029e-08 0.000000e+00 2.43172e-06 0.000000e+00 1.375274e-07 6.494031e-07 8.415419e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.091895e-08 0.000000e+00 2.48221e-06 0.000000e+00 1.347307e-07 6.358199e-07 8.170828e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.059843e-08 0.000000e+00 2.53229e-06 0.000000e+00 1.321691e-07 6.252074e-07 7.936747e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.029541e-08 0.000000e+00 2.58197e-06 0.000000e+00 1.297971e-07 6.172238e-07 7.706426e-07 0.000000e+00 0.000000e+00 0.000000e+00 2.000658e-08 0.000000e+00 2.63126e-06 0.000000e+00 1.275390e-07 6.113378e-07 7.484031e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.972816e-08 0.000000e+00 2.68016e-06 0.000000e+00 1.253656e-07 6.071383e-07 7.279950e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.945779e-08 0.000000e+00 2.72869e-06 0.000000e+00 1.232757e-07 6.040237e-07 7.093294e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.919438e-08 0.000000e+00 2.77683e-06 0.000000e+00 1.212711e-07 6.014336e-07 6.916158e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.893779e-08 0.000000e+00 2.82461e-06 0.000000e+00 1.193412e-07 5.995559e-07 6.748759e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.868760e-08 0.000000e+00 2.87201e-06 0.000000e+00 1.174162e-07 5.975158e-07 6.590531e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.843867e-08 0.000000e+00 2.91903e-06 0.000000e+00 1.155349e-07 5.954072e-07 6.447285e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.819406e-08 0.000000e+00 2.96567e-06 0.000000e+00 1.137252e-07 5.931181e-07 6.318952e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.795449e-08 0.000000e+00 3.01194e-06 0.000000e+00 1.120094e-07 5.904828e-07 6.202738e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.772064e-08 0.000000e+00 3.05785e-06 0.000000e+00 1.104089e-07 5.873203e-07 6.096358e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.749415e-08 0.000000e+00 3.1034e-06 0.000000e+00 1.089088e-07 5.834934e-07 5.999317e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.727551e-08 0.000000e+00 3.14862e-06 0.000000e+00 1.075045e-07 5.789331e-07 5.913303e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.706551e-08 0.000000e+00 3.19349e-06 0.000000e+00 1.061978e-07 5.736304e-07 5.838156e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.686157e-08 0.000000e+00 3.23803e-06 0.000000e+00 1.049280e-07 5.674663e-07 5.759674e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.665733e-08 0.000000e+00 3.28223e-06 0.000000e+00 1.037199e-07 5.610776e-07 5.664174e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.646217e-08 0.000000e+00 3.32611e-06 0.000000e+00 1.026262e-07 5.553960e-07 5.553930e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.627663e-08 0.000000e+00 3.36968e-06 0.000000e+00 1.015751e-07 5.504035e-07 5.461241e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.609845e-08 0.000000e+00 3.41296e-06 0.000000e+00 1.005783e-07 5.461918e-07 5.380770e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.592607e-08 0.000000e+00 3.45594e-06 0.000000e+00 9.962924e-08 5.417998e-07 5.316262e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.575875e-08 0.000000e+00 3.49864e-06 0.000000e+00 9.868994e-08 5.364300e-07 5.271556e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.559594e-08 0.000000e+00 3.54106e-06 0.000000e+00 9.775988e-08 5.297018e-07 5.244551e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.543719e-08 0.000000e+00 3.58321e-06 0.000000e+00 9.685555e-08 5.212361e-07 5.243078e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.528209e-08 0.000000e+00 3.6251e-06 0.000000e+00 9.599998e-08 5.106776e-07 5.261937e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.513169e-08 0.000000e+00 3.66673e-06 0.000000e+00 9.522452e-08 4.981649e-07 5.309171e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.498467e-08 0.000000e+00 3.7081e-06 0.000000e+00 9.447989e-08 4.834693e-07 5.399841e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.484131e-08 0.000000e+00 3.74922e-06 0.000000e+00 9.373951e-08 4.650713e-07 5.559061e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.470077e-08 0.000000e+00 3.79009e-06 0.000000e+00 9.302561e-08 4.428461e-07 5.819536e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.456339e-08 0.000000e+00 3.83071e-06 0.000000e+00 9.230840e-08 4.134616e-07 6.302120e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.442646e-08 0.000000e+00 3.87005e-06 0.000000e+00 8.938145e-08 3.709697e-07 7.065025e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.393026e-08 0.000000e+00 3.90524e-06 0.000000e+00 7.964536e-08 2.828025e-07 9.510157e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.239615e-08 0.000000e+00 3.93612e-06 0.000000e+00 7.408702e-08 3.766166e-07 6.964435e-07 0.000000e+00 0.000000e+00 0.000000e+00 1.131394e-08 0.000000e+00
-
rcf_sphere_laminar.zip
@sibo 这里面差个polyMesh,那个文件有点大。 -
观察输出的迭代信息,发现,U rhoU rhoE三个值始终残差为0,我以为是不需要设置求解的,尝试在fvsolution中注销掉了,发现计算运行时会报错,说这几个量没有定义。。。定义了好像又不求解。。这是怎么回事呢?
而且我rcf迭代中,final残差总是比final残差大。。几个量级。。
并发现,上一步的final并不是下一步的initial残差。这是怎么回事呀?
初始残差一般都是10的-7量级,怎么迭代后越来越大,但是下一步的初始残差还是e-7。。。 要被虐哭了,大佬帮帮我。deltaT = 8.38392e-08 Mean and max Courant Numbers = 0.010868 0.525071 Time = 4.93006e-07 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 6.98094e-07, Final residual = 3.53286e-05, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 6.01407e-06, Final residual = 5.40888e-05, No Iterations 1000 smoothSolver: Solving for Uz, Initial residual = 2.91948e-06, Final residual = 2.84312e-05, No Iterations 1000 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for e, Initial residual = 7.3214e-08, Final residual = 0.000463259, No Iterations 1000 ExecutionTime = 48.36 s ClockTime = 54 s
-
log.zip
上传一个log文件。。。 -
@RebelYoung
你这个log是rhoC的吧?你的case是inviscid还是viscous flow? rhoCentralFoam对待inviscid flow是用的explicit方法求解,所以假如你没有viscosity,用diagonal solver时,residual就是0. -
@RebelYoung
建议先查boundary conditions;还有mesh,你的checkMesh结果呢 -
以上基本描述的都是rhoCentralFoam问题,报错是Negative Initial Temperature,但是全场最小温度并没有负值。。
这个rcf_sphere_laminar是根据,$FOAM_TUTORIALS/compressible/rhoCentralFoam/obliqueShock改的。是层流计算,/0下设置了p,T,U三个量。
以下贴出rhoC 0下文件:
./0/pFoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 100000; boundaryField { ball { type zeroGradient; } inlet { type zeroGradient; } outlet { type fixedValue; value uniform 100000; } far { type zeroGradient; } }
./0/T
FoamFile { version 2.0; format ascii; class volScalarField; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 270; boundaryField { ball { type zeroGradient; } inlet { type fixedValue; value uniform 270; } outlet { type zeroGradient; } far { type fixedValue; value uniform 270; } }
./0/U
其中U从1到250,都算过。都出现能量方程发散或negative initial temperature问题。FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (1 0 0); boundaryField { ball { type noSlip; } inlet { type fixedValue; value uniform (1 0 0); } outlet { type zeroGradient; } far { type fixedValue; value uniform (1 0 0); } }
checkMesh结果:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 28680 faces: 309924 internal faces: 293684 cells: 150902 faces per cell: 4 boundary patches: 4 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 0 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 150902 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology ball 9780 4892 ok (closed singly connected) far 4404 2278 ok (non-closed singly connected) inlet 1028 553 ok (non-closed singly connected) outlet 1028 553 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.1 -0.1 -0.1) (0.1 0.1 0.1) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (1.54762e-16 -1.49987e-17 -1.09064e-16) OK. Max cell openness = 3.03063e-16 OK. Max aspect ratio = 5.29154 OK. Minimum face area = 3.38388e-08. Maximum face area = 0.000137468. Face area magnitudes OK. Min volume = 4.46514e-12. Max volume = 4.98913e-07. Total volume = 0.00799582. Cell volumes OK. Mesh non-orthogonality Max: 58.0988 average: 22.4508 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.67456 OK. Coupled point location match (average 0) OK. Mesh OK. End
./constant/thermophysicalProperties: 此文件根据rhoS中计算翼型的文件修改,因为原算例是想控制mach数等原因,改的不符合物理性质,且mu=0。我将其改成了正常参数。
FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } mixture { // normalised gas specie { molWeight 28.9; } thermodynamics { Cp 1005; Hf 0; } transport { mu 1.8e-5; Pr 0.71; } }
FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar;
-
最新看到的说法是,T估算值或者插值中出现了问题。比如方程解的是h,那么从h=cp(T)T中解出T的估算值,结果是负的。。
rhoC解的是e,那么e=CvT,cv基本不变,那应该是e出现负值导致T出现负值。。。 -
@RebelYoung 出现负值不代表计算结果是负的。数值溢出也会成负值。就是大到极限了。
温度的 min max 最后一步最大值不但跳增,而且离上一个坐标点很远,这很明显有问题啊。一个时间步至少增长了4000K,你的时间步还那么的小。这种增长率很可能是数值溢出了。
如果问题描述搭的附件太多,会看起来很难成一体,即使尽力地暗逻辑描述。一般这种状况的信息是像引用文献那样表述的。下面是个例子,自由软件基金会的公开邮件。不过因为是纯文本格式的,所以网址是直接贴的,你可以用超链接。
这样主体信息和逻辑就不会被附件打断了。现在看你的帖子有种听微信语音的感觉
This spring, as the time for planning our [biannual appeal][1] came around, we discussed the difficult time all of us are experiencing: charities like us, the free software community, and every individual. And it led us to consider why people from all walks of life cherish user freedom. [1]: https://www.fsf.org/appeal?pk_campaign=frspring2020&pk_source=collab1 The socially distant, digital way in which we are carrying on our work and private lives is affecting our software freedom. Globally, decisions to transition to an online and remote life were made with less consideration than we normally put into them, giving proprietary corporations access to parts of our lives we normally protect. Lately, we have been pointing to grim examples of [bulk surveillance][2] and [privacy violations][3] in the realms of education and [communication][4] to help everyone understand why this fight is so important. [2]: https://www.fsf.org/blogs/community/remote-education-does-not-require-giving-up-rights-to-freedom-and-privacy [3]: https://www.fsf.org/bulletin/2019/spring/its-not-just-about-privacy [4]: https://www.fsf.org/blogs/community/better-than-zoom-try-these-free-software-tools-for-staying-in-touch