CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

nearWallFields error in postProcessing

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2018, 16:57
Default nearWallFields error in postProcessing
  #1
New Member
 
Lorenzo
Join Date: Jul 2018
Posts: 4
Rep Power: 3
wilove is on a distinguished road
I'm trying to calculate the UNear field of my simulation but I run always in 2 error.

I execute this command line:
Code:
simpleFoam -postProcess -field U -func nearWallFields -latestTime
and I obtain this
Code:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 6-1a0c91b3baa8
Exec : simpleFoam -postProcess -field U -func nearWallFields -latestTime
Date : Sep 23 2018
Time : 19:38:13
Host : "lorenzo-SATELLITE-P755"
PID : 21855
I/O : uncollated
Case : /home/lorenzo/OpenFOAM/lorenzo-6/run/Muso0
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 700

SIMPLE: Convergence criteria found
U: tolerance 1e-05
"p.*": tolerance 1e-05
k: tolerance 1e-05
omega: tolerance 1e-05


--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 19 the punctuation token '('

file: /home/lorenzo/OpenFOAM/lorenzo-6/run/Muso0/system/nearWallFields.nearWallFields.fields at line 19.

From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

Therefore I remove the brackets from the nearWallFields file, I execute the first command line again and I get the opposite error.


Code:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 6-1a0c91b3baa8
Exec : simpleFoam -postProcess -field U -func nearWallFields -latestTime
Date : Sep 23 2018
Time : 19:41:36
Host : "lorenzo-SATELLITE-P755"
PID : 22463
I/O : uncollated
Case : /home/lorenzo/OpenFOAM/lorenzo-6/run/Muso0
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 700

SIMPLE: Convergence criteria found
U: tolerance 1e-05
"p.*": tolerance 1e-05
k: tolerance 1e-05
omega: tolerance 1e-05

--> FOAM FATAL IO ERROR:
Expected a '(' while reading Tuple2, found on line 19 the word 'U'

file: /home/lorenzo/OpenFOAM/lorenzo-6/run/Muso0/system/nearWallFields.nearWallFields.fields at line 19.

From function Foam::Istream& Foam::Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 92.

If you need to see the nearWallFields file here it is:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

// Interpolate U to create near-wall UNear
nearWallFields
{
functionObjectLibs ("libfieldFunctionObjects.so");
type nearWallFields;
writeControl writeTime;
executeControl writeTime;

fields
(
U UNear
);

patches (solid_0_Pilota solid_0_Muso solid_0_Monoscocca_DPX_Solida solid_0_FW solid_0_Ant);
distance 0.001;
}

// *********************************************************************** //

I really don't know what I'm doing wrong… Any help is really appreciated!

Thank you in advance
wilove is offline   Reply With Quote

Old   February 14, 2019, 05:34
Default
  #2
New Member
 
Matteo Pischiutta
Join Date: Mar 2012
Location: Milano, Italy
Posts: 1
Rep Power: 0
matpisk is on a distinguished road
Hi Lorenzo,
did you solve this?
I've the same problem, I'm not able to run nearWallFields in postProcessing.
Thanks
Matteo
matpisk is offline   Reply With Quote

Old   February 26, 2019, 01:19
Default
  #3
New Member
 
Lorenzo
Join Date: Jul 2018
Posts: 4
Rep Power: 3
wilove is on a distinguished road
Unfortunately I did not.
wilove is offline   Reply With Quote

Old   March 4, 2019, 07:46
Default
  #4
New Member
 
Join Date: Oct 2017
Posts: 20
Rep Power: 4
Krapf is on a distinguished road
Hi wilove, hi matpisk,

I'm not able to use nearWallFields in post processing, too. Maybe this is not possible? Because if you check
Code:
postProcess -list
nearWallFields it doesn't appear in the list.
The only way I managed to get it working, was to add it to the controlDict file and compute it during the simulation.

Kind regards,
Krapf
Krapf is offline   Reply With Quote

Old   April 11, 2019, 04:37
Default
  #5
Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 88
Rep Power: 9
Yann is on a distinguished road
Hello Guys,

Lorenzo, I'm not sure whether your tried it or not, but my best bet is that your nearWallFields function object misses two brackets.
It should be written this way :

Code:
fields
(
    (U UNear)
);
Generally speaking, this is a good habit to refer to the headers in the source code to get information and usage examples.
Here you get everything you need from the $FOAM_SRC/functionObjects/field/nearWallFields/nearWallFields.H :

Code:
 [...]

 Description
    Samples near-patch volume fields.

    Fields are stored
    - every time step the field is updated with new values
    - at output it writes the fields

    This functionObject can either be used
    - to calculate a new field as a  post-processing step or
    - since the fields are registered, used in another functionObject

    Example of function object specification:
    \verbatim
    nearWallFields1
    {
        type        nearWallFields;
        libs        ("libfieldFunctionObjects.so");

        writeControl writeTime;

        fields
        (
            (p pNear)
            (U UNear)
        );

        patches     (movingWall);

        distance    0.13;
    }
    \endverbatim

Usage
    \table
        Property | Description               | Required    | Default value
        type     | type name: nearWallFields | yes         |
        fields   | list of fields with correspoding output field names | yes |
        patches  | list of patches to sample | yes         |
        distance | distance from patch to sample | yes     |
    \endtable

 [...]

Let us know if it solves your problem.

Yann
Yann is offline   Reply With Quote

Reply

Tags
error, nearwallfields, openfoam, postprocessing, simplefoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to export the specific heat and viscosity for postprocessing (compressible) ? david39 OpenFOAM Post-Processing 2 January 4, 2019 08:04
using fieldAverage library to average postprocessing eelcovv OpenFOAM Programming & Development 30 July 9, 2017 07:53
Postprocessing in 3d - Creating part of a surface shankara.2 FLUENT 0 July 13, 2009 18:33
Question about Postprocessing Using UDF(in tutoria sarah_ron2002 FLUENT 1 April 10, 2007 17:17
postprocessing bas rijkse FLUENT 0 July 5, 2001 09:30


All times are GMT -4. The time now is 14:30.