twoPhaseEulerFoam中的ITAE模型
-
各位老师,经过测试发现问题好像是fvm::laplacian(A,B)中的AB两个的数据类型不正确,对于第一个mesh注册的Tcell是没有问题的,对于第二个注册在phase_.U().mesh()内的Tcell就不可以进行计算。现在主要问题是怎么在ITAE.C中将T注册到mesh中,或者有什么办法能够在ITAE库中进行fvm::laplacian(A,B),标量传输方程正常计算,希望各位老师点拨一下,添加一个标量传输方程咋这么难,哎
volScalarField Tcell ( IOobject ( "Tcell", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); volScalarField Tcell ( IOobject ( "Tcell", // IOobject::groupName("Tcell", phase.name()), phase_.U().time().timeName(), phase_.U().mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), phase_.U().mesh()//T );
-
@东岳 东岳老师现在出现这个问题,麻烦老师有时间再给看看,谢谢谢谢
diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::diameterModels::IATEsources::randomCoalescence::R() const’: diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C:94:40: error: ‘mesh’ was not declared in this scope const volScalarField& TcellnowLX = mesh.lookupObject<volScalarField>("Tcell"); ^ diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C:94:72: error: expected primary-expression before ‘>’ token const volScalarField& TcellnowLX = mesh.lookupObject<volScalarField>("Tcell");
-
@东岳 东岳老师,现在植入进去也能编译成功了,但是开始计算就发散,错误代码如下,看了论坛上和网上的也没找到啥相关的资料,希望东岳老师再给点指导,谢谢
Starting jisuan kappai smoothSolver: Solving for kappai.air, Initial residual = 0.164043, Final residual = 3.33679e-07, No Iterations 2 Constructing momentum equations GAMG: Solving for p_rgh, Initial residual = 0.0861362, Final residual = 8.71808e-09, No Iterations 55 GAMG: Solving for p_rgh, Initial residual = 0.00100705, Final residual = 9.19158e-09, No Iterations 42 GAMG: Solving for p_rgh, Initial residual = 9.49796e-06, Final residual = 9.7128e-09, No Iterations 18 new cannot satisfy memory request. This does not necessarily mean you have run out of virtual memory. It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library 已放弃 (核心已转储)
植入代码如下:
ITAE.C中Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATE::Rph() const { //const volScalarField& T = phase_.thermo().T(); //const volScalarField& p = phase_.thermo().p(); const volScalarField& Tcellnow = phase_.U().mesh().lookupObject<volScalarField>("Tcell"); // scalar Teq = 275; //scalar rhohydrate = 850; // scalar phaseh = 50; //scalar qianre = 43500; dimensionedScalar Teq("Teq", dimensionSet(0,0,0,1,0), 275); dimensionedScalar rhohydrate("rhohydrate", dimensionSet(1,-3,0,0,0), 850); dimensionedScalar phaseh("phaseh", dimensionSet(1,1,-3,-1,0), 50); dimensionedScalar qianre("qianre", dimensionSet(0,2,-2,0,0), 43500); volScalarField delt(Tcellnow - Teq); volScalarField Rph(0.0085*phaseh*delt*phase_*pow(kappai_,5)/rhohydrate/qianre); volScalarField Dsm(max(6/max(kappai_, 6/dMax_), dMin_)); // volScalarField Dbc // ( // 4*sigma*vm/(constant::physicoChemical::k*T*log(p/ps)) //); return constant::mathematical::pi*sqr(Dsm)*Rph; }