量纲问题:加入的fvm::susp部分总差个密度量纲?求大佬指点,我已黔驴技穷了
-
错误如下:
--> FOAM FATAL ERROR: incompatible dimensions for operation [omega[0 0 -2 0 0 0 0] ] - [omega[1 -3 -2 0 0 0 0] ]
我定义量部分:
const volVectorField& B = ( this->mesh_.objectRegistry::template lookupObject<volVectorField>("B") ); const volScalarField& sigmaMag = ( this->mesh_.objectRegistry::template lookupObject<volScalarField>("sigmaMag") ); volScalarField Ux = U.component(0); volScalarField Uy = U.component(1); volScalarField Uz = U.component(2); volScalarField Bx = B.component(0); volScalarField By = B.component(1); volScalarField Bz = B.component(2); volScalarField Scmag ( ((sigmaMag/rho)*(2.0*Ux*Uy*Bx*By) + (2.0*Ux*Uz*Bx*Bz) + (2.0*Uy*Uz*Bx*By) - (Uy*Uy + Uz*Uz)*Bx*Bx - (Ux*Ux + Uz*Uz)*By*By - (Uy*Uy + Ux*Ux)*Bz*Bz) );
加入一个fvm::susp部分:
tmp<fvScalarMatrix> omegaEqn ( fvm::ddt(alpha, rho, omega_) + fvm::div(alphaRhoPhi, omega_) - fvm::laplacian(alpha*rho*DomegaEff(F1), omega_) == alpha()*rho()*gamma *min ( GbyNu, //G (c1_/a1_)*betaStar_*omega_() *max(a1_*omega_(), b1_*F23()*sqrt(S2())) ) - fvm::SuSp((2.0/3.0)*alpha()*rho()*gamma*divU, omega_) //加入部分如下: - fvm::SuSp(0.1*alpha()*rho()*Scmag()/k_(), omega_) - fvm::Sp(alpha()*rho()*beta*omega_(), omega_) - fvm::SuSp ( alpha()*rho()*(F1() - scalar(1))*CDkOmega()/omega_(), omega_ ) + Qsas(S2(), gamma, beta) + omegaSource() + fvOptions(alpha, rho, omega_) );
量纲显示差一个密度,可我计算的Scmag量 [0,2,-3,0,0,0,0] 密度没差, 莫非是方程默认除了一个rho的单位?
-
fvm::SuSp(0.1*alpha()*rho()*Scmag()/k_(), omega_)
自己添加这一部分算下来确实如错误所示 [1,-3,-2,0,0,0,0]
fvm::SuSp((2.0/3.0)*alpha()*rho()*gamma*divU, omega_)
不理解的是这一部分 alpha gamma 无量纲,rho [1,-3,0,0,0,0,0] , divU [0,0,-1,0,0,0,0 ] , omega [0,0,-1,0,0,0,0] ,
按道理来说应该也是 [1,-3,-2,0,0,0,0],可错误显示其为 [0 0 -2 0 0 0 0],然后omegaSource定义的量纲:
kOmegaSST<TurbulenceModel, BasicTurbulenceModel>::omegaSource() const { return tmp<fvScalarMatrix> ( new fvScalarMatrix ( omega_, dimVolume*this->rho_.dimensions()*omega_.dimensions()/dimTime ) ); }
从这看是[ 1,0,-2,0,0,0,0] ???