CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Define an array of "volVectroField" type

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

LinkBack Thread Tools Display Modes
Old   June 20, 2013, 18:18
Default Define an array of "volVectroField" type
New Member
Join Date: Apr 2013
Posts: 16
Rep Power: 6
haghgoo_reza is on a distinguished road
Hi all,

When I define a variable "Uold" as:

volVectorField Uold("Uold", U);
Uold = U;

it works. However, I would like to define an array of Uold. I mean, I want to have Uold1, Uold2, ..... So When I define the above expression inside a loop it does not work I.e.

for (int i=1; i < 100; i++) {
volVectorField Uold[i] ("Uold", U);
Uold[i] = U;

Could anybody please help me how to define an array of the object "volVectroField" type?

haghgoo_reza is offline   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
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 04:32
buoyantSimpleRadiationFoam msarkar OpenFOAM 0 February 15, 2010 07:22
Flow Around a Cylinder ronaldo OpenFOAM 5 September 18, 2009 08:13
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24

All times are GMT -4. The time now is 04:21.