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

dot product of vectorField and volVectorField

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

Like Tree1Likes
  • 1 Post By sahm

Reply
 
LinkBack Thread Tools Display Modes
Old   August 24, 2017, 15: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: 103
Rep Power: 9
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 likes this.
__________________
SAHM
sahm is offline   Reply With Quote

Old   August 27, 2017, 23:40
Question Anisotropic heat diffusion equation
  #2
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 103
Rep Power: 9
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.
__________________
SAHM
sahm is offline   Reply With Quote

Old   August 28, 2017, 03:56
Default
  #3
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 103
Rep Power: 9
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

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
Multiplication of two volVectorField ChGr OpenFOAM Programming & Development 1 May 30, 2016 11:08
How to extract ONLY ONE Boundary data to make a VectorField File from volVectorField hy1112006 OpenFOAM Programming & Development 2 April 14, 2016 12:11
Calculate cross product of mesh points and given vector DE25VT OpenFOAM Mesh Utilities 5 January 13, 2016 11:05
power of vectorField matthias OpenFOAM Programming & Development 0 August 19, 2014 08:52
Create a Vectorfield joskate OpenFOAM Pre-Processing 0 May 8, 2013 10:22


All times are GMT -4. The time now is 18:36.