View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001416 | OpenFOAM | Bug | public | 2014-10-17 12:05 | 2015-10-22 10:02 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | suspended | ||
OS | Linux OpenSuse 13.1 | OS Version | 13.1 | ||
Summary | 0001416: Vector or Tensor Fields cannot be accessed using U.components | ||||
Description | As described by http://www.openfoam.org/docs/user/sample.php the components of vector and tensor fields should be accessible by the sample function by using U.component(0). This is also used in the shockTube-tutorial of rhoCentralFoam ($FOAM_INST_DIR/tutorials/compressible/rhoCentralFoam/shockTube). But running the tutorial with the AllRun script and using sample gives no output for the velocity component. | ||||
Steps To Reproduce | 1. Run the tutorial case stated above 2. Use sample with the dictionary in the system folder 3. check postProcessing/sets | ||||
Additional Information | Furthermore I tried to sample an isosurface with the Ux during calculation of my simulation using this at the end of my controllDict: functions { #include "isosurfaces" } with this "isosurfaces"-File in my system folder. isosurface { type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; surfaceFormat vtk; fields ( U.component(0) ); interpolationScheme cellPoint; surfaces ( isosurface { type isoSurface; isoField U.component(0); isoValue 0.0; interpolate true; } ); } then I get this error: --> FOAM FATAL IO ERROR: cannot find file file: /home/ba2282/OpenFOAM/ba2282-2.3.x/run/61_AMD_VORVERSUCHE/multiphase/mesh_dyM/GLYCERIN_84.4m%_GLR_0.6/1.19195466026e-07/U.component(0) at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 73. FOAM exiting I checked the syntax of my files because sampling of volScalarFields like T works with this functionObject. | ||||
Tags | No tags attached. | ||||
|
|
|
|
|
|
|
I did a bit of digital time travelling into OpenFOAM's past and here's what I could find out: 1- The User Guide for OpenFOAM 1.6.* was the last one that had a reference to this feature in one of the tables, as shown in image "Excerpt from User Guide 1.6.png". For comparison, the respective table in the User Guide for OpenFOAM 1.7.* is shown in image "Excerpt from User Guide 1.7.png". 2- As ThomasM87 points out, there is still a remnant in the User Guide to this date, referring to this feature. It's shown in the image "Excerpt that is still present to this day.png". I'm still looking through the evolutions of OpenFOAM's source code, to see if I can figure out how it was once implemented and to see if there is a possibility to either implement this code again or not. ---------------- But my guess is that this kind of sampling has been shifted to relying on the "foamCalc" utility or the function object "calcMag" to generate the necessary intermediate fields for sampling. This way it makes things more generic and this way it's not necessary to meld code into the sampling infrastructure. In this light, it seems that this results in two tasks: a) Feature request to have "foamCalc" available as a function object as well... namely, to further extend the function object library "src/postProcessing/functionObjects/fvTools" to use all of the available features at "src/postProcessing/foamCalcFunctions". b) Updating the documentation to rephrase the text represented in the image "Excerpt that is still present to this day.png". |
|
Additional historic note: the utility "sample" was pretty much rewritten for OpenFOAM 1.5. This was when this feature of processing components and magnitudes was dropped from being done directly in "sample". In theory, it seems possible to re-implement this by using a few little pieces of code as reference from the old code from OpenFOAM 1.4.1 and using them in "src/sampling/sampledSet/sampledSets" and "src/sampling/sampledSurface/sampledSurfaces". But from I know about OpenFOAM's source code evolution, this would not be the intended evolutionary direction, but instead be in favour of "a)" on my previous comment. |
|
Pending funding or code contribution. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-10-17 12:05 |
|
New Issue | |
2015-02-15 14:31 | wyldckat | File Added: Excerpt from User Guide 1.6.png | |
2015-02-15 14:31 | wyldckat | File Added: Excerpt User Guide 1.7.png | |
2015-02-15 14:31 | wyldckat | File Added: Excerpt that is still present to this day.png | |
2015-02-15 14:48 | wyldckat | Note Added: 0003780 | |
2015-02-15 15:10 | wyldckat | Note Added: 0003781 | |
2015-10-22 10:01 | henry | Note Added: 0005460 | |
2015-10-22 10:01 | henry | Status | new => closed |
2015-10-22 10:02 | henry | Assigned To | => henry |
2015-10-22 10:02 | henry | Resolution | open => suspended |