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

multiplication of scalar and volVectorField

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 26, 2012, 11:29
Default multiplication of scalar and volVectorField
  #1
Member
 
Join Date: Jun 2011
Posts: 42
Rep Power: 14
mikeP is on a distinguished road
Hi,
I use following two methods in order to get the multiplication of Reynolds number and drag coefficient. (Drag coefficient, Cd, here is assumed constant scalar here for convenience)

Code:
Re = (magUr*dp*rhoa)/mua;
CdRe = 0.5*Re;
Code:
Re = (magUr*dp*rhoa)/mua;
forAll (Re, celli) 
{
     CdRe[celli] = 0.5*Re[celli];
}
These should give the same volScalarField, CdRe.
However, when I use these two code parts, I get different velocity field results at the end.
Are these two code parts exactly the same? or can they give different results when I, let's say, interpolate them?

Last edited by mikeP; March 27, 2012 at 04:13.
mikeP is offline   Reply With Quote

 


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
Climbing inlet pressure with simpleFoam and directMappedPatches chegdan OpenFOAM Running, Solving & CFD 1 January 2, 2012 19:35


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