CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development


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

LinkBack Thread Tools Display Modes
Old   June 3, 2013, 23:36
Default volVectorField
New Member
Join Date: Apr 2013
Posts: 16
Rep Power: 4
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?

haghgoo_reza is offline   Reply With Quote

Old   June 4, 2013, 05:29
Senior Member
Join Date: Feb 2010
Location: Stanford University
Posts: 236
Rep Power: 9
Cyp is on a distinguished road

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 :

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


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
subtract volvectorfield and dimensionedvector ggoggodak85 OpenFOAM Programming & Development 1 January 28, 2014 15:54
Pstream reduce sum volVectorField ganeshv OpenFOAM Running, Solving & CFD 0 December 11, 2012 15:35
dot product of volvectorfield latvietis OpenFOAM 1 November 20, 2012 03:16
[Problem] paraFoam Throws volVectorField Error At t=0 for 0/U iamed18 OpenFOAM Pre-Processing 2 June 4, 2012 13:15
Initialize a uniform 0 volVectorField Schag OpenFOAM 3 August 26, 2009 10:08

All times are GMT -4. The time now is 13:50.