CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Unable to retrieve anything from surfaceInterpolate function (https://www.cfd-online.com/Forums/openfoam-post-processing/242292-unable-retrieve-anything-surfaceinterpolate-function.html)

sunagra27 April 14, 2022 02:33

Unable to retrieve anything from surfaceInterpolate function
 
Hi,

I am running a steady state simulation. For post-processing, I am trying to get the surfaceField using surfaceInterpolate function. Below is the functional code implemented in "system" folder. After running the simulations, I am unable to retrieve any data from it. The simulation runs correrctly.

Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    |
    \\  /    A nd          | Web:      www.OpenFOAM.org
    \\/    M anipulation  |
-------------------------------------------------------------------------------
Description
    Interpolates the volume field values to surface linearly.

\*---------------------------------------------------------------------------*/

surfaceInterpolate1
{
    // Mandatory entries
    type            surfaceInterpolate;
    libs            ("libfieldFunctionObjects.so");
    fields          (T TInterp);

    // Optional (inherited) entries
 
    region          patch;
    enabled        true;
    log            true;
    timeStart      0;
    timeEnd        100;
    executeControl  runTime;
    executeInterval 1;
    writeControl    runTime;
    writeInterval  1;
 
}

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

I have added the file in the controlDict as:


Code:

functions
 {

  #includeFunc surfaceInterpolate1  //File name given in system folder
 }

Where do I look for the output?

Regards,
Sunag R A.

skaal March 14, 2023 05:36

I just had a similar issue and will document the solution I found:


In controlDict:

Code:

functions
{
    surfaceInterpolate
    {
        type            surfaceInterpolate;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        log            yes;
        writeFields    yes;
        field          p;
        result          pf;
    }

}

This will interpolate the pressure p to the surfaceScalarField pf which is then available for further processing steps.


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