目前我只会做到在边界某段添加固定温度,整个边界都使用热流密度条件也是可以的,请问如何在边界的某段添加热流密度边界~比如下面这段0.000333<=x<=0.000666使用热流边界 应该如何修改~
OUTLET
{
type codedFixedValue;
name heated;
value uniform 300;
codeInclude
#{
#include "fvCFD.H"
#};
codeOptions
#{
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
#};
//libs needed to visualize BC in paraview
codeLibs
#{
-lmeshTools \
-lfiniteVolume
#};
code
#{
/*const IOdictionary& d = static_cast<const IOdictionary&>
(
dict.parent().parent()
);
const fvMesh& mesh = refCast<const fvMesh>(d.db());
const label id = mesh.boundary().findPatchID("OUTLET");
const fvPatch& patch = mesh.boundary()[id];*/
scalarField T(patch().size(), 300);
forAll(T, i)
{
const scalar x = patch().Cf()[i][0];
//const scalar y = patch.Cf()[i][1];
//const scalar z = patch.Cf()[i][2];
if(x>=0.000333||x<=0.000666)
{
T[i] = 400;
}
else
{
T[i] = 300;
}
}
(*this)==T;//T.writeEntry("", os);
#};
}