CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Radiation bc problems multiplying fields

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 11, 2007, 11:15
Default Dear AllOfYou, Based on the
  #1
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
Dear AllOfYou,

Based on the existing fixedGradient boundary condition, I am trying to implement a boundary condition for thermal radiation against an environment temperature, i.e.

gradient=eps*sigma/lambda*(TRef^4-Tf^4)

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
Foam::radFluxFvPatchField<foam::vector<double> >
(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:

FoamFile
{
....

class volScalarField;
object T;
}

dimensions [0 0 0 1 0 0 0];

internalField nonuniform List<scalar>
.....

The boundary file like this:

boundaryField
{
top
{
type radFlux;
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)
tehache is offline   Reply With Quote

Old   January 30, 2007, 21:26
Default Hi, Sorry if it's too late
  #2
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi,

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

makePatchFields(radFlux);

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

template<>
makePatchTypeField(fvPatchScalarField, radFluxFvPatchScalarField);

in the .C file. Hope this helps.

Regards,
Takuya
7islands is offline   Reply With Quote

Old   January 31, 2007, 03:27
Default Yes, that was the point. I jus
  #3
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
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 !
tehache is offline   Reply With Quote

Old   February 5, 2007, 18:47
Default Hello, I am interested in w
  #4
Member
 
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 8
coops is on a distinguished road
Hello,

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.

Thankyou
coops is offline   Reply With Quote

Old   February 6, 2007, 03:37
Default Hello Shaun, As Takuya Oshi
  #5
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
Hello Shaun,

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 !

Thomas
tehache is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i give input for radiation problems balaji FLUENT 2 April 2, 2008 14:45
No matching function multiplying tensors for BC Erik OpenFOAM 3 March 20, 2008 14:05
Radiation in Periodic Problems Angus Duncan FLUENT 0 May 15, 2000 08:44
Problems with convergence and initial guessed fields in compressible steady flows Pedro Gil Main CFD Forum 3 April 25, 2000 11:34
Benchmark problems for radiation achuth rao Main CFD Forum 0 July 28, 1999 12:12


All times are GMT -4. The time now is 11:04.