CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   how to add an extra dimension to internalField data type? (http://www.cfd-online.com/Forums/openfoam-solving/102089-how-add-extra-dimension-internalfield-data-type.html)

chenhu May 22, 2012 04:55

how to add an extra dimension to internalField data type?
 
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 May 23, 2012 09:19

Problem solved!
 
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


All times are GMT -4. The time now is 06:07.