从0开始计算没问题,停掉再续算过几步就出错
-
在compressibleInterFoam中添加组分方程,组分方程如下:
tmp<fv::convectionScheme<scalar>> mvConvection ( fv::convectionScheme<scalar>::New ( mesh, fields, alpharho2Phi, mesh.divScheme("div(phi,Yi)") ) ); { combustion->correct(); volScalarField Yt(0.0*Y[0]); alpharho2 = alpha2*rho2; alpharho2Phi = fvc::interpolate(alpharho2)*phi; volScalarField alphamuEff("alphamuEff",alpha2*turbulence.muEff()); forAll(Y, i) { if (i != inertIndex && composition.active(i)) { volScalarField& Yi = Y[i]; fvScalarMatrix YEqn ( fvm::ddt(alpharho2, Yi) + mvConvection->fvmDiv(alpharho2Phi, Yi) - fvm::laplacian(alphamuEff, Yi) == parcels.SYi(i, Yi) + combustion->R(Yi) + fvOptions(alpharho2, Yi) ); YEqn.relax(); fvOptions.constrain(YEqn); YEqn.solve("Yi"); fvOptions.correct(Yi); Yi.max(0.0); Yt += Yi; } } Y[inertIndex] = scalar(1) - Yt; Y[inertIndex].max(0.0); }
从0时刻开始计算没有问题,在某一时刻停掉计算后续算,没过几步就会报错,报错如下,请问各位有什么建议。
-
顶
-
@tens y方程是跟原本求解器偶合在一起的么?
-
@李东岳 老师说的耦合具体是指什么呢
-
@tens 除了添加y方程之外,还做了什么其他的改动么。
-
@李东岳 就算仿照sprayfoam进行添加的,createFields.H里还添加了下面部分,twoPhaseMixtureThermo里将RhoThermo改为了rhoReactionThermo,应该就这些。
rhoReactionThermo& thermo2 = mixture.thermo2(); basicSpecieMixture& composition = thermo2.composition(); PtrList<volScalarField>& Y = composition.Y(); const word inertSpecie(thermo2.lookup("inertSpecie")); if (!composition.species().found(inertSpecie)) { FatalIOErrorIn(args.executable().c_str(), thermo2) << "Inert specie " << inertSpecie << " not found in available species " << composition.species() << exit(FatalIOError); } const label inertIndex(composition.species()[inertSpecie]); multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; forAll(Y, i) { fields.add(Y[i]); } surfaceScalarField alpharho2 ( IOobject ( "alphaRho2Phi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), alpha2*rho2 ); surfaceScalarField alphaRho2Phi ( IOobject ( "alphaRho2Phi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), fvc::interpolate(alpha2*rho2)*phi );
-
@tens 您好,我也遇到了相似的情况,请问最后解决了吗?
-
@fkingdom 现在没有这个问题了,不过现在的方程以及求解器改动很多,我也不知道是什么导致的这个问题