dimensionedScalar + volScalarField is evaluated elementwisely ?
Hello everyone,
I'd like to know if a dimensionedScalar (ex. T1) + volScalarField (ex. T) is still a volScalarField and the result is obtained elementwisely, that is : result(i)=T1+T(i). I need also to use a scalar function (ex. pos) determing the positivity of a scalar. If I apply this function to a volScalarField (ex. T), can I still obtain a volScalarField and result(i)=pos(T(i)) ? I wrote this because I'm now implementing a nonconstant diffusivity in the laplacianFoam solver. In mylaplacianFoam.C, I have Code:
DT=(a1+b1*T)*pos(T1T)+(a2+b2*T)*neg(T1T)*pos(T2T)+(a3+b3*T)*neg(T2T); In creatFields.H, I have Code:
volScalarField DT Thank you very much for your help !! 
Yes, pos(T  X), where T is a volScalarField and X is a dimensionedScalar will return a volScalarField.

All times are GMT 4. The time now is 23:47. 