|
[Sponsors] |
February 10, 2011, 10:59 |
Access to field data
|
#1 |
New Member
johannes
Join Date: Feb 2011
Posts: 7
Rep Power: 15 |
hello
Probably I got a very simple question, but I'm new at openfoam and so I don't see the problem. I'm working with icoFoam and in icoFoam I'm able to display each component of U: Pout<< icoFoam.C u: " << U.internalField()[0][0] << endl; then icoFoam calls fvm::div, which can also display each one: (U is now named vf) Pout<<"fvmDiv.C div1 u:" << vf.internalField()[0][0] << endl; div calls convectionScheme<Type>::New(vf.mesh(),flux,vf.mesh ().divScheme(name) )().fvmDiv(flux, vf), which calls gaussConvectionScheme. and there I'm not able to access Pout<<"gaussConvectionScheme.C fvmdiv1 u:" << vf.internalField()[0][0] << endl; what's the reason for being able to access to vf.internalField()[0], but not to vf.internalField()[0][0] ? thanks for your help |
|
February 10, 2011, 11:29 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
I'm not sure what you want to reach here? Maybe you can explain it, because most likely there is a much easier solution.
Anyhow, the divergence of a vector gives you a scalar, so div(U) has no vector-components. |
|
February 10, 2011, 12:45 |
|
#3 |
New Member
johannes
Join Date: Feb 2011
Posts: 7
Rep Power: 15 |
Well, the thing I should do is to implement an alternative way of calculating the convection term.
The calculation is made by an scheme invonked by gaussConvectionScheme. (It's not my idea but I've got to do it). In this scheme I've got to do some calculations with U-values. These values are imparted from icoFoam to fvmDiv and so on in a geometricField. There's nowhere any manipulation but beginning at gaussConvectionScheme I cannot access each component of the U vectors. I can do addition and multiplikation with scalars on the hole vector, but nothing for example on the x value of U. I can do my calculation with an U-value from the lookup table, but then the return value has the wrong type. typeid(vf.internalField()[0][0]).name() gave me "d" as datatype of this. Is there in OpenFoam a datatype d? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The initial values file does not contain any field solution data | jiguozhao | CFX | 1 | January 28, 2011 06:24 |
[OpenFOAM] Cell Data to Point Data Issues | mcintoshjamie | ParaView | 2 | November 19, 2009 04:55 |
Field data | Jorge | Siemens | 1 | November 29, 2005 12:31 |
How to access acceleration of steady Euler field? | winnie | FLUENT | 0 | May 2, 2003 23:53 |
access to FIDAP-internal data from within a UDF | Ingo Meisel | FLUENT | 0 | April 17, 2001 12:58 |