externalCoupledTemperature 怎么用在不可压缩solver中?
-
大家好,
最近在用externalCoupledTemperature 边界条件,这个是用来把OpenFOAM solver和其他cfd联系起来。但是目前这个BC只能用在compressible solver里面,原因可见下面的code. 基本上就是,它需要‘he'和’alpha‘,但这些传热量只能在thermo库里找到。因为incomopressible solver是分开求解温度的,只有transport库,所以会报错。
if (db().foundObject<cmpTurbModelType>(turbName)) { const cmpTurbModelType& turbModel = db().lookupObject<cmpTurbModelType>(turbName); const basicThermo& thermo = turbModel.transport(); const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi]; qDot = turbModel.alphaEff(patchi)*hep.snGrad(); } else if (db().foundObject<basicThermo>(thermoName)) { const basicThermo& thermo = db().lookupObject<basicThermo>(thermoName); const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi]; qDot = thermo.alpha().boundaryField()[patchi]*hep.snGrad(); } else { FatalErrorInFunction << "Condition requires either compressible turbulence and/or " << "thermo model to be available" << exit(FatalError); }
现在想修改一下这个BC, 让它可以在incompressible solver中也得到’he', 'alpha', 还请大家给点建议!十分感谢!