Dear AllOfYou, Based on the
Based on the existing fixedGradient boundary condition, I am trying to implement a boundary condition for thermal radiation against an environment temperature, i.e.
eps=emissivity, lambda=thermal conductivity, sigma=Stefan-Boltzmann-constant, TRef=environment temp., Tf= boundary face temp.
However, I cant multiply fields (for T^4). I tried to calculate TRef_*TRef_, as a first step, TRef_ beeing declared as Field<type> ... , same as gradient.
TRef_*=TRef gives a compiler error, telling me there is no operator *= taking as argument a
(I made a radFluxFvPatchField from the fixedGradientFvPatchField..)
No wonder, there is no such operator ... but why is my FvPatchField parameterized with Type = Foam::Vector<double> ? It belongs to a VolScalarField (Temperature), the dictionary looks like this:
dimensions [0 0 0 1 0 0 0];
internalField nonuniform List<scalar>
The boundary file like this:
gradient uniform 100;
reftemp uniform 1710;
So, I expected to get Type=double, and to have a field of doubles. Apparently, I have however a field of vectors of doubles.
Probably I got something completely wrong ... please enlighten me !
(Btw., if I just specify the gradient, the implementation works)
Hi, Sorry if it's too late
Sorry if it's too late to answer. Probably it's because you're trying to instantiate the b. c. code template with <type>==<vector> within radFluxFvPatchFields.C. If you followed the fixedGradient b. c. code straightforward you might have a line something like
in the file. In such case the b. c. code will be instantiated for all the scalar, vector, tensor and sphericalTensor classes. Instead you should explicitly specify only the scalar code to be instantiated by
in the .C file. Hope this helps.
Yes, that was the point. I jus
Yes, that was the point. I just did not read carefully enough the compiler messages.
Sorry for not posting I found it before and make you think about it - thanks a lot anyways !
Hello, I am interested in w
I am interested in writing a boundary condition that multiplies two fields that are solved for. I want the boundary condition to set the vertical gradient of a different field equal to this product. Can you please let me know how you went about writing your boundary condition.
Hello Shaun, As Takuya Oshi
As Takuya Oshima pointed out: I had to use the template specialized for scalar fields, i.e. base it on fvPatchScalarField instead of fvPatchField. If I got it correctly, there is no multiplication operator for vector fields ...
Good luck !
|All times are GMT -4. The time now is 12:48.|