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', 还请大家给点建议!十分感谢!
-
或许可以将代码改为用不可压缩求解器求解的边界上的温度和导热率来获得,边界上的传热量。例如:
if(db().foundObject<volScalarField>("T")) { const volScalarField& T = db().lookupObject<volScalarField>("T"); const fvPatchScalarField& Tp = T.boundaryField()[patchi]; qDot = kappa*Tp.snGrad(); }
其中
kappa
需要根据你的物性和边界上的温度场来计算获得
2020年9月30日 17:19
4/4
2020年10月2日 08:52