HEATED
{
type externalWallHeatFluxTemperature;
mode flux;
q coded; // Heat flux
code
#{
scalar q=*this;
scalar t = this->db().time().value();
if(t >= 0 && t<=1.5)
{
q = 180000;
}
else if(t<=3)
{
q = 200000;
}
else if(t<=4.5)
{
q = 250000;
}
else if(t<=6)
{
q = 300000;
}
else
{
q = 0;
}
q.writeEntry("", os);
#};
value uniform 300;
kappaMethod lookup;
kappa "K";
}
/home/dyfluid/OpenFOAM/dyfluid-v2006/run/bianhuaQ/0/SOLID/T.boundaryField.HEATED:32:23: error: cannot convert ‘const Foam::PatchFunction1Types::qPatchFunction1ScalarField’ to ‘Foam::scalar’ {aka ‘double’} in initialization
/home/dyfluid/OpenFOAM/dyfluid-v2006/run/bianhuaQ/0/SOLID/T.boundaryField.HEATED:33:31: error: ‘const class Foam::PatchFunction1Types::qPatchFunction1ScalarField’ has no member named ‘db’
/home/dyfluid/OpenFOAM/dyfluid-v2006/run/bianhuaQ/0/SOLID/T.boundaryField.HEATED:55:9: error: request for member ‘writeEntry’ in ‘q’, which is of non-class type ‘Foam::scalar’ {aka ‘double’}
/home/dyfluid/OpenFOAM/dyfluid-v2006/run/bianhuaQ/0/SOLID/T.boundaryField.HEATED:55:24: error: ‘os’ was not declared in this scope; did you mean ‘cos’?