|
[Sponsors] |
January 15, 2008, 19:38 |
Hi,
What is the number of
|
#1 |
New Member
J. T.
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
Hi,
What is the number of components of the Bmean tensor in the results of tutorial/channelOodles/channel395 ? foamToVTK marks the tensor has 6 components but saves 9 for each of them. Thanks, JT Bmean 6 60000 float followed by 540000 values (60000 * 9) |
|
January 30, 2008, 22:01 |
Found the reason for the probl
|
#2 |
New Member
J. T.
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
Found the reason for the problem: the 6 components symmTensor is saved as a regular 9 components tensor. I have a fix but don't know how to attach the files, can someone let me know how to submit the fix.
Thanks. |
|
January 31, 2008, 05:00 |
See the Documentation->Formatt
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
See the Documentation->Formatting on the left: \attach
Alternatively tell us what you've changed. |
|
January 31, 2008, 13:41 |
The writeFuns::write function
|
#4 |
New Member
J. T.
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
The writeFuns::write function uses the insert function to convert the symmTensor into a scalar list:
void Foam::writeFuns::write(*) { ...... insert(vvf.internalField(), fField); ...... write(os, binary, fField); } The insert function is defined for scalar, vector and tensor only, not defined for symmTensor, so the one for tensor is used symmTensor. Add the following two insert function in Foam::writeFuns can solve the problem: void Foam::writeFuns::insert(const symmTensor& pt, DynamicList<floatscalar>& dest) { for (direction cmpt = 0; cmpt < symmTensor::nComponents; cmpt++) { dest.append(float(pt[cmpt])); } } void Foam::writeFuns::insert(const sphericalTensor& pt, DynamicList<floatscalar>& dest) { for (direction cmpt = 0; cmpt < sphericalTensor::nComponents; cmpt++) { dest.append(float(pt[cmpt])); } } |
|
January 31, 2008, 14:57 |
Thanks.
Just so people don'
|
#5 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Thanks.
Just so people don't make the same mistake I made (board converted floatScalar to all lower case) here are the corrected files for 1.4.1. writeFuns.C writeFuns.H |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange foamToVTK problem | hsieh | OpenFOAM Running, Solving & CFD | 5 | April 24, 2023 21:12 |
FoamToVTK and MayaVi | alexandrepereira | OpenFOAM Post-Processing | 57 | August 11, 2008 04:15 |
FoamToVTK output names | hartinger | OpenFOAM Post-Processing | 2 | March 29, 2007 06:49 |
[OpenFOAM] FoamToVTK problem | oevermann | ParaView | 6 | July 11, 2006 15:10 |
[OpenFOAM] FoamToVTK error with OF 13 | melanie | ParaView | 1 | May 22, 2006 04:40 |