可压流计算发散,出现Negative Initial Temperature 问题如何处理?
-
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