求助:液池热毛细对流算例,已编译好求解器和算例,但就是和文献自编程序不一样
-
这是按照文献给出的边界条件
tmp<vectorField > marangoniFvPatchVectorField::snGrad() const { return this->patch().deltaCoeffs()*(*this - patchInternalField()); } // Evaluate the field on the patch void marangoniFvPatchVectorField::evaluate() { //Info << "entering marangoniFvPatchVectorField::evaluate()" << endl; if (!this->updated()) { //Info << "marangoniFvPatchVectorField::evaluate(): calling updatecoeffs" << endl; this->updateCoeffs(); } vectorField nHat = this->patch().nf(); vectorField pif = this->patchInternalField(); scalarField deltas=this->patch().deltaCoeffs(); fvPatchField<vector> gradT =this->patch().lookupPatchField<volVectorField, vector>("gradT"); vectorField gradT_internal = gradT.patchInternalField(); vectorField gradTplane= transform(I - sqr(nHat),gradT_internal); vectorField pifplane= transform(I - sqr(nHat),pif); fvPatchField<vector> gradC =this->patch().lookupPatchField<volVectorField, vector>("gradC"); vectorField gradC_internal = gradC.patchInternalField(); vectorField gradCplane= transform(I - sqr(nHat),gradC_internal); vectorField result=pifplane+(tmarangonicoeff_*gradTplane+cmarangonicoeff_*gradCplane)/deltas; vectorField::operator= ( result ); transformFvPatchVectorField::evaluate(); }