Smagorinsky模型不输出k_sgs场
- 
							
							
							
							
可以做如下改动进行输出,至少适用于OpenFOAM-8 - 打开Smagorinsky.H,添加k_:
 // Protected data dimensionedScalar Ck_; volScalarField k_;//这是添加的一行 // Protected Member Functions- 打开Smagorinsky.C,添加下面代码:
 : LESeddyViscosity<BasicMomentumTransportModel> ( type, alpha, rho, U, alphaRhoPhi, phi, transport ), Ck_ ( dimensioned<scalar>::lookupOrAddToDict ( "Ck", this->coeffDict_, 0.094 ) ),//这里加个逗号 //下面是添加的 k_ ( IOobject ( IOobject::groupName("k", this->alphaRhoPhi_.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ) { if (type == typeName) { this->printCoeffs(type); } }correctnut()函数通过下面代码替换:void Smagorinsky<BasicMomentumTransportModel>::correctNut() { k_ = (this->k(fvc::grad(this->U_))); this->nut_ = Ck_*this->delta()*sqrt(k_); this->nut_.correctBoundaryConditions(); fv::options::New(this->mesh_).correct(this->nut_); }
- 打开Smagorinsky.H,添加
- 
	 李 李东岳 被引用 于这个主题 李 李东岳 被引用 于这个主题
- 
	 李 李东岳 被引用 于这个主题 李 李东岳 被引用 于这个主题
- 
	 李 李东岳 被引用 于这个主题 李 李东岳 被引用 于这个主题
- 
	 李 李东岳 被引用 于这个主题 李 李东岳 被引用 于这个主题
- 
	 李 李东岳 被引用 于这个主题 李 李东岳 被引用 于这个主题
- 
							
							
							
							
@李东岳epsilon()函数要不要改 template<class BasicTurbulenceModel> tmp<volScalarField> tshbSmagorinsky<BasicTurbulenceModel>::epsilon() const { k_ = (this->k(fvc::grad(this->U_))); return volScalarField::New ( IOobject::groupName("epsilon", this->alphaRhoPhi_.group()), this->Ce_*k_*sqrt(k_)/this->delta() ); }
 
			
 
 

