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

volVectorField

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2013, 23:36
Default volVectorField
  #1
New Member
 
reza
Join Date: Apr 2013
Posts: 16
Rep Power: 13
haghgoo_reza is on a distinguished road
Hello all,

I am trying to define a vector in openFoam with the following equation:
A = -fvc::div(phi, U)+fvc::laplacian(nu, U)

do you think I can use the following command to define my vector i.e. A.

volVectorField A("A", U);
A = -fvc::div(phi, U)+fvc::laplacian(nu, U);

I can not understand the meaning of A("A", U) in volVectorField A("A", U);

can anybody help me?

Thanks
haghgoo_reza is offline   Reply With Quote

Old   June 4, 2013, 05:29
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi,

Code:
volVectorField A("A", U);
means that your are creating a new volVectorField object declared as A. This object has to be constructed with a name, a dimension, a mesh.... Among the different constructors available, you can construct A from a name, and another volVectorField (U in this example). The main problem in your snippet is that with such a declaration, A should have the same dimensions as U. But it's wrong... I think the following code is better :

Code:
volVectorField A("A", -fvc::div(phi, U)+fvc::laplacian(nu, U));
Best,
Cyp
Cyp is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Problem] paraFoam Throws volVectorField Error At t=0 for 0/U iamed18 OpenFOAM Pre-Processing 3 April 11, 2016 10:03
subtract volvectorfield and dimensionedvector ggoggodak85 OpenFOAM Programming & Development 1 January 28, 2014 14:54
Pstream reduce sum volVectorField ganeshv OpenFOAM Running, Solving & CFD 0 December 11, 2012 14:35
dot product of volvectorfield latvietis OpenFOAM 1 November 20, 2012 02:16
Initialize a uniform 0 volVectorField Schag OpenFOAM 3 August 26, 2009 10:08


All times are GMT -4. The time now is 05:20.