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

how to add an extra dimension to internalField data type?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By chenhu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2012, 04:55
Wink how to add an extra dimension to internalField data type?
  #1
New Member
 
Chen Huang
Join Date: Jul 2009
Location: Gothenburg, Sweden
Posts: 11
Rep Power: 16
chenhu is on a distinguished road
Hello!

I am wondering if there is anyone who knows how to define a data type with an extra dimension to the internalField data.

E.g. the unburnt temperature at celli can be called as follows,
thermo.Tu().internalField()[celli]

Can I have a data type which has an extra dimension as follows
thermo.Tu().internalField()[celli][extra dimension]?

Thanks for the help!

Chen
chenhu is offline   Reply With Quote

Old   May 23, 2012, 09:19
Default Problem solved!
  #2
New Member
 
Chen Huang
Join Date: Jul 2009
Location: Gothenburg, Sweden
Posts: 11
Rep Power: 16
chenhu is on a distinguished road
I defined a list of volScalarField like following

PtrList<volScalarField> variable(100);

which means variable has 100 elments which are volScalarField.

I call each elements like the following:

variable[1][celli]

which means I call the celli of the second element (a volScalarField).

I can get access of the internal and boundaryField as following,

variable[1].internalField()[celli]


Chen
shash likes this.
chenhu is offline   Reply With Quote

Reply


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
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 8 July 1, 2022 06:54
compilation problem with "fvPatch::lookupPatchField" Ya_Squall2010 OpenFOAM Programming & Development 9 November 15, 2021 22:01
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 04:32
buoyantSimpleRadiationFoam msarkar OpenFOAM 0 February 15, 2010 06:22
pipe flow with heat transfer Fabian OpenFOAM 2 December 12, 2009 04:53


All times are GMT -4. The time now is 23:17.