CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

dot product of vectorField and volVectorField

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By sahm
  • 1 Post By sahm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2017, 16:38
Red face dot product of vectorField and volVectorField
  #1
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17
sahm is on a distinguished road
Hi FOAMers

I have made a solver that part of it does solid heat diffusion. I want to add anisotropic thermal conductivity to this code, however part of the code has a convection boundary condition that requires to use the thermal conductivity normal to the boundary condition.

my problem is when I am defining a dot product of thermal conductivity (lambda) and the normal vector of the boundary surface:

Code:
vectorField NrmlVctr = this->patch().nf(); // vector normal to boundary
And Lambda is defined as a volVectorField in the createFields file.

This line gives an error:

Code:
this->valueFraction() = 1.0 / ( 1.0 + (lambda.boundaryField() & NrmlVctr)/(ConvCoeff_*mag(delta)) );
The code does not compile and gives an error that says operator& is not defined for these types of operands. Can someone help me resolve this problem?

Thanks.
nkv1990 and sonGoku like this.
__________________
SAHM
sahm is offline   Reply With Quote

Old   August 28, 2017, 00:40
Question Anisotropic heat diffusion equation
  #2
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17
sahm is on a distinguished road
Ok, it seems I got that problem kinda sorted out. I had to have it defined as:

Code:
(lambda.boundaryField()[patchindex].patchInternalField() & SurfaceNormalVector)
However, it seems the problem is more complicated than that. I need to define the thermal conductivity as a Tensor and modify heat diffusion equation in the solver based on that.
Do I need to change the form of heat diffusion equation? Or the discretization in OpenFOAM works based on that?

Thanks.
sonGoku likes this.
__________________
SAHM
sahm is offline   Reply With Quote

Old   August 28, 2017, 04:56
Default
  #3
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17
sahm is on a distinguished road
One more question. I am trying to redefine the convective boundary condition for Anisotropic material. How am I supposed to implement it? I have asked this question before for isotropic material, and someone helped me out. But that method used mixed patch boundary condition type. How can I use a similar thing?

Thanks.
__________________
SAHM
sahm is offline   Reply With Quote

Reply

Tags
anisotropic conductivity, boundary condition, inner product


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiplication of two volVectorField ChGr OpenFOAM Programming & Development 1 May 30, 2016 12:08
How to extract ONLY ONE Boundary data to make a VectorField File from volVectorField hy1112006 OpenFOAM Programming & Development 2 April 14, 2016 13:11
[mesh manipulation] Calculate cross product of mesh points and given vector DE25VT OpenFOAM Meshing & Mesh Conversion 5 January 13, 2016 11:05
power of vectorField matthias OpenFOAM Programming & Development 0 August 19, 2014 09:52
Create a Vectorfield joskate OpenFOAM Pre-Processing 0 May 8, 2013 11:22


All times are GMT -4. The time now is 17:24.